diff --git a/CNAME b/CNAME new file mode 100644 index 000000000..1013752b1 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +example.rarible.org diff --git a/asset-manifest.json b/asset-manifest.json new file mode 100644 index 000000000..1131dd1b2 --- /dev/null +++ b/asset-manifest.json @@ -0,0 +1,22 @@ +{ + "files": { + "main.js": "/static/js/main.4918d51a.chunk.js", + "main.js.map": "/static/js/main.4918d51a.chunk.js.map", + "runtime-main.js": "/static/js/runtime-main.cda067ba.js", + "runtime-main.js.map": "/static/js/runtime-main.cda067ba.js.map", + "static/js/2.6eab0e3c.chunk.js": "/static/js/2.6eab0e3c.chunk.js", + "static/js/2.6eab0e3c.chunk.js.map": "/static/js/2.6eab0e3c.chunk.js.map", + "static/js/3.b445a58f.chunk.js": "/static/js/3.b445a58f.chunk.js", + "static/js/3.b445a58f.chunk.js.map": "/static/js/3.b445a58f.chunk.js.map", + "static/js/4.e7bff840.chunk.js": "/static/js/4.e7bff840.chunk.js", + "static/js/4.e7bff840.chunk.js.map": "/static/js/4.e7bff840.chunk.js.map", + "index.html": "/index.html", + "static/js/2.6eab0e3c.chunk.js.LICENSE.txt": "/static/js/2.6eab0e3c.chunk.js.LICENSE.txt", + "static/js/3.b445a58f.chunk.js.LICENSE.txt": "/static/js/3.b445a58f.chunk.js.LICENSE.txt" + }, + "entrypoints": [ + "static/js/runtime-main.cda067ba.js", + "static/js/2.6eab0e3c.chunk.js", + "static/js/main.4918d51a.chunk.js" + ] +} \ No newline at end of file diff --git a/favicon.png b/favicon.png new file mode 100644 index 000000000..8ff911b75 Binary files /dev/null and b/favicon.png differ diff --git a/index.html b/index.html new file mode 100644 index 000000000..9092aef7b --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +Rarible SDK Example App
\ No newline at end of file diff --git a/logo512.png b/logo512.png new file mode 100644 index 000000000..7b1ea9dfe Binary files /dev/null and b/logo512.png differ diff --git a/manifest.json b/manifest.json new file mode 100644 index 000000000..5b17db391 --- /dev/null +++ b/manifest.json @@ -0,0 +1,20 @@ +{ + "short_name": "Rarible Example", + "name": "Rarible SDK Example App", + "icons": [ + { + "src": "favicon.png", + "sizes": "512x512 64x64 32x32 24x24 16x16", + "type": "image/png" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#feda08" +} diff --git a/robots.txt b/robots.txt new file mode 100644 index 000000000..e9e57dc4d --- /dev/null +++ b/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/static/js/2.6eab0e3c.chunk.js b/static/js/2.6eab0e3c.chunk.js new file mode 100644 index 000000000..be6422653 --- /dev/null +++ b/static/js/2.6eab0e3c.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.6eab0e3c.chunk.js.LICENSE.txt */ +(this.webpackJsonpexample=this.webpackJsonpexample||[]).push([[2],[function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(387);function a(){a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(O){f=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var a=t&&t.prototype instanceof p?t:p,o=Object.create(a.prototype),s=new B(n||[]);return i(o,"_invoke",{value:E(e,r,s)}),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(O){return{type:"throw",arg:O}}}e.wrap=d;var h={};function p(){}function b(){}function m(){}var g={};f(g,s,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(I([])));y&&y!==t&&r.call(y,s)&&(g=y);var A=m.prototype=p.prototype=Object.create(g);function w(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function a(i,o,s,c){var u=l(e[i],e,o);if("throw"!==u.type){var f=u.arg,d=f.value;return d&&"object"==Object(n.a)(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){a("next",e,s,c)}),(function(e){a("throw",e,s,c)})):t.resolve(d).then((function(e){f.value=e,s(f)}),(function(e){return a("throw",e,s,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){a(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function E(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return S()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=_(o,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var a=l(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,h;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;k(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(873);function a(e,t){for(var r=0;r=256)return!1}return!0}function u(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),i(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),h(e)){var o=e.substring(2);o.length%2&&("left"===t.hexPad?o="0"+o:"right"===t.hexPad?o+="0":n.throwArgumentError("hex data is odd-length","value",e));for(var s=[],u=0;ut&&n.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),i(r)}function h(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}var p="0123456789abcdef";function b(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r=p[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"===typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(c(e)){for(var i="0x",o=0;o>4]+p[15&s]}return i}return n.throwArgumentError("invalid hexlify value","value",e)}function m(e){if("string"!==typeof e)e=b(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function g(e,t,r){return"string"!==typeof e?e=b(e):(!h(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function v(e){var t="0x";return e.forEach((function(e){t+=b(e).substring(2)})),t}function y(e){var t=A(b(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function A(e){"string"!==typeof e&&(e=b(e)),h(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function x(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(o(e)){var r=u(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=b(r.slice(0,32)),t.s=b(r.slice(32,64))):65===r.length?(t.r=b(r.slice(0,32)),t.s=b(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=b(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var a=l(u(t._vs),32);t._vs=b(a);var i=a[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),a[0]&=127;var s=b(a);null==t.s?t.s=s:t.s!==s&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var c=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==c&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&h(t.r)?t.r=w(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=w(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);var f=u(t.s);f[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(f[0]|=128);var d=b(f);t._vs&&(h(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=w(t._vs,32)),null==t._vs?t._vs=d:t._vs!==d&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function E(e){return b(f([(e=x(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return T})),r.d(t,"b",(function(){return F})),r.d(t,"c",(function(){return I})),r.d(t,"d",(function(){return R})),r.d(t,"e",(function(){return W})),r.d(t,"f",(function(){return S})),r.d(t,"g",(function(){return P})),r.d(t,"h",(function(){return N})),r.d(t,"i",(function(){return L})),r.d(t,"j",(function(){return U})),r.d(t,"k",(function(){return Q})),r.d(t,"l",(function(){return G})),r.d(t,"m",(function(){return H})),r.d(t,"n",(function(){return z})),r.d(t,"o",(function(){return q})),r.d(t,"p",(function(){return K})),r.d(t,"q",(function(){return V}));var n=r(843),a=r(842),i=r(434),o=r(844);var s=r(25),c=r(0),u=r(33),f=r(27),d=r(14),l=r(222),h=r(2),p=r(1),b=r(23),m=r(7),g=r(8),v=r(43),y=["message"],A=Object(c.a)().mark(C),w=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(e,n){var a,i;Object(p.a)(this,r);var o=e.message,s=Object(l.a)(e,y),c=e.path,u=0===c.length?o:"At path: "+c.join(".")+" -- "+o;return a=t.call(this,u),Object.assign(Object(b.a)(a),s),a.name=a.constructor.name,a.failures=function(){var t;return null!=(t=i)?t:i=[e].concat(Object(d.a)(n()))},a}return Object(h.a)(r)}(Object(v.a)(TypeError));function x(e){return"object"===typeof e&&null!=e}function E(e){return"string"===typeof e?JSON.stringify(e):""+e}function _(e,t,r,n){if(!0!==e){!1===e?e={}:"string"===typeof e&&(e={message:e});var a=t.path,i=t.branch,o=r.type,s=e,c=s.refinement,u=s.message,d=void 0===u?"Expected a value of type `"+o+"`"+(c?" with refinement `"+c+"`":"")+", but received: `"+E(n)+"`":u;return Object(f.a)(Object(f.a)({value:n,type:o,refinement:c,key:a[a.length-1],path:a,branch:i},e),{},{message:d})}}function C(e,t,r,n){var a,i,o,s;return Object(c.a)().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:x(f=e)&&"function"===typeof f[Symbol.iterator]||(e=[e]),a=Object(u.a)(e),c.prev=2,a.s();case 4:if((i=a.n()).done){c.next=12;break}if(o=i.value,!(s=_(o,t,r,n))){c.next=10;break}return c.next=10,s;case 10:c.next=4;break;case 12:c.next=17;break;case 14:c.prev=14,c.t0=c.catch(2),a.e(c.t0);case 17:return c.prev=17,a.f(),c.finish(17);case 20:case"end":return c.stop()}var f}),A,null,[[2,14,17,20]])}function k(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(c.a)().mark((function n(){var a,i,o,f,l,h,p,b,m,g,v,y,A,w,E,_,C,B,I,S,O,M,D,T,F,R,P;return Object(c.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=r.path,i=void 0===a?[]:a,o=r.branch,f=void 0===o?[e]:o,l=r.coerce,h=void 0!==l&&l,p=r.mask,b=void 0!==p&&p,m={path:i,branch:f},h&&(e=t.coercer(e,m),b&&"type"!==t.type&&x(t.schema)&&x(e)&&!Array.isArray(e)))for(g in e)void 0===t.schema[g]&&delete e[g];v=!0,y=Object(u.a)(t.validator(e,m)),n.prev=5,y.s();case 7:if((A=y.n()).done){n.next=14;break}return w=A.value,v=!1,n.next=12,[w,void 0];case 12:n.next=7;break;case 14:n.next=19;break;case 16:n.prev=16,n.t0=n.catch(5),y.e(n.t0);case 19:return n.prev=19,y.f(),n.finish(19);case 22:E=Object(u.a)(t.entries(e,m)),n.prev=23,E.s();case 25:if((_=E.n()).done){n.next=52;break}C=Object(s.a)(_.value,3),B=C[0],I=C[1],S=C[2],O=k(I,S,{path:void 0===B?i:[].concat(Object(d.a)(i),[B]),branch:void 0===B?f:[].concat(Object(d.a)(f),[I]),coerce:h,mask:b}),M=Object(u.a)(O),n.prev=29,M.s();case 31:if((D=M.n()).done){n.next=42;break}if(!(T=D.value)[0]){n.next=39;break}return v=!1,n.next=37,[T[0],void 0];case 37:n.next=40;break;case 39:h&&(I=T[1],void 0===B?e=I:e instanceof Map?e.set(B,I):e instanceof Set?e.add(I):x(e)&&(e[B]=I));case 40:n.next=31;break;case 42:n.next=47;break;case 44:n.prev=44,n.t1=n.catch(29),M.e(n.t1);case 47:return n.prev=47,M.f(),n.finish(47);case 50:n.next=25;break;case 52:n.next=57;break;case 54:n.prev=54,n.t2=n.catch(23),E.e(n.t2);case 57:return n.prev=57,E.f(),n.finish(57);case 60:if(!v){n.next=79;break}F=Object(u.a)(t.refiner(e,m)),n.prev=62,F.s();case 64:if((R=F.n()).done){n.next=71;break}return P=R.value,v=!1,n.next=69,[P,void 0];case 69:n.next=64;break;case 71:n.next=76;break;case 73:n.prev=73,n.t3=n.catch(62),F.e(n.t3);case 76:return n.prev=76,F.f(),n.finish(76);case 79:if(!v){n.next=82;break}return n.next=82,[void 0,e];case 82:case"end":return n.stop()}}),n,null,[[5,16,19,22],[23,54,57,60],[29,44,47,50],[62,73,76,79]])}))()}var B=function(){function e(t){var r=this;Object(p.a)(this,e);var n=t.type,a=t.schema,i=t.validator,o=t.refiner,s=t.coercer,u=void 0===s?function(e){return e}:s,f=t.entries,d=void 0===f?Object(c.a)().mark((function e(){return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})):f;this.type=n,this.schema=a,this.entries=d,this.coercer=u,this.validator=i?function(e,t){return C(i(e,t),t,r,e)}:function(){return[]},this.refiner=o?function(e,t){return C(o(e,t),t,r,e)}:function(){return[]}}return Object(h.a)(e,[{key:"assert",value:function(e){return I(e,this)}},{key:"create",value:function(e){return S(e,this)}},{key:"is",value:function(e){return O(e,this)}},{key:"mask",value:function(e){return function(e,t){var r=M(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}(e,this)}},{key:"validate",value:function(e){return M(e,this,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}]),e}();function I(e,t){var r=M(e,t);if(r[0])throw r[0]}function S(e,t){var r=M(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}function O(e,t){return!M(e,t)[0]}function M(e,t){var r=k(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n=function(e){var t=e.next(),r=t.done,n=t.value;return r?void 0:n}(r);return n[0]?[new w(n[0],Object(c.a)().mark((function e(){var t,n,a;return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(u.a)(r),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(!(a=n.value)[0]){e.next=8;break}return e.next=8,a[0];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])}))),void 0]:[void 0,n[1]]}function D(e,t){return new B({type:e,schema:null,validator:t})}function T(){return D("any",(function(){return!0}))}function F(e){return new B({type:"array",schema:e,entries:Object(c.a)().mark((function t(r){var n,a,i,o,f;return Object(c.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e||!Array.isArray(r)){t.next=18;break}n=Object(u.a)(r.entries()),t.prev=2,n.s();case 4:if((a=n.n()).done){t.next=10;break}return i=Object(s.a)(a.value,2),o=i[0],f=i[1],t.next=8,[o,f,e];case 8:t.next=4;break;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(2),n.e(t.t0);case 15:return t.prev=15,n.f(),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[2,12,15,18]])})),coercer:function(e){return Array.isArray(e)?e.slice():e},validator:function(e){return Array.isArray(e)||"Expected an array value, but received: "+E(e)}})}function R(){return D("boolean",(function(e){return"boolean"===typeof e}))}function P(e){return D("instance",(function(t){return t instanceof e||"Expected a `"+e.name+"` instance, but received: "+E(t)}))}function N(e){var t=E(e),r=typeof e;return new B({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:function(r){return r===e||"Expected the literal `"+t+"`, but received: "+E(r)}})}function j(){return D("never",(function(){return!1}))}function L(e){return new B(Object(f.a)(Object(f.a)({},e),{},{validator:function(t,r){return null===t||e.validator(t,r)},refiner:function(t,r){return null===t||e.refiner(t,r)}}))}function U(){return D("number",(function(e){return"number"===typeof e&&!isNaN(e)||"Expected a number, but received: "+E(e)}))}function Q(e){return new B(Object(f.a)(Object(f.a)({},e),{},{validator:function(t,r){return void 0===t||e.validator(t,r)},refiner:function(t,r){return void 0===t||e.refiner(t,r)}}))}function G(e,t){return new B({type:"record",schema:null,entries:Object(c.a)().mark((function r(n){var a,i;return Object(c.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!x(n)){r.next=11;break}r.t0=Object(c.a)().keys(n);case 2:if((r.t1=r.t0()).done){r.next=11;break}return a=r.t1.value,i=n[a],r.next=7,[a,a,e];case 7:return r.next=9,[a,i,t];case 9:r.next=2;break;case 11:case"end":return r.stop()}}),r)})),validator:function(e){return x(e)||"Expected an object, but received: "+E(e)}})}function H(){return D("string",(function(e){return"string"===typeof e||"Expected a string, but received: "+E(e)}))}function z(e){var t=j();return new B({type:"tuple",schema:null,entries:Object(c.a)().mark((function r(n){var a,i;return Object(c.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!Array.isArray(n)){r.next=9;break}a=Math.max(e.length,n.length),i=0;case 3:if(!(i"},f=function(e,t){return{key:e,type:t}},d=function(e,t,r,n){for(var a=e.length,i=Array(a+1),o=0;o"),new W(t,(function(t){return T.is(t)&&t.every(e.is)}),(function(t,r){var a=T.validate(t,r);if(Object(n.b)(a))return a;for(var i=a.right,o=i.length,s=i,c=[],u=0;u0?l(c):p(s)}),e.encode===c?c:function(t){return t.map(e.encode)},e)},J=function(e){function t(t,r,n,a,i){var o=e.call(this,t,r,n,a)||this;return o.props=i,o._tag="InterfaceType",o}return a(t,e),t}(s),X=function(e){return Object.keys(e).map((function(t){return t+": "+e[t].name})).join(", ")},Z=function(e){for(var t=0;t0?l(f):p(u)}),Z(a)?c:function(e){for(var t=i({},e),n=0;n"},ne=function(e,t){void 0===t&&(t=re($(e)));var r=Object.keys(e),a=r.map((function(t){return e[t]})),o=r.length;return new te(t,(function(t){if(R.is(t)){for(var n=0;n0?l(f):p(u)}),Z(a)?c:function(e){for(var t=i({},e),n=0;n0?l(u):p(f||Object.keys(s).length!==i?c:s)}),r.encode===c?c:function(t){for(var n={},a=0;a0?l(o):p(u?i:r)}return ze(t)&&Array.isArray(r)?p(r):h(r,a)}),e.encode===c&&t.encode===c?c:function(r){for(var n={},a=Object.keys(r),i=a.length,o=0;o0){var a=r[0],i=r[1],o=i.length,s=function(e){for(var t=0;t0?l(o):p(de(t,i))},0===e.length?c:function(t){return de(t,e.map((function(e){return e.encode(t)})))},e)}var he=function(e){function t(t,r,n,a,i){var o=e.call(this,t,r,n,a)||this;return o.types=i,o._tag="TupleType",o}return a(t,e),t}(s);function pe(e,t){void 0===t&&(t="["+e.map((function(e){return e.name})).join(", ")+"]");var r=e.length;return new he(t,(function(t){return T.is(t)&&t.length===r&&e.every((function(e,r){return e.is(t[r])}))}),(function(t,a){var i=T.validate(t,a);if(Object(n.b)(i))return i;for(var o=i.right,s=o.length>r?o.slice(0,r):o,c=[],u=0;u0?l(c):p(s)}),Z(e)?c:function(t){return e.map((function(e,r){return e.encode(t[r])}))},e)}var be=function(e){function t(t,r,n,a,i){var o=e.call(this,t,r,n,a)||this;return o.type=i,o._tag="ReadonlyType",o}return a(t,e),t}(s),me=function(e,t){return void 0===t&&(t="Readonly<"+e.name+">"),new be(t,e.is,e.validate,e.encode,e)},ge=function(e){function t(t,r,n,a,i){var o=e.call(this,t,r,n,a)||this;return o.type=i,o._tag="ReadonlyArrayType",o}return a(t,e),t}(s),ve=function(e,t){void 0===t&&(t="ReadonlyArray<"+e.name+">");var r=Y(e);return new ge(t,r.is,r.validate,r.encode,e)},ye=function(e,t){return Ce(ee(e),t)},Ae=function(e){function t(t,r,n,a,i,o){var s=e.call(this,t,r,n,a,i)||this;return s.tag=o,s}return a(t,e),t}(se),we=function(e,t,r){void 0===r&&(r=ce(t));var n=ue(t,r);return n instanceof Ae?n:(console.warn("[io-ts] Cannot build a tagged union for "+r+", returning a de-optimized union"),new Ae(r,n.is,n.validate,n.encode,t,e))},xe=function(e){function t(t,r,n,a,i){var o=e.call(this,t,r,n,a)||this;return o.type=i,o._tag="ExactType",o}return a(t,e),t}(s),Ee=function e(t){switch(t._tag){case"RefinementType":case"ReadonlyType":return e(t.type);case"InterfaceType":case"StrictType":case"PartialType":return t.props;case"IntersectionType":return t.types.reduce((function(t,r){return Object.assign(t,e(r))}),{})}},_e=function(e,t){for(var r=Object.getOwnPropertyNames(e),n=!1,a={},i=0;i"}(e));var r=Ee(e);return new xe(t,e.is,(function(t,a){var i=R.validate(t,a);if(Object(n.b)(i))return i;var o=e.validate(t,a);return Object(n.b)(o)?o:Object(n.d)(_e(o.right,r))}),(function(t){return e.encode(_e(t,r))}),e)},ke=function(e,t){return{value:e,context:t}},Be=function(e){return[{key:"",type:e}]},Ie=function(e){function t(){var t=e.call(this,"never",(function(e){return!1}),(function(e,t){return h(e,t)}),(function(){throw new Error("cannot encode never")}))||this;return t._tag="NeverType",t}return a(t,e),t}(s),Se=new Ie,Oe=function(e){function t(){var t=e.call(this,"any",(function(e){return!0}),p,c)||this;return t._tag="AnyType",t}return a(t,e),t}(s),Me=new Oe,De=R,Te=function(e){function t(){var t=e.call(this,"object",(function(e){return null!==e&&"object"===typeof e}),(function(e,r){return t.is(e)?p(e):h(e,r)}),c)||this;return t._tag="ObjectType",t}return a(t,e),t}(s),Fe=new Te;function Re(e,t,r){return void 0===r&&(r="("+e.name+" | "+u(t)+")"),new j(r,(function(r){return e.is(r)&&t(r)}),(function(r,a){var i=e.validate(r,a);if(Object(n.b)(i))return i;var o=i.right;return t(o)?p(o):h(o,a)}),e.encode,e,t)}var Pe=Re(B,Number.isInteger,"Integer"),Ne=oe,je=function(e){function t(t,r,n,a,i){var o=e.call(this,t,r,n,a)||this;return o.props=i,o._tag="StrictType",o}return a(t,e),t}(s);function Le(e){return e}function Ue(e){return function(){return e}}var Qe=function(e){return e.length>0},Ge={};function He(e,t){for(var r=[],n=0,a=e;ns[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=h[15&t[i]];a.push(e+"=Uint8Array(0x"+r+")")}else a.push(e+"="+JSON.stringify(t))}catch(u){a.push(e+"="+JSON.stringify(n[e].toString()))}})),a.push("code=".concat(r)),a.push("version=".concat(this.version));var i=t,s="";switch(r){case d.NUMERIC_FAULT:s="NUMERIC_FAULT";var c=t;switch(c){case"overflow":case"underflow":case"division-by-zero":s+="-"+c;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case d.CALL_EXCEPTION:case d.INSUFFICIENT_FUNDS:case d.MISSING_NEW:case d.NONCE_EXPIRED:case d.REPLACEMENT_UNDERPRICED:case d.TRANSACTION_REPLACED:case d.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),a.length&&(t+=" ("+a.join(", ")+")");var u=new Error(t);return u.reason=i,u.code=r,Object.keys(n).forEach((function(e){u[e]=n[e]})),u}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),l&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:l})}},{key:"checkSafeUint53",value:function(t,r){"number"===typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return u||(u=new e("logger/5.6.0")),u}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),i){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}o=!!t,i=!!r}},{key:"setLogLevel",value:function(t){var r=s[t.toLowerCase()];null!=r?c=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();p.errors=d,p.levels=f},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(873);function a(e,t,r){return(t=Object(n.a)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){"use strict";r.d(t,"d",(function(){return u})),r.d(t,"e",(function(){return f})),r.d(t,"f",(function(){return d})),r.d(t,"b",(function(){return l})),r.d(t,"g",(function(){return h})),r.d(t,"c",(function(){return g})),r.d(t,"a",(function(){return v}));var n=r(2),a=r(1),i=r(0),o=r(11),s=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},c=new o.b("properties/5.6.0");function u(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function f(e,t){for(var r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function d(e){return s(this,void 0,void 0,Object(i.a)().mark((function t(){var r,n;return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.keys(e).map((function(t){var r=e[t];return Promise.resolve(r).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(r);case 3:return n=t.sent,t.abrupt("return",n.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))}function l(e,t){e&&"object"===typeof e||c.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((function(r){t[r]||c.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function h(e){var t={};for(var r in e)t[r]=e[r];return t}var p={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function b(e){if(void 0===e||null===e||p[typeof e])return!0;if(Array.isArray(e)||"object"===typeof e){if(!Object.isFrozen(e))return!1;for(var t=Object.keys(e),r=0;r=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(n)return Q(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return S(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,a){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"===typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,a);if("number"===typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,a){var i,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var f=-1;for(i=r;is&&(r=s-c),i=r;i>=0;i--){for(var d=!0,l=0;la&&(n=a):n=a;var i=t.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o>8,a=r%256,i.push(a),i.push(n);return i}(t,e.length-r),e,r,n)}function C(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a239?4:u>223?3:u>191?2:1;if(a+d<=r)switch(d){case 1:u<128&&(f=u);break;case 2:128===(192&(i=e[a+1]))&&(c=(31&u)<<6|63&i)>127&&(f=c);break;case 3:i=e[a+1],o=e[a+2],128===(192&i)&&128===(192&o)&&(c=(15&u)<<12|(63&i)<<6|63&o)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:i=e[a+1],o=e[a+2],s=e[a+3],128===(192&i)&&128===(192&o)&&128===(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(f=c)}null===f?(f=65533,d=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),a+=d}return function(e){var t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},c.prototype.compare=function(e,t,r,n,a){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(i,o),u=this.slice(n,a),f=e.slice(t,r),d=0;da)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;function I(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;an)&&(r=n);for(var a="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,r,n,a,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function F(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,i=Math.min(e.length-r,2);a>>8*(n?a:1-a)}function R(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,i=Math.min(e.length-r,4);a>>8*(n?a:3-a)&255}function P(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,i){return i||P(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,i){return i||P(e,0,r,8),a.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(a*=256);)n+=this[e+--t]*a;return n},c.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||D(e,t,this.length);for(var n=this[e],a=1,i=0;++i=(a*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||D(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),a.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||T(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+a]=e/i&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);T(this,e,t,r,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);T(this,e,t,r,a-1,-a)}var i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--a)e[a+t]=this[a+r];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(i=t;i55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function G(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function H(e,t,r,n){for(var a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}}).call(this,r(55))},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(1908).Buffer}catch(C){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,n){for(var a=0,i=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return a}i.isBN=function(e){return e instanceof i||null!==e&&"object"===typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=c(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(o=(a=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o>>24-a&16777215)||o!==this.length-1?f[6-c.length]+c+r:c+r,(a+=2)>=26&&(a-=26,o--)}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=d[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:f[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n("undefined"!==typeof o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,s,c="le"===t,u=new e(i),f=this.clone();if(c){for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],A=8191&y,w=y>>>13,x=0|o[4],E=8191&x,_=x>>>13,C=0|o[5],k=8191&C,B=C>>>13,I=0|o[6],S=8191&I,O=I>>>13,M=0|o[7],D=8191&M,T=M>>>13,F=0|o[8],R=8191&F,P=F>>>13,N=0|o[9],j=8191&N,L=N>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,Y=0|s[3],J=8191&Y,X=Y>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,Q))|0)+((8191&(a=(a=Math.imul(d,G))+Math.imul(l,Q)|0))<<13)|0;u=((i=Math.imul(l,G))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,Q),a=(a=Math.imul(p,G))+Math.imul(b,Q)|0,i=Math.imul(b,G);var ge=(u+(n=n+Math.imul(d,z)|0)|0)+((8191&(a=(a=a+Math.imul(d,q)|0)+Math.imul(l,z)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,Q),a=(a=Math.imul(g,G))+Math.imul(v,Q)|0,i=Math.imul(v,G),n=n+Math.imul(p,z)|0,a=(a=a+Math.imul(p,q)|0)+Math.imul(b,z)|0,i=i+Math.imul(b,q)|0;var ve=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,Q),a=(a=Math.imul(A,G))+Math.imul(w,Q)|0,i=Math.imul(w,G),n=n+Math.imul(g,z)|0,a=(a=a+Math.imul(g,q)|0)+Math.imul(v,z)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(p,V)|0,a=(a=a+Math.imul(p,W)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ye=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(a=(a=a+Math.imul(d,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((i=i+Math.imul(l,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,Q),a=(a=Math.imul(E,G))+Math.imul(_,Q)|0,i=Math.imul(_,G),n=n+Math.imul(A,z)|0,a=(a=a+Math.imul(A,q)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,q)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(p,J)|0,a=(a=a+Math.imul(p,X)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,X)|0;var Ae=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,Q),a=(a=Math.imul(k,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),n=n+Math.imul(E,z)|0,a=(a=a+Math.imul(E,q)|0)+Math.imul(_,z)|0,i=i+Math.imul(_,q)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(g,J)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,a=(a=a+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((i=i+Math.imul(l,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,Q),a=(a=Math.imul(S,G))+Math.imul(O,Q)|0,i=Math.imul(O,G),n=n+Math.imul(k,z)|0,a=(a=a+Math.imul(k,q)|0)+Math.imul(B,z)|0,i=i+Math.imul(B,q)|0,n=n+Math.imul(E,V)|0,a=(a=a+Math.imul(E,W)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(A,J)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,a=(a=a+Math.imul(p,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var xe=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,oe)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),a=(a=Math.imul(D,G))+Math.imul(T,Q)|0,i=Math.imul(T,G),n=n+Math.imul(S,z)|0,a=(a=a+Math.imul(S,q)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,q)|0,n=n+Math.imul(k,V)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(A,$)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(p,ie)|0,a=(a=a+Math.imul(p,oe)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,oe)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,Q),a=(a=Math.imul(R,G))+Math.imul(P,Q)|0,i=Math.imul(P,G),n=n+Math.imul(D,z)|0,a=(a=a+Math.imul(D,q)|0)+Math.imul(T,z)|0,i=i+Math.imul(T,q)|0,n=n+Math.imul(S,V)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,n=n+Math.imul(E,$)|0,a=(a=a+Math.imul(E,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(p,ce)|0,a=(a=a+Math.imul(p,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0;var _e=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),a=(a=Math.imul(j,G))+Math.imul(L,Q)|0,i=Math.imul(L,G),n=n+Math.imul(R,z)|0,a=(a=a+Math.imul(R,q)|0)+Math.imul(P,z)|0,i=i+Math.imul(P,q)|0,n=n+Math.imul(D,V)|0,a=(a=a+Math.imul(D,W)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,W)|0,n=n+Math.imul(S,J)|0,a=(a=a+Math.imul(S,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,a=(a=a+Math.imul(E,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(g,ce)|0,a=(a=a+Math.imul(g,ue)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,a=(a=a+Math.imul(p,le)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,le)|0;var Ce=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(a=(a=a+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((i=i+Math.imul(l,be)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,z),a=(a=Math.imul(j,q))+Math.imul(L,z)|0,i=Math.imul(L,q),n=n+Math.imul(R,V)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(S,$)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(E,ie)|0,a=(a=a+Math.imul(E,oe)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(A,ce)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,n=n+Math.imul(g,de)|0,a=(a=a+Math.imul(g,le)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0;var ke=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(a=(a=a+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),a=(a=Math.imul(j,W))+Math.imul(L,V)|0,i=Math.imul(L,W),n=n+Math.imul(R,J)|0,a=(a=a+Math.imul(R,X)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(E,ce)|0,a=(a=a+Math.imul(E,ue)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,le)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0;var Be=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(a=(a=a+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((i=i+Math.imul(v,be)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,J),a=(a=Math.imul(j,X))+Math.imul(L,J)|0,i=Math.imul(L,X),n=n+Math.imul(R,$)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(D,re)|0,a=(a=a+Math.imul(D,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(k,ce)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,n=n+Math.imul(E,de)|0,a=(a=a+Math.imul(E,le)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,le)|0;var Ie=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(a=(a=a+Math.imul(A,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,$),a=(a=Math.imul(j,ee))+Math.imul(L,$)|0,i=Math.imul(L,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(D,ie)|0,a=(a=a+Math.imul(D,oe)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,oe)|0,n=n+Math.imul(S,ce)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,le)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,le)|0;var Se=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(a=(a=a+Math.imul(E,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((i=i+Math.imul(_,be)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,re),a=(a=Math.imul(j,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(D,ce)|0,a=(a=a+Math.imul(D,ue)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,le)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(a=(a=a+Math.imul(k,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ie),a=(a=Math.imul(j,oe))+Math.imul(L,ie)|0,i=Math.imul(L,oe),n=n+Math.imul(R,ce)|0,a=(a=a+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,n=n+Math.imul(D,de)|0,a=(a=a+Math.imul(D,le)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,le)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(a=(a=a+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,ce),a=(a=Math.imul(j,ue))+Math.imul(L,ce)|0,i=Math.imul(L,ue),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,le)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,le)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(a=(a=a+Math.imul(D,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,de),a=(a=Math.imul(j,le))+Math.imul(L,de)|0,i=Math.imul(L,le);var Te=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(a=(a=a+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Fe=(u+(n=Math.imul(j,pe))|0)+((8191&(a=(a=Math.imul(j,be))+Math.imul(L,pe)|0))<<13)|0;return u=((i=Math.imul(L,be))+(a>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=Ae,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=_e,c[9]=Ce,c[10]=ke,c[11]=Be,c[12]=Ie,c[13]=Se,c[14]=Oe,c[15]=Me,c[16]=De,c[17]=Te,c[18]=Fe,0!==u&&(c[19]=u,r.length++),r};function b(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=h),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r.strip()}(this,e,t):b(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=a/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==f||u>=a);u--){var d=0|this.words[u];this.words[u]=f<<26-i|d>>>i,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this.strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,c=n.length-a.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(a,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,a=this.length-1;a>=0;a--)r=(t*r+(0|this.words[a]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*t;this.words[r]=a/e|0,t=a%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0===(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(f),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,l=1;0===(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new E(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function _(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},a(y,v),y.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=o}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new A;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return g[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,a),l=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),p=o;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var d=u>>f&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===f)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}c=26}return a},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new _(e)},a(_,E),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},_.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},_.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(98)(e))},function(e,t,r){"use strict";var n=r(624).default,a=r(403).default,i=r(203).default,o=r(111).default,s=r(37).default,c=r(38).default,u=r(21).default,f=r(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.s16=t.s8=t.nu64be=t.u48be=t.u40be=t.u32be=t.u24be=t.u16be=t.nu64=t.u48=t.u40=t.u32=t.u24=t.u16=t.u8=t.offset=t.greedy=t.Constant=t.UTF8=t.CString=t.Blob=t.Boolean=t.BitField=t.BitStructure=t.VariantLayout=t.Union=t.UnionLayoutDiscriminator=t.UnionDiscriminator=t.Structure=t.Sequence=t.DoubleBE=t.Double=t.FloatBE=t.Float=t.NearInt64BE=t.NearInt64=t.NearUInt64BE=t.NearUInt64=t.IntBE=t.Int=t.UIntBE=t.UInt=t.OffsetLayout=t.GreedyCount=t.ExternalLayout=t.bindConstructorLayout=t.nameWithProperty=t.Layout=t.uint8ArrayToBuffer=t.checkUint8Array=void 0,t.constant=t.utf8=t.cstr=t.blob=t.unionLayoutDiscriminator=t.union=t.seq=t.bits=t.struct=t.f64be=t.f64=t.f32be=t.f32=t.ns64be=t.s48be=t.s40be=t.s32be=t.s24be=t.s16be=t.ns64=t.s48=t.s40=t.s32=t.s24=void 0;var d=r(15);function l(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}function h(e){return l(e),d.Buffer.from(e.buffer,e.byteOffset,e.length)}t.checkUint8Array=l,t.uint8ArrayToBuffer=h;var p=function(){function e(t,r){if(u(this,e),!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=r}return f(e,[{key:"makeDestinationObject",value:function(){return{}}},{key:"getSpan",value:function(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}},{key:"replicate",value:function(e){var t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}},{key:"fromArray",value:function(e){}}]),e}();function b(e,t){return t.property?e+"["+t.property+"]":e}t.Layout=p,t.nameWithProperty=b,t.bindConstructorLayout=function(e,t){if("function"!==typeof e)throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof p))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=function(){return new e},Object.defineProperty(e.prototype,"encode",{value:function(e,r){return t.encode(this,e,r)},writable:!0}),Object.defineProperty(e,"decode",{value:function(e,r){return t.decode(e,r)},writable:!0})};var m=function(e){s(r,e);var t=c(r);function r(){return u(this,r),t.apply(this,arguments)}return f(r,[{key:"isCount",value:function(){throw new Error("ExternalLayout is abstract")}}]),r}(p);t.ExternalLayout=m;var g=function(e){s(r,e);var t=c(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,a=arguments.length>1?arguments[1]:void 0;if(u(this,r),!Number.isInteger(n)||0>=n)throw new TypeError("elementSpan must be a (positive) integer");return(e=t.call(this,-1,a)).elementSpan=n,e}return f(r,[{key:"isCount",value:function(){return!0}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;l(e);var r=e.length-t;return Math.floor(r/this.elementSpan)}},{key:"encode",value:function(e,t,r){return 0}}]),r}(m);t.GreedyCount=g;var v=function(e){s(r,e);var t=c(r);function r(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;if(u(this,r),!(e instanceof p))throw new TypeError("layout must be a Layout");if(!Number.isInteger(a))throw new TypeError("offset must be integer or undefined");return(n=t.call(this,e.span,i||e.property)).layout=e,n.offset=a,n}return f(r,[{key:"isCount",value:function(){return this.layout instanceof y||this.layout instanceof A}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.layout.decode(e,t+this.offset)}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.layout.encode(e,t,r+this.offset)}}]),r}(m);t.OffsetLayout=v;var y=function(e){s(r,e);var t=c(r);function r(e,n){var a;if(u(this,r),6<(a=t.call(this,e,n)).span)throw new RangeError("span must not exceed 6 bytes");return a}return f(r,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return h(e).readUIntLE(t,this.span)}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return h(t).writeUIntLE(e,r,this.span),this.span}}]),r}(p);t.UInt=y;var A=function(e){s(r,e);var t=c(r);function r(e,n){var a;if(u(this,r),6<(a=t.call(this,e,n)).span)throw new RangeError("span must not exceed 6 bytes");return a}return f(r,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return h(e).readUIntBE(t,this.span)}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return h(t).writeUIntBE(e,r,this.span),this.span}}]),r}(p);t.UIntBE=A;var w=function(e){s(r,e);var t=c(r);function r(e,n){var a;if(u(this,r),6<(a=t.call(this,e,n)).span)throw new RangeError("span must not exceed 6 bytes");return a}return f(r,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return h(e).readIntLE(t,this.span)}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return h(t).writeIntLE(e,r,this.span),this.span}}]),r}(p);t.Int=w;var x=function(e){s(r,e);var t=c(r);function r(e,n){var a;if(u(this,r),6<(a=t.call(this,e,n)).span)throw new RangeError("span must not exceed 6 bytes");return a}return f(r,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return h(e).readIntBE(t,this.span)}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return h(t).writeIntBE(e,r,this.span),this.span}}]),r}(p);t.IntBE=x;var E=Math.pow(2,32);function _(e){var t=Math.floor(e/E);return{hi32:t,lo32:e-t*E}}function C(e,t){return e*E+t}var k=function(e){s(r,e);var t=c(r);function r(e){return u(this,r),t.call(this,8,e)}return f(r,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=h(e),n=r.readUInt32LE(t);return C(r.readUInt32LE(t+4),n)}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=_(e),a=h(t);return a.writeUInt32LE(n.lo32,r),a.writeUInt32LE(n.hi32,r+4),8}}]),r}(p);t.NearUInt64=k;var B=function(e){s(r,e);var t=c(r);function r(e){return u(this,r),t.call(this,8,e)}return f(r,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=h(e);return C(r.readUInt32BE(t),r.readUInt32BE(t+4))}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=_(e),a=h(t);return a.writeUInt32BE(n.hi32,r),a.writeUInt32BE(n.lo32,r+4),8}}]),r}(p);t.NearUInt64BE=B;var I=function(e){s(r,e);var t=c(r);function r(e){return u(this,r),t.call(this,8,e)}return f(r,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=h(e),n=r.readUInt32LE(t);return C(r.readInt32LE(t+4),n)}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=_(e),a=h(t);return a.writeUInt32LE(n.lo32,r),a.writeInt32LE(n.hi32,r+4),8}}]),r}(p);t.NearInt64=I;var S=function(e){s(r,e);var t=c(r);function r(e){return u(this,r),t.call(this,8,e)}return f(r,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=h(e);return C(r.readInt32BE(t),r.readUInt32BE(t+4))}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=_(e),a=h(t);return a.writeInt32BE(n.hi32,r),a.writeUInt32BE(n.lo32,r+4),8}}]),r}(p);t.NearInt64BE=S;var O=function(e){s(r,e);var t=c(r);function r(e){return u(this,r),t.call(this,4,e)}return f(r,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return h(e).readFloatLE(t)}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return h(t).writeFloatLE(e,r),4}}]),r}(p);t.Float=O;var M=function(e){s(r,e);var t=c(r);function r(e){return u(this,r),t.call(this,4,e)}return f(r,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return h(e).readFloatBE(t)}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return h(t).writeFloatBE(e,r),4}}]),r}(p);t.FloatBE=M;var D=function(e){s(r,e);var t=c(r);function r(e){return u(this,r),t.call(this,8,e)}return f(r,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return h(e).readDoubleLE(t)}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return h(t).writeDoubleLE(e,r),8}}]),r}(p);t.Double=D;var T=function(e){s(r,e);var t=c(r);function r(e){return u(this,r),t.call(this,8,e)}return f(r,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return h(e).readDoubleBE(t)}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return h(t).writeDoubleBE(e,r),8}}]),r}(p);t.DoubleBE=T;var F=function(e){s(r,e);var t=c(r);function r(e,n,a){var i;if(u(this,r),!(e instanceof p))throw new TypeError("elementLayout must be a Layout");if(!(n instanceof m&&n.isCount()||Number.isInteger(n)&&0<=n))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");var o=-1;return!(n instanceof m)&&01&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;var r=0,n=this.count;if(n instanceof m&&(n=n.decode(e,t)),01&&void 0!==arguments[1]?arguments[1]:0,r=[],n=0,a=this.count;for(a instanceof m&&(a=a.decode(e,t));n2&&void 0!==arguments[2]?arguments[2]:0,n=this.elementLayout,a=e.reduce((function(e,a){return e+n.encode(a,t,r+e)}),0);return this.count instanceof m&&this.count.encode(e.length,t,r),a}}]),r}(p);t.Sequence=F;var R=function(e){s(r,e);var t=c(r);function r(e,n,a){var i;if(u(this,r),!Array.isArray(e)||!e.reduce((function(e,t){return e&&t instanceof p}),!0))throw new TypeError("fields must be array of Layout instances");"boolean"===typeof n&&void 0===a&&(a=n,n=void 0);var s,c=o(e);try{for(c.s();!(s=c.n()).done;){var f=s.value;if(0>f.span&&void 0===f.property)throw new Error("fields cannot contain unnamed variable-length layout")}}catch(l){c.e(l)}finally{c.f()}var d=-1;try{d=e.reduce((function(e,t){return e+t.getSpan()}),0)}catch(h){}return(i=t.call(this,d,n)).fields=e,i.decodePrefixes=!!a,i}return f(r,[{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;var r=0;try{r=this.fields.reduce((function(r,n){var a=n.getSpan(e,t);return t+=a,r+a}),0)}catch(n){throw new RangeError("indeterminate span")}return r}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;l(e);var r,n=this.makeDestinationObject(),a=o(this.fields);try{for(a.s();!(r=a.n()).done;){var i=r.value;if(void 0!==i.property&&(n[i.property]=i.decode(e,t)),t+=i.getSpan(e,t),this.decodePrefixes&&e.length===t)break}}catch(s){a.e(s)}finally{a.f()}return n}},{key:"encode",value:function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=n,i=0,s=0,c=o(this.fields);try{for(c.s();!(r=c.n()).done;){var u=r.value,f=u.span;if(s=0f&&(f=u.getSpan(t,n)))}i=n,n+=f}}catch(l){c.e(l)}finally{c.f()}return i+s-a}},{key:"fromArray",value:function(e){var t,r=this.makeDestinationObject(),n=o(this.fields);try{for(n.s();!(t=n.n()).done;){var a=t.value;void 0!==a.property&&0a.span?r=-1:0<=r&&(r+=a.span)}}catch(i){n.e(i)}finally{n.f()}}}]),r}(p);t.Structure=R;var P=function(){function e(t){u(this,e),this.property=t}return f(e,[{key:"decode",value:function(e,t){throw new Error("UnionDiscriminator is abstract")}},{key:"encode",value:function(e,t,r){throw new Error("UnionDiscriminator is abstract")}}]),e}();t.UnionDiscriminator=P;var N=function(e){s(r,e);var t=c(r);function r(e,n){var a;if(u(this,r),!(e instanceof m&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");return(a=t.call(this,n||e.property||"variant")).layout=e,a}return f(r,[{key:"decode",value:function(e,t){return this.layout.decode(e,t)}},{key:"encode",value:function(e,t,r){return this.layout.encode(e,t,r)}}]),r}(P);t.UnionLayoutDiscriminator=N;var j=function(e){s(r,e);var t=c(r);function r(e,n,a){var o,s;if(u(this,r),e instanceof y||e instanceof A)s=new N(new v(e));else if(e instanceof m&&e.isCount())s=new N(e);else{if(!(e instanceof P))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");s=e}if(void 0===n&&(n=null),!(null===n||n instanceof p))throw new TypeError("defaultLayout must be null or a Layout");if(null!==n){if(0>n.span)throw new Error("defaultLayout must have constant span");void 0===n.property&&(n=n.replicate("content"))}var c=-1;n&&0<=(c=n.span)&&(e instanceof y||e instanceof A)&&(c+=s.layout.span),(o=t.call(this,c,a)).discriminator=s,o.usesPrefixDiscriminator=e instanceof y||e instanceof A,o.defaultLayout=n,o.registry={};var f=o.defaultGetSourceVariant.bind(i(o));return o.getSourceVariant=function(e){return f(e)},o.configGetSourceVariant=function(e){f=e.bind(this)},o}return f(r,[{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;var r=this.getVariant(e,t);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(e,t)}},{key:"defaultGetSourceVariant",value:function(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;var t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(var r in this.registry){var n=this.registry[r];if(n.property&&Object.prototype.hasOwnProperty.call(e,n.property))return n}throw new Error("unable to infer src variant")}},{key:"decode",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.discriminator,a=n.decode(e,r),i=this.registry[a];if(void 0===i){var o=this.defaultLayout,s=0;this.usesPrefixDiscriminator&&(s=n.layout.span),(t=this.makeDestinationObject())[n.property]=a,t[o.property]=o.decode(e,r+s)}else t=i.decode(e,r);return t}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this.getSourceVariant(e);if(void 0===n){var a=this.discriminator,i=this.defaultLayout,o=0;return this.usesPrefixDiscriminator&&(o=a.layout.span),a.encode(e[a.property],t,r),o+i.encode(e[i.property],t,r+o)}return n.encode(e,t,r)}},{key:"addVariant",value:function(e,t,r){var n=new L(this,e,t,r);return this.registry[e]=n,n}},{key:"getVariant",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=e instanceof Uint8Array?this.discriminator.decode(e,r):e,this.registry[t]}}]),r}(p);t.Union=j;var L=function(e){s(r,e);var t=c(r);function r(e,n,a,i){var o;if(u(this,r),!(e instanceof j))throw new TypeError("union must be a Union");if(!Number.isInteger(n)||0>n)throw new TypeError("variant must be a (non-negative) integer");if("string"===typeof a&&void 0===i&&(i=a,a=null),a){if(!(a instanceof p))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=a.span&&a.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!==typeof i)throw new TypeError("variant must have a String property")}var s=e.span;return 0>e.span&&0<=(s=a?a.span:0)&&e.usesPrefixDiscriminator&&(s+=e.discriminator.layout.span),(o=t.call(this,s,i)).union=e,o.variant=n,o.layout=a||null,o}return f(r,[{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;var r=0;this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span);var n=0;return this.layout&&(n=this.layout.getSpan(e,t+r)),r+n}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");var n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(e,t+n):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,r);var a=n;if(this.layout&&(this.layout.encode(e[this.property],t,r+n),a+=this.layout.getSpan(t,r+n),0<=this.union.span&&a>this.union.span))throw new Error("encoded variant overruns containing union");return a}},{key:"fromArray",value:function(e){if(this.layout)return this.layout.fromArray(e)}}]),r}(p);function U(e){return 0>e&&(e+=4294967296),e}t.VariantLayout=L;var Q=function(e){s(r,e);var t=c(r);function r(e,n,a){var i;if(u(this,r),!(e instanceof y||e instanceof A))throw new TypeError("word must be a UInt or UIntBE layout");if("string"===typeof n&&void 0===a&&(a=n,n=!1),41&&void 0!==arguments[1]?arguments[1]:0,r=this.makeDestinationObject(),n=this.word.decode(e,t);this._packedSetValue(n);var a,i=o(this.fields);try{for(i.s();!(a=i.n()).done;){var s=a.value;void 0!==s.property&&(r[s.property]=s.decode(e))}}catch(c){i.e(c)}finally{i.f()}return r}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this.word.decode(t,r);this._packedSetValue(n);var a,i=o(this.fields);try{for(i.s();!(a=i.n()).done;){var s=a.value;if(void 0!==s.property){var c=e[s.property];void 0!==c&&s.encode(c)}}}catch(u){i.e(u)}finally{i.f()}return this.word.encode(this._packedGetValue(),t,r)}},{key:"addField",value:function(e,t){var r=new G(this,e,t);return this.fields.push(r),r}},{key:"addBoolean",value:function(e){var t=new H(this,e);return this.fields.push(t),t}},{key:"fieldFor",value:function(e){if("string"!==typeof e)throw new TypeError("property must be string");var t,r=o(this.fields);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n.property===e)return n}}catch(a){r.e(a)}finally{r.f()}}}]),r}(p);t.BitStructure=Q;var G=function(){function e(t,r,n){if(u(this,e),!(t instanceof Q))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(r)||0>=r)throw new TypeError("bits must be positive integer");var a=8*t.span,i=t.fields.reduce((function(e,t){return e+t.bits}),0);if(r+i>a)throw new Error("bits too long for span remainder ("+(a-i)+" of "+a+" remain)");this.container=t,this.bits=r,this.valueMask=(1<>>this.start}},{key:"encode",value:function(e){if("number"!==typeof e||!Number.isInteger(e)||e!==U(e&this.valueMask))throw new TypeError(b("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);var t=this.container._packedGetValue(),r=U(e<r&&(r=this.length.decode(e,t)),r}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.span;return 0>r&&(r=this.length.decode(e,t)),h(e).slice(t,t+r)}},{key:"encode",value:function(e,t,r){var n=this.length;if(this.length instanceof m&&(n=e.length),!(e instanceof Uint8Array&&n===e.length))throw new TypeError(b("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(r+n>t.length)throw new RangeError("encoding overruns Uint8Array");var a=h(e);return h(t).write(a.toString("hex"),r,n,"hex"),this.length instanceof m&&this.length.encode(n,t,r),n}}]),r}(p);t.Blob=z;var q=function(e){s(r,e);var t=c(r);function r(e){return u(this,r),t.call(this,-1,e)}return f(r,[{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;l(e);for(var r=t;r1&&void 0!==arguments[1]?arguments[1]:0,r=this.getSpan(e,t);return h(e).slice(t,t+r-1).toString("utf-8")}},{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;"string"!==typeof e&&(e=String(e));var n=d.Buffer.from(e,"utf8"),a=n.length;if(r+a>t.length)throw new RangeError("encoding overruns Buffer");var i=h(t);return n.copy(i,r),i[r+a]=0,a+1}}]),r}(p);t.CString=q;var K=function(e){s(r,e);var t=c(r);function r(e,n){var a;if(u(this,r),"string"===typeof e&&void 0===n&&(n=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");return(a=t.call(this,-1,n)).maxSpan=e,a}return f(r,[{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return l(e),e.length-t}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan2&&void 0!==arguments[2]?arguments[2]:0;"string"!==typeof e&&(e=String(e));var n=d.Buffer.from(e,"utf8"),a=n.length;if(0<=this.maxSpan&&this.maxSpant.length)throw new RangeError("encoding overruns Buffer");return n.copy(h(t),r),a}}]),r}(p);t.UTF8=K;var V=function(e){s(r,e);var t=c(r);function r(e,n){var a;return u(this,r),(a=t.call(this,0,n)).value=e,a}return f(r,[{key:"decode",value:function(e,t){return this.value}},{key:"encode",value:function(e,t,r){return 0}}]),r}(p);t.Constant=V,t.greedy=function(e,t){return new g(e,t)},t.offset=function(e,t,r){return new v(e,t,r)},t.u8=function(e){return new y(1,e)},t.u16=function(e){return new y(2,e)},t.u24=function(e){return new y(3,e)},t.u32=function(e){return new y(4,e)},t.u40=function(e){return new y(5,e)},t.u48=function(e){return new y(6,e)},t.nu64=function(e){return new k(e)},t.u16be=function(e){return new A(2,e)},t.u24be=function(e){return new A(3,e)},t.u32be=function(e){return new A(4,e)},t.u40be=function(e){return new A(5,e)},t.u48be=function(e){return new A(6,e)},t.nu64be=function(e){return new B(e)},t.s8=function(e){return new w(1,e)},t.s16=function(e){return new w(2,e)},t.s24=function(e){return new w(3,e)},t.s32=function(e){return new w(4,e)},t.s40=function(e){return new w(5,e)},t.s48=function(e){return new w(6,e)},t.ns64=function(e){return new I(e)},t.s16be=function(e){return new x(2,e)},t.s24be=function(e){return new x(3,e)},t.s32be=function(e){return new x(4,e)},t.s40be=function(e){return new x(5,e)},t.s48be=function(e){return new x(6,e)},t.ns64be=function(e){return new S(e)},t.f32=function(e){return new O(e)},t.f32be=function(e){return new M(e)},t.f64=function(e){return new D(e)},t.f64be=function(e){return new T(e)},t.struct=function(e,t,r){return new R(e,t,r)},t.bits=function(e,t,r){return new Q(e,t,r)},t.seq=function(e,t,r){return new F(e,t,r)},t.union=function(e,t,r){return new j(e,t,r)},t.unionLayoutDiscriminator=function(e,t){return new N(e,t)},t.blob=function(e,t){return new z(e,t)},t.cstr=function(e){return new q(e)},t.utf8=function(e,t){return new K(e,t)},t.constant=function(e,t){return new V(e,t)}},function(e,t,r){"use strict";function n(){return n=Object.assign||function(e){for(var t=1;t=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}function m(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(r=a[e](t)).value instanceof y?Promise.resolve(r.value.v).then(c,u):f(i[0][2],r)}catch(n){f(i[0][3],n)}var r}function c(e){s("next",e)}function u(e){s("throw",e)}function f(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,a){t[n]=e[n]?function(t){return(r=!r)?{value:y(e[n](t)),done:"return"===n}:a?a(t):t}:a}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,a){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,a,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var _=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&l(t,e,r);return _(t,e),t}function k(e){return e&&e.__esModule?e:{default:e}}function B(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function I(e,t,r,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r}function S(e,t){if(null===t||"object"!==typeof t&&"function"!==typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"===typeof e?t===e:e.has(t)}},function(e,t,r){var n=r(709).default;function a(){"use strict";e.exports=a=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",f=s.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(M){d=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof b?t:b,i=Object.create(a.prototype),s=new I(n||[]);return o(i,"_invoke",{value:_(e,r,s)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(M){return{type:"throw",arg:M}}}t.wrap=l;var p={};function b(){}function m(){}function g(){}var v={};d(v,c,(function(){return this}));var y=Object.getPrototypeOf,A=y&&y(y(S([])));A&&A!==r&&i.call(A,c)&&(v=A);var w=g.prototype=b.prototype=Object.create(v);function x(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,s,c){var u=h(e[a],e,o);if("throw"!==u.type){var f=u.arg,d=f.value;return d&&"object"==n(d)&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):t.resolve(d).then((function(e){f.value=e,s(f)}),(function(e){return r("throw",e,s,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,a){r(e,n,t,a)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return O()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=C(o,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function C(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var a=h(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,p;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function S(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r=0;--n){var a=this.tryEntries[n],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),B(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;B(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(1145);function a(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:[],r=[];return Object.keys(e).forEach((function(n){if(!t.length||t.includes(n)){var a=e[n];r.push.apply(r,Object(u.a)(a.accounts))}})),r}function k(e,t){return e.includes(":")?[e]:t.chains||[]}var B="base10",I="base16",S="base64pad",O="utf8",M=0,D=1,T=0,F=1,R=12,P=32;function N(){var e=b.generateKeyPair();return{privateKey:Object(m.toString)(e.secretKey,I),publicKey:Object(m.toString)(e.publicKey,I)}}function j(){var e=Object(h.randomBytes)(P);return Object(m.toString)(e,I)}function L(e,t){var r=b.sharedKey(Object(m.fromString)(e,I),Object(m.fromString)(t,I),!0),n=new l.HKDF(p.SHA256,r).expand(P);return Object(m.toString)(n,I)}function U(e){var t=Object(p.hash)(Object(m.fromString)(e,I));return Object(m.toString)(t,I)}function Q(e){var t=Object(p.hash)(Object(m.fromString)(e,O));return Object(m.toString)(t,I)}function G(e){return Number(Object(m.toString)(e,B))}function H(e){var t=function(e){return Object(m.fromString)("".concat(e),B)}(typeof e.type<"u"?e.type:M);if(G(t)===D&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");var r=typeof e.senderPublicKey<"u"?Object(m.fromString)(e.senderPublicKey,I):void 0,n=typeof e.iv<"u"?Object(m.fromString)(e.iv,I):Object(h.randomBytes)(R);return function(e){if(G(e.type)===D){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Object(m.toString)(Object(m.concat)([e.type,e.senderPublicKey,e.iv,e.sealed]),S)}return Object(m.toString)(Object(m.concat)([e.type,e.iv,e.sealed]),S)}({type:t,sealed:new d.ChaCha20Poly1305(Object(m.fromString)(e.symKey,I)).seal(n,Object(m.fromString)(e.message,O)),iv:n,senderPublicKey:r})}function z(e){var t=new d.ChaCha20Poly1305(Object(m.fromString)(e.symKey,I)),r=q(e.encoded),n=r.sealed,a=r.iv,i=t.open(a,n);if(null===i)throw new Error("Failed to decrypt");return Object(m.toString)(i,O)}function q(e){var t=Object(m.fromString)(e,S),r=t.slice(T,F),n=F;if(G(r)===D){var a=n+P,i=a+R,o=t.slice(n,a),s=t.slice(a,i);return{type:r,sealed:t.slice(i),iv:s,senderPublicKey:o}}var c=n+R,u=t.slice(n,c);return{type:r,sealed:t.slice(c),iv:u}}function K(e,t){var r=q(e);return V({type:G(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Object(m.toString)(r.senderPublicKey,I):void 0,receiverPublicKey:null===t||void 0===t?void 0:t.receiverPublicKey})}function V(e){var t=(null===e||void 0===e?void 0:e.type)||M;if(t===D){if(typeof(null===e||void 0===e?void 0:e.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(null===e||void 0===e?void 0:e.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:null===e||void 0===e?void 0:e.senderPublicKey,receiverPublicKey:null===e||void 0===e?void 0:e.receiverPublicKey}}function W(e){return e.type===D&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var Y=Object.defineProperty,J=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,$=function(e,t,r){return t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},ee=function(e,t){for(var r in t||(t={}))X.call(t,r)&&$(e,r,t[r]);if(J){var n,a=Object(c.a)(J(t));try{for(a.s();!(n=a.n()).done;){r=n.value;Z.call(t,r)&&$(e,r,t[r])}}catch(i){a.e(i)}finally{a.f()}}return e},te="ReactNative",re={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},ne="js";function ae(){return typeof e<"u"&&typeof e.versions<"u"&&typeof e.versions.node<"u"}function ie(){return!Object(y.getDocument)()&&!!Object(y.getNavigator)()&&navigator.product===te}function oe(){return!ae()&&!!Object(y.getNavigator)()}function se(){return ie()?re.reactNative:ae()?re.node:oe()?re.browser:re.unknown}function ce(){return Object(A.getWindowMetadata)()||{name:"",description:"",url:"",icons:[""]}}function ue(e,t,r){var a=function(){if(se()===re.reactNative&&typeof n<"u"&&typeof(null==n?void 0:n.Platform)<"u"){var e=n.Platform;return[e.OS,e.Version].join("-")}var t=Object(g.a)();if(null===t)return"unknown";var r=t.os?t.os.replace(" ","").toLowerCase():"unknown";return"browser"===t.type?[r,t.name,t.version].join("-"):[r,t.version].join("-")}(),i=function(){var e,t=se();return t===re.browser?[t,(null==(e=Object(y.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[ne,r].join("-"),a,i].join("/")}function fe(e){var t=e.protocol,r=e.version,n=e.relayUrl,a=e.sdkVersion,i=e.auth,o=e.projectId,s=e.useOnCloseEvent,c=n.split("?"),u={auth:i,ua:ue(t,r,a),projectId:o,useOnCloseEvent:s||void 0},f=function(e,t){var r=w.parse(e);return r=ee(ee({},r),t),w.stringify(r)}(c[1]||"",u);return c[0]+"?"+f}function de(e,t){return e.filter((function(e){return t.includes(e)})).length===e.length}function le(e){return Object.fromEntries(e.entries())}function he(e){return new Map(Object.entries(e))}function pe(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v.FIVE_MINUTES,a=arguments.length>1?arguments[1]:void 0,i=Object(v.toMiliseconds)(n||v.FIVE_MINUTES);return{resolve:function(t){r&&e&&(clearTimeout(r),e(t))},reject:function(e){r&&t&&(clearTimeout(r),t(e))},done:function(){return new Promise((function(n,o){r=setTimeout((function(){o(new Error(a))}),i),e=n,t=o}))}}}function be(e,t,r){return new Promise(function(){var n=Object(s.a)(Object(o.a)().mark((function n(a,i){var s,c;return Object(o.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=setTimeout((function(){return i(new Error(r))}),t),n.prev=1,n.next=4,e;case 4:c=n.sent,a(c),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(1),i(n.t0);case 11:clearTimeout(s);case 12:case"end":return n.stop()}}),n,null,[[1,8]])})));return function(e,t){return n.apply(this,arguments)}}())}function me(e,t){if("string"==typeof t&&t.startsWith("".concat(e,":")))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return"topic:".concat(t)}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return"id:".concat(t)}throw new Error("Unknown expirer target type: ".concat(e))}function ge(e){return me("topic",e)}function ve(e){return me("id",e)}function ye(e){var t=e.split(":"),r=Object(f.a)(t,2),n=r[0],a=r[1],i={id:void 0,topic:void 0};if("topic"===n&&"string"==typeof a)i.topic=a;else{if("id"!==n||!Number.isInteger(Number(a)))throw new Error("Invalid target, expected id:number or topic:string, got ".concat(n,":").concat(a));i.id=Number(a)}return i}function Ae(e,t){return Object(v.fromMiliseconds)((t||Date.now())+Object(v.toMiliseconds)(e))}function we(e){return Date.now()>=Object(v.toMiliseconds)(e)}function xe(e,t){return"".concat(e).concat(t?":".concat(t):"")}function Ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(u.a)(new Set([].concat(Object(u.a)(e),Object(u.a)(t))))}function _e(e){return Ce.apply(this,arguments)}function Ce(){return(Ce=Object(s.a)(Object(o.a)().mark((function e(t){var r,a,i,s,c,u,f;return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.id,a=t.topic,i=t.wcDeepLink,e.prev=1,i){e.next=4;break}return e.abrupt("return");case 4:if(s="string"==typeof i?JSON.parse(i):i,"string"==typeof(c=null===s||void 0===s?void 0:s.href)){e.next=8;break}return e.abrupt("return");case 8:if(c.endsWith("/")&&(c=c.slice(0,-1)),u="".concat(c,"/wc?requestId=").concat(r,"&sessionTopic=").concat(a),(f=se())!==re.browser){e.next=14;break}u.startsWith("https://")?window.open(u,"_blank","noreferrer noopener"):window.open(u,"_self","noreferrer noopener"),e.next=18;break;case 14:if(e.t0=f===re.reactNative&&typeof(null==n?void 0:n.Linking)<"u",!e.t0){e.next=18;break}return e.next=18,n.Linking.openURL(u);case 18:e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),console.error(e.t1);case 23:case"end":return e.stop()}}),e,null,[[1,20]])})))).apply(this,arguments)}var ke="irn";function Be(e){return(null===e||void 0===e?void 0:e.relay)||{protocol:ke}}function Ie(e){var t=x.RELAY_JSONRPC[e];if(typeof t>"u")throw new Error("Relay Protocol not supported: ".concat(e));return t}var Se=Object.defineProperty,Oe=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Te=function(e,t,r){return t in e?Se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Fe=function(e,t){for(var r in t||(t={}))Me.call(t,r)&&Te(e,r,t[r]);if(Oe){var n,a=Object(c.a)(Oe(t));try{for(a.s();!(n=a.n()).done;){r=n.value;De.call(t,r)&&Te(e,r,t[r])}}catch(i){a.e(i)}finally{a.f()}}return e};function Re(e){var t={},r="relay"+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-");return Object.keys(e).forEach((function(n){if(n.startsWith(r)){var a=n.replace(r,""),i=e[n];t[a]=i}})),t}function Pe(e){var t=e.indexOf(":"),r=-1!==e.indexOf("?")?e.indexOf("?"):void 0,n=e.substring(0,t),a=e.substring(t+1,r).split("@"),i=typeof r<"u"?e.substring(r):"",o=w.parse(i);return{protocol:n,topic:Ne(a[0]),version:parseInt(a[1],10),symKey:o.symKey,relay:Re(o)}}function Ne(e){return e.startsWith("//")?e.substring(2):e}function je(e){return"".concat(e.protocol,":").concat(e.topic,"@").concat(e.version,"?")+w.stringify(Fe({symKey:e.symKey},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",r={};return Object.keys(e).forEach((function(n){var a="relay"+t+n;e[n]&&(r[a]=e[n])})),r}(e.relay)))}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function Le(e){var t=[];return e.forEach((function(e){var r=e.split(":"),n=Object(f.a)(r,2),a=n[0],i=n[1];t.push("".concat(a,":").concat(i))})),t}function Ue(e,t){var r=ut(e,t);if(r)throw new Error(r.message);for(var n={},a=0,i=Object.entries(e);a"u"}function Je(e,t){return!(!t||!Ye(e))||"string"==typeof e&&!!e.trim().length}function Xe(e,t){return!(!t||!Ye(e))||"number"==typeof e&&!isNaN(e)}function Ze(e,t){var r=t.requiredNamespaces,n=Object.keys(e.namespaces),a=Object.keys(r),i=!0;return!!de(a,n)&&(n.forEach((function(t){var n=e.namespaces[t],a=n.accounts,o=n.methods,s=n.events,c=Le(a),u=r[t];(!de(k(t,u),c)||!de(u.methods,o)||!de(u.events,s))&&(i=!1)})),i)}function $e(e){return!(!Je(e,!1)||!e.includes(":"))&&2===e.split(":").length}function et(e){if(Je(e,!1))try{return typeof new URL(e)<"u"}catch(t){return!1}return!1}function tt(e){var t;return null==(t=null===e||void 0===e?void 0:e.proposer)?void 0:t.publicKey}function rt(e){return null===e||void 0===e?void 0:e.topic}function nt(e,t){var r=null;return Je(null===e||void 0===e?void 0:e.publicKey,!1)||(r=qe("MISSING_OR_INVALID","".concat(t," controller public key should be a string"))),r}function at(e){var t=!0;return Ve(e)?e.length&&(t=e.every((function(e){return Je(e,!1)}))):t=!1,t}function it(e,t,r){var n=null;return Object.entries(e).forEach((function(e){var a=Object(f.a)(e,2),i=a[0],o=a[1];if(!n){var s=function(e,t,r){var n=null;return Ve(t)&&t.length?t.forEach((function(e){n||$e(e)||(n=Ke("UNSUPPORTED_CHAINS","".concat(r,", chain ").concat(e,' should be a string and conform to "namespace:chainId" format')))})):$e(e)||(n=Ke("UNSUPPORTED_CHAINS","".concat(r,', chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }'))),n}(i,k(i,o),"".concat(t," ").concat(r));s&&(n=s)}})),n}function ot(e,t){var r=null;return Ve(e)?e.forEach((function(e){r||function(e){if(Je(e,!1)&&e.includes(":")){var t=e.split(":");if(3===t.length){var r=t[0]+":"+t[1];return!!t[2]&&$e(r)}}return!1}(e)||(r=Ke("UNSUPPORTED_ACCOUNTS","".concat(t,", account ").concat(e,' should be a string and conform to "namespace:chainId:address" format')))})):r=Ke("UNSUPPORTED_ACCOUNTS","".concat(t,', accounts should be an array of strings conforming to "namespace:chainId:address" format')),r}function st(e,t){var r=null;return Object.values(e).forEach((function(e){if(!r){var n=function(e,t){var r=null;return at(null===e||void 0===e?void 0:e.methods)?at(null===e||void 0===e?void 0:e.events)||(r=Ke("UNSUPPORTED_EVENTS","".concat(t,", events should be an array of strings or empty array for no events"))):r=Ke("UNSUPPORTED_METHODS","".concat(t,", methods should be an array of strings or empty array for no methods")),r}(e,"".concat(t,", namespace"));n&&(r=n)}})),r}function ct(e,t,r){var n=null;if(e&&We(e)){var a=st(e,t);a&&(n=a);var i=it(e,t,r);i&&(n=i)}else n=qe("MISSING_OR_INVALID","".concat(t,", ").concat(r," should be an object with data"));return n}function ut(e,t){var r=null;if(e&&We(e)){var n=st(e,t);n&&(r=n);var a=function(e,t){var r=null;return Object.values(e).forEach((function(e){if(!r){var n=ot(null===e||void 0===e?void 0:e.accounts,"".concat(t," namespace"));n&&(r=n)}})),r}(e,t);a&&(r=a)}else r=qe("MISSING_OR_INVALID","".concat(t,", namespaces should be an object with data"));return r}function ft(e){return Je(e.protocol,!0)}function dt(e,t){var r=!1;return t&&!e?r=!0:e&&Ve(e)&&e.length&&e.forEach((function(e){r=ft(e)})),r}function lt(e){return"number"==typeof e}function ht(e){return typeof e<"u"&&null!==typeof e}function pt(e){return!(!e||"object"!=typeof e||!e.code||!Xe(e.code,!1)||!e.message||!Je(e.message,!1))}function bt(e){return!(Ye(e)||!Je(e.method,!1))}function mt(e){return!(Ye(e)||Ye(e.result)&&Ye(e.error)||!Xe(e.id,!1)||!Je(e.jsonrpc,!1))}function gt(e){return!(Ye(e)||!Je(e.name,!1))}function vt(e,t){return!(!$e(t)||!function(e){var t=[];return Object.values(e).forEach((function(e){t.push.apply(t,Object(u.a)(Le(e.accounts)))})),t}(e).includes(t))}function yt(e,t,r){return!!Je(r,!1)&&function(e,t){var r=[];return Object.values(e).forEach((function(e){Le(e.accounts).includes(t)&&r.push.apply(r,Object(u.a)(e.methods))})),r}(e,t).includes(r)}function At(e,t,r){return!!Je(r,!1)&&function(e,t){var r=[];return Object.values(e).forEach((function(e){Le(e.accounts).includes(t)&&r.push.apply(r,Object(u.a)(e.events))})),r}(e,t).includes(r)}function wt(e,t,r){var n=null,a=function(e){var t={};return Object.keys(e).forEach((function(r){var n;r.includes(":")?t[r]=e[r]:null==(n=e[r].chains)||n.forEach((function(n){t[n]={methods:e[r].methods,events:e[r].events}}))})),t}(e),i=function(e){var t={};return Object.keys(e).forEach((function(r){if(r.includes(":"))t[r]=e[r];else{var n=Le(e[r].accounts);null===n||void 0===n||n.forEach((function(n){t[n]={accounts:e[r].accounts.filter((function(e){return e.includes("".concat(n,":"))})),methods:e[r].methods,events:e[r].events}}))}})),t}(t),o=Object.keys(a),s=Object.keys(i),c=xt(Object.keys(e)),u=xt(Object.keys(t)),f=c.filter((function(e){return!u.includes(e)}));return f.length&&(n=qe("NON_CONFORMING_NAMESPACES","".concat(r," namespaces keys don't satisfy requiredNamespaces.\n Required: ").concat(f.toString(),"\n Received: ").concat(Object.keys(t).toString()))),de(o,s)||(n=qe("NON_CONFORMING_NAMESPACES","".concat(r," namespaces chains don't satisfy required namespaces.\n Required: ").concat(o.toString(),"\n Approved: ").concat(s.toString()))),Object.keys(t).forEach((function(e){if(e.includes(":")&&!n){var a=Le(t[e].accounts);a.includes(e)||(n=qe("NON_CONFORMING_NAMESPACES","".concat(r," namespaces accounts don't satisfy namespace accounts for ").concat(e,"\n Required: ").concat(e,"\n Approved: ").concat(a.toString())))}})),o.forEach((function(e){n||(de(a[e].methods,i[e].methods)?de(a[e].events,i[e].events)||(n=qe("NON_CONFORMING_NAMESPACES","".concat(r," namespaces events don't satisfy namespace events for ").concat(e))):n=qe("NON_CONFORMING_NAMESPACES","".concat(r," namespaces methods don't satisfy namespace methods for ").concat(e)))})),n}function xt(e){return Object(u.a)(new Set(e.map((function(e){return e.includes(":")?e.split(":")[0]:e}))))}function Et(e,t){return Xe(e,!1)&&e<=t.max&&e>=t.min}function _t(){var e=se();return new Promise((function(t){switch(e){case re.browser:t(function(){var e;return oe()&&(null===(e=navigator)||void 0===e?void 0:e.onLine)}());break;case re.reactNative:t(function(){return Ct.apply(this,arguments)}());break;case re.node:default:t(!0)}}))}function Ct(){return(Ct=Object(s.a)(Object(o.a)().mark((function e(){var t;return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(ie()&&typeof n<"u"&&null!=n&&n.NetInfo)){e.next=5;break}return e.next=3,null==n?void 0:n.NetInfo.fetch();case 3:return t=e.sent,e.abrupt("return",null===t||void 0===t?void 0:t.isConnected);case 5:return e.abrupt("return",!0);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kt(e){switch(se()){case re.browser:!function(e){oe()&&(window.addEventListener("online",(function(){return e(!0)})),window.addEventListener("offline",(function(){return e(!1)})))}(e);break;case re.reactNative:!function(e){var t;ie()&&typeof n<"u"&&null!=n&&n.NetInfo&&(null===(t=n)||void 0===t||t.NetInfo.addEventListener((function(t){return e(null===t||void 0===t?void 0:t.isConnected)})))}(e);case re.node:}}var Bt={},It=function(){function e(){Object(a.a)(this,e)}return Object(i.a)(e,null,[{key:"get",value:function(e){return Bt[e]}},{key:"set",value:function(e,t){Bt[e]=t}},{key:"delete",value:function(e){delete Bt[e]}}]),e}()}).call(this,r(80),r(55))},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(843);var a=r(434),i=r(844);function o(e,t){return Object(n.a)(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}(e,t)||Object(a.a)(e,t)||Object(i.a)()}},function(e,t,r){var n=t;n.utils=r(325),n.common=r(608),n.sha=r(1913),n.ripemd=r(1196),n.hmac=r(1917),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(12);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=256)return!1}return!0}function u(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),i(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),l(e)){var o=e.substring(2);o.length%2&&("left"===t.hexPad?o="0"+o:"right"===t.hexPad?o+="0":n.throwArgumentError("hex data is odd-length","value",e));for(var s=[],u=0;u>4]+h[15&s]}return i}return n.throwArgumentError("invalid hexlify value","value",e)}function b(e){if("string"!==typeof e)e=p(e);else if(!l(e)||e.length%2)return null;return(e.length-2)/2}function m(e,t,r){return"string"!==typeof e?e=p(e):(!l(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function g(e){var t="0x";return e.forEach((function(e){t+=p(e).substring(2)})),t}function v(e,t){for("string"!==typeof e?e=p(e):l(e)||n.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function y(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(o(e)){var r=u(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64))):65===r.length?(t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=p(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var a=function(e,t){(e=u(e)).length>t&&n.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),i(r)}(u(t._vs),32);t._vs=p(a);var s=a[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=s:t.recoveryParam!==s&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),a[0]&=127;var c=p(a);null==t.s?t.s=c:t.s!==c&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var f=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==f&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&l(t.r)?t.r=v(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&l(t.s)?t.s=v(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);var d=u(t.s);d[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(d[0]|=128);var h=p(d);t._vs&&(l(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=v(t._vs,32)),null==t._vs?t._vs=h:t._vs!==h&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function A(e){return p(f([(e=y(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},function(e,t,r){"use strict";var n,a,i,o,s,c,u,f,d;r.d(t,"e",(function(){return i})),r.d(t,"b",(function(){return n})),r.d(t,"g",(function(){return a})),r.d(t,"f",(function(){return s})),r.d(t,"h",(function(){return p})),r.d(t,"d",(function(){return c})),r.d(t,"a",(function(){return u})),r.d(t,"j",(function(){return f})),r.d(t,"k",(function(){return d})),r.d(t,"i",(function(){return l})),r.d(t,"l",(function(){return g})),r.d(t,"c",(function(){return b})),function(e){e.BlockchainRequest="blockchain_request",e.PermissionRequest="permission_request",e.SignPayloadRequest="sign_payload_request",e.OperationRequest="operation_request",e.BroadcastRequest="broadcast_request",e.BlockchainResponse="blockchain_response",e.PermissionResponse="permission_response",e.SignPayloadResponse="sign_payload_response",e.OperationResponse="operation_response",e.BroadcastResponse="broadcast_response",e.Acknowledge="acknowledge",e.Disconnect="disconnect",e.Error="error"}(n||(n={})),function(e){e.SIGN="sign",e.OPERATION_REQUEST="operation_request",e.ENCRYPT="encrypt",e.THRESHOLD="threshold"}(a||(a={})),function(e){e.MAINNET="mainnet",e.DELPHINET="delphinet",e.EDONET="edonet",e.FLORENCENET="florencenet",e.GRANADANET="granadanet",e.HANGZHOUNET="hangzhounet",e.ITHACANET="ithacanet",e.JAKARTANET="jakartanet",e.CUSTOM="custom"}(i||(i={})),function(e){e.ENDORSEMENT="endorsement",e.SEED_NONCE_REVELATION="seed_nonce_revelation",e.DOUBLE_ENDORSEMENT_EVIDENCE="double_endorsement_evidence",e.DOUBLE_BAKING_EVIDENCE="double_baking_evidence",e.ACTIVATE_ACCOUNT="activate_account",e.PROPOSALS="proposals",e.BALLOT="ballot",e.REVEAL="reveal",e.TRANSACTION="transaction",e.ORIGINATION="origination",e.DELEGATION="delegation"}(o||(o={})),function(e){e.WEBSITE="website",e.EXTENSION="extension",e.P2P="p2p"}(s||(s={})),function(e){e.BACKGROUND="toBackground",e.PAGE="toPage",e.EXTENSION="toExtension"}(c||(c={})),function(e){e.BROADCAST_ERROR="BROADCAST_ERROR",e.NETWORK_NOT_SUPPORTED="NETWORK_NOT_SUPPORTED",e.NO_ADDRESS_ERROR="NO_ADDRESS_ERROR",e.NO_PRIVATE_KEY_FOUND_ERROR="NO_PRIVATE_KEY_FOUND_ERROR",e.NOT_GRANTED_ERROR="NOT_GRANTED_ERROR",e.PARAMETERS_INVALID_ERROR="PARAMETERS_INVALID_ERROR",e.TOO_MANY_OPERATIONS="TOO_MANY_OPERATIONS",e.TRANSACTION_INVALID_ERROR="TRANSACTION_INVALID_ERROR",e.SIGNATURE_TYPE_NOT_SUPPORTED="SIGNATURE_TYPE_NOT_SUPPORTED",e.ABORTED_ERROR="ABORTED_ERROR",e.UNKNOWN_ERROR="UNKNOWN_ERROR"}(u||(u={})),function(e){e.NOT_CONNECTED="NOT_CONNECTED",e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED"}(f||(f={})),function(e){e.CHROME_MESSAGE="chrome_message",e.POST_MESSAGE="post_message",e.LEDGER="ledger",e.P2P="p2p"}(d||(d={}));var l;r(1),r(2);!function(e){e.TRANSPORT_P2P_PEERS_DAPP="beacon:communication-peers-dapp",e.TRANSPORT_P2P_PEERS_WALLET="beacon:communication-peers-wallet",e.TRANSPORT_POSTMESSAGE_PEERS_DAPP="beacon:postmessage-peers-dapp",e.TRANSPORT_POSTMESSAGE_PEERS_WALLET="beacon:postmessage-peers-wallet",e.ACCOUNTS="beacon:accounts",e.ACTIVE_ACCOUNT="beacon:active-account",e.BEACON_SDK_SECRET_SEED="beacon:sdk-secret-seed",e.APP_METADATA_LIST="beacon:app-metadata-list",e.PERMISSION_LIST="beacon:permissions",e.BEACON_SDK_VERSION="beacon:sdk_version",e.MATRIX_PRESERVED_STATE="beacon:sdk-matrix-preserved-state",e.MATRIX_PEER_ROOM_IDS="beacon:matrix-peer-rooms",e.MATRIX_SELECTED_NODE="beacon:matrix-selected-node",e.MULTI_NODE_SETUP_DONE="beacon:multi-node-setup"}(l||(l={}));var h,p,b,m=r(12),g=(h={},Object(m.a)(h,l.TRANSPORT_P2P_PEERS_DAPP,[]),Object(m.a)(h,l.TRANSPORT_P2P_PEERS_WALLET,[]),Object(m.a)(h,l.TRANSPORT_POSTMESSAGE_PEERS_DAPP,[]),Object(m.a)(h,l.TRANSPORT_POSTMESSAGE_PEERS_WALLET,[]),Object(m.a)(h,l.ACCOUNTS,[]),Object(m.a)(h,l.ACTIVE_ACCOUNT,void 0),Object(m.a)(h,l.BEACON_SDK_SECRET_SEED,void 0),Object(m.a)(h,l.APP_METADATA_LIST,[]),Object(m.a)(h,l.PERMISSION_LIST,[]),Object(m.a)(h,l.BEACON_SDK_VERSION,void 0),Object(m.a)(h,l.MATRIX_PRESERVED_STATE,{}),Object(m.a)(h,l.MATRIX_PEER_ROOM_IDS,{}),Object(m.a)(h,l.MATRIX_SELECTED_NODE,void 0),Object(m.a)(h,l.MULTI_NODE_SETUP_DONE,void 0),h);!function(e){e.RAW="raw",e.OPERATION="operation",e.MICHELINE="micheline"}(p||(p={})),function(e){e.LIGHT="light",e.DARK="dark"}(b||(b={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return B})),r.d(t,"b",(function(){return x})),r.d(t,"c",(function(){return E})),r.d(t,"d",(function(){return w})),r.d(t,"e",(function(){return _})),r.d(t,"f",(function(){return C})),r.d(t,"g",(function(){return k})),r.d(t,"h",(function(){return A})),r.d(t,"i",(function(){return i})),r.d(t,"j",(function(){return g})),r.d(t,"k",(function(){return K})),r.d(t,"l",(function(){return q})),r.d(t,"m",(function(){return V})),r.d(t,"n",(function(){return Z})),r.d(t,"o",(function(){return z})),r.d(t,"p",(function(){return Y})),r.d(t,"q",(function(){return J})),r.d(t,"r",(function(){return W})),r.d(t,"s",(function(){return v})),r.d(t,"t",(function(){return y})),r.d(t,"u",(function(){return P})),r.d(t,"v",(function(){return H})),r.d(t,"w",(function(){return N})),r.d(t,"x",(function(){return j})),r.d(t,"y",(function(){return L})),r.d(t,"z",(function(){return G})),r.d(t,"A",(function(){return Q})),r.d(t,"B",(function(){return U}));r(25);var n,a,i,o=r(2),s=r(1),c=r(7),u=r(8),f=r(43),d=r(12),l=r(15),h=(r(585),r(1112),r(566)),p=r.n(h),b=r(148),m=r.n(b);r(171),r(1646);!function(e){e.TZ1="tz1",e.TZ2="tz2",e.TZ3="tz3",e.TZ4="tz4",e.KT="KT",e.KT1="KT1",e.EDSK2="edsk2",e.SPSK="spsk",e.P2SK="p2sk",e.EDPK="edpk",e.SPPK="sppk",e.P2PK="p2pk",e.EDESK="edesk",e.SPESK="spesk",e.P2ESK="p2esk",e.EDSK="edsk",e.EDSIG="edsig",e.SPSIG="spsig",e.P2SIG="p2sig",e.SIG="sig",e.NET="Net",e.NCE="nce",e.B="B",e.O="o",e.LO="Lo",e.LLO="LLo",e.P="P",e.CO="Co",e.ID="id",e.EXPR="expr",e.TZ="TZ",e.VH="vh",e.TXR1="txr1",e.TXI="txi",e.TXM="txm",e.TXC="txc",e.TXMR="txmr",e.TXRL="txM",e.TXW="txw"}(i||(i={}));var g,v=(n={},Object(d.a)(n,i.TZ1,new Uint8Array([6,161,159])),Object(d.a)(n,i.TZ2,new Uint8Array([6,161,161])),Object(d.a)(n,i.TZ3,new Uint8Array([6,161,164])),Object(d.a)(n,i.TZ4,new Uint8Array([6,161,166])),Object(d.a)(n,i.KT,new Uint8Array([2,90,121])),Object(d.a)(n,i.KT1,new Uint8Array([2,90,121])),Object(d.a)(n,i.EDSK,new Uint8Array([43,246,78,7])),Object(d.a)(n,i.EDSK2,new Uint8Array([13,15,58,7])),Object(d.a)(n,i.SPSK,new Uint8Array([17,162,224,201])),Object(d.a)(n,i.P2SK,new Uint8Array([16,81,238,189])),Object(d.a)(n,i.EDPK,new Uint8Array([13,15,37,217])),Object(d.a)(n,i.SPPK,new Uint8Array([3,254,226,86])),Object(d.a)(n,i.P2PK,new Uint8Array([3,178,139,127])),Object(d.a)(n,i.EDESK,new Uint8Array([7,90,60,179,41])),Object(d.a)(n,i.SPESK,new Uint8Array([9,237,241,174,150])),Object(d.a)(n,i.P2ESK,new Uint8Array([9,48,57,115,171])),Object(d.a)(n,i.EDSIG,new Uint8Array([9,245,205,134,18])),Object(d.a)(n,i.SPSIG,new Uint8Array([13,115,101,19,63])),Object(d.a)(n,i.P2SIG,new Uint8Array([54,240,44,52])),Object(d.a)(n,i.SIG,new Uint8Array([4,130,43])),Object(d.a)(n,i.NET,new Uint8Array([87,82,0])),Object(d.a)(n,i.NCE,new Uint8Array([69,220,169])),Object(d.a)(n,i.B,new Uint8Array([1,52])),Object(d.a)(n,i.O,new Uint8Array([5,116])),Object(d.a)(n,i.LO,new Uint8Array([133,233])),Object(d.a)(n,i.LLO,new Uint8Array([29,159,109])),Object(d.a)(n,i.P,new Uint8Array([2,170])),Object(d.a)(n,i.CO,new Uint8Array([79,179])),Object(d.a)(n,i.ID,new Uint8Array([153,103])),Object(d.a)(n,i.EXPR,new Uint8Array([13,44,64,27])),Object(d.a)(n,i.TZ,new Uint8Array([2,90,121])),Object(d.a)(n,i.VH,new Uint8Array([1,106,242])),Object(d.a)(n,i.TXR1,new Uint8Array([1,128,120,31])),Object(d.a)(n,i.TXI,new Uint8Array([79,148,196])),Object(d.a)(n,i.TXM,new Uint8Array([79,149,30])),Object(d.a)(n,i.TXC,new Uint8Array([79,148,17])),Object(d.a)(n,i.TXMR,new Uint8Array([18,7,206,87])),Object(d.a)(n,i.TXRL,new Uint8Array([79,146,82])),Object(d.a)(n,i.TXW,new Uint8Array([79,150,72])),n),y=(a={},Object(d.a)(a,i.TZ1,20),Object(d.a)(a,i.TZ2,20),Object(d.a)(a,i.TZ3,20),Object(d.a)(a,i.TZ4,20),Object(d.a)(a,i.KT,20),Object(d.a)(a,i.KT1,20),Object(d.a)(a,i.EDPK,32),Object(d.a)(a,i.SPPK,33),Object(d.a)(a,i.P2PK,33),Object(d.a)(a,i.EDSIG,64),Object(d.a)(a,i.SPSIG,64),Object(d.a)(a,i.P2SIG,64),Object(d.a)(a,i.SIG,64),Object(d.a)(a,i.NET,4),Object(d.a)(a,i.B,32),Object(d.a)(a,i.P,32),Object(d.a)(a,i.O,32),Object(d.a)(a,i.VH,32),Object(d.a)(a,i.TXR1,20),Object(d.a)(a,i.TXI,32),Object(d.a)(a,i.TXM,32),Object(d.a)(a,i.TXC,32),Object(d.a)(a,i.TXMR,32),Object(d.a)(a,i.TXRL,32),Object(d.a)(a,i.TXW,32),a),A=(Error,function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(e,n){var a;return Object(s.a)(this,r),(a=t.call(this,"The public key '".concat(e,"' is invalid. ").concat(n))).publicKey=e,a.name="InvalidPublicKeyError",a}return Object(o.a)(r)}(Object(f.a)(Error))),w=(Error,Error,function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(e){var n;return Object(s.a)(this,r),(n=t.call(this,"The contract address '".concat(e,"' is invalid"))).contractAddress=e,n.name="InvalidContractAddressError",n}return Object(o.a)(r)}(Object(f.a)(Error))),x=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(e){var n;return Object(s.a)(this,r),(n=t.call(this,"The address '".concat(e,"' is invalid"))).address=e,n.name="InvalidAddressError",n}return Object(o.a)(r)}(Object(f.a)(Error)),E=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(e){var n;return Object(s.a)(this,r),(n=t.call(this,"The chain id '".concat(e,"' is invalid"))).chainId=e,n.name="InvalidChainIdError",n}return Object(o.a)(r)}(Object(f.a)(Error)),_=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(e){var n;return Object(s.a)(this,r),(n=t.call(this,"The public key hash '".concat(e,"' is invalid"))).keyHash=e,n.name="InvalidKeyHashError",n}return Object(o.a)(r)}(Object(f.a)(Error)),C=(Error,Error,function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(e){var n;return Object(s.a)(this,r),(n=t.call(this,"The operation hash '".concat(e,"' is invalid"))).operationHash=e,n.name="InvalidOperationHashError",n}return Object(o.a)(r)}(Object(f.a)(Error))),k=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(e){var n;return Object(s.a)(this,r),(n=t.call(this,"The operation kind '".concat(e,"' is unsupported"))).operationKind=e,n.name="InvalidOperationKindError",n}return Object(o.a)(r)}(Object(f.a)(Error)),B=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(e){var n;return Object(s.a)(this,r),(n=t.call(this,e)).message=e,n.name="DeprecationError",n}return Object(o.a)(r)}(Object(f.a)(Error)),I=(Error,function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(e,n){var a;return Object(s.a)(this,r),(a=t.call(this,"Unable to convert ".concat(e," to a ").concat(n))).value=e,a.desiredType=n,a.name="ValueConversionError",a}return Object(o.a)(r)}(Object(f.a)(Error)));function S(e,t){var r=new RegExp("^(".concat(t.join("|"),")")).exec(e);if(!r||0===r.length)return g.NO_PREFIX_MATCHED;var n=r[0];if(!function(e){return"string"===typeof e&&e in v}(n))return g.NO_PREFIX_MATCHED;var a=/^(KT1\w{33})(%(.*))?/.exec(e);a&&(e=a[1]);var i=m.a.decodeUnsafe(e);return i?(i=i.slice(v[n].length)).length!==y[n]?g.INVALID_LENGTH:g.VALID:g.INVALID_CHECKSUM}!function(e){e[e.NO_PREFIX_MATCHED=0]="NO_PREFIX_MATCHED",e[e.INVALID_CHECKSUM=1]="INVALID_CHECKSUM",e[e.INVALID_LENGTH=2]="INVALID_LENGTH",e[e.VALID=3]="VALID"}(g||(g={}));var O=[i.TZ1,i.TZ2,i.TZ3,i.TZ4],M=[i.KT1,i.TXR1],D=[i.EDSIG,i.P2SIG,i.SPSIG,i.SIG],T=[i.EDPK,i.SPPK,i.P2PK],F=[i.O],R=(i.P,[i.B]);function P(e){return S(e,[].concat(O,M))}function N(e){return S(e,[i.NET])}function j(e){return S(e,M)}function L(e){return S(e,O)}function U(e){return S(e,D)}function Q(e){return S(e,T)}function G(e){return S(e,F)}function H(e){return S(e,R)}function z(e){return q(p.a.blake2b(X(e),void 0,32),v.expr)}function q(e,t){var r="string"===typeof e?Uint8Array.from(l.Buffer.from(e,"hex")):e,n=new Uint8Array(t.length+r.length);return n.set(t),n.set(r,t.length),m.a.encode(l.Buffer.from(n.buffer))}var K=function(e,t){return m.a.decode(e).slice(t.length)};function V(e){var t,r=m.a.decode(e),n=(t={},Object(d.a)(t,v.tz1.toString(),"0000"),Object(d.a)(t,v.tz2.toString(),"0001"),Object(d.a)(t,v.tz3.toString(),"0002"),t)[new Uint8Array(r.slice(0,3)).toString()];return n?n+Z(r.slice(3)):"01"+Z(r.slice(3,42))+"00"}function W(e){if("00"===e.substring(0,2)){var t={"0000":v.tz1,"0001":v.tz2,"0002":v.tz3};return q(e.substring(4),t[e.substring(0,4)])}return q(e.substring(2,42),v.KT)}function Y(e){if("0"===e[0]){var t={"00":new Uint8Array([13,15,37,217]),"01":new Uint8Array([3,254,226,86]),"02":new Uint8Array([3,178,139,127])};return q(e.substring(2),t[e.substring(0,2)])}}function J(e){if("0"===e[0]){var t={"00":new Uint8Array([6,161,159]),"01":new Uint8Array([6,161,161]),"02":new Uint8Array([6,161,164])};return q(e.substring(2),t[e.substring(0,2)])}}var X=function(e){var t=e.match(/[\da-f]{2}/gi);if(t)return new Uint8Array(t.map((function(e){return parseInt(e,16)})));throw new I(e,"Uint8Array")},Z=function(e){var t=new Uint8Array(e),r=[];return t.forEach((function(e){var t=e.toString(16),n="00".concat(t).slice(-2);r.push(n)})),r.join("")}},function(e,t,r){"use strict";r.r(t),function(e){r.d(t,"Account",(function(){return sr})),r.d(t,"Authorized",(function(){return Ma})),r.d(t,"BLOCKHASH_CACHE_TIMEOUT_MS",(function(){return tn})),r.d(t,"BPF_LOADER_DEPRECATED_PROGRAM_ID",(function(){return cr})),r.d(t,"BPF_LOADER_PROGRAM_ID",(function(){return Qr})),r.d(t,"BpfLoader",(function(){return Gr})),r.d(t,"COMPUTE_BUDGET_INSTRUCTION_LAYOUTS",(function(){return zr})),r.d(t,"ComputeBudgetInstruction",(function(){return Hr})),r.d(t,"ComputeBudgetProgram",(function(){return qr})),r.d(t,"Connection",(function(){return ka})),r.d(t,"Ed25519Program",(function(){return Sa})),r.d(t,"Enum",(function(){return Zt})),r.d(t,"EpochSchedule",(function(){return Yr})),r.d(t,"FeeCalculatorLayout",(function(){return Tr})),r.d(t,"Keypair",(function(){return Ba})),r.d(t,"LAMPORTS_PER_SOL",(function(){return ii})),r.d(t,"Loader",(function(){return Ur})),r.d(t,"Lockup",(function(){return Da})),r.d(t,"MAX_SEED_LENGTH",(function(){return er})),r.d(t,"Message",(function(){return pr})),r.d(t,"NONCE_ACCOUNT_LENGTH",(function(){return Rr})),r.d(t,"NonceAccount",(function(){return Pr})),r.d(t,"PublicKey",(function(){return tr})),r.d(t,"SOLANA_SCHEMA",(function(){return $t})),r.d(t,"STAKE_CONFIG_ID",(function(){return Oa})),r.d(t,"STAKE_INSTRUCTION_LAYOUTS",(function(){return Fa})),r.d(t,"SYSTEM_INSTRUCTION_LAYOUTS",(function(){return jr})),r.d(t,"SYSVAR_CLOCK_PUBKEY",(function(){return yr})),r.d(t,"SYSVAR_EPOCH_SCHEDULE_PUBKEY",(function(){return Ar})),r.d(t,"SYSVAR_INSTRUCTIONS_PUBKEY",(function(){return wr})),r.d(t,"SYSVAR_RECENT_BLOCKHASHES_PUBKEY",(function(){return xr})),r.d(t,"SYSVAR_RENT_PUBKEY",(function(){return Er})),r.d(t,"SYSVAR_REWARDS_PUBKEY",(function(){return _r})),r.d(t,"SYSVAR_SLOT_HASHES_PUBKEY",(function(){return Cr})),r.d(t,"SYSVAR_SLOT_HISTORY_PUBKEY",(function(){return kr})),r.d(t,"SYSVAR_STAKE_HISTORY_PUBKEY",(function(){return Br})),r.d(t,"Secp256k1Program",(function(){return Ua})),r.d(t,"SendTransactionError",(function(){return Jr})),r.d(t,"StakeAuthorizationLayout",(function(){return Ra})),r.d(t,"StakeInstruction",(function(){return Ta})),r.d(t,"StakeProgram",(function(){return Pa})),r.d(t,"Struct",(function(){return Xt})),r.d(t,"SystemInstruction",(function(){return Nr})),r.d(t,"SystemProgram",(function(){return Lr})),r.d(t,"Transaction",(function(){return vr})),r.d(t,"TransactionInstruction",(function(){return gr})),r.d(t,"VALIDATOR_INFO_KEY",(function(){return Qa})),r.d(t,"VOTE_PROGRAM_ID",(function(){return za})),r.d(t,"ValidatorInfo",(function(){return Ha})),r.d(t,"VoteAccount",(function(){return Ka})),r.d(t,"VoteAuthorizationLayout",(function(){return $a})),r.d(t,"VoteInit",(function(){return Ja})),r.d(t,"VoteInstruction",(function(){return Xa})),r.d(t,"VoteProgram",(function(){return ei})),r.d(t,"clusterApiUrl",(function(){return ai})),r.d(t,"sendAndConfirmRawTransaction",(function(){return ti})),r.d(t,"sendAndConfirmTransaction",(function(){return Ir}));var n=r(222),a=r(43),i=r(33),o=r(25),s=r(27),c=r(14),u=r(0),f=r(9),d=r(7),l=r(8),h=r(1),p=r(2),b=r(150),m=r.n(b),g=r(15),v=r(877),y=r.n(v),A=r(87),w=r.n(A),x=r(257),E=r(17),_=r(5),C=r(1597),k=r(859),B=r.n(k),I=r(1097),S=r.n(I),O=r(136),M=r.n(O),D=["commitment"],T=function(e){return g.Buffer.isBuffer(e)?e:e instanceof Uint8Array?g.Buffer.from(e.buffer,e.byteOffset,e.byteLength):g.Buffer.from(e)},F="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{};function R(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var P={},N={},j=L;function L(e,t){if(!e)throw new Error(t||"Assertion failed")}L.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var U={exports:{}};"function"===typeof Object.create?U.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:U.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}};var Q=j,G=U.exports;function H(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function z(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function q(e){return 1===e.length?"0"+e:e}function K(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}N.inherits=G,N.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),a=0;a>6|192,r[n++]=63&i|128):H(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=63&i|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=63&i|128)}else for(a=0;a>>0}return i},N.split32=function(e,t){for(var r=new Array(4*e.length),n=0,a=0;n>>24,r[a+1]=i>>>16&255,r[a+2]=i>>>8&255,r[a+3]=255&i):(r[a+3]=i>>>24,r[a+2]=i>>>16&255,r[a+1]=i>>>8&255,r[a]=255&i)}return r},N.rotr32=function(e,t){return e>>>t|e<<32-t},N.rotl32=function(e,t){return e<>>32-t},N.sum32=function(e,t){return e+t>>>0},N.sum32_3=function(e,t,r){return e+t+r>>>0},N.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},N.sum32_5=function(e,t,r,n,a){return e+t+r+n+a>>>0},N.sum64=function(e,t,r,n){var a=e[t],i=n+e[t+1]>>>0,o=(i>>0,e[t+1]=i},N.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},N.sum64_lo=function(e,t,r,n){return t+n>>>0},N.sum64_4_hi=function(e,t,r,n,a,i,o,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},N.sum64_4_lo=function(e,t,r,n,a,i,o,s){return t+n+i+s>>>0},N.sum64_5_hi=function(e,t,r,n,a,i,o,s,c,u){var f=0,d=t;return f+=(d=d+n>>>0)>>0)>>0)>>0)>>0},N.sum64_5_lo=function(e,t,r,n,a,i,o,s,c,u){return t+n+i+s+u>>>0},N.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},N.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},N.shr64_hi=function(e,t,r){return e>>>r},N.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0};var V={},W=N,Y=j;function J(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}V.BlockHash=J,J.prototype.update=function(e,t){if(e=W.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=W.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[a++]=e>>>16&255,n[a++]=e>>>8&255,n[a++]=255&e}else for(n[a++]=255&e,n[a++]=e>>>8&255,n[a++]=e>>>16&255,n[a++]=e>>>24&255,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,i=8;i>>3},Z.g1_256=function(e){return $(e,17)^$(e,19)^e>>>10};var ne=N,ae=V,ie=Z,oe=ne.rotl32,se=ne.sum32,ce=ne.sum32_5,ue=ie.ft_1,fe=ae.BlockHash,de=[1518500249,1859775393,2400959708,3395469782];function le(){if(!(this instanceof le))return new le;fe.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ne.inherits(le,fe);var he=le;le.blockSize=512,le.outSize=160,le.hmacStrength=80,le.padLength=64,le.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),Dt(e.length<=this.blockSize);for(var t=e.length;tjt[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=zt[15&t[i]];a.push(e+"=Uint8Array(0x"+r+")")}else a.push(e+"="+JSON.stringify(t))}catch(c){a.push(e+"="+JSON.stringify(n[e].toString()))}})),a.push("code=".concat(r)),a.push("version=".concat(this.version));var i=t,o="";switch(r){case Gt.NUMERIC_FAULT:o="NUMERIC_FAULT";var s=t;switch(s){case"overflow":case"underflow":case"division-by-zero":o+="-"+s;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break;case Gt.CALL_EXCEPTION:case Gt.INSUFFICIENT_FUNDS:case Gt.MISSING_NEW:case Gt.NONCE_EXPIRED:case Gt.REPLACEMENT_UNDERPRICED:case Gt.TRANSACTION_REPLACED:case Gt.UNPREDICTABLE_GAS_LIMIT:o=r}o&&(t+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),a.length&&(t+=" ("+a.join(", ")+")");var c=new Error(t);return c.reason=i,c.code=r,Object.keys(n).forEach((function(e){c[e]=n[e]})),c}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){Ht&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Ht})}},{key:"checkSafeUint53",value:function(t,r){"number"===typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return Ut||(Ut=new e("logger/5.6.0")),Ut}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Pt){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Nt=!!t,Pt=!!r}},{key:"setLogLevel",value:function(t){var r=jt[t.toLowerCase()];null!=r?Lt=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();qt.errors=Gt,qt.levels=Qt;var Kt=new qt("bytes/5.6.0");function Vt(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return Vt(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function Wt(e){return"number"===typeof e&&e==e&&e%1===0}function Yt(e,t){if(t||(t={}),"number"===typeof e){Kt.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),Vt(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),function(e){return!!e.toHexString}(e)&&(e=e.toHexString()),function(e,t){if("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))return!1;if(t&&e.length!==2+2*t)return!1;return!0}(e)){var n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0x0"+n.substring(2):"right"===t.hexPad?n+="0":Kt.throwArgumentError("hex data is odd-length","value",e));for(var a=[],i=0;i=256)return!1}return!0}(e)?Vt(new Uint8Array(e)):Kt.throwArgumentError("invalid arrayify value","value",e)}function Jt(e){return"0x"+Rt.sha256().update(Yt(e)).digest("hex")}new qt("sha2/5.6.0");var Xt=function(){function e(t){Object(h.a)(this,e),Object.assign(this,t)}return Object(p.a)(e,[{key:"encode",value:function(){return g.Buffer.from(Object(x.serialize)($t,this))}}],[{key:"decode",value:function(e){return Object(x.deserialize)($t,this,e)}},{key:"decodeUnchecked",value:function(e){return Object(x.deserializeUnchecked)($t,this,e)}}]),e}(),Zt=function(e){Object(d.a)(r,e);var t=Object(l.a)(r);function r(e){var n;if(Object(h.a)(this,r),(n=t.call(this,e)).enum="",1!==Object.keys(e).length)throw new Error("Enum can only take single value");return Object.keys(e).map((function(e){n.enum=e})),n}return Object(p.a)(r)}(Xt),$t=new Map,er=32;var tr=function(e){Object(d.a)(r,e);var t=Object(l.a)(r);function r(e){var n;if(Object(h.a)(this,r),(n=t.call(this,{}))._bn=void 0,function(e){return void 0!==e._bn}(e))n._bn=e._bn;else{if("string"===typeof e){var a=w.a.decode(e);if(32!=a.length)throw new Error("Invalid public key input");n._bn=new y.a(a)}else n._bn=new y.a(e);if(n._bn.byteLength()>32)throw new Error("Invalid public key input")}return n}return Object(p.a)(r,[{key:"equals",value:function(e){return this._bn.eq(e._bn)}},{key:"toBase58",value:function(){return w.a.encode(this.toBytes())}},{key:"toJSON",value:function(){return this.toBase58()}},{key:"toBytes",value:function(){return this.toBuffer()}},{key:"toBuffer",value:function(){var e=this._bn.toArrayLike(g.Buffer);if(32===e.length)return e;var t=g.Buffer.alloc(32);return e.copy(t,32-e.length),t}},{key:"toString",value:function(){return this.toBase58()}}],[{key:"createWithSeed",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,n,a){var i,o;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=g.Buffer.concat([t.toBuffer(),g.Buffer.from(n),a.toBuffer()]),o=Jt(new Uint8Array(i)).slice(2),e.abrupt("return",new r(g.Buffer.from(o,"hex")));case 3:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"createProgramAddressSync",value:function(e,t){var n=g.Buffer.alloc(0);e.forEach((function(e){if(e.length>er)throw new TypeError("Max seed length exceeded");n=g.Buffer.concat([n,T(e)])})),n=g.Buffer.concat([n,t.toBuffer(),g.Buffer.from("ProgramDerivedAddress")]);var a=Jt(new Uint8Array(n)).slice(2),i=new y.a(a,16).toArray(void 0,32);if(nr(i))throw new Error("Invalid seeds, address must fall off the curve");return new r(i)}},{key:"createProgramAddress",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r){return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.createProgramAddressSync(t,r));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"findProgramAddressSync",value:function(e,t){for(var r,n=255;0!=n;){try{var a=e.concat(g.Buffer.from([n]));r=this.createProgramAddressSync(a,t)}catch(i){if(i instanceof TypeError)throw i;n--;continue}return[r,n]}throw new Error("Unable to find a viable program address nonce")}},{key:"findProgramAddress",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r){return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.findProgramAddressSync(t,r));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"isOnCurve",value:function(e){return 1==nr(new r(e).toBytes())}}]),r}(Xt);tr.default=new tr("11111111111111111111111111111111"),$t.set(tr,{kind:"struct",fields:[["_bn","u256"]]});var rr=m.a.lowlevel;function nr(e){var t=[rr.gf(),rr.gf(),rr.gf(),rr.gf()],r=rr.gf(),n=rr.gf(),a=rr.gf(),i=rr.gf(),o=rr.gf(),s=rr.gf(),c=rr.gf();return rr.set25519(t[2],ar),rr.unpack25519(t[1],e),rr.S(a,t[1]),rr.M(i,a,rr.D),rr.Z(a,a,t[2]),rr.A(i,t[2],i),rr.S(o,i),rr.S(s,o),rr.M(c,s,o),rr.M(r,c,a),rr.M(r,r,i),rr.pow2523(r,r),rr.M(r,r,a),rr.M(r,r,i),rr.M(r,r,i),rr.M(t[0],r,i),rr.S(n,t[0]),rr.M(n,n,i),or(n,a)&&rr.M(t[0],t[0],ir),rr.S(n,t[0]),rr.M(n,n,i),or(n,a)?0:1}var ar=rr.gf([1]),ir=rr.gf([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function or(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return rr.pack25519(r,e),rr.pack25519(n,t),rr.crypto_verify_32(r,0,n,0)}var sr=function(){function e(t){Object(h.a)(this,e),this._keypair=void 0,this._keypair=t?m.a.sign.keyPair.fromSecretKey(T(t)):m.a.sign.keyPair()}return Object(p.a)(e,[{key:"publicKey",get:function(){return new tr(this._keypair.publicKey)}},{key:"secretKey",get:function(){return T(this._keypair.secretKey)}}]),e}(),cr=new tr("BPFLoader1111111111111111111111111111111111"),ur=1232,fr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"publicKey";return E.blob(32,e)},dr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"string",t=E.struct([E.u32("length"),E.u32("lengthPadding"),E.blob(E.offset(E.u32(),-8),"chars")],e),r=t.decode.bind(t),n=t.encode.bind(t),a=t;return a.decode=function(e,t){return r(e,t).chars.toString()},a.encode=function(e,t,r){var a={chars:g.Buffer.from(e,"utf8")};return n(a,t,r)},a.alloc=function(e){return E.u32().span+E.u32().span+g.Buffer.from(e,"utf8").length},a};function lr(e){for(var t=0,r=0;;){var n=e.shift();if(t|=(127&n)<<7*r,r+=1,0===(128&n))break}return t}function hr(e,t){for(var r=t;;){var n=127&r;if(0==(r>>=7)){e.push(n);break}n|=128,e.push(n)}}var pr=function(){function e(t){var r=this;Object(h.a)(this,e),this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map((function(e){return new tr(e)})),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach((function(e){return r.indexToProgramIds.set(e.programIdIndex,r.accountKeys[e.programIdIndex])}))}return Object(p.a)(e,[{key:"isAccountSigner",value:function(e){return e=this.header.numRequiredSignatures&&e0?this.signatures[0].signature:null}},{key:"toJSON",value:function(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map((function(e){return e.toJSON()})),signers:this.signatures.map((function(e){return e.publicKey.toJSON()}))}}},{key:"add",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n0&&this.signatures[0].publicKey))throw new Error("Transaction fee payer required");t=this.signatures[0].publicKey}for(var n=0;n-1?u[r].isWritable=u[r].isWritable||e.isWritable:u.push(e)}));var f=u.findIndex((function(e){return e.pubkey.equals(t)}));if(f>-1){var d=u.splice(f,1),l=Object(o.a)(d,1)[0];l.isSigner=!0,l.isWritable=!0,u.unshift(l)}else u.unshift({pubkey:t,isSigner:!0,isWritable:!0});var h,p=Object(i.a)(this.signatures);try{var b=function(){var e=h.value,t=u.findIndex((function(t){return t.pubkey.equals(e.publicKey)}));if(!(t>-1))throw new Error("unknown signer: ".concat(e.publicKey.toString()));u[t].isSigner||(u[t].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."))};for(p.s();!(h=p.n()).done;)b()}catch(_){p.e(_)}finally{p.f()}var m=0,g=0,v=0,y=[],A=[];u.forEach((function(e){var t=e.pubkey,r=e.isSigner,n=e.isWritable;r?(y.push(t.toString()),m+=1,n||(g+=1)):(A.push(t.toString()),n||(v+=1))}));var x=y.concat(A),E=this.instructions.map((function(e){var t=e.data,r=e.programId;return{programIdIndex:x.indexOf(r.toString()),accounts:e.keys.map((function(e){return x.indexOf(e.pubkey.toString())})),data:w.a.encode(t)}}));return E.forEach((function(e){br(e.programIdIndex>=0),e.accounts.forEach((function(e){return br(e>=0)}))})),new pr({header:{numRequiredSignatures:m,numReadonlySignedAccounts:g,numReadonlyUnsignedAccounts:v},accountKeys:x,recentBlockhash:r,instructions:E})}},{key:"_compile",value:function(){var e=this.compileMessage(),t=e.accountKeys.slice(0,e.header.numRequiredSignatures);if(this.signatures.length===t.length&&this.signatures.every((function(e,r){return t[r].equals(e.publicKey)})))return e;return this.signatures=t.map((function(e){return{signature:null,publicKey:e}})),e}},{key:"serializeMessage",value:function(){return this._compile().serialize()}},{key:"getEstimatedFee",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t){return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getFeeForMessage(this.compileMessage());case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setSigners",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r1?n-1:0),i=1;i ").concat(ur)),a}},{key:"keys",get:function(){return br(1===this.instructions.length),this.instructions[0].keys.map((function(e){return e.pubkey}))}},{key:"programId",get:function(){return br(1===this.instructions.length),this.instructions[0].programId}},{key:"data",get:function(){return br(1===this.instructions.length),this.instructions[0].data}}],[{key:"from",value:function(t){for(var r=Object(c.a)(t),n=lr(r),a=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:[],n=new e;return n.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(n.feePayer=t.accountKeys[0]),r.forEach((function(e,r){var a={signature:e==w.a.encode(mr)?null:w.a.decode(e),publicKey:t.accountKeys[r]};n.signatures.push(a)})),t.instructions.forEach((function(e){var r=e.accounts.map((function(e){var r=t.accountKeys[e];return{pubkey:r,isSigner:n.signatures.some((function(e){return e.publicKey.toString()===r.toString()}))||t.isAccountSigner(e),isWritable:t.isAccountWritable(e)}}));n.instructions.push(new gr({keys:r,programId:t.accountKeys[e.programIdIndex],data:w.a.decode(e.data)}))})),n._message=t,n._json=n.toJSON(),n}}]),e}(),yr=new tr("SysvarC1ock11111111111111111111111111111111"),Ar=new tr("SysvarEpochSchedu1e111111111111111111111111"),wr=new tr("Sysvar1nstructions1111111111111111111111111"),xr=new tr("SysvarRecentB1ockHashes11111111111111111111"),Er=new tr("SysvarRent111111111111111111111111111111111"),_r=new tr("SysvarRewards111111111111111111111111111111"),Cr=new tr("SysvarS1otHashes111111111111111111111111111"),kr=new tr("SysvarS1otHistory11111111111111111111111111"),Br=new tr("SysvarStakeHistory1111111111111111111111111");function Ir(e,t,r,n){return Sr.apply(this,arguments)}function Sr(){return(Sr=Object(f.a)(Object(u.a)().mark((function e(t,r,n,a){var i,o,s;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a&&{skipPreflight:a.skipPreflight,preflightCommitment:a.preflightCommitment||a.commitment,maxRetries:a.maxRetries},e.next=3,t.sendTransaction(r,n,i);case 3:return o=e.sent,e.next=6,t.confirmTransaction(o,a&&a.commitment);case 6:if(!(s=e.sent.value).err){e.next=9;break}throw new Error("Transaction ".concat(o," failed (").concat(JSON.stringify(s),")"));case 9:return e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Or(e){return new Promise((function(t){return setTimeout(t,e)}))}function Mr(e,t){var r=e.layout.span>=0?e.layout.span:function(e,t){var r=0;return e.layout.fields.forEach((function(e){e.span>=0?r+=e.span:"function"===typeof e.alloc&&(r+=e.alloc(t[e.property]))})),r}(e,t),n=g.Buffer.alloc(r),a=Object.assign({instruction:e.index},t);return e.layout.encode(a,n),n}function Dr(e,t){var r;try{r=e.layout.decode(t)}catch(n){throw new Error("invalid instruction; "+n)}if(r.instruction!==e.index)throw new Error("invalid instruction; instruction index mismatch ".concat(r.instruction," != ").concat(e.index));return r}var Tr=E.nu64("lamportsPerSignature"),Fr=E.struct([E.u32("version"),E.u32("state"),fr("authorizedPubkey"),fr("nonce"),E.struct([Tr],"feeCalculator")]),Rr=Fr.span,Pr=function(){function e(t){Object(h.a)(this,e),this.authorizedPubkey=void 0,this.nonce=void 0,this.feeCalculator=void 0,this.authorizedPubkey=t.authorizedPubkey,this.nonce=t.nonce,this.feeCalculator=t.feeCalculator}return Object(p.a)(e,null,[{key:"fromAccountData",value:function(t){var r=Fr.decode(T(t),0);return new e({authorizedPubkey:new tr(r.authorizedPubkey),nonce:new tr(r.nonce).toString(),feeCalculator:r.feeCalculator})}}]),e}(),Nr=function(){function e(){Object(h.a)(this,e)}return Object(p.a)(e,null,[{key:"decodeInstructionType",value:function(e){this.checkProgramId(e.programId);for(var t,r=E.u32("instruction").decode(e.data),n=0,a=Object.entries(jr);n0?s:1,space:o.length,programId:i}));case 17:if(null===f){t.next=20;break}return t.next=20,Ir(r,f,[n,a],{commitment:"confirmed"});case 20:d=E.struct([E.u32("instruction"),E.u32("offset"),E.u32("bytesLength"),E.u32("bytesLengthPadding"),E.seq(E.u8("byte"),E.offset(E.u32(),-8),"bytes")]),l=e.chunkSize,h=0,p=o,b=[];case 25:if(!(p.length>0)){t.next=39;break}if(m=p.slice(0,l),v=g.Buffer.alloc(l+16),d.encode({instruction:0,offset:h,bytes:m,bytesLength:0,bytesLengthPadding:0},v),y=(new vr).add({keys:[{pubkey:a.publicKey,isSigner:!0,isWritable:!0}],programId:i,data:v}),b.push(Ir(r,y,[n,a],{commitment:"confirmed"})),!r._rpcEndpoint.includes("solana.com")){t.next=35;break}return 4,t.next=35,Or(250);case 35:h+=l,p=p.slice(l),t.next=25;break;case 39:return t.next=41,Promise.all(b);case 41:return A=E.struct([E.u32("instruction")]),w=g.Buffer.alloc(A.span),A.encode({instruction:1},w),x=(new vr).add({keys:[{pubkey:a.publicKey,isSigner:!0,isWritable:!0},{pubkey:Er,isSigner:!1,isWritable:!1}],programId:i,data:w}),t.next=47,Ir(r,x,[n,a],{commitment:"confirmed"});case 47:return t.abrupt("return",!0);case 48:case"end":return t.stop()}}),t)})));return function(e,r,n,a,i){return t.apply(this,arguments)}}()}]),e}();Ur.chunkSize=932;var Qr=new tr("BPFLoader2111111111111111111111111111111111"),Gr=function(){function e(){Object(h.a)(this,e)}return Object(p.a)(e,null,[{key:"getMinNumSignatures",value:function(e){return Ur.getMinNumSignatures(e)}},{key:"load",value:function(e,t,r,n,a){return Ur.load(e,t,r,a,n)}}]),e}(),Hr=function(){function e(){Object(h.a)(this,e)}return Object(p.a)(e,null,[{key:"decodeInstructionType",value:function(e){this.checkProgramId(e.programId);for(var t,r=E.u8("instruction").decode(e.data),n=0,a=Object.entries(zr);n-1};function i(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function o(e){return"string"!==typeof e&&(e=String(e)),e}function s(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function d(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function l(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:r.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():r.arrayBuffer&&r.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=l(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||a(e))?this._bodyArrayBuffer=l(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,r=f(t);return t.readAsText(e),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function m(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),a=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(a))}})),t}function g(e){var t=new c;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var a=r.join(":").trim();t.append(n,a)}})),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},h.call(b.prototype),h.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var y=[301,302,303,307,308];v.redirect=function(e,t){if(-1===y.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(w){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function A(e,n){return new Promise((function(a,i){var o=new b(e,n);if(o.signal&&o.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:g(s.getAllResponseHeaders()||"")};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var t="response"in s?s.response:s.responseText;a(new v(t,e))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&r.blob&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send("undefined"===typeof o._bodyInit?null:o._bodyInit)}))}A.polyfill=!0,e.fetch||(e.fetch=A,e.Headers=c,e.Request=b,e.Response=v),t.Headers=c,t.Request=b,t.Response=v,t.fetch=A,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var a=n;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t}(Kr,Kr.exports);var Vr=R(Kr.exports);function Wr(e){for(var t=0;e>1;)e/=2,t++;return t}var Yr=function(){function e(t,r,n,a,i){Object(h.a)(this,e),this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=t,this.leaderScheduleSlotOffset=r,this.warmup=n,this.firstNormalEpoch=a,this.firstNormalSlot=i}return Object(p.a)(e,[{key:"getEpoch",value:function(e){return this.getEpochAndSlotIndex(e)[0]}},{key:"getEpochAndSlotIndex",value:function(e){if(e>1,r|=r>>2,r|=r>>4,r|=r>>8,r|=r>>16,1+(r|=r>>32)))-Wr(32)-1;return[t,e-(this.getSlotsInEpoch(t)-32)]}var r,n=e-this.firstNormalSlot,a=Math.floor(n/this.slotsPerEpoch);return[this.firstNormalEpoch+a,n%this.slotsPerEpoch]}},{key:"getFirstSlotInEpoch",value:function(e){return e<=this.firstNormalEpoch?32*(Math.pow(2,e)-1):(e-this.firstNormalEpoch)*this.slotsPerEpoch+this.firstNormalSlot}},{key:"getLastSlotInEpoch",value:function(e){return this.getFirstSlotInEpoch(e)+this.getSlotsInEpoch(e)-1}},{key:"getSlotsInEpoch",value:function(e){return e0&&(a.until=o.signatures[o.signatures.length-1].toString()),e.next=22;break;case 15:if(e.prev=15,e.t0=e.catch(8),!(e.t0 instanceof Error&&e.t0.message.includes("skipped"))){e.next=21;break}return e.abrupt("continue",4);case 21:throw e.t0;case 22:e.next=4;break;case 24:return e.next=26,this.getSlot("finalized");case 26:s=e.sent;case 27:if("before"in a){e.next=47;break}if(!(++n>s)){e.next=31;break}return e.abrupt("break",47);case 31:return e.prev=31,e.next=34,this.getConfirmedBlockSignatures(n);case 34:(c=e.sent).signatures.length>0&&(a.before=c.signatures[c.signatures.length-1].toString()),e.next=45;break;case 38:if(e.prev=38,e.t1=e.catch(31),!(e.t1 instanceof Error&&e.t1.message.includes("skipped"))){e.next=44;break}return e.abrupt("continue",27);case 44:throw e.t1;case 45:e.next=27;break;case 47:return e.next=49,this.getConfirmedSignaturesForAddress2(t,a);case 49:return f=e.sent,e.abrupt("return",f.map((function(e){return e.signature})));case 51:case"end":return e.stop()}}),e,this,[[8,15],[31,38]])})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"getConfirmedSignaturesForAddress2",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r,n){var a,i,o;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this._buildArgsAtLeastConfirmed([t.toBase58()],n,void 0,r),e.next=3,this._rpcRequest("getConfirmedSignaturesForAddress2",a);case 3:if(i=e.sent,!("error"in(o=Object(_.f)(i,Nn)))){e.next=7;break}throw new Error("failed to get confirmed signatures for address: "+o.error.message);case 7:return e.abrupt("return",o.result);case 8:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"getSignaturesForAddress",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r,n){var a,i,o;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this._buildArgsAtLeastConfirmed([t.toBase58()],n,void 0,r),e.next=3,this._rpcRequest("getSignaturesForAddress",a);case 3:if(i=e.sent,!("error"in(o=Object(_.f)(i,jn)))){e.next=7;break}throw new Error("failed to get signatures for address: "+o.error.message);case 7:return e.abrupt("return",o.result);case 8:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"getNonceAndContext",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r){var n,a,i,o;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccountInfoAndContext(t,r);case 2:return n=e.sent,a=n.context,i=n.value,o=null,null!==i&&(o=Pr.fromAccountData(i.data)),e.abrupt("return",{context:a,value:o});case 8:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getNonce",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r){return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNonceAndContext(t,r).then((function(e){return e.value})).catch((function(e){throw new Error("failed to get nonce for account "+t.toBase58()+": "+e)}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"requestAirdrop",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r){var n,a;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._rpcRequest("requestAirdrop",[t.toBase58(),r]);case 2:if(n=e.sent,!("error"in(a=Object(_.f)(n,wa)))){e.next=6;break}throw new Error("airdrop to "+t.toBase58()+" failed: "+a.error.message);case 6:return e.abrupt("return",a.result);case 7:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_recentBlockhash",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t){var r,n;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=10;break}case 1:if(!this._pollingBlockhash){e.next=6;break}return e.next=4,Or(100);case 4:e.next=1;break;case 6:if(r=Date.now()-this._blockhashInfo.lastFetch,n=r>=tn,null===this._blockhashInfo.recentBlockhash||n){e.next=10;break}return e.abrupt("return",this._blockhashInfo.recentBlockhash);case 10:return e.next=12,this._pollNewBlockhash();case 12:return e.abrupt("return",e.sent);case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_pollNewBlockhash",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(){var t,r,n,a;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._pollingBlockhash=!0,e.prev=1,t=Date.now(),r=0;case 4:if(!(r<50)){e.next=17;break}return e.next=7,this.getRecentBlockhash("finalized");case 7:if(n=e.sent,a=n.blockhash,this._blockhashInfo.recentBlockhash==a){e.next=12;break}return this._blockhashInfo={recentBlockhash:a,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]},e.abrupt("return",a);case 12:return e.next=14,Or(200);case 14:r++,e.next=4;break;case 17:throw new Error("Unable to obtain a new blockhash after ".concat(Date.now()-t,"ms"));case 18:return e.prev=18,this._pollingBlockhash=!1,e.finish(18);case 21:case"end":return e.stop()}}),e,this,[[1,,18,21]])})));return function(){return e.apply(this,arguments)}}()},{key:"simulateTransaction",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r,n){var a,i,o,s,f,d,l,h,p,b,m,g,v,y,A,w,x,E;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t instanceof vr?(a=new vr({recentBlockhash:(i=t).recentBlockhash,nonceInfo:i.nonceInfo,feePayer:i.feePayer,signatures:Object(c.a)(i.signatures)})).instructions=t.instructions:(a=vr.populate(t))._message=a._json=void 0,!a.nonceInfo||!r){e.next=5;break}(o=a).sign.apply(o,Object(c.a)(r)),e.next=23;break;case 5:s=this._disableBlockhashCaching;case 6:return e.next=8,this._recentBlockhash(s);case 8:if(a.recentBlockhash=e.sent,r){e.next=11;break}return e.abrupt("break",23);case 11:if((f=a).sign.apply(f,Object(c.a)(r)),a.signature){e.next=14;break}throw new Error("!signature");case 14:if(d=a.signature.toString("base64"),this._blockhashInfo.simulatedSignatures.includes(d)||this._blockhashInfo.transactionSignatures.includes(d)){e.next=20;break}return this._blockhashInfo.simulatedSignatures.push(d),e.abrupt("break",23);case 20:s=!0;case 21:e.next=6;break;case 23:return l=a._compile(),h=l.serialize(),p=a._serialize(h),b=p.toString("base64"),m={encoding:"base64",commitment:this.commitment},n&&(g=(Array.isArray(n)?n:l.nonProgramIds()).map((function(e){return e.toBase58()})),m.accounts={encoding:"base64",addresses:g}),r&&(m.sigVerify=!0),v=[b,m],e.next=33,this._rpcRequest("simulateTransaction",v);case 33:if(y=e.sent,!("error"in(A=Object(_.f)(y,gn)))){e.next=38;break}throw"data"in A.error&&(w=A.error.data.logs)&&Array.isArray(w)&&(E=(x="\n ")+w.join(x),console.error(A.error.message,E)),new Jr("failed to simulate transaction: "+A.error.message,w);case 38:return e.abrupt("return",A.result);case 39:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"sendTransaction",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r,n){var a,i,o;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.nonceInfo){e.next=4;break}t.sign.apply(t,Object(c.a)(r)),e.next=20;break;case 4:a=this._disableBlockhashCaching;case 5:return e.next=7,this._recentBlockhash(a);case 7:if(t.recentBlockhash=e.sent,t.sign.apply(t,Object(c.a)(r)),t.signature){e.next=11;break}throw new Error("!signature");case 11:if(i=t.signature.toString("base64"),this._blockhashInfo.transactionSignatures.includes(i)){e.next=17;break}return this._blockhashInfo.transactionSignatures.push(i),e.abrupt("break",20);case 17:a=!0;case 18:e.next=5;break;case 20:return o=t.serialize(),e.next=23,this.sendRawTransaction(o,n);case 23:return e.abrupt("return",e.sent);case 24:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"sendRawTransaction",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r){var n,a;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=T(t).toString("base64"),e.next=3,this.sendEncodedTransaction(n,r);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"sendEncodedTransaction",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r){var n,a,i,o,s,c,f;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={encoding:"base64"},a=r&&r.skipPreflight,i=r&&r.preflightCommitment||this.commitment,r&&r.maxRetries&&(n.maxRetries=r.maxRetries),a&&(n.skipPreflight=a),i&&(n.preflightCommitment=i),o=[t,n],e.next=9,this._rpcRequest("sendTransaction",o);case 9:if(s=e.sent,!("error"in(c=Object(_.f)(s,xa)))){e.next=14;break}throw"data"in c.error&&(f=c.error.data.logs),new Jr("failed to send transaction: "+c.error.message,f);case 14:return e.abrupt("return",c.result);case 15:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_wsOnOpen",value:function(){var e=this;this._rpcWebSocketConnected=!0,this._rpcWebSocketHeartbeat=setInterval((function(){e._rpcWebSocket.notify("ping").catch((function(){}))}),5e3),this._updateSubscriptions()}},{key:"_wsOnError",value:function(e){console.error("ws error:",e.message)}},{key:"_wsOnClose",value:function(e){this._rpcWebSocketHeartbeat&&(clearInterval(this._rpcWebSocketHeartbeat),this._rpcWebSocketHeartbeat=null),1e3!==e?this._resetSubscriptions():this._updateSubscriptions()}},{key:"_subscribe",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r,n){var a;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t.subscriptionId){e.next=13;break}return t.subscriptionId="subscribing",e.prev=2,e.next=5,this._rpcWebSocket.call(r,n);case 5:"number"===typeof(a=e.sent)&&"subscribing"===t.subscriptionId&&(t.subscriptionId=a),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),"subscribing"===t.subscriptionId&&(t.subscriptionId=null),e.t0 instanceof Error&&console.error("".concat(r," error for argument"),n,e.t0.message);case 13:case"end":return e.stop()}}),e,this,[[2,9]])})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_unsubscribe",value:function(){var e=Object(f.a)(Object(u.a)().mark((function e(t,r){var n,a;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==(n=t.subscriptionId)||"string"==typeof n){e.next=11;break}return a=n,e.prev=3,e.next=6,this._rpcWebSocket.call(r,[a]);case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(3),e.t0 instanceof Error&&console.error("".concat(r," error:"),e.t0.message);case 11:case"end":return e.stop()}}),e,this,[[3,8]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_resetSubscriptions",value:function(){Object.values(this._accountChangeSubscriptions).forEach((function(e){return e.subscriptionId=null})),Object.values(this._logsSubscriptions).forEach((function(e){return e.subscriptionId=null})),Object.values(this._programAccountChangeSubscriptions).forEach((function(e){return e.subscriptionId=null})),Object.values(this._rootSubscriptions).forEach((function(e){return e.subscriptionId=null})),Object.values(this._signatureSubscriptions).forEach((function(e){return e.subscriptionId=null})),Object.values(this._slotSubscriptions).forEach((function(e){return e.subscriptionId=null})),Object.values(this._slotUpdateSubscriptions).forEach((function(e){return e.subscriptionId=null}))}},{key:"_updateSubscriptions",value:function(){var e=this,t=Object.keys(this._accountChangeSubscriptions).map(Number),r=Object.keys(this._programAccountChangeSubscriptions).map(Number),n=Object.keys(this._slotSubscriptions).map(Number),a=Object.keys(this._slotUpdateSubscriptions).map(Number),o=Object.keys(this._signatureSubscriptions).map(Number),s=Object.keys(this._rootSubscriptions).map(Number),c=Object.keys(this._logsSubscriptions).map(Number);if(0!==t.length||0!==r.length||0!==n.length||0!==a.length||0!==o.length||0!==s.length||0!==c.length)if(null!==this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketConnected=!0),this._rpcWebSocketConnected){var u,f=Object(i.a)(t);try{for(f.s();!(u=f.n()).done;){var d=u.value,l=this._accountChangeSubscriptions[d];this._subscribe(l,"accountSubscribe",this._buildArgs([l.publicKey],l.commitment,"base64"))}}catch(L){f.e(L)}finally{f.f()}var h,p=Object(i.a)(r);try{for(p.s();!(h=p.n()).done;){var b=h.value,m=this._programAccountChangeSubscriptions[b];this._subscribe(m,"programSubscribe",this._buildArgs([m.programId],m.commitment,"base64",{filters:m.filters}))}}catch(L){p.e(L)}finally{p.f()}var g,v=Object(i.a)(n);try{for(v.s();!(g=v.n()).done;){var y=g.value,A=this._slotSubscriptions[y];this._subscribe(A,"slotSubscribe",[])}}catch(L){v.e(L)}finally{v.f()}var w,x=Object(i.a)(a);try{for(x.s();!(w=x.n()).done;){var E=w.value,_=this._slotUpdateSubscriptions[E];this._subscribe(_,"slotsUpdatesSubscribe",[])}}catch(L){x.e(L)}finally{x.f()}var C,k=Object(i.a)(o);try{for(k.s();!(C=k.n()).done;){var B=C.value,I=this._signatureSubscriptions[B],S=[I.signature];I.options&&S.push(I.options),this._subscribe(I,"signatureSubscribe",S)}}catch(L){k.e(L)}finally{k.f()}var O,M=Object(i.a)(s);try{for(M.s();!(O=M.n()).done;){var D=O.value,T=this._rootSubscriptions[D];this._subscribe(T,"rootSubscribe",[])}}catch(L){M.e(L)}finally{M.f()}var F,R=Object(i.a)(c);try{for(R.s();!(F=R.n()).done;){var P=F.value,N=this._logsSubscriptions[P],j=void 0;j="object"===typeof N.filter?{mentions:[N.filter.toString()]}:N.filter,this._subscribe(N,"logsSubscribe",this._buildArgs([j],N.commitment))}}catch(L){R.e(L)}finally{R.f()}}else this._rpcWebSocket.connect();else this._rpcWebSocketConnected&&(this._rpcWebSocketConnected=!1,this._rpcWebSocketIdleTimeout=setTimeout((function(){e._rpcWebSocketIdleTimeout=null;try{e._rpcWebSocket.close()}catch(L){L instanceof Error&&console.log("Error when closing socket connection: ".concat(L.message))}}),500))}},{key:"_wsOnAccountNotification",value:function(e){for(var t=Object(_.f)(e,Ln),r=0,n=Object.values(this._accountChangeSubscriptions);r3&&(a.custodianPubkey=e.keys[3].pubkey),a}},{key:"decodeAuthorizeWithSeed",value:function(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);var t=Dr(Fa.AuthorizeWithSeed,e.data),r=t.newAuthorized,n=t.stakeAuthorizationType,a=t.authoritySeed,i=t.authorityOwner,o={stakePubkey:e.keys[0].pubkey,authorityBase:e.keys[1].pubkey,authoritySeed:a,authorityOwner:new tr(i),newAuthorizedPubkey:new tr(r),stakeAuthorizationType:{index:n}};return e.keys.length>3&&(o.custodianPubkey=e.keys[3].pubkey),o}},{key:"decodeSplit",value:function(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);var t=Dr(Fa.Split,e.data).lamports;return{stakePubkey:e.keys[0].pubkey,splitStakePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[2].pubkey,lamports:t}}},{key:"decodeMerge",value:function(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Dr(Fa.Merge,e.data),{stakePubkey:e.keys[0].pubkey,sourceStakePubKey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey}}},{key:"decodeWithdraw",value:function(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);var t=Dr(Fa.Withdraw,e.data).lamports,r={stakePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:t};return e.keys.length>5&&(r.custodianPubkey=e.keys[5].pubkey),r}},{key:"decodeDeactivate",value:function(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Dr(Fa.Deactivate,e.data),{stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}},{key:"checkProgramId",value:function(e){if(!e.equals(Pa.programId))throw new Error("invalid instruction; programId is not StakeProgram")}},{key:"checkKeyLength",value:function(e,t){if(e.length0&&void 0!==arguments[0]?arguments[0]:"authorized";return E.struct([fr("staker"),fr("withdrawer")],e)}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lockup";return E.struct([E.ns64("unixTimestamp"),E.ns64("epoch"),fr("custodian")],e)}()])},Authorize:{index:1,layout:E.struct([E.u32("instruction"),fr("newAuthorized"),E.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:E.struct([E.u32("instruction")])},Split:{index:3,layout:E.struct([E.u32("instruction"),E.ns64("lamports")])},Withdraw:{index:4,layout:E.struct([E.u32("instruction"),E.ns64("lamports")])},Deactivate:{index:5,layout:E.struct([E.u32("instruction")])},Merge:{index:7,layout:E.struct([E.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:E.struct([E.u32("instruction"),fr("newAuthorized"),E.u32("stakeAuthorizationType"),dr("authoritySeed"),fr("authorityOwner")])}}),Ra=Object.freeze({Staker:{index:0},Withdrawer:{index:1}}),Pa=function(){function e(){Object(h.a)(this,e)}return Object(p.a)(e,null,[{key:"initialize",value:function(e){var t=e.stakePubkey,r=e.authorized,n=e.lockup||Da.default,a=Mr(Fa.Initialize,{authorized:{staker:T(r.staker.toBuffer()),withdrawer:T(r.withdrawer.toBuffer())},lockup:{unixTimestamp:n.unixTimestamp,epoch:n.epoch,custodian:T(n.custodian.toBuffer())}}),i={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Er,isSigner:!1,isWritable:!1}],programId:this.programId,data:a};return new gr(i)}},{key:"createAccountWithSeed",value:function(e){var t=new vr;t.add(Lr.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:this.space,programId:this.programId}));var r=e.stakePubkey,n=e.authorized,a=e.lockup;return t.add(this.initialize({stakePubkey:r,authorized:n,lockup:a}))}},{key:"createAccount",value:function(e){var t=new vr;t.add(Lr.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,lamports:e.lamports,space:this.space,programId:this.programId}));var r=e.stakePubkey,n=e.authorized,a=e.lockup;return t.add(this.initialize({stakePubkey:r,authorized:n,lockup:a}))}},{key:"delegate",value:function(e){var t=e.stakePubkey,r=e.authorizedPubkey,n=e.votePubkey,a=Mr(Fa.Delegate);return(new vr).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:yr,isSigner:!1,isWritable:!1},{pubkey:Br,isSigner:!1,isWritable:!1},{pubkey:Oa,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}},{key:"authorize",value:function(e){var t=e.stakePubkey,r=e.authorizedPubkey,n=e.newAuthorizedPubkey,a=e.stakeAuthorizationType,i=e.custodianPubkey,o=Mr(Fa.Authorize,{newAuthorized:T(n.toBuffer()),stakeAuthorizationType:a.index}),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:yr,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return i&&s.push({pubkey:i,isSigner:!1,isWritable:!1}),(new vr).add({keys:s,programId:this.programId,data:o})}},{key:"authorizeWithSeed",value:function(e){var t=e.stakePubkey,r=e.authorityBase,n=e.authoritySeed,a=e.authorityOwner,i=e.newAuthorizedPubkey,o=e.stakeAuthorizationType,s=e.custodianPubkey,c=Mr(Fa.AuthorizeWithSeed,{newAuthorized:T(i.toBuffer()),stakeAuthorizationType:o.index,authoritySeed:n,authorityOwner:T(a.toBuffer())}),u=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:yr,isSigner:!1,isWritable:!1}];return s&&u.push({pubkey:s,isSigner:!1,isWritable:!1}),(new vr).add({keys:u,programId:this.programId,data:c})}},{key:"splitInstruction",value:function(e){var t=e.stakePubkey,r=e.authorizedPubkey,n=e.splitStakePubkey,a=e.lamports,i=Mr(Fa.Split,{lamports:a});return new gr({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}},{key:"split",value:function(e){var t=new vr;return t.add(Lr.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:0,space:this.space,programId:this.programId})),t.add(this.splitInstruction(e))}},{key:"splitWithSeed",value:function(e){var t=e.stakePubkey,r=e.authorizedPubkey,n=e.splitStakePubkey,a=e.basePubkey,i=e.seed,o=e.lamports,s=new vr;return s.add(Lr.allocate({accountPubkey:n,basePubkey:a,seed:i,space:this.space,programId:this.programId})),s.add(this.splitInstruction({stakePubkey:t,authorizedPubkey:r,splitStakePubkey:n,lamports:o}))}},{key:"merge",value:function(e){var t=e.stakePubkey,r=e.sourceStakePubKey,n=e.authorizedPubkey,a=Mr(Fa.Merge);return(new vr).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:yr,isSigner:!1,isWritable:!1},{pubkey:Br,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}},{key:"withdraw",value:function(e){var t=e.stakePubkey,r=e.authorizedPubkey,n=e.toPubkey,a=e.lamports,i=e.custodianPubkey,o=Mr(Fa.Withdraw,{lamports:a}),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:yr,isSigner:!1,isWritable:!1},{pubkey:Br,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return i&&s.push({pubkey:i,isSigner:!1,isWritable:!1}),(new vr).add({keys:s,programId:this.programId,data:o})}},{key:"deactivate",value:function(e){var t=e.stakePubkey,r=e.authorizedPubkey,n=Mr(Fa.Deactivate);return(new vr).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:yr,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:n})}}]),e}();Pa.programId=new tr("Stake11111111111111111111111111111111111111"),Pa.space=200;var Na=S.a.publicKeyCreate,ja=S.a.ecdsaSign,La=E.struct([E.u8("numSignatures"),E.u16("signatureOffset"),E.u8("signatureInstructionIndex"),E.u16("ethAddressOffset"),E.u8("ethAddressInstructionIndex"),E.u16("messageDataOffset"),E.u16("messageDataSize"),E.u8("messageInstructionIndex"),E.blob(20,"ethAddress"),E.blob(64,"signature"),E.u8("recoveryId")]),Ua=function(){function e(){Object(h.a)(this,e)}return Object(p.a)(e,null,[{key:"publicKeyToEthAddress",value:function(e){br(64===e.length,"Public key must be ".concat(64," bytes but received ").concat(e.length," bytes"));try{return g.Buffer.from(M.a.keccak_256.update(T(e)).digest()).slice(-20)}catch(t){throw new Error("Error constructing Ethereum address: ".concat(t))}}},{key:"createInstructionWithPublicKey",value:function(t){var r=t.publicKey,n=t.message,a=t.signature,i=t.recoveryId,o=t.instructionIndex;return e.createInstructionWithEthAddress({ethAddress:e.publicKeyToEthAddress(r),message:n,signature:a,recoveryId:i,instructionIndex:o})}},{key:"createInstructionWithEthAddress",value:function(t){var r,n=t.ethAddress,a=t.message,i=t.signature,o=t.recoveryId,s=t.instructionIndex,c=void 0===s?0:s;br(20===(r="string"===typeof n?n.startsWith("0x")?g.Buffer.from(n.substr(2),"hex"):g.Buffer.from(n,"hex"):n).length,"Address must be ".concat(20," bytes but received ").concat(r.length," bytes"));var u=12+r.length,f=u+i.length+1,d=g.Buffer.alloc(La.span+a.length);return La.encode({numSignatures:1,signatureOffset:u,signatureInstructionIndex:c,ethAddressOffset:12,ethAddressInstructionIndex:c,messageDataOffset:f,messageDataSize:a.length,messageInstructionIndex:c,signature:T(i),ethAddress:T(r),recoveryId:o},d),d.fill(T(a),La.span),new gr({keys:[],programId:e.programId,data:d})}},{key:"createInstructionWithPrivateKey",value:function(e){var t=e.privateKey,r=e.message,n=e.instructionIndex;br(32===t.length,"Private key must be ".concat(32," bytes but received ").concat(t.length," bytes"));try{var a=T(t),i=Na(a,!1).slice(1),o=g.Buffer.from(M.a.keccak_256.update(T(r)).digest()),s=ja(o,a),c=s.signature,u=s.recid;return this.createInstructionWithPublicKey({publicKey:i,message:r,signature:c,recoveryId:u,instructionIndex:n})}catch(f){throw new Error("Error creating instruction; ".concat(f))}}}]),e}();Ua.programId=new tr("KeccakSecp256k11111111111111111111111111111");var Qa=new tr("Va1idator1nfo111111111111111111111111111111"),Ga=Object(_.o)({name:Object(_.m)(),website:Object(_.k)(Object(_.m)()),details:Object(_.k)(Object(_.m)()),keybaseUsername:Object(_.k)(Object(_.m)())}),Ha=function(){function e(t,r){Object(h.a)(this,e),this.key=void 0,this.info=void 0,this.key=t,this.info=r}return Object(p.a)(e,null,[{key:"fromConfigData",value:function(t){var r=Object(c.a)(t);if(2!==lr(r))return null;for(var n=[],a=0;a<2;a++){var i=new tr(r.slice(0,32)),o=1===(r=r.slice(32)).slice(0,1)[0];r=r.slice(1),n.push({publicKey:i,isSigner:o})}if(n[0].publicKey.equals(Qa)&&n[1].isSigner){var s=dr().decode(g.Buffer.from(r)),u=JSON.parse(s);return Object(_.c)(u,Ga),new e(n[1].publicKey,u)}return null}}]),e}(),za=new tr("Vote111111111111111111111111111111111111111"),qa=E.struct([fr("nodePubkey"),fr("authorizedWithdrawer"),E.u8("commission"),E.nu64(),E.seq(E.struct([E.nu64("slot"),E.u32("confirmationCount")]),E.offset(E.u32(),-8),"votes"),E.u8("rootSlotValid"),E.nu64("rootSlot"),E.nu64(),E.seq(E.struct([E.nu64("epoch"),fr("authorizedVoter")]),E.offset(E.u32(),-8),"authorizedVoters"),E.struct([E.seq(E.struct([fr("authorizedPubkey"),E.nu64("epochOfLastAuthorizedSwitch"),E.nu64("targetEpoch")]),32,"buf"),E.nu64("idx"),E.u8("isEmpty")],"priorVoters"),E.nu64(),E.seq(E.struct([E.nu64("epoch"),E.nu64("credits"),E.nu64("prevCredits")]),E.offset(E.u32(),-8),"epochCredits"),E.struct([E.nu64("slot"),E.nu64("timestamp")],"lastTimestamp")]),Ka=function(){function e(t){Object(h.a)(this,e),this.nodePubkey=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.rootSlot=void 0,this.votes=void 0,this.authorizedVoters=void 0,this.priorVoters=void 0,this.epochCredits=void 0,this.lastTimestamp=void 0,this.nodePubkey=t.nodePubkey,this.authorizedWithdrawer=t.authorizedWithdrawer,this.commission=t.commission,this.rootSlot=t.rootSlot,this.votes=t.votes,this.authorizedVoters=t.authorizedVoters,this.priorVoters=t.priorVoters,this.epochCredits=t.epochCredits,this.lastTimestamp=t.lastTimestamp}return Object(p.a)(e,null,[{key:"fromAccountData",value:function(t){var r=qa.decode(T(t),4),n=r.rootSlot;return r.rootSlotValid||(n=null),new e({nodePubkey:new tr(r.nodePubkey),authorizedWithdrawer:new tr(r.authorizedWithdrawer),commission:r.commission,votes:r.votes,rootSlot:n,authorizedVoters:r.authorizedVoters.map(Va),priorVoters:Ya(r.priorVoters),epochCredits:r.epochCredits,lastTimestamp:r.lastTimestamp})}}]),e}();function Va(e){var t=e.authorizedVoter;return{epoch:e.epoch,authorizedVoter:new tr(t)}}function Wa(e){var t=e.authorizedPubkey,r=e.epochOfLastAuthorizedSwitch,n=e.targetEpoch;return{authorizedPubkey:new tr(t),epochOfLastAuthorizedSwitch:r,targetEpoch:n}}function Ya(e){var t=e.buf,r=e.idx;return e.isEmpty?[]:[].concat(Object(c.a)(t.slice(r+1).map(Wa)),Object(c.a)(t.slice(0,r).map(Wa)))}var Ja=Object(p.a)((function e(t,r,n,a){Object(h.a)(this,e),this.nodePubkey=void 0,this.authorizedVoter=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.nodePubkey=t,this.authorizedVoter=r,this.authorizedWithdrawer=n,this.commission=a})),Xa=function(){function e(){Object(h.a)(this,e)}return Object(p.a)(e,null,[{key:"decodeInstructionType",value:function(e){this.checkProgramId(e.programId);for(var t,r=E.u32("instruction").decode(e.data),n=0,a=Object.entries(Za);n0&&void 0!==arguments[0]?arguments[0]:"voteInit";return E.struct([fr("nodePubkey"),fr("authorizedVoter"),fr("authorizedWithdrawer"),E.u8("commission")],e)}()])},Authorize:{index:1,layout:E.struct([E.u32("instruction"),fr("newAuthorized"),E.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:E.struct([E.u32("instruction"),E.ns64("lamports")])}}),$a=Object.freeze({Voter:{index:0},Withdrawer:{index:1}}),ei=function(){function e(){Object(h.a)(this,e)}return Object(p.a)(e,null,[{key:"initializeAccount",value:function(e){var t=e.votePubkey,r=e.nodePubkey,n=e.voteInit,a=Mr(Za.InitializeAccount,{voteInit:{nodePubkey:T(n.nodePubkey.toBuffer()),authorizedVoter:T(n.authorizedVoter.toBuffer()),authorizedWithdrawer:T(n.authorizedWithdrawer.toBuffer()),commission:n.commission}}),i={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Er,isSigner:!1,isWritable:!1},{pubkey:yr,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:a};return new gr(i)}},{key:"createAccount",value:function(e){var t=new vr;return t.add(Lr.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.votePubkey,lamports:e.lamports,space:this.space,programId:this.programId})),t.add(this.initializeAccount({votePubkey:e.votePubkey,nodePubkey:e.voteInit.nodePubkey,voteInit:e.voteInit}))}},{key:"authorize",value:function(e){var t=e.votePubkey,r=e.authorizedPubkey,n=e.newAuthorizedPubkey,a=e.voteAuthorizationType,i=Mr(Za.Authorize,{newAuthorized:T(n.toBuffer()),voteAuthorizationType:a.index}),o=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:yr,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return(new vr).add({keys:o,programId:this.programId,data:i})}},{key:"withdraw",value:function(e){var t=e.votePubkey,r=e.authorizedWithdrawerPubkey,n=e.lamports,a=e.toPubkey,i=Mr(Za.Withdraw,{lamports:n}),o=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return(new vr).add({keys:o,programId:this.programId,data:i})}}]),e}();function ti(e,t,r){return ri.apply(this,arguments)}function ri(){return(ri=Object(f.a)(Object(u.a)().mark((function e(t,r,n){var a,i,o;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n&&{skipPreflight:n.skipPreflight,preflightCommitment:n.preflightCommitment||n.commitment},e.next=3,t.sendRawTransaction(r,a);case 3:return i=e.sent,e.next=6,t.confirmTransaction(i,n&&n.commitment);case 6:if(!(o=e.sent.value).err){e.next=9;break}throw new Error("Raw transaction ".concat(i," failed (").concat(JSON.stringify(o),")"));case 9:return e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}ei.programId=new tr("Vote111111111111111111111111111111111111111"),ei.space=3731;var ni={http:{devnet:"http://api.devnet.solana.com",testnet:"http://api.testnet.solana.com","mainnet-beta":"http://api.mainnet-beta.solana.com/"},https:{devnet:"https://api.devnet.solana.com",testnet:"https://api.testnet.solana.com","mainnet-beta":"https://api.mainnet-beta.solana.com/"}};function ai(e,t){var r=!1===t?"http":"https";if(!e)return ni[r].devnet;var n=ni[r][e];if(!n)throw new Error("Unknown ".concat(r," cluster: ").concat(e));return n}var ii=1e9}.call(this,r(55))},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(434);function a(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Object(n.a)(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}},function(e,t,r){"use strict";r.d(t,"i",(function(){return o})),r.d(t,"h",(function(){return c})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return f})),r.d(t,"l",(function(){return d})),r.d(t,"j",(function(){return l})),r.d(t,"g",(function(){return p})),r.d(t,"d",(function(){return b})),r.d(t,"e",(function(){return m})),r.d(t,"c",(function(){return g})),r.d(t,"f",(function(){return v})),r.d(t,"k",(function(){return y}));var n=new(r(97).a)("bytes/5.6.1");function a(e){return!!e.toHexString}function i(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return i(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function o(e){return l(e)&&!(e.length%2)||c(e)}function s(e){return"number"===typeof e&&e==e&&e%1===0}function c(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(!s(e.length)||e.length<0)return!1;for(var t=0;t=256)return!1}return!0}function u(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),i(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),l(e)){var o=e.substring(2);o.length%2&&("left"===t.hexPad?o="0"+o:"right"===t.hexPad?o+="0":n.throwArgumentError("hex data is odd-length","value",e));for(var s=[],u=0;u>4]+h[15&s]}return i}return n.throwArgumentError("invalid hexlify value","value",e)}function b(e){if("string"!==typeof e)e=p(e);else if(!l(e)||e.length%2)return null;return(e.length-2)/2}function m(e,t,r){return"string"!==typeof e?e=p(e):(!l(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function g(e){var t="0x";return e.forEach((function(e){t+=p(e).substring(2)})),t}function v(e,t){for("string"!==typeof e?e=p(e):l(e)||n.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function y(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(o(e)){var r=u(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64))):65===r.length?(t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=p(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var a=function(e,t){(e=u(e)).length>t&&n.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),i(r)}(u(t._vs),32);t._vs=p(a);var s=a[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=s:t.recoveryParam!==s&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),a[0]&=127;var c=p(a);null==t.s?t.s=c:t.s!==c&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var f=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==f&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&l(t.r)?t.r=v(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&l(t.s)?t.s=v(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);var d=u(t.s);d[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(d[0]|=128);var h=p(d);t._vs&&(l(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=v(t._vs,32)),null==t._vs?t._vs=h:t._vs!==h&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return o}));var n=r(599),a=r(435),i=function(e){return Object(n.b)(e)&&"classes"!==e},o=n.b,s=Object(n.a)({defaultTheme:a.a,rootShouldForwardProp:i});t.a=s},function(e,t,r){var n=r(2944)();e.exports=n;try{regeneratorRuntime=n}catch(a){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t,r){var n=r(902);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(403),a=r(1146),i=r(903);e.exports=function(e){var t=a();return function(){var r,a=n(e);if(t){var o=n(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return i(this,r)}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";function n(e){var t,r,a="";if("string"===typeof e||"number"===typeof e)a+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t=0||(a[r]=e[r]);return a}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(40),a=r(573);var i=r(858);function o(e){var t="function"===typeof Map?new Map:void 0;return o=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return Object(i.a)(e,arguments,Object(n.a)(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Object(a.a)(o,e)},o(e)}},function(e,t,r){var n=r(59),a=r(229).f,i=r(309),o=r(197),s=r(995),c=r(1400),u=r(639);e.exports=function(e,t){var r,f,d,l,h,p=e.target,b=e.global,m=e.stat;if(r=b?n:m?n[p]||s(p,{}):(n[p]||{}).prototype)for(f in t){if(l=t[f],d=e.noTargetGet?(h=a(r,f))&&h.value:r[f],!u(b?f:p+(m?".":"#")+f,e.forced)&&void 0!==d){if(typeof l==typeof d)continue;c(l,d)}(e.sham||d&&d.sham)&&i(l,"sham",!0),o(r,f,l,e)}}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(324),t),a(r(1755),t),a(r(1765),t)},function(e,t,r){e.exports=r(3688)()},,function(e,t,r){var n=r(1147),a=r(1742),i=r(711),o=r(1149);e.exports=function(e,t){return n(e)||a(e,t)||i(e,t)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";function n(){return n=Object.assign||function(e){for(var t=1;t0||e===t?t:t-1}function v(e){for(var t,r,n=1,a=e.length,i=e[0]+"";nu^r?1:-1;for(s=(c=a.length)<(u=i.length)?c:u,o=0;oi[o]^r?1:-1;return c==u?0:c>u^r?1:-1}function A(e,t,r,n){if(er||e!==c(e))throw Error(u+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return g(e.e/l)==t&&e.c[t]%2!=0}function x(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function E(e,t,r){var n,a;if(t<0){for(a=r+".";++t;a+=r);e=a+e}else if(++t>(n=e.length)){for(a=r,t-=n;--t;a+=r);e+=a}else tO?g.c=g.e=null:e.e=10;d/=10,u++);return void(u>O?g.c=g.e=null:(g.e=u,g.c=[e]))}m=String(e)}else{if(!o.test(m=String(e)))return a(g,m,p);g.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(u=m.indexOf("."))>-1&&(m=m.replace(".","")),(d=m.search(/e/i))>0?(u<0&&(u=d),u+=+m.slice(d+1),m=m.substring(0,d)):u<0&&(u=m.length)}else{if(A(t,2,R.length,"Base"),10==t&&P)return Q(g=new N(e),C+g.e+1,k);if(m=String(e),p="number"==typeof e){if(0*e!=0)return a(g,m,p,t);if(g.s=1/e<0?(m=m.slice(1),-1):1,N.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(f+e)}else g.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(r=R.slice(0,t),u=d=0,b=m.length;du){u=b;continue}}else if(!s&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){s=!0,d=-1,u=0;continue}return a(g,String(e),p,t)}p=!1,(u=(m=n(m,t,10,g.s)).indexOf("."))>-1?m=m.replace(".",""):u=m.length}for(d=0;48===m.charCodeAt(d);d++);for(b=m.length;48===m.charCodeAt(--b););if(m=m.slice(d,++b)){if(b-=d,p&&N.DEBUG&&b>15&&(e>h||e!==c(e)))throw Error(f+g.s*e);if((u=u-d-1)>O)g.c=g.e=null;else if(u=I)?x(c,o):E(c,o,"0");else if(i=(e=Q(new N(e),t,r)).e,s=(c=v(e.c)).length,1==n||2==n&&(t<=i||i<=B)){for(;ss){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-s)>0)for(i+1==s&&(c+=".");t--;c+="0");return e.s<0&&a?"-"+c:c}function L(e,t){for(var r,n=1,a=new N(e[0]);n=10;a/=10,n++);return(r=n+r*l-1)>O?e.c=e.e=null:r=10;u/=10,a++);if((i=t-a)<0)i+=l,o=t,b=(f=m[h=0])/g[a-o-1]%10|0;else if((h=s((i+1)/l))>=m.length){if(!n)break e;for(;m.length<=h;m.push(0));f=b=0,a=1,o=(i%=l)-l+1}else{for(f=u=m[h],a=1;u>=10;u/=10,a++);b=(o=(i%=l)-l+a)<0?0:f/g[a-o-1]%10|0}if(n=n||t<0||null!=m[h+1]||(o<0?f:f%g[a-o-1]),n=r<4?(b||n)&&(0==r||r==(e.s<0?3:2)):b>5||5==b&&(4==r||n||6==r&&(i>0?o>0?f/g[a-o]:0:m[h-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=g[(l-t%l)%l],e.e=-t||0):m[0]=e.e=0,e;if(0==i?(m.length=h,u=1,h--):(m.length=h+1,u=g[l-i],m[h]=o>0?c(f/g[a-o]%g[o])*u:0),n)for(;;){if(0==h){for(i=1,o=m[0];o>=10;o/=10,i++);for(o=m[0]+=u,u=1;o>=10;o/=10,u++);i!=u&&(e.e++,m[0]==d&&(m[0]=1));break}if(m[h]+=u,m[h]!=d)break;m[h--]=0,u=1}for(i=m.length;0===m[--i];m.pop());}e.e>O?e.c=e.e=null:e.e=I?x(t,r):E(t,r,"0"),e.s<0?"-"+t:t)}return N.clone=e,N.ROUND_UP=0,N.ROUND_DOWN=1,N.ROUND_CEIL=2,N.ROUND_FLOOR=3,N.ROUND_HALF_UP=4,N.ROUND_HALF_DOWN=5,N.ROUND_HALF_EVEN=6,N.ROUND_HALF_CEIL=7,N.ROUND_HALF_FLOOR=8,N.EUCLID=9,N.config=N.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(A(r=e[t],0,m,t),C=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(A(r=e[t],0,8,t),k=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(A(r[0],-m,0,t),A(r[1],0,m,t),B=r[0],I=r[1]):(A(r,-m,m,t),B=-(I=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)A(r[0],-m,-1,t),A(r[1],1,m,t),S=r[0],O=r[1];else{if(A(r,-m,m,t),!r)throw Error(u+t+" cannot be zero: "+r);S=-(O=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(u+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw M=!r,Error(u+"crypto unavailable");M=r}else M=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(A(r=e[t],0,9,t),D=r),e.hasOwnProperty(t="POW_PRECISION")&&(A(r=e[t],0,m,t),T=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(u+t+" not an object: "+r);F=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(u+t+" invalid: "+r);P="0123456789"==r.slice(0,10),R=r}}return{DECIMAL_PLACES:C,ROUNDING_MODE:k,EXPONENTIAL_AT:[B,I],RANGE:[S,O],CRYPTO:M,MODULO_MODE:D,POW_PRECISION:T,FORMAT:F,ALPHABET:R}},N.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!N.DEBUG)return!0;var t,r,n=e.c,a=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&a>=-m&&a<=m&&a===c(a)){if(0===n[0]){if(0===a&&1===n.length)return!0;break e}if((t=(a+1)%l)<1&&(t+=l),String(n[0]).length==t){for(t=0;t=d||r!==c(r))break e;if(0!==r)return!0}}}else if(null===n&&null===a&&(null===i||1===i||-1===i))return!0;throw Error(u+"Invalid BigNumber: "+e)},N.maximum=N.max=function(){return L(arguments,i.lt)},N.minimum=N.min=function(){return L(arguments,i.gt)},N.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return c(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var r,n,a,i,o,f=0,d=[],h=new N(_);if(null==e?e=C:A(e,0,m),i=s(e/l),M)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(i*=2));f>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),r[f]=n[0],r[f+1]=n[1]):(d.push(o%1e14),f+=2);f=i/2}else{if(!crypto.randomBytes)throw M=!1,Error(u+"crypto unavailable");for(r=crypto.randomBytes(i*=7);f=9e15?crypto.randomBytes(7).copy(r,f):(d.push(o%1e14),f+=7);f=i/7}if(!M)for(;f=10;o/=10,f++);fr-1&&(null==o[a+1]&&(o[a+1]=0),o[a+1]+=o[a]/r|0,o[a]%=r)}return o.reverse()}return function(n,a,i,o,s){var c,u,f,d,l,h,p,b,m=n.indexOf("."),g=C,y=k;for(m>=0&&(d=T,T=0,n=n.replace(".",""),h=(b=new N(a)).pow(n.length-m),T=d,b.c=t(E(v(h.c),h.e,"0"),10,i,e),b.e=b.c.length),f=d=(p=t(n,a,i,s?(c=R,e):(c=e,R))).length;0==p[--d];p.pop());if(!p[0])return c.charAt(0);if(m<0?--f:(h.c=p,h.e=f,h.s=o,p=(h=r(h,b,g,y,i)).c,l=h.r,f=h.e),m=p[u=f+g+1],d=i/2,l=l||u<0||null!=p[u+1],l=y<4?(null!=m||l)&&(0==y||y==(h.s<0?3:2)):m>d||m==d&&(4==y||l||6==y&&1&p[u-1]||y==(h.s<0?8:7)),u<1||!p[0])n=l?E(c.charAt(1),-g,c.charAt(0)):c.charAt(0);else{if(p.length=u,l)for(--i;++p[--u]>i;)p[u]=0,u||(++f,p=[1].concat(p));for(d=p.length;!p[--d];);for(m=0,n="";m<=d;n+=c.charAt(p[m++]));n=E(n,f,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,a,i,o,s=0,c=e.length,u=t%b,f=t/b|0;for(e=e.slice();c--;)s=((a=u*(i=e[c]%b)+(n=f*i+(o=e[c]/b|0)*u)%b*b+s)/r|0)+(n/b|0)+f*o,e[c]=a%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var a,i;if(r!=n)i=r>n?1:-1;else for(a=i=0;at[a]?1:-1;break}return i}function r(e,t,r,n){for(var a=0;r--;)e[r]-=a,a=e[r]1;e.splice(0,1));}return function(n,a,i,o,s){var u,f,h,p,b,m,v,y,A,w,x,E,_,C,k,B,I,S=n.s==a.s?1:-1,O=n.c,M=a.c;if(!O||!O[0]||!M||!M[0])return new N(n.s&&a.s&&(O?!M||O[0]!=M[0]:M)?O&&0==O[0]||!M?0*S:S/0:NaN);for(A=(y=new N(S)).c=[],S=i+(f=n.e-a.e)+1,s||(s=d,f=g(n.e/l)-g(a.e/l),S=S/l|0),h=0;M[h]==(O[h]||0);h++);if(M[h]>(O[h]||0)&&f--,S<0)A.push(1),p=!0;else{for(C=O.length,B=M.length,h=0,S+=2,(b=c(s/(M[0]+1)))>1&&(M=e(M,b,s),O=e(O,b,s),B=M.length,C=O.length),_=B,x=(w=O.slice(0,B)).length;x=s/2&&k++;do{if(b=0,(u=t(M,w,B,x))<0){if(E=w[0],B!=x&&(E=E*s+(w[1]||0)),(b=c(E/k))>1)for(b>=s&&(b=s-1),v=(m=e(M,b,s)).length,x=w.length;1==t(m,w,v,x);)b--,r(m,B=10;S/=10,h++);Q(y,i+(y.e=h+f*l-1)+1,o,p)}else y.e=f,y.r=+p;return y}}(),a=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,r=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,a=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(i,o,s,c){var f,d=s?o:o.replace(a,"");if(n.test(d))i.s=isNaN(d)?null:d<0?-1:1;else{if(!s&&(d=d.replace(e,(function(e,t,r){return f="x"==(r=r.toLowerCase())?16:"b"==r?2:8,c&&c!=f?e:t})),c&&(f=c,d=d.replace(t,"$1").replace(r,"0.$1")),o!=d))return new N(d,f);if(N.DEBUG)throw Error(u+"Not a"+(c?" base "+c:"")+" number: "+o);i.s=null}i.c=i.e=null}}(),i.absoluteValue=i.abs=function(){var e=new N(this);return e.s<0&&(e.s=1),e},i.comparedTo=function(e,t){return y(this,new N(e,t))},i.decimalPlaces=i.dp=function(e,t){var r,n,a,i=this;if(null!=e)return A(e,0,m),null==t?t=k:A(t,0,8),Q(new N(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((a=r.length-1)-g(this.e/l))*l,a=r[a])for(;a%10==0;a/=10,n--);return n<0&&(n=0),n},i.dividedBy=i.div=function(e,t){return r(this,new N(e,t),C,k)},i.dividedToIntegerBy=i.idiv=function(e,t){return r(this,new N(e,t),0,1)},i.exponentiatedBy=i.pow=function(e,t){var r,n,a,i,o,f,d,h,p=this;if((e=new N(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+G(e));if(null!=t&&(t=new N(t)),o=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return h=new N(Math.pow(+G(p),o?2-w(e):+G(e))),t?h.mod(t):h;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new N(NaN);(n=!f&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||o&&p.c[1]>=24e7:p.c[0]<8e13||o&&p.c[0]<=9999975e7)))return i=p.s<0&&w(e)?-0:0,p.e>-1&&(i=1/i),new N(f?1/i:i);T&&(i=s(T/l+2))}for(o?(r=new N(.5),f&&(e.s=1),d=w(e)):d=(a=Math.abs(+G(e)))%2,h=new N(_);;){if(d){if(!(h=h.times(p)).c)break;i?h.c.length>i&&(h.c.length=i):n&&(h=h.mod(t))}if(a){if(0===(a=c(a/2)))break;d=a%2}else if(Q(e=e.times(r),e.e+1,1),e.e>14)d=w(e);else{if(0===(a=+G(e)))break;d=a%2}p=p.times(p),i?p.c&&p.c.length>i&&(p.c.length=i):n&&(p=p.mod(t))}return n?h:(f&&(h=_.div(h)),t?h.mod(t):i?Q(h,T,k,undefined):h)},i.integerValue=function(e){var t=new N(this);return null==e?e=k:A(e,0,8),Q(t,t.e+1,e)},i.isEqualTo=i.eq=function(e,t){return 0===y(this,new N(e,t))},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(e,t){return y(this,new N(e,t))>0},i.isGreaterThanOrEqualTo=i.gte=function(e,t){return 1===(t=y(this,new N(e,t)))||0===t},i.isInteger=function(){return!!this.c&&g(this.e/l)>this.c.length-2},i.isLessThan=i.lt=function(e,t){return y(this,new N(e,t))<0},i.isLessThanOrEqualTo=i.lte=function(e,t){return-1===(t=y(this,new N(e,t)))||0===t},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&0==this.c[0]},i.minus=function(e,t){var r,n,a,i,o=this,s=o.s;if(t=(e=new N(e,t)).s,!s||!t)return new N(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/l,u=e.e/l,f=o.c,h=e.c;if(!c||!u){if(!f||!h)return f?(e.s=-t,e):new N(h?o:NaN);if(!f[0]||!h[0])return h[0]?(e.s=-t,e):new N(f[0]?o:3==k?-0:0)}if(c=g(c),u=g(u),f=f.slice(),s=c-u){for((i=s<0)?(s=-s,a=f):(u=c,a=h),a.reverse(),t=s;t--;a.push(0));a.reverse()}else for(n=(i=(s=f.length)<(t=h.length))?s:t,s=t=0;t0)for(;t--;f[r++]=0);for(t=d-1;n>s;){if(f[--n]=0;){for(r=0,p=E[a]%A,m=E[a]/A|0,i=a+(o=c);i>a;)r=((u=p*(u=x[--o]%A)+(s=m*u+(f=x[o]/A|0)*p)%A*A+v[i]+r)/y|0)+(s/A|0)+m*f,v[i--]=u%y;v[i]=r}return r?++n:v.splice(0,1),U(e,v,n)},i.negated=function(){var e=new N(this);return e.s=-e.s||null,e},i.plus=function(e,t){var r,n=this,a=n.s;if(t=(e=new N(e,t)).s,!a||!t)return new N(NaN);if(a!=t)return e.s=-t,n.minus(e);var i=n.e/l,o=e.e/l,s=n.c,c=e.c;if(!i||!o){if(!s||!c)return new N(a/0);if(!s[0]||!c[0])return c[0]?e:new N(s[0]?n:0*a)}if(i=g(i),o=g(o),s=s.slice(),a=i-o){for(a>0?(o=i,r=c):(a=-a,r=s),r.reverse();a--;r.push(0));r.reverse()}for((a=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=a),a=0;t;)a=(s[--t]=s[t]+c[t]+a)/d|0,s[t]=d===s[t]?0:s[t]%d;return a&&(s=[a].concat(s),++o),U(e,s,o)},i.precision=i.sd=function(e,t){var r,n,a,i=this;if(null!=e&&e!==!!e)return A(e,1,m),null==t?t=k:A(t,0,8),Q(new N(i),e,t);if(!(r=i.c))return null;if(n=(a=r.length-1)*l+1,a=r[a]){for(;a%10==0;a/=10,n--);for(a=r[0];a>=10;a/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},i.shiftedBy=function(e){return A(e,-9007199254740991,h),this.times("1e"+e)},i.squareRoot=i.sqrt=function(){var e,t,n,a,i,o=this,s=o.c,c=o.s,u=o.e,f=C+4,d=new N("0.5");if(1!==c||!s||!s[0])return new N(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(c=Math.sqrt(+G(o)))||c==1/0?(((t=v(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=g((u+1)/2)-(u<0||u%2),n=new N(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new N(c+""),n.c[0])for((c=(u=n.e)+f)<3&&(c=0);;)if(i=n,n=d.times(i.plus(r(o,i,f,1))),v(i.c).slice(0,c)===(t=v(n.c)).slice(0,c)){if(n.e0&&b>0){for(i=b%s||s,d=p.substr(0,i);i0&&(d+=f+p.slice(i)),h&&(d="-"+d)}n=l?d+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):d}return(r.prefix||"")+n+(r.suffix||"")},i.toFraction=function(e){var t,n,a,i,o,s,c,f,d,h,b,m,g=this,y=g.c;if(null!=e&&(!(c=new N(e)).isInteger()&&(c.c||1!==c.s)||c.lt(_)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+G(c));if(!y)return new N(g);for(t=new N(_),d=n=new N(_),a=f=new N(_),m=v(y),o=t.e=m.length-g.e-1,t.c[0]=p[(s=o%l)<0?l+s:s],e=!e||c.comparedTo(t)>0?o>0?t:d:c,s=O,O=1/0,c=new N(m),f.c[0]=0;h=r(c,t,0,1),1!=(i=n.plus(h.times(a))).comparedTo(e);)n=a,a=i,d=f.plus(h.times(i=d)),f=i,t=c.minus(h.times(i=t)),c=i;return i=r(e.minus(n),a,0,1),f=f.plus(i.times(d)),n=n.plus(i.times(a)),f.s=d.s=g.s,b=r(d,a,o*=2,k).minus(g).abs().comparedTo(r(f,n,o,k).minus(g).abs())<1?[d,a]:[f,n],O=s,b},i.toNumber=function(){return+G(this)},i.toPrecision=function(e,t){return null!=e&&A(e,1,m),j(this,e,t,2)},i.toString=function(e){var t,r=this,a=r.s,i=r.e;return null===i?a?(t="Infinity",a<0&&(t="-"+t)):t="NaN":(null==e?t=i<=B||i>=I?x(v(r.c),i):E(v(r.c),i,"0"):10===e&&P?t=E(v((r=Q(new N(r),C+i+1,k)).c),r.e,"0"):(A(e,2,R.length,"Base"),t=n(E(v(r.c),i,"0"),10,e,a,!0)),a<0&&r.c[0]&&(t="-"+t)),t},i.valueOf=i.toJSON=function(){return G(this)},i._isBigNumber=!0,null!=t&&N.set(t),N}(),i.default=i.BigNumber=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return m})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return b})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return f})),r.d(t,"g",(function(){return d})),r.d(t,"h",(function(){return h}));var n,a,i,o,s,c,u,f=((i=f||{}).MissingApiKey="MISSING_API_KEY",i.ModalNotReady="MODAL_NOT_READY",i.MalformedResponse="MALFORMED_RESPONSE",i.InvalidArgument="INVALID_ARGUMENT",i.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",i.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",i),d=((a=d||{}).SyncWeb3Method="SYNC_WEB3_METHOD",a.DuplicateIframe="DUPLICATE_IFRAME",a.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",a.DeprecationNotice="DEPRECATION_NOTICE",a),l=((n=l||{})[n.ParseError=-32700]="ParseError",n[n.InvalidRequest=-32600]="InvalidRequest",n[n.MethodNotFound=-32601]="MethodNotFound",n[n.InvalidParams=-32602]="InvalidParams",n[n.InternalError=-32603]="InternalError",n[n.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",n[n.MagicLinkExpired=-10001]="MagicLinkExpired",n[n.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",n[n.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",n[n.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",n[n.UpdateEmailFailed=-10004]="UpdateEmailFailed",n[n.UserRequestEditEmail=-10005]="UserRequestEditEmail",n[n.InactiveRecipient=-10010]="InactiveRecipient",n[n.AccessDeniedToUser=-10011]="AccessDeniedToUser",n[n.RedirectLoginComplete=-10015]="RedirectLoginComplete",n),h=((c=h||{}).MetaMask="metamask",c.CoinbaseWallet="coinbase_wallet",c),p=((s=p||{}).WalletSelected="wallet_selected",s.WalletConnected="wallet_connected",s.WalletRejected="wallet_rejected",s),b=((o=b||{}).LoginWithSms="magic_auth_login_with_sms",o.LoginWithEmailOTP="magic_auth_login_with_email_otp",o.LoginWithMagicLink="magic_auth_login_with_magic_link",o.LoginWithCredential="magic_auth_login_with_credential",o.SetAuthorizationToken="magic_auth_set_authorization_token",o.GetIdToken="magic_auth_get_id_token",o.GenerateIdToken="magic_auth_generate_id_token",o.GetMetadata="magic_auth_get_metadata",o.IsLoggedIn="magic_is_logged_in",o.Logout="magic_auth_logout",o.UpdateEmail="magic_auth_update_email",o.UserSettings="magic_auth_settings",o.UserSettingsTestMode="magic_auth_settings_testing_mode",o.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",o.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",o.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",o.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",o.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",o.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",o.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",o.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",o.LogoutTestMode="magic_auth_logout_testing_mode",o.UpdateEmailTestMode="magic_auth_update_email_testing_mode",o.IntermediaryEvent="magic_intermediary_event",o.RequestAccounts="eth_requestAccounts",o.GetInfo="magic_get_info",o.ShowUI="magic_wallet",o.NFTPurchase="magic_nft_purchase",o.NFTCheckout="magic_nft_checkout",o.RequestUserInfoWithUI="mc_request_user_info",o.Disconnect="mc_disconnect",o.UpdatePhoneNumber="magic_auth_update_phone_number",o.UpdatePhoneNumberTestMode="magic_auth_update_phone_number_testing_mode",o.RecoverAccount="magic_auth_recover_account",o.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",o.MagicBoxHeartBeat="magic_box_heart_beat",o.AutoConnect="mc_auto_connect",o.Login="mc_login",o.EncryptV1="magic_auth_encrypt_v1",o.DecryptV1="magic_auth_decrypt_v1",o.ShowNFTs="magic_show_nfts",o.ShowOnRamp="magic_show_fiat_onramp",o.ShowSendTokensUI="magic_show_send_tokens_ui",o.ShowAddress="magic_show_address",o.ShowBalances="magic_show_balances",o),m=function(e){return e.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",e.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",e.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",e.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",e.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",e.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",e}(m||{}),g=((u=g||{}).MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",u),v=function(e){return e.MFA="mfa",e.Recovery="recovery",e}(v||{}),y=function(e){return e.Harmony="HARMONY",e}(y||{}),A=function(e){return e.PhoneNumber="phone_number",e}(A||{})},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}e.exports=r},,function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return u}));var n=r(28),a=r(50),i=r(67),o=r(389),s=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,r}return n.a(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(a.a),c=(a.a,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.a(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(a.a));a.a;function u(e,t){if(!t.closed){if(e instanceof i.a)return e.subscribe(t);var r;try{r=Object(o.a)(e)(t)}catch(n){t.error(n)}return r}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return y})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return m})),r.d(t,"e",(function(){return g})),r.d(t,"f",(function(){return b})),r.d(t,"g",(function(){return l})),r.d(t,"h",(function(){return A})),r.d(t,"i",(function(){return f})),r.d(t,"j",(function(){return d})),r.d(t,"k",(function(){return h}));var n,a,i,o,s,c,u,f=((i=f||{}).MissingApiKey="MISSING_API_KEY",i.ModalNotReady="MODAL_NOT_READY",i.MalformedResponse="MALFORMED_RESPONSE",i.InvalidArgument="INVALID_ARGUMENT",i.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",i.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",i),d=((a=d||{}).SyncWeb3Method="SYNC_WEB3_METHOD",a.DuplicateIframe="DUPLICATE_IFRAME",a.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",a.DeprecationNotice="DEPRECATION_NOTICE",a),l=((n=l||{})[n.ParseError=-32700]="ParseError",n[n.InvalidRequest=-32600]="InvalidRequest",n[n.MethodNotFound=-32601]="MethodNotFound",n[n.InvalidParams=-32602]="InvalidParams",n[n.InternalError=-32603]="InternalError",n[n.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",n[n.MagicLinkExpired=-10001]="MagicLinkExpired",n[n.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",n[n.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",n[n.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",n[n.UpdateEmailFailed=-10004]="UpdateEmailFailed",n[n.UserRequestEditEmail=-10005]="UserRequestEditEmail",n[n.InactiveRecipient=-10010]="InactiveRecipient",n[n.AccessDeniedToUser=-10011]="AccessDeniedToUser",n[n.RedirectLoginComplete=-10015]="RedirectLoginComplete",n),h=((c=h||{}).MetaMask="metamask",c.CoinbaseWallet="coinbase_wallet",c),p=((s=p||{}).WalletSelected="wallet_selected",s.WalletConnected="wallet_connected",s.WalletRejected="wallet_rejected",s),b=((o=b||{}).LoginWithSms="magic_auth_login_with_sms",o.LoginWithEmailOTP="magic_auth_login_with_email_otp",o.LoginWithMagicLink="magic_auth_login_with_magic_link",o.LoginWithCredential="magic_auth_login_with_credential",o.SetAuthorizationToken="magic_auth_set_authorization_token",o.GetIdToken="magic_auth_get_id_token",o.GenerateIdToken="magic_auth_generate_id_token",o.GetMetadata="magic_auth_get_metadata",o.IsLoggedIn="magic_is_logged_in",o.Logout="magic_auth_logout",o.UpdateEmail="magic_auth_update_email",o.UserSettings="magic_auth_settings",o.UserSettingsTestMode="magic_auth_settings_testing_mode",o.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",o.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",o.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",o.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",o.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",o.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",o.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",o.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",o.LogoutTestMode="magic_auth_logout_testing_mode",o.UpdateEmailTestMode="magic_auth_update_email_testing_mode",o.IntermediaryEvent="magic_intermediary_event",o.RequestAccounts="eth_requestAccounts",o.GetInfo="magic_get_info",o.ShowUI="magic_wallet",o.NFTPurchase="magic_nft_purchase",o.NFTCheckout="magic_nft_checkout",o.RequestUserInfoWithUI="mc_request_user_info",o.Disconnect="mc_disconnect",o.UpdatePhoneNumber="magic_auth_update_phone_number",o.UpdatePhoneNumberTestMode="magic_auth_update_phone_number_testing_mode",o.RecoverAccount="magic_auth_recover_account",o.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",o.MagicBoxHeartBeat="magic_box_heart_beat",o.AutoConnect="mc_auto_connect",o.Login="mc_login",o.EncryptV1="magic_auth_encrypt_v1",o.DecryptV1="magic_auth_decrypt_v1",o),m=function(e){return e.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",e.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",e.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",e.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",e.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",e.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",e}(m||{}),g=((u=g||{}).MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",u),v=function(e){return e.MFA="mfa",e.Recovery="recovery",e}(v||{}),y=function(e){return e.Harmony="HARMONY",e}(y||{}),A=function(e){return e.PhoneNumber="phone_number",e}(A||{})},function(e,t,r){(function(t){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,r(55))},function(e,t,r){var n=r(2965)();e.exports=n;try{regeneratorRuntime=n}catch(a){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"g",(function(){return O})),r.d(t,"d",(function(){return M})),r.d(t,"a",(function(){return Z})),r.d(t,"e",(function(){return D})),r.d(t,"l",(function(){return T})),r.d(t,"m",(function(){return F})),r.d(t,"n",(function(){return R})),r.d(t,"o",(function(){return P})),r.d(t,"p",(function(){return N})),r.d(t,"t",(function(){return j})),r.d(t,"u",(function(){return L})),r.d(t,"s",(function(){return re})),r.d(t,"w",(function(){return U})),r.d(t,"v",(function(){return H})),r.d(t,"k",(function(){return te.a})),r.d(t,"h",(function(){return ne.a})),r.d(t,"f",(function(){return K})),r.d(t,"i",(function(){return W})),r.d(t,"q",(function(){return ee})),r.d(t,"b",(function(){return X})),r.d(t,"c",(function(){return l.a})),r.d(t,"y",(function(){return _.a})),r.d(t,"x",(function(){return y.a})),r.d(t,"z",(function(){return p})),r.d(t,"r",(function(){return Y.a})),r.d(t,"j",(function(){return B}));var n=r(0),a=r(1),i=r(2),o=r(41),s=r(40),c=r(7),u=r(8),f=r(70),d=r(30),l=r(337),h=[function(e){}],p={postMessage:function(e,t){console.log("GOT MOCK POST MESSAGE",e),h.forEach((function(t){t({data:e})}))},addEventListener:function(e,t){h.push(t)},removeEventListener:function(e,t){h.splice(h.indexOf((function(e){return e===t})),1)},location:{origin:"*"}};try{"undefined"!==typeof window&&(p=window)}catch(ae){console.log("not defined: ".concat(ae))}var b=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},m=function(){function e(t){if(Object(a.a)(this,e),this._beaconId=new f.a,this._keyPair=new f.a,!t.name)throw new Error("Name not set");if(!t.storage)throw new Error("Storage not set");this.name=t.name,this.iconUrl=t.iconUrl,this.appUrl=t.appUrl,this.storage=t.storage,p.beaconCreatedClientInstance?console.warn("[BEACON] It looks like you created multiple Beacon SDK Client instances. This can lead to problems. Only create one instance and re-use it everywhere."):p.beaconCreatedClientInstance=!0,this.initSDK().catch(console.error)}return Object(i.a)(e,[{key:"beaconId",get:function(){return this._beaconId.promise}},{key:"keyPair",get:function(){return this._keyPair.promise}},{key:"destroy",value:function(){return b(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.removeBeaconEntriesFromStorage();case 2:p.beaconCreatedClientInstance=!1;case 3:case"end":return e.stop()}}),e,this)})))}},{key:"initSDK",value:function(){return b(this,void 0,void 0,Object(n.a)().mark((function e(){var t=this;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.storage.set(d.i.BEACON_SDK_VERSION,l.b).catch(console.error),this.loadOrCreateBeaconSecret().catch(console.error),e.abrupt("return",this.keyPair.then((function(e){t._beaconId.resolve(Object(f.m)(e.publicKey))})));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"removeBeaconEntriesFromStorage",value:function(){return b(this,void 0,void 0,Object(n.a)().mark((function e(){var t,r=this;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object.values(d.i),e.next=3,Promise.all(t.map((function(e){return r.storage.delete(e)})));case 3:case"end":return e.stop()}}),e)})))}},{key:"loadOrCreateBeaconSecret",value:function(){return b(this,void 0,void 0,Object(n.a)().mark((function e(){var t,r;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.storage.get(d.i.BEACON_SDK_SECRET_SEED);case 2:if(!(t=e.sent)||"string"!==typeof t){e.next=11;break}return e.t0=this._keyPair,e.next=7,Object(f.h)(t);case 7:e.t1=e.sent,e.t0.resolve.call(e.t0,e.t1),e.next=21;break;case 11:return e.next=13,Object(f.e)();case 13:return r=e.sent,e.next=16,this.storage.set(d.i.BEACON_SDK_SECRET_SEED,r);case 16:return e.t2=this._keyPair,e.next=19,Object(f.h)(r);case 19:e.t3=e.sent,e.t2.resolve.call(e.t2,e.t3);case 21:case"end":return e.stop()}}),e,this)})))}}]),e}(),g=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};var v=function(){function e(t,r){Object(a.a)(this,e),this.storage=t,this.storageKey=r}return Object(i.a)(e,[{key:"getAll",value:function(){return g(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.storage.get(this.storageKey));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getOne",value:function(e){return g(this,void 0,void 0,Object(n.a)().mark((function t(){var r;return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.storage.get(this.storageKey);case 2:return r=t.sent,t.abrupt("return",r.find(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"addOne",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return g(this,void 0,void 0,Object(n.a)().mark((function a(){var i,o;return Object(n.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.storage.get(this.storageKey);case 2:if((i=n.sent).some(t)){if(r)for(o=0;o1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n2&&void 0!==arguments[2]?arguments[2]:[];if(k){var s="[BEACON] ".concat((new Date).toISOString()," [").concat(this.name,"](").concat(t,")"),c=o;switch(o[0]&&"string"===typeof o[0]&&(s+=" ".concat(o[0]),c=o.slice(1)),e){case"error":console.group(s),(r=console).error.apply(r,Object(C.a)(c));break;case"warn":console.group(s),(n=console).warn.apply(n,Object(C.a)(c));break;case"debug":console.groupCollapsed(s),(a=console).debug.apply(a,Object(C.a)(c));break;default:console.group(s),(i=console).log.apply(i,Object(C.a)(c))}console.groupEnd()}}}]),e}(),I=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},S=new B("Client"),O=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(e){var n,i;return Object(a.a)(this,r),(n=t.call(this,e)).rateLimit=2,n.rateLimitWindowInSeconds=5,n.requestCounter=[],n._transport=new f.a,n.accountManager=new E(e.storage),n.matrixNodes=null!==(i=e.matrixNodes)&&void 0!==i?i:[],n.handleResponse=function(e,t){throw new Error("not overwritten".concat(JSON.stringify(e)," - ").concat(JSON.stringify(t)))},n}return Object(i.a)(r,[{key:"transport",get:function(){return this._transport.promise}},{key:"connectionStatus",get:function(){var e,t;return null!==(t=null===(e=this._transport.promiseResult)||void 0===e?void 0:e.connectionStatus)&&void 0!==t?t:d.j.NOT_CONNECTED}},{key:"ready",get:function(){return this.transport.then((function(){}))}},{key:"getAccounts",value:function(){return I(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.accountManager.getAccounts());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getAccount",value:function(e){return I(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.accountManager.getAccount(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAccount",value:function(e){return I(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.accountManager.removeAccount(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAllAccounts",value:function(){return I(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.accountManager.removeAllAccounts());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"addRequestAndCheckIfRateLimited",value:function(){return I(this,void 0,void 0,Object(n.a)().mark((function e(){var t,r=this;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(new Date).getTime(),this.requestCounter=this.requestCounter.filter((function(e){return e+1e3*r.rateLimitWindowInSeconds>t})),this.requestCounter.push(t),e.abrupt("return",this.requestCounter.length>this.rateLimit);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"init",value:function(e){return I(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._transport.status!==f.b.RESOLVED){t.next=4;break}return t.next=3,this.transport;case 3:return t.abrupt("return",t.sent.type);case 4:return t.next=6,this.setTransport(e);case 6:return t.abrupt("return",e.type);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"getOwnAppMetadata",value:function(){return I(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=_.a,e.next=3,this.beaconId;case 3:return e.t1=e.sent,e.next=6,(0,e.t0)(e.t1);case 6:return e.t2=e.sent,e.t3=this.name,e.t4=this.iconUrl,e.abrupt("return",{senderId:e.t2,name:e.t3,icon:e.t4});case 10:case"end":return e.stop()}}),e,this)})))}},{key:"getPeers",value:function(){return I(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.transport;case 2:return e.abrupt("return",e.sent.getPeers());case 3:case"end":return e.stop()}}),e,this)})))}},{key:"addPeer",value:function(e){return I(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.transport;case 2:return t.abrupt("return",t.sent.addPeer(e));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"destroy",value:function(){var e=this,t=Object.create(null,{destroy:{get:function(){return Object(o.a)(Object(s.a)(r.prototype),"destroy",e)}}});return I(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._transport.status!==f.b.RESOLVED){e.next=5;break}return e.next=3,this.transport;case 3:return e.next=5,e.sent.disconnect();case 5:return e.next=7,t.destroy.call(this);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"setTransport",value:function(e){return I(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e?this._transport.isSettled()?this._transport=f.a.resolve(e):this._transport.resolve(e):this._transport.isSettled()&&(this._transport=new f.a);case 1:case"end":return t.stop()}}),t,this)})))}},{key:"addListener",value:function(e){return I(this,void 0,void 0,Object(n.a)().mark((function t(){var r=this;return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.addListener((function(e,t){return I(r,void 0,void 0,Object(n.a)().mark((function r(){var a;return Object(n.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("string"!==typeof e){r.next=5;break}return r.next=3,(new Y.a).deserialize(e);case 3:a=r.sent,this.handleResponse(a,t);case 5:case"end":return r.stop()}}),r,this)})))})).catch((function(e){return S.error("addListener",e)}));case 1:case"end":return t.stop()}}),t)})))}},{key:"sendDisconnectToPeer",value:function(e,t){return I(this,void 0,void 0,Object(n.a)().mark((function r(){var a,i,o;return Object(n.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(f.e)();case 2:return r.t0=r.sent,r.t1=l.a,r.t2=_.a,r.next=7,this.beaconId;case 7:return r.t3=r.sent,r.next=10,(0,r.t2)(r.t3);case 10:return r.t4=r.sent,r.t5=d.b.Disconnect,a={id:r.t0,version:r.t1,senderId:r.t4,type:r.t5},r.next=15,(new Y.a).serialize(a);case 15:if(i=r.sent,null===t||void 0===t){r.next=20;break}r.t6=t,r.next=23;break;case 20:return r.next=22,this.transport;case 22:r.t6=r.sent;case 23:return o=r.t6,r.next=26,o.send(i,e);case 26:case"end":return r.stop()}}),r,this)})))}}]),r}(m);var M=function(){function e(t,r){Object(a.a)(this,e),this.name="BeaconError",this.title="Error",this.message="[".concat(t,"]:").concat(r),this.description=r}return Object(i.a)(e,[{key:"fullDescription",get:function(){return{description:this.description}}}],[{key:"getError",value:function(e,t){switch(e){case d.a.BROADCAST_ERROR:return new D;case d.a.NETWORK_NOT_SUPPORTED:return new T;case d.a.NO_ADDRESS_ERROR:return new F;case d.a.NO_PRIVATE_KEY_FOUND_ERROR:return new R;case d.a.NOT_GRANTED_ERROR:return new P;case d.a.PARAMETERS_INVALID_ERROR:return new N;case d.a.TOO_MANY_OPERATIONS:return new j;case d.a.TRANSACTION_INVALID_ERROR:return new L(t);case d.a.SIGNATURE_TYPE_NOT_SUPPORTED:return new re;case d.a.ABORTED_ERROR:return new Z;case d.a.UNKNOWN_ERROR:return new U}}}]),e}(),D=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(){var e;return Object(a.a)(this,r),(e=t.call(this,d.a.BROADCAST_ERROR,"The transaction could not be broadcast to the network. Please try again.")).name="BroadcastBeaconError",e.title="Broadcast Error",e}return Object(i.a)(r)}(M),T=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(){var e;return Object(a.a)(this,r),(e=t.call(this,d.a.NETWORK_NOT_SUPPORTED,"The wallet does not support this network. Please select another one.")).name="NetworkNotSupportedBeaconError",e.title="Network Error",e}return Object(i.a)(r)}(M),F=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(){var e;return Object(a.a)(this,r),(e=t.call(this,d.a.NO_ADDRESS_ERROR,"The wallet does not have an account set up. Please make sure to set up your wallet and try again.")).name="NoAddressBeaconError",e.title="No Address",e}return Object(i.a)(r)}(M),R=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(){var e;return Object(a.a)(this,r),(e=t.call(this,d.a.NO_PRIVATE_KEY_FOUND_ERROR,"The account you are trying to interact with is not available. Please make sure to add the account to your wallet and try again.")).name="NoPrivateKeyBeaconError",e.title="Account Not Found",e}return Object(i.a)(r)}(M),P=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(){var e;return Object(a.a)(this,r),(e=t.call(this,d.a.NOT_GRANTED_ERROR,"You do not have the necessary permissions to perform this action. Please initiate another permission request and give the necessary permissions.")).name="NotGrantedBeaconError",e.title="Permission Not Granted",e}return Object(i.a)(r)}(M),N=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(){var e;return Object(a.a)(this,r),(e=t.call(this,d.a.PARAMETERS_INVALID_ERROR,"Some of the parameters you provided are invalid and the request could not be completed. Please check your inputs and try again.")).name="ParametersInvalidBeaconError",e.title="Parameters Invalid",e}return Object(i.a)(r)}(M),j=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(){var e;return Object(a.a)(this,r),(e=t.call(this,d.a.TOO_MANY_OPERATIONS,"The request contains too many transactions. Please include fewer operations and try again.")).name="TooManyOperationsBeaconError",e.title="Too Many Operations",e}return Object(i.a)(r)}(M),L=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(e){var n;return Object(a.a)(this,r),(n=t.call(this,d.a.TRANSACTION_INVALID_ERROR,"The transaction is invalid and the node did not accept it.")).data=e,n.name="TransactionInvalidBeaconError",n.title="Transaction Invalid",n.data=e,n}return Object(i.a)(r,[{key:"fullDescription",get:function(){return{description:this.description,data:JSON.stringify(this.data,void 0,2)}}}]),r}(M),U=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(){var e;return Object(a.a)(this,r),(e=t.call(this,d.a.UNKNOWN_ERROR,"An unknown error occured. Please try again or report it to a developer.")).name="UnknownBeaconError",e.title="Error",e}return Object(i.a)(r)}(M),Q=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},G=new B("Transport"),H=function(){function e(t,r,n){Object(a.a)(this,e),this.type=d.k.POST_MESSAGE,this._isConnected=d.j.NOT_CONNECTED,this.listeners=[],this.name=t,this.client=r,this.peerManager=n}return Object(i.a)(e,[{key:"connectionStatus",get:function(){return this._isConnected}},{key:"connect",value:function(){return Q(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return G.log("connect"),this._isConnected=d.j.CONNECTED,e.abrupt("return");case 3:case"end":return e.stop()}}),e,this)})))}},{key:"disconnect",value:function(){return Q(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return G.log("disconnect"),this._isConnected=d.j.NOT_CONNECTED,e.abrupt("return");case 3:case"end":return e.stop()}}),e,this)})))}},{key:"send",value:function(e,t){return Q(this,void 0,void 0,Object(n.a)().mark((function r(){var a,i,o=this;return Object(n.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!t){r.next=4;break}return r.abrupt("return",this.client.sendMessage(e,t));case 4:return r.next=6,this.getPeers();case 6:return a=r.sent,i=a.map((function(t){return o.client.sendMessage(e,t)})),r.next=10,Promise.all(i);case 10:return r.abrupt("return",r.sent[0]);case 11:case"end":return r.stop()}}),r,this)})))}},{key:"addListener",value:function(e){return Q(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return G.debug("addListener",e),this.listeners.push(e),t.abrupt("return");case 3:case"end":return t.stop()}}),t,this)})))}},{key:"removeListener",value:function(e){return Q(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return G.log("removeListener"),this.listeners=this.listeners.filter((function(t){return t!==e})),t.abrupt("return");case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getPeers",value:function(){return Q(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.peerManager.getPeers());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"addPeer",value:function(e){return Q(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return G.log("addPeer","adding peer",e),t.next=3,this.peerManager.addPeer(e);case 3:return t.next=5,this.listen(e.publicKey);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"removePeer",value:function(e){return Q(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return G.log("removePeer","removing peer",e),t.next=3,this.peerManager.removePeer(e.publicKey);case 3:if(!this.client){t.next=6;break}return t.next=6,this.client.unsubscribeFromEncryptedMessage(e.publicKey);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"removeAllPeers",value:function(){return Q(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return G.log("removeAllPeers"),e.next=3,this.peerManager.removeAllPeers();case 3:if(!this.client){e.next=6;break}return e.next=6,this.client.unsubscribeFromEncryptedMessages();case 6:case"end":return e.stop()}}),e,this)})))}},{key:"notifyListeners",value:function(e,t){return Q(this,void 0,void 0,Object(n.a)().mark((function r(){return Object(n.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return 0===this.listeners.length?G.warn("notifyListeners","0 listeners notified!",this):G.log("notifyListeners","Notifying ".concat(this.listeners.length," listeners"),this),this.listeners.forEach((function(r){r(e,t)})),r.abrupt("return");case 3:case"end":return r.stop()}}),r,this)})))}}],[{key:"isAvailable",value:function(){return Q(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(!1));case 1:case"end":return e.stop()}}),e)})))}}]),e}(),z=r(12),q=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},K=function(){function e(){Object(a.a)(this,e)}return Object(i.a)(e,[{key:"get",value:function(e){return q(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){chrome.storage.local.get(null,(function(r){r[e]?t(r[e]):"object"===typeof d.l[e]?t(JSON.parse(JSON.stringify(d.l[e]))):t(d.l[e])}))})));case 1:case"end":return t.stop()}}),t)})))}},{key:"set",value:function(e,t){return q(this,void 0,void 0,Object(n.a)().mark((function r(){return Object(n.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(r){chrome.storage.local.set(Object(z.a)({},e,t),(function(){r()}))})));case 1:case"end":return r.stop()}}),r)})))}},{key:"delete",value:function(e){return q(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){chrome.storage.local.set(Object(z.a)({},e,void 0),(function(){t()}))})));case 1:case"end":return t.stop()}}),t)})))}}],[{key:"isSupported",value:function(){return q(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return","undefined"!==typeof window&&"undefined"!==typeof chrome&&Boolean(chrome)&&Boolean(chrome.runtime)&&Boolean(chrome.runtime.id));case 1:case"end":return e.stop()}}),e)})))}}]),e}(),V=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},W=function(){function e(t){Object(a.a)(this,e),this.prefix=t}return Object(i.a)(e,[{key:"get",value:function(e){return V(this,void 0,void 0,Object(n.a)().mark((function t(){var r;return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=localStorage.getItem(this.getPrefixedKey(e))){t.next=9;break}if("object"!==typeof d.l[e]){t.next=6;break}return t.abrupt("return",JSON.parse(JSON.stringify(d.l[e])));case 6:return t.abrupt("return",d.l[e]);case 7:t.next=16;break;case 9:return t.prev=9,t.abrupt("return",JSON.parse(r));case 13:return t.prev=13,t.t0=t.catch(9),t.abrupt("return",r);case 16:case"end":return t.stop()}}),t,this,[[9,13]])})))}},{key:"set",value:function(e,t){return V(this,void 0,void 0,Object(n.a)().mark((function r(){return Object(n.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("string"!==typeof t){r.next=4;break}return r.abrupt("return",localStorage.setItem(this.getPrefixedKey(e),t));case 4:return r.abrupt("return",localStorage.setItem(this.getPrefixedKey(e),JSON.stringify(t)));case 5:case"end":return r.stop()}}),r,this)})))}},{key:"delete",value:function(e){return V(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.resolve(localStorage.removeItem(this.getPrefixedKey(e))));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getPrefixedKey",value:function(e){return this.prefix?"".concat(this.prefix,"-").concat(e):e}}],[{key:"isSupported",value:function(){return V(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(Boolean("undefined"!==typeof window)&&Boolean(window.localStorage)));case 1:case"end":return e.stop()}}),e)})))}}]),e}(),Y=(new B("STORAGE"),r(1497)),J=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},X=function(){function e(t){Object(a.a)(this,e),this.storageManager=new v(t,d.i.APP_METADATA_LIST)}return Object(i.a)(e,[{key:"getAppMetadataList",value:function(){return J(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.storageManager.getAll());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getAppMetadata",value:function(e){return J(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.getOne((function(t){return t.senderId===e})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"addAppMetadata",value:function(e){return J(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.addOne(e,(function(t){return t.senderId===e.senderId})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAppMetadata",value:function(e){return J(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.remove((function(t){return t.senderId===e})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAppMetadatas",value:function(e){return J(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.remove((function(t){return e.includes(t.senderId)})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAllAppMetadata",value:function(){return J(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.storageManager.removeAll());case 1:case"end":return e.stop()}}),e,this)})))}}]),e}(),Z=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(){var e;return Object(a.a)(this,r),(e=t.call(this,d.a.ABORTED_ERROR,"The action was aborted by the user.")).name="UnknownBeaconError",e.title="Aborted",e}return Object(i.a)(r)}(M),$=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},ee=function(){function e(t,r){Object(a.a)(this,e),this.storageManager=new v(t,r)}return Object(i.a)(e,[{key:"hasPeer",value:function(e){return $(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPeer(e);case 2:if(!t.sent){t.next=6;break}t.t0=!0,t.next=7;break;case 6:t.t0=!1;case 7:return t.abrupt("return",t.t0);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"getPeers",value:function(){return $(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.storageManager.getAll());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getPeer",value:function(e){return $(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.getOne((function(t){return t.publicKey===e})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"addPeer",value:function(e){return $(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.addOne(e,(function(t){return t.publicKey===e.publicKey})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removePeer",value:function(e){return $(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.remove((function(t){return t.publicKey===e})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removePeers",value:function(e){return $(this,void 0,void 0,Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.remove((function(t){return e.includes(t.publicKey)})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAllPeers",value:function(){return $(this,void 0,void 0,Object(n.a)().mark((function e(){return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.storageManager.removeAll());case 1:case"end":return e.stop()}}),e,this)})))}}]),e}(),te=r(1498),re=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(){var e;return Object(a.a)(this,r),(e=t.call(this,d.a.SIGNATURE_TYPE_NOT_SUPPORTED,"The wallet is not able to sign payloads of this type.")).name="SignatureTypeNotSupportedBeaconError",e.title="Signature Type Not Supported",e}return Object(i.a)(r)}(M),ne=r(836)},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19);(0,n.__exportStar)(r(1957),t),(0,n.__exportStar)(r(1958),t),(0,n.__exportStar)(r(720),t),(0,n.__exportStar)(r(515),t),(0,n.__exportStar)(r(1959),t),(0,n.__exportStar)(r(1083),t),(0,n.__exportStar)(r(1960),t),(0,n.__exportStar)(r(1961),t),(0,n.__exportStar)(r(1962),t),(0,n.__exportStar)(r(1963),t),(0,n.__exportStar)(r(1964),t),(0,n.__exportStar)(r(1965),t),(0,n.__exportStar)(r(1966),t),(0,n.__exportStar)(r(1967),t),(0,n.__exportStar)(r(1968),t),(0,n.__exportStar)(r(1969),t)},function(e,t,r){"use strict";r.d(t,"b",(function(){return o}));var n=r(12),a=r(1127),i=r(182);function o(e,t){if(!t||"string"!==typeof t)return null;if(e&&e.vars){var r="vars.".concat(t).split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e);if(null!=r)return r}return t.split(".").reduce((function(e,t){return e&&null!=e[t]?e[t]:null}),e)}function s(e,t,r){var n,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r;return n="function"===typeof e?e(r):Array.isArray(e)?e[r]||a:o(e,r)||a,t&&(n=t(n)),n}t.a=function(e){var t=e.prop,r=e.cssProperty,c=void 0===r?e.prop:r,u=e.themeKey,f=e.transform,d=function(e){if(null==e[t])return null;var r=e[t],d=o(e.theme,u)||{};return Object(i.b)(e,r,(function(e){var r=s(d,f,e);return e===r&&"string"===typeof e&&(r=s(d,f,"".concat(t).concat("default"===e?"":Object(a.a)(e)),e)),!1===c?r:Object(n.a)({},c,r)}))};return d.propTypes={},d.filterProps=[t],d}},function(e,t){function r(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(u){return void r(u)}s.done?t(c):Promise.resolve(c).then(n,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var o=e.apply(t,n);function s(e){r(o,a,i,s,c,"next",e)}function c(e){r(o,a,i,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(571),a=r(50),i=r(491),o=r(580);var s=r(290),c=r(484),u=r(236),f=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,s=function(e,t,r){if(e){if(e instanceof a.a)return e;if(e[i.a])return e[i.a]()}return e||t||r?new a.a(e,t,r):new a.a(o.a)}(e,t,r);if(n?s.add(n.call(s,this.source)):s.add(this.source||u.a.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),u.a.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){u.a.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),Object(n.a)(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=d(t))((function(t,n){var a;a=r.subscribe((function(t){try{e(t)}catch(r){n(r),a&&a.unsubscribe()}}),n,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[s.a]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t=256)return!1}return!0}function u(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),i(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),l(e)){var o=e.substring(2);o.length%2&&("left"===t.hexPad?o="0"+o:"right"===t.hexPad?o+="0":n.throwArgumentError("hex data is odd-length","value",e));for(var s=[],u=0;u>4]+h[15&s]}return i}return n.throwArgumentError("invalid hexlify value","value",e)}function b(e){if("string"!==typeof e)e=p(e);else if(!l(e)||e.length%2)return null;return(e.length-2)/2}function m(e,t,r){return"string"!==typeof e?e=p(e):(!l(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function g(e){var t="0x";return e.forEach((function(e){t+=p(e).substring(2)})),t}function v(e,t){for("string"!==typeof e?e=p(e):l(e)||n.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}},function(e,t,r){"use strict";(function(t){var n=r(509);function a(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a=0;u--)if(f[u]!==d[u])return!1;for(u=f.length-1;u>=0;u--)if(!y(e[s=f[u]],t[s],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function A(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(r){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function x(e,t,r,n){var a;if("function"!==typeof t)throw new TypeError('"block" argument must be a function');"string"===typeof r&&(n=r,r=null),a=function(e){var t;try{e()}catch(r){t=r}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!a&&g(a,r,"Missing expected exception"+n);var i="string"===typeof n,s=!e&&a&&!r;if((!e&&o.isError(a)&&i&&w(a,r)||s)&&g(a,r,"Got unwanted exception"+n),e&&a&&r&&!w(a,r)||!e&&a)throw a}l.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return b(m(e.actual),128)+" "+e.operator+" "+b(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,a=p(t),i=n.indexOf("\n"+a);if(i>=0){var o=n.indexOf("\n",i+1);n=n.substring(o+1)}this.stack=n}}},o.inherits(l.AssertionError,Error),l.fail=g,l.ok=v,l.equal=function(e,t,r){e!=t&&g(e,t,r,"==",l.equal)},l.notEqual=function(e,t,r){e==t&&g(e,t,r,"!=",l.notEqual)},l.deepEqual=function(e,t,r){y(e,t,!1)||g(e,t,r,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(e,t,r){y(e,t,!0)||g(e,t,r,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(e,t,r){y(e,t,!1)&&g(e,t,r,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function e(t,r,n){y(t,r,!0)&&g(t,r,n,"notDeepStrictEqual",e)},l.strictEqual=function(e,t,r){e!==t&&g(e,t,r,"===",l.strictEqual)},l.notStrictEqual=function(e,t,r){e===t&&g(e,t,r,"!==",l.notStrictEqual)},l.throws=function(e,t,r){x(!0,e,t,r)},l.doesNotThrow=function(e,t,r){x(!1,e,t,r)},l.ifError=function(e){if(e)throw e},l.strict=n((function e(t,r){t||g(t,!0,r,"==",e)}),l,{equal:l.strictEqual,deepEqual:l.deepStrictEqual,notEqual:l.notStrictEqual,notDeepEqual:l.notDeepStrictEqual}),l.strict.strict=l.strict;var E=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this,r(55))},function(e,t,r){"use strict";function n(e){return Object.keys(e)}r.d(t,"i",(function(){return n})),r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return a})),r.d(t,"h",(function(){return u.e})),r.d(t,"m",(function(){return u.i})),r.d(t,"f",(function(){return u.c})),r.d(t,"c",(function(){return u.a})),r.d(t,"d",(function(){return u.b})),r.d(t,"g",(function(){return u.d})),r.d(t,"l",(function(){return u.h})),r.d(t,"j",(function(){return u.f})),r.d(t,"k",(function(){return u.g})),r.d(t,"e",(function(){return f.a}));var a,i=r(1),o=r(2);!function(e){e.PENDING="pending",e.RESOLVED="resolved",e.REJECTED="rejected"}(a||(a={}));var s=function(){throw new Error("ExposedPromise not initialized yet.")},c=function(){function e(){var t=this;Object(i.a)(this,e),this._resolve=s,this._reject=s,this._status=a.PENDING,this._promise=new Promise((function(e,r){t._resolve=function(r){t.isSettled()||(t._promiseResult=r,e(r),t._status=a.RESOLVED)},t._reject=function(e){t.isSettled()||(t._promiseError=e,r(e),t._status=a.REJECTED)}}))}return Object(o.a)(e,[{key:"promise",get:function(){return this._promise}},{key:"resolve",get:function(){return this._resolve}},{key:"reject",get:function(){return this._reject}},{key:"status",get:function(){return this._status}},{key:"promiseResult",get:function(){return this._promiseResult}},{key:"promiseError",get:function(){return this._promiseError}},{key:"isPending",value:function(){return this.status===a.PENDING}},{key:"isResolved",value:function(){return this.status===a.RESOLVED}},{key:"isRejected",value:function(){return this.status===a.REJECTED}},{key:"isSettled",value:function(){return this.isResolved()||this.isRejected()}}],[{key:"resolve",value:function(t){var r=new e;return r.resolve(t),r}},{key:"reject",value:function(t){var r=new e;return r.reject(t),r}}]),e}(),u=r(331),f=r(1496)},function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return o})),r.d(t,"g",(function(){return s})),r.d(t,"d",(function(){return c})),r.d(t,"f",(function(){return u})),r.d(t,"e",(function(){return f}));var n=r(69),a="@metaplex-foundation/beet",i="len",o="Beet<{innner}>";function s(e){return Object.keys(e).includes("byteSize")}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"".concat(e," should have been a fixed beet");Object(n.strict)(s(e),t)}function u(e){return"function"===typeof e.toFixedFromData&&"function"===typeof e.toFixedFromValue}function f(e){var t=Object.keys(e);return t.includes("length")&&t.includes("elementByteSize")&&t.includes("lenPrefixByteSize")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(810);n.__exportStar(r(3671),t),n.__exportStar(r(3676),t),n.__exportStar(r(3677),t),n.__exportStar(r(1540),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19);(0,n.__exportStar)(r(2020),t),(0,n.__exportStar)(r(2021),t),(0,n.__exportStar)(r(728),t),(0,n.__exportStar)(r(615),t),(0,n.__exportStar)(r(2022),t),(0,n.__exportStar)(r(2023),t),(0,n.__exportStar)(r(2024),t),(0,n.__exportStar)(r(2025),t),(0,n.__exportStar)(r(2026),t),(0,n.__exportStar)(r(2027),t),(0,n.__exportStar)(r(2028),t),(0,n.__exportStar)(r(2029),t),(0,n.__exportStar)(r(2030),t),(0,n.__exportStar)(r(2031),t),(0,n.__exportStar)(r(2032),t),(0,n.__exportStar)(r(2033),t)},function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(1),a=r(2),i=!1,o=!1,s={debug:1,default:2,info:2,warning:3,error:4,off:5},c=s.default,u=null;var f,d,l=function(){try{var e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(f||(f={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(d||(d={}));var h="0123456789abcdef",p=function(){function e(t){Object(n.a)(this,e),Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}return Object(a.a)(e,[{key:"_log",value:function(e,t){var r=e.toLowerCase();null==s[r]&&this.throwArgumentError("invalid log level name","logLevel",e),c>s[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=h[15&t[i]];a.push(e+"=Uint8Array(0x"+r+")")}else a.push(e+"="+JSON.stringify(t))}catch(u){a.push(e+"="+JSON.stringify(n[e].toString()))}})),a.push("code=".concat(r)),a.push("version=".concat(this.version));var i=t,s="";switch(r){case d.NUMERIC_FAULT:s="NUMERIC_FAULT";var c=t;switch(c){case"overflow":case"underflow":case"division-by-zero":s+="-"+c;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case d.CALL_EXCEPTION:case d.INSUFFICIENT_FUNDS:case d.MISSING_NEW:case d.NONCE_EXPIRED:case d.REPLACEMENT_UNDERPRICED:case d.TRANSACTION_REPLACED:case d.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),a.length&&(t+=" ("+a.join(", ")+")");var u=new Error(t);return u.reason=i,u.code=r,Object.keys(n).forEach((function(e){u[e]=n[e]})),u}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),l&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:l})}},{key:"checkSafeUint53",value:function(t,r){"number"===typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return u||(u=new e("logger/5.6.0")),u}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),i){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}o=!!t,i=!!r}},{key:"setLogLevel",value:function(t){var r=s[t.toLowerCase()];null!=r?c=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();p.errors=d,p.levels=f},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(525),t),a(r(2506),t),a(r(2507),t),a(r(2508),t),a(r(2509),t),a(r(2510),t),a(r(2511),t),a(r(2512),t),a(r(2513),t),a(r(1275),t)},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,r){"use strict";(function(e){r.d(t,"e",(function(){return n})),r.d(t,"p",(function(){return a})),r.d(t,"a",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return s})),r.d(t,"o",(function(){return c})),r.d(t,"q",(function(){return u})),r.d(t,"t",(function(){return f})),r.d(t,"i",(function(){return d})),r.d(t,"r",(function(){return l})),r.d(t,"s",(function(){return h})),r.d(t,"k",(function(){return p})),r.d(t,"m",(function(){return b})),r.d(t,"j",(function(){return m})),r.d(t,"l",(function(){return g})),r.d(t,"g",(function(){return v})),r.d(t,"f",(function(){return y})),r.d(t,"h",(function(){return A})),r.d(t,"n",(function(){return w})),r.d(t,"b",(function(){return x}));var n="1.13.3",a="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||Function("return this")()||{},i=Array.prototype,o=Object.prototype,s="undefined"!==typeof Symbol?Symbol.prototype:null,c=i.push,u=i.slice,f=o.toString,d=o.hasOwnProperty,l="undefined"!==typeof ArrayBuffer,h="undefined"!==typeof DataView,p=Array.isArray,b=Object.keys,m=Object.create,g=l&&ArrayBuffer.isView,v=isNaN,y=isFinite,A=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],x=Math.pow(2,53)-1}).call(this,r(55))},function(e,t,r){var n=r(1750),a=r(1169),i=r(711),o=r(1751);e.exports=function(e){return n(e)||a(e)||i(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2713).Buffer}catch(I){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,a){for(var i=0,o=0,s=Math.min(e.length,r),c=t;c=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&o0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=c(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(I){i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o>>24-a&16777215)||o!==this.length-1?l[6-c.length]+c+r:c+r,(a+=2)>=26&&(a-=26,o--)}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(f).toString(e);r=(d=d.idivn(f)).isZero()?b+r:l[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function b(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(o=(a=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,a),o},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===i?(r>=0&&(e[r--]=o>>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],A=8191&y,w=y>>>13,x=0|o[4],E=8191&x,_=x>>>13,C=0|o[5],k=8191&C,B=C>>>13,I=0|o[6],S=8191&I,O=I>>>13,M=0|o[7],D=8191&M,T=M>>>13,F=0|o[8],R=8191&F,P=F>>>13,N=0|o[9],j=8191&N,L=N>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,Y=0|s[3],J=8191&Y,X=Y>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,Q))|0)+((8191&(a=(a=Math.imul(d,G))+Math.imul(l,Q)|0))<<13)|0;u=((i=Math.imul(l,G))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,Q),a=(a=Math.imul(p,G))+Math.imul(b,Q)|0,i=Math.imul(b,G);var ge=(u+(n=n+Math.imul(d,z)|0)|0)+((8191&(a=(a=a+Math.imul(d,q)|0)+Math.imul(l,z)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,Q),a=(a=Math.imul(g,G))+Math.imul(v,Q)|0,i=Math.imul(v,G),n=n+Math.imul(p,z)|0,a=(a=a+Math.imul(p,q)|0)+Math.imul(b,z)|0,i=i+Math.imul(b,q)|0;var ve=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,Q),a=(a=Math.imul(A,G))+Math.imul(w,Q)|0,i=Math.imul(w,G),n=n+Math.imul(g,z)|0,a=(a=a+Math.imul(g,q)|0)+Math.imul(v,z)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(p,V)|0,a=(a=a+Math.imul(p,W)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ye=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(a=(a=a+Math.imul(d,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((i=i+Math.imul(l,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,Q),a=(a=Math.imul(E,G))+Math.imul(_,Q)|0,i=Math.imul(_,G),n=n+Math.imul(A,z)|0,a=(a=a+Math.imul(A,q)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,q)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(p,J)|0,a=(a=a+Math.imul(p,X)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,X)|0;var Ae=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,Q),a=(a=Math.imul(k,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),n=n+Math.imul(E,z)|0,a=(a=a+Math.imul(E,q)|0)+Math.imul(_,z)|0,i=i+Math.imul(_,q)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(g,J)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,a=(a=a+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((i=i+Math.imul(l,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,Q),a=(a=Math.imul(S,G))+Math.imul(O,Q)|0,i=Math.imul(O,G),n=n+Math.imul(k,z)|0,a=(a=a+Math.imul(k,q)|0)+Math.imul(B,z)|0,i=i+Math.imul(B,q)|0,n=n+Math.imul(E,V)|0,a=(a=a+Math.imul(E,W)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(A,J)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,a=(a=a+Math.imul(p,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var xe=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,oe)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),a=(a=Math.imul(D,G))+Math.imul(T,Q)|0,i=Math.imul(T,G),n=n+Math.imul(S,z)|0,a=(a=a+Math.imul(S,q)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,q)|0,n=n+Math.imul(k,V)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(A,$)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(p,ie)|0,a=(a=a+Math.imul(p,oe)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,oe)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,Q),a=(a=Math.imul(R,G))+Math.imul(P,Q)|0,i=Math.imul(P,G),n=n+Math.imul(D,z)|0,a=(a=a+Math.imul(D,q)|0)+Math.imul(T,z)|0,i=i+Math.imul(T,q)|0,n=n+Math.imul(S,V)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,n=n+Math.imul(E,$)|0,a=(a=a+Math.imul(E,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(p,ce)|0,a=(a=a+Math.imul(p,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0;var _e=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),a=(a=Math.imul(j,G))+Math.imul(L,Q)|0,i=Math.imul(L,G),n=n+Math.imul(R,z)|0,a=(a=a+Math.imul(R,q)|0)+Math.imul(P,z)|0,i=i+Math.imul(P,q)|0,n=n+Math.imul(D,V)|0,a=(a=a+Math.imul(D,W)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,W)|0,n=n+Math.imul(S,J)|0,a=(a=a+Math.imul(S,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,a=(a=a+Math.imul(E,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(g,ce)|0,a=(a=a+Math.imul(g,ue)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,a=(a=a+Math.imul(p,le)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,le)|0;var Ce=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(a=(a=a+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((i=i+Math.imul(l,be)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,z),a=(a=Math.imul(j,q))+Math.imul(L,z)|0,i=Math.imul(L,q),n=n+Math.imul(R,V)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(S,$)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(E,ie)|0,a=(a=a+Math.imul(E,oe)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(A,ce)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,n=n+Math.imul(g,de)|0,a=(a=a+Math.imul(g,le)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0;var ke=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(a=(a=a+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),a=(a=Math.imul(j,W))+Math.imul(L,V)|0,i=Math.imul(L,W),n=n+Math.imul(R,J)|0,a=(a=a+Math.imul(R,X)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(E,ce)|0,a=(a=a+Math.imul(E,ue)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,le)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0;var Be=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(a=(a=a+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((i=i+Math.imul(v,be)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,J),a=(a=Math.imul(j,X))+Math.imul(L,J)|0,i=Math.imul(L,X),n=n+Math.imul(R,$)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(D,re)|0,a=(a=a+Math.imul(D,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(k,ce)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,n=n+Math.imul(E,de)|0,a=(a=a+Math.imul(E,le)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,le)|0;var Ie=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(a=(a=a+Math.imul(A,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,$),a=(a=Math.imul(j,ee))+Math.imul(L,$)|0,i=Math.imul(L,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(D,ie)|0,a=(a=a+Math.imul(D,oe)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,oe)|0,n=n+Math.imul(S,ce)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,le)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,le)|0;var Se=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(a=(a=a+Math.imul(E,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((i=i+Math.imul(_,be)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,re),a=(a=Math.imul(j,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(D,ce)|0,a=(a=a+Math.imul(D,ue)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,le)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(a=(a=a+Math.imul(k,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ie),a=(a=Math.imul(j,oe))+Math.imul(L,ie)|0,i=Math.imul(L,oe),n=n+Math.imul(R,ce)|0,a=(a=a+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,n=n+Math.imul(D,de)|0,a=(a=a+Math.imul(D,le)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,le)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(a=(a=a+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,ce),a=(a=Math.imul(j,ue))+Math.imul(L,ce)|0,i=Math.imul(L,ue),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,le)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,le)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(a=(a=a+Math.imul(D,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,de),a=(a=Math.imul(j,le))+Math.imul(L,de)|0,i=Math.imul(L,le);var Te=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(a=(a=a+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Fe=(u+(n=Math.imul(j,pe))|0)+((8191&(a=(a=Math.imul(j,be))+Math.imul(L,pe)|0))<<13)|0;return u=((i=Math.imul(L,be))+(a>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=Ae,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=_e,c[9]=Ce,c[10]=ke,c[11]=Be,c[12]=Ie,c[13]=Se,c[14]=Oe,c[15]=Me,c[16]=De,c[17]=Te,c[18]=Fe,0!==u&&(c[19]=u,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function v(e,t,r){return g(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(m=b),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?b(this,e,t):r<1024?g(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,r+=i/67108864|0,r+=o>>>26,this.words[a]=67108863&o}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==f||u>=a);u--){var d=0|this.words[u];this.words[u]=f<<26-i|d>>>i,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this._strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,c=n.length-a.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(a,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0===(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(f),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,l=1;0===(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function B(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},a(x,w),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=o}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(A[e])return A[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new E;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return A[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,a),l=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),p=o;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var d=u>>f&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===f)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}c=26}return a},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new B(e)},a(B,k),B.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},B.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},B.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},B.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},B.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(98)(e))},function(e,t){var r,n,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"===typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"===typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var c,u=[],f=!1,d=-1;function l(){f&&c&&(f=!1,c.length?u=c.concat(u):d=-1,u.length&&h())}function h(){if(!f){var e=s(l);f=!0;for(var t=u.length;t;){for(c=u,u=[];++d1)for(var r=1;r1&&void 0!==arguments[1]&&arguments[1],r=e.toString(s);return t?L(r):r}function l(e){return e.toString(c)}function h(e){return e.readUIntBE(0,e.length)}function p(e){return o.default(e)}function b(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return d(p(e),t)}function m(e){return l(p(e))}function g(e){return h(p(e))}function v(e){return Array.from(e).map(_).join("")}function y(t){return e.from(j(t),s)}function A(e){return f(y(e))}function w(e){return v(A(e))}function x(t){return e.from(t,c)}function E(e){return f(x(e))}function _(e){return P((e>>>0).toString(2))}function C(e){return p(k(e))}function k(e){return new Uint8Array(F(e).map((function(e){return parseInt(e,2)})))}function B(e,t){return b(k(e),t)}function I(e){return!("string"!==typeof e||!new RegExp(/^[01]+$/).test(e))&&e.length%8===0}function S(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function O(t){return e.isBuffer(t)}function M(e){return i.default.strict(e)&&!O(e)}function D(e){return!M(e)&&!O(e)&&"undefined"!==typeof e.byteLength}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,r=e%t;return r?(e-r)/t*t+t:e}function F(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,r=P(e).match(new RegExp(".{".concat(t,"}"),"gi"));return Array.from(r||[])}function R(e){return F(e).map(U).join("")}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u;return N(e,T(e.length,t),r)}function N(e,t){return Q(e,t,!0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:u)}function j(e){return e.replace(/^0x/,"")}function L(e){return e.startsWith("0x")?e:"0x".concat(e)}function U(e){return e.split("").reverse().join("")}function Q(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:u,a=t-e.length,i=e;if(a>0){var o=n.repeat(a);i=r?o+e:e+o}return i}t.bufferToArray=f,t.bufferToHex=d,t.bufferToUtf8=l,t.bufferToNumber=h,t.bufferToBinary=function(e){return v(f(e))},t.arrayToBuffer=p,t.arrayToHex=b,t.arrayToUtf8=m,t.arrayToNumber=g,t.arrayToBinary=v,t.hexToBuffer=y,t.hexToArray=A,t.hexToUtf8=function(e){return l(y(e))},t.hexToNumber=function(e){return g(A(e))},t.hexToBinary=w,t.utf8ToBuffer=x,t.utf8ToArray=E,t.utf8ToHex=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return d(x(e),t)},t.utf8ToNumber=function(e){var t=parseInt(e,10);return function(e,t){if(!e)throw new Error(t)}(!function(e){return"undefined"===typeof e}(t),"Number can only safely store up to 53 bits"),t},t.utf8ToBinary=function(e){return v(E(e))},t.numberToBuffer=function(e){return C(_(e))},t.numberToArray=function(e){return k(_(e))},t.numberToHex=function(e,t){return B(_(e),t)},t.numberToUtf8=function(e){return"".concat(e)},t.numberToBinary=_,t.binaryToBuffer=C,t.binaryToArray=k,t.binaryToHex=B,t.binaryToUtf8=function(e){return m(k(e))},t.binaryToNumber=function(e){return g(k(e))},t.isBinaryString=I,t.isHexString=S,t.isBuffer=O,t.isTypedArray=M,t.isArrayBuffer=D,t.getType=function(e){return O(e)?"buffer":M(e)?"typed-array":D(e)?"array-buffer":Array.isArray(e)?"array":typeof e},t.getEncoding=function(e){return I(e)?"binary":S(e)?s:c},t.concatBuffers=function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&(e=e.slice(r)),e},t.trimRight=function(e,t){return e.slice(0,t)},t.calcByteLength=T,t.splitBytes=F,t.swapBytes=R,t.swapHex=function(e){return B(R(w(e)))},t.sanitizeBytes=P,t.padLeft=N,t.padRight=function(e,t){return Q(e,t,!1,arguments.length>2&&void 0!==arguments[2]?arguments[2]:u)},t.removeHexPrefix=j,t.addHexPrefix=L,t.sanitizeHex=function(e){return(e=P(e=j(e),2))&&(e=L(e)),e},t.removeHexLeadingZeros=function(e){var t=e.startsWith("0x");return e=(e=j(e)).startsWith(u)?e.substring(1):e,t?L(e):e}}).call(this,r(15).Buffer)},function(e,t,r){var n,a,i;!function(o){var s="object"==typeof o.sodium&&"function"==typeof o.sodium.onload?o.sodium.onload:null;a=[t,r(2938)],n=function(e,t){"use strict";var r,n=t.ready.then((function(){function n(){if(0!==r._sodium_init())throw new Error("libsodium was not correctly initialized.");for(var t=["crypto_aead_chacha20poly1305_decrypt","crypto_aead_chacha20poly1305_decrypt_detached","crypto_aead_chacha20poly1305_encrypt","crypto_aead_chacha20poly1305_encrypt_detached","crypto_aead_chacha20poly1305_ietf_decrypt","crypto_aead_chacha20poly1305_ietf_decrypt_detached","crypto_aead_chacha20poly1305_ietf_encrypt","crypto_aead_chacha20poly1305_ietf_encrypt_detached","crypto_aead_chacha20poly1305_ietf_keygen","crypto_aead_chacha20poly1305_keygen","crypto_aead_xchacha20poly1305_ietf_decrypt","crypto_aead_xchacha20poly1305_ietf_decrypt_detached","crypto_aead_xchacha20poly1305_ietf_encrypt","crypto_aead_xchacha20poly1305_ietf_encrypt_detached","crypto_aead_xchacha20poly1305_ietf_keygen","crypto_auth","crypto_auth_hmacsha256","crypto_auth_hmacsha256_keygen","crypto_auth_hmacsha256_verify","crypto_auth_hmacsha512","crypto_auth_hmacsha512_keygen","crypto_auth_hmacsha512_verify","crypto_auth_keygen","crypto_auth_verify","crypto_box_beforenm","crypto_box_curve25519xchacha20poly1305_keypair","crypto_box_curve25519xchacha20poly1305_seal","crypto_box_curve25519xchacha20poly1305_seal_open","crypto_box_detached","crypto_box_easy","crypto_box_easy_afternm","crypto_box_keypair","crypto_box_open_detached","crypto_box_open_easy","crypto_box_open_easy_afternm","crypto_box_seal","crypto_box_seal_open","crypto_box_seed_keypair","crypto_core_ristretto255_add","crypto_core_ristretto255_from_hash","crypto_core_ristretto255_is_valid_point","crypto_core_ristretto255_random","crypto_core_ristretto255_scalar_add","crypto_core_ristretto255_scalar_complement","crypto_core_ristretto255_scalar_invert","crypto_core_ristretto255_scalar_mul","crypto_core_ristretto255_scalar_negate","crypto_core_ristretto255_scalar_random","crypto_core_ristretto255_scalar_reduce","crypto_core_ristretto255_scalar_sub","crypto_core_ristretto255_sub","crypto_generichash","crypto_generichash_blake2b_salt_personal","crypto_generichash_final","crypto_generichash_init","crypto_generichash_keygen","crypto_generichash_update","crypto_hash","crypto_hash_sha256","crypto_hash_sha256_final","crypto_hash_sha256_init","crypto_hash_sha256_update","crypto_hash_sha512","crypto_hash_sha512_final","crypto_hash_sha512_init","crypto_hash_sha512_update","crypto_kdf_derive_from_key","crypto_kdf_keygen","crypto_kx_client_session_keys","crypto_kx_keypair","crypto_kx_seed_keypair","crypto_kx_server_session_keys","crypto_onetimeauth","crypto_onetimeauth_final","crypto_onetimeauth_init","crypto_onetimeauth_keygen","crypto_onetimeauth_update","crypto_onetimeauth_verify","crypto_pwhash","crypto_pwhash_scryptsalsa208sha256","crypto_pwhash_scryptsalsa208sha256_ll","crypto_pwhash_scryptsalsa208sha256_str","crypto_pwhash_scryptsalsa208sha256_str_verify","crypto_pwhash_str","crypto_pwhash_str_needs_rehash","crypto_pwhash_str_verify","crypto_scalarmult","crypto_scalarmult_base","crypto_scalarmult_ristretto255","crypto_scalarmult_ristretto255_base","crypto_secretbox_detached","crypto_secretbox_easy","crypto_secretbox_keygen","crypto_secretbox_open_detached","crypto_secretbox_open_easy","crypto_secretstream_xchacha20poly1305_init_pull","crypto_secretstream_xchacha20poly1305_init_push","crypto_secretstream_xchacha20poly1305_keygen","crypto_secretstream_xchacha20poly1305_pull","crypto_secretstream_xchacha20poly1305_push","crypto_secretstream_xchacha20poly1305_rekey","crypto_shorthash","crypto_shorthash_keygen","crypto_shorthash_siphashx24","crypto_sign","crypto_sign_detached","crypto_sign_ed25519_pk_to_curve25519","crypto_sign_ed25519_sk_to_curve25519","crypto_sign_ed25519_sk_to_pk","crypto_sign_ed25519_sk_to_seed","crypto_sign_final_create","crypto_sign_final_verify","crypto_sign_init","crypto_sign_keypair","crypto_sign_open","crypto_sign_seed_keypair","crypto_sign_update","crypto_sign_verify_detached","crypto_stream_chacha20","crypto_stream_chacha20_ietf_xor","crypto_stream_chacha20_ietf_xor_ic","crypto_stream_chacha20_keygen","crypto_stream_chacha20_xor","crypto_stream_chacha20_xor_ic","crypto_stream_keygen","crypto_stream_xchacha20_keygen","crypto_stream_xchacha20_xor","crypto_stream_xchacha20_xor_ic","randombytes_buf","randombytes_buf_deterministic","randombytes_close","randombytes_random","randombytes_set_implementation","randombytes_stir","randombytes_uniform","sodium_version_string"],n=[w,x,E,_,C,k,B,I,S,O,M,D,T,F,R,P,N,j,L,U,Q,G,H,z,q,K,V,W,Y,J,X,Z,$,ee,te,re,ne,ae,ie,oe,se,ce,ue,fe,de,le,he,pe,be,me,ge,ve,ye,Ae,we,xe,Ee,_e,Ce,ke,Be,Ie,Se,Oe,Me,De,Te,Fe,Re,Pe,Ne,je,Le,Ue,Qe,Ge,He,ze,qe,Ke,Ve,We,Ye,Je,Xe,Ze,$e,et,tt,rt,nt,at,it,ot,st,ct,ut,ft,dt,lt,ht,pt,bt,mt,gt,vt,yt,At,wt,xt,Et,_t,Ct,kt,Bt,It,St,Ot,Mt,Dt,Tt,Ft,Rt,Pt,Nt,jt,Lt,Ut,Qt,Gt,Ht,zt,qt,Kt,Vt,Wt],a=0;a=240?(u=4,s=!0):f>=224?(u=3,s=!0):f>=192?(u=2,s=!0):f<128&&(u=1,s=!0)}while(!s);for(var d=u-(o.length-c),l=0;l>8&-39)<<8|87+(t=e[i]>>>4)+(t-10>>8&-39),a+=String.fromCharCode(255&n)+String.fromCharCode(n>>>8);return a}var s={ORIGINAL:1,ORIGINAL_NO_PADDING:3,URLSAFE:5,URLSAFE_NO_PADDING:7};function c(e){if(null==e)return s.URLSAFE_NO_PADDING;if(e!==s.ORIGINAL&&e!==s.ORIGINAL_NO_PADDING&&e!==s.URLSAFE&&e!=s.URLSAFE_NO_PADDING)throw new Error("unsupported base64 variant");return e}function u(e,t){t=c(t),e=A(a,e,"input");var n,a=[],o=0|Math.floor(e.length/3),s=e.length-3*o,u=4*o+(0!==s?0==(2&t)?4:2+(s>>>1):0),f=new h(u+1),d=p(e);return a.push(d),a.push(f.address),0===r._sodium_bin2base64(f.address,f.length,d,e.length,t)&&g(a,"conversion failed"),f.length=u,n=i(f.to_Uint8Array()),m(a),n}function f(e,t){var r=t||"uint8array";if(!d(r))throw new Error(r+" output format is not available");if(e instanceof h){if("uint8array"===r)return e.to_Uint8Array();if("text"===r)return i(e.to_Uint8Array());if("hex"===r)return o(e.to_Uint8Array());if("base64"===r)return u(e.to_Uint8Array(),s.URLSAFE_NO_PADDING);throw new Error('What is output format "'+r+'"?')}if("object"==typeof e){for(var n=Object.keys(e),a={},c=0;c>>24>>>8,c,d);var x=f(g,o);return m(s),x}function Fe(e){var t=[];l(e);var n=new h(0|r._crypto_kdf_keybytes()),a=n.address;t.push(a),r._crypto_kdf_keygen(a);var i=f(n,e);return m(t),i}function Re(e,t,n,a){var i=[];l(a),e=A(i,e,"clientPublicKey");var o,s=0|r._crypto_kx_publickeybytes();e.length!==s&&v(i,"invalid clientPublicKey length"),o=p(e),i.push(o),t=A(i,t,"clientSecretKey");var c,u=0|r._crypto_kx_secretkeybytes();t.length!==u&&v(i,"invalid clientSecretKey length"),c=p(t),i.push(c),n=A(i,n,"serverPublicKey");var d,b=0|r._crypto_kx_publickeybytes();n.length!==b&&v(i,"invalid serverPublicKey length"),d=p(n),i.push(d);var y=new h(0|r._crypto_kx_sessionkeybytes()),w=y.address;i.push(w);var x=new h(0|r._crypto_kx_sessionkeybytes()),E=x.address;if(i.push(E),0==(0|r._crypto_kx_client_session_keys(w,E,o,c,d))){var _=f({sharedRx:y,sharedTx:x},a);return m(i),_}g(i,"invalid usage")}function Pe(e){var t=[];l(e);var n=new h(0|r._crypto_kx_publickeybytes()),a=n.address;t.push(a);var i=new h(0|r._crypto_kx_secretkeybytes()),o=i.address;if(t.push(o),0==(0|r._crypto_kx_keypair(a,o))){var s={publicKey:f(n,e),privateKey:f(i,e),keyType:"x25519"};return m(t),s}g(t,"internal error")}function Ne(e,t){var n=[];l(t),e=A(n,e,"seed");var a,i=0|r._crypto_kx_seedbytes();e.length!==i&&v(n,"invalid seed length"),a=p(e),n.push(a);var o=new h(0|r._crypto_kx_publickeybytes()),s=o.address;n.push(s);var c=new h(0|r._crypto_kx_secretkeybytes()),u=c.address;if(n.push(u),0==(0|r._crypto_kx_seed_keypair(s,u,a))){var d={publicKey:f(o,t),privateKey:f(c,t),keyType:"x25519"};return m(n),d}g(n,"internal error")}function je(e,t,n,a){var i=[];l(a),e=A(i,e,"serverPublicKey");var o,s=0|r._crypto_kx_publickeybytes();e.length!==s&&v(i,"invalid serverPublicKey length"),o=p(e),i.push(o),t=A(i,t,"serverSecretKey");var c,u=0|r._crypto_kx_secretkeybytes();t.length!==u&&v(i,"invalid serverSecretKey length"),c=p(t),i.push(c),n=A(i,n,"clientPublicKey");var d,b=0|r._crypto_kx_publickeybytes();n.length!==b&&v(i,"invalid clientPublicKey length"),d=p(n),i.push(d);var y=new h(0|r._crypto_kx_sessionkeybytes()),w=y.address;i.push(w);var x=new h(0|r._crypto_kx_sessionkeybytes()),E=x.address;if(i.push(E),0==(0|r._crypto_kx_server_session_keys(w,E,o,c,d))){var _=f({sharedRx:y,sharedTx:x},a);return m(i),_}g(i,"invalid usage")}function Le(e,t,n){var a=[];l(n);var i=p(e=A(a,e,"message")),o=e.length;a.push(i),t=A(a,t,"key");var s,c=0|r._crypto_onetimeauth_keybytes();t.length!==c&&v(a,"invalid key length"),s=p(t),a.push(s);var u=new h(0|r._crypto_onetimeauth_bytes()),d=u.address;if(a.push(d),0==(0|r._crypto_onetimeauth(d,i,o,0,s))){var b=f(u,n);return m(a),b}g(a,"invalid usage")}function Ue(e,t){var n=[];l(t),y(n,e,"state_address");var a=new h(0|r._crypto_onetimeauth_bytes()),i=a.address;if(n.push(i),0==(0|r._crypto_onetimeauth_final(e,i))){var o=(r._free(e),f(a,t));return m(n),o}g(n,"invalid usage")}function Qe(e,t){var n=[];l(t);var a=null;null!=e&&(a=p(e=A(n,e,"key")),e.length,n.push(a));var i=new h(144).address;if(0==(0|r._crypto_onetimeauth_init(i,a))){var o=i;return m(n),o}g(n,"invalid usage")}function Ge(e){var t=[];l(e);var n=new h(0|r._crypto_onetimeauth_keybytes()),a=n.address;t.push(a),r._crypto_onetimeauth_keygen(a);var i=f(n,e);return m(t),i}function He(e,t,n){var a=[];l(n),y(a,e,"state_address");var i=p(t=A(a,t,"message_chunk")),o=t.length;a.push(i),0!=(0|r._crypto_onetimeauth_update(e,i,o))&&g(a,"invalid usage"),m(a)}function ze(e,t,n){var a=[];e=A(a,e,"hash");var i,o=0|r._crypto_onetimeauth_bytes();e.length!==o&&v(a,"invalid hash length"),i=p(e),a.push(i);var s=p(t=A(a,t,"message")),c=t.length;a.push(s),n=A(a,n,"key");var u,f=0|r._crypto_onetimeauth_keybytes();n.length!==f&&v(a,"invalid key length"),u=p(n),a.push(u);var d=0==(0|r._crypto_onetimeauth_verify(i,s,c,0,u));return m(a),d}function qe(e,t,n,a,i,o,s){var c=[];l(s),y(c,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&v(c,"keyLength must be an unsigned integer");var u=p(t=A(c,t,"password")),d=t.length;c.push(u),n=A(c,n,"salt");var b,w=0|r._crypto_pwhash_saltbytes();n.length!==w&&v(c,"invalid salt length"),b=p(n),c.push(b),y(c,a,"opsLimit"),("number"!=typeof a||(0|a)!==a||a<0)&&v(c,"opsLimit must be an unsigned integer"),y(c,i,"memLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&v(c,"memLimit must be an unsigned integer"),y(c,o,"algorithm"),("number"!=typeof o||(0|o)!==o||o<0)&&v(c,"algorithm must be an unsigned integer");var x=new h(0|e),E=x.address;if(c.push(E),0==(0|r._crypto_pwhash(E,e,0,u,d,0,b,a,0,i,o))){var _=f(x,s);return m(c),_}g(c,"invalid usage")}function Ke(e,t,n,a,i,o){var s=[];l(o),y(s,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&v(s,"keyLength must be an unsigned integer");var c=p(t=A(s,t,"password")),u=t.length;s.push(c),n=A(s,n,"salt");var d,b=0|r._crypto_pwhash_scryptsalsa208sha256_saltbytes();n.length!==b&&v(s,"invalid salt length"),d=p(n),s.push(d),y(s,a,"opsLimit"),("number"!=typeof a||(0|a)!==a||a<0)&&v(s,"opsLimit must be an unsigned integer"),y(s,i,"memLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&v(s,"memLimit must be an unsigned integer");var w=new h(0|e),x=w.address;if(s.push(x),0==(0|r._crypto_pwhash_scryptsalsa208sha256(x,e,0,c,u,0,d,a,0,i))){var E=f(w,o);return m(s),E}g(s,"invalid usage")}function Ve(e,t,n,a,i,o,s){var c=[];l(s);var u=p(e=A(c,e,"password")),d=e.length;c.push(u);var b=p(t=A(c,t,"salt")),w=t.length;c.push(b),y(c,n,"opsLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&v(c,"opsLimit must be an unsigned integer"),y(c,a,"r"),("number"!=typeof a||(0|a)!==a||a<0)&&v(c,"r must be an unsigned integer"),y(c,i,"p"),("number"!=typeof i||(0|i)!==i||i<0)&&v(c,"p must be an unsigned integer"),y(c,o,"keyLength"),("number"!=typeof o||(0|o)!==o||o<0)&&v(c,"keyLength must be an unsigned integer");var x=new h(0|o),E=x.address;if(c.push(E),0==(0|r._crypto_pwhash_scryptsalsa208sha256_ll(u,d,b,w,n,0,a,i,E,o))){var _=f(x,s);return m(c),_}g(c,"invalid usage")}function We(e,t,n,a){var i=[];l(a);var o=p(e=A(i,e,"password")),s=e.length;i.push(o),y(i,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&v(i,"opsLimit must be an unsigned integer"),y(i,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&v(i,"memLimit must be an unsigned integer");var c=new h(0|r._crypto_pwhash_scryptsalsa208sha256_strbytes()).address;if(i.push(c),0==(0|r._crypto_pwhash_scryptsalsa208sha256_str(c,o,s,0,t,0,n))){var u=r.UTF8ToString(c);return m(i),u}g(i,"invalid usage")}function Ye(e,t,n){var i=[];l(n),"string"!=typeof e&&v(i,"hashed_password must be a string"),e=a(e+"\0"),null!=s&&e.length-1!==s&&v(i,"invalid hashed_password length");var o=p(e),s=e.length-1;i.push(o);var c=p(t=A(i,t,"password")),u=t.length;i.push(c);var f=0==(0|r._crypto_pwhash_scryptsalsa208sha256_str_verify(o,c,u,0));return m(i),f}function Je(e,t,n,a){var i=[];l(a);var o=p(e=A(i,e,"password")),s=e.length;i.push(o),y(i,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&v(i,"opsLimit must be an unsigned integer"),y(i,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&v(i,"memLimit must be an unsigned integer");var c=new h(0|r._crypto_pwhash_strbytes()).address;if(i.push(c),0==(0|r._crypto_pwhash_str(c,o,s,0,t,0,n))){var u=r.UTF8ToString(c);return m(i),u}g(i,"invalid usage")}function Xe(e,t,n,i){var o=[];l(i),"string"!=typeof e&&v(o,"hashed_password must be a string"),e=a(e+"\0"),null!=c&&e.length-1!==c&&v(o,"invalid hashed_password length");var s=p(e),c=e.length-1;o.push(s),y(o,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&v(o,"opsLimit must be an unsigned integer"),y(o,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&v(o,"memLimit must be an unsigned integer");var u=0!=(0|r._crypto_pwhash_str_needs_rehash(s,t,0,n));return m(o),u}function Ze(e,t,n){var i=[];l(n),"string"!=typeof e&&v(i,"hashed_password must be a string"),e=a(e+"\0"),null!=s&&e.length-1!==s&&v(i,"invalid hashed_password length");var o=p(e),s=e.length-1;i.push(o);var c=p(t=A(i,t,"password")),u=t.length;i.push(c);var f=0==(0|r._crypto_pwhash_str_verify(o,c,u,0));return m(i),f}function $e(e,t,n){var a=[];l(n),e=A(a,e,"privateKey");var i,o=0|r._crypto_scalarmult_scalarbytes();e.length!==o&&v(a,"invalid privateKey length"),i=p(e),a.push(i),t=A(a,t,"publicKey");var s,c=0|r._crypto_scalarmult_scalarbytes();t.length!==c&&v(a,"invalid publicKey length"),s=p(t),a.push(s);var u=new h(0|r._crypto_scalarmult_bytes()),d=u.address;if(a.push(d),0==(0|r._crypto_scalarmult(d,i,s))){var b=f(u,n);return m(a),b}g(a,"weak public key")}function et(e,t){var n=[];l(t),e=A(n,e,"privateKey");var a,i=0|r._crypto_scalarmult_scalarbytes();e.length!==i&&v(n,"invalid privateKey length"),a=p(e),n.push(a);var o=new h(0|r._crypto_scalarmult_scalarbytes()),s=o.address;if(n.push(s),0==(0|r._crypto_scalarmult_base(s,a))){var c=f(o,t);return m(n),c}g(n,"insecure scalar")}function tt(e,t,n){var a=[];l(n),e=A(a,e,"scalar");var i,o=0|r._crypto_scalarmult_ristretto255_scalarbytes();e.length!==o&&v(a,"invalid scalar length"),i=p(e),a.push(i),t=A(a,t,"privateKey");var s,c=0|r._crypto_scalarmult_ristretto255_bytes();t.length!==c&&v(a,"invalid privateKey length"),s=p(t),a.push(s);var u=new h(0|r._crypto_scalarmult_ristretto255_bytes()),d=u.address;if(a.push(d),0==(0|r._crypto_scalarmult_ristretto255(d,i,s))){var b=f(u,n);return m(a),b}g(a,"input is zero element")}function rt(e,t){var n=[];l(t);var a=p(e=A(n,e,"scalar"));e.length,n.push(a);var i=new h(0|r._crypto_core_ristretto255_bytes()),o=i.address;if(n.push(o),0==(0|r._crypto_scalarmult_ristretto255_base(o,a))){var s=f(i,t);return m(n),s}g(n,"scalar is 0")}function nt(e,t,n,a){var i=[];l(a);var o=p(e=A(i,e,"message")),s=e.length;i.push(o),t=A(i,t,"nonce");var c,u=0|r._crypto_secretbox_noncebytes();t.length!==u&&v(i,"invalid nonce length"),c=p(t),i.push(c),n=A(i,n,"key");var d,b=0|r._crypto_secretbox_keybytes();n.length!==b&&v(i,"invalid key length"),d=p(n),i.push(d);var y=new h(0|s),w=y.address;i.push(w);var x=new h(0|r._crypto_secretbox_macbytes()),E=x.address;if(i.push(E),0==(0|r._crypto_secretbox_detached(w,E,o,s,0,c,d))){var _=f({mac:x,cipher:y},a);return m(i),_}g(i,"invalid usage")}function at(e,t,n,a){var i=[];l(a);var o=p(e=A(i,e,"message")),s=e.length;i.push(o),t=A(i,t,"nonce");var c,u=0|r._crypto_secretbox_noncebytes();t.length!==u&&v(i,"invalid nonce length"),c=p(t),i.push(c),n=A(i,n,"key");var d,b=0|r._crypto_secretbox_keybytes();n.length!==b&&v(i,"invalid key length"),d=p(n),i.push(d);var y=new h(s+r._crypto_secretbox_macbytes()|0),w=y.address;if(i.push(w),0==(0|r._crypto_secretbox_easy(w,o,s,0,c,d))){var x=f(y,a);return m(i),x}g(i,"invalid usage")}function it(e){var t=[];l(e);var n=new h(0|r._crypto_secretbox_keybytes()),a=n.address;t.push(a),r._crypto_secretbox_keygen(a);var i=f(n,e);return m(t),i}function ot(e,t,n,a,i){var o=[];l(i);var s=p(e=A(o,e,"ciphertext")),c=e.length;o.push(s),t=A(o,t,"mac");var u,d=0|r._crypto_secretbox_macbytes();t.length!==d&&v(o,"invalid mac length"),u=p(t),o.push(u),n=A(o,n,"nonce");var b,y=0|r._crypto_secretbox_noncebytes();n.length!==y&&v(o,"invalid nonce length"),b=p(n),o.push(b),a=A(o,a,"key");var w,x=0|r._crypto_secretbox_keybytes();a.length!==x&&v(o,"invalid key length"),w=p(a),o.push(w);var E=new h(0|c),_=E.address;if(o.push(_),0==(0|r._crypto_secretbox_open_detached(_,s,u,c,0,b,w))){var C=f(E,i);return m(o),C}g(o,"wrong secret key for the given ciphertext")}function st(e,t,n,a){var i=[];l(a),e=A(i,e,"ciphertext");var o,s=r._crypto_secretbox_macbytes(),c=e.length;c>>0;return m([]),t}function qt(e,t){var n=[];l(t);for(var a=r._malloc(24),i=0;i<6;i++)r.setValue(a+4*i,r.Runtime.addFunction(e[["implementation_name","random","stir","uniform","buf","close"][i]]),"i32");0!=(0|r._randombytes_set_implementation(a))&&g(n,"unsupported implementation"),m(n)}function Kt(e){l(e),r._randombytes_stir()}function Vt(e,t){var n=[];l(t),y(n,e,"upper_bound"),("number"!=typeof e||(0|e)!==e||e<0)&&v(n,"upper_bound must be an unsigned integer");var a=r._randombytes_uniform(e)>>>0;return m(n),a}function Wt(){var e=r._sodium_version_string(),t=r.UTF8ToString(e);return m([]),t}return h.prototype.to_Uint8Array=function(){var e=new Uint8Array(this.length);return e.set(r.HEAPU8.subarray(this.address,this.address+this.length)),e},e.add=function(e,t){if(!(e instanceof Uint8Array&&t instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can added");var r=e.length,n=0,a=0;if(t.length!=e.length)throw new TypeError("Arguments must have the same length");for(a=0;a>=8,n+=e[a]+t[a],e[a]=255&n},e.base64_variants=s,e.compare=function(e,t){if(!(e instanceof Uint8Array&&t instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be compared");if(e.length!==t.length)throw new TypeError("Only instances of identical length can be compared");for(var r=0,n=1,a=e.length;a-- >0;)r|=t[a]-e[a]>>8&n,n&=(t[a]^e[a])-1>>8;return r+r+n-1},e.from_base64=function(e,t){t=c(t);var n,a=[],i=new h(3*(e=A(a,e,"input")).length/4),o=p(e),s=b(4),u=b(4);return a.push(o),a.push(i.address),a.push(i.result_bin_len_p),a.push(i.b64_end_p),0!==r._sodium_base642bin(i.address,i.length,o,e.length,0,s,u,t)&&g(a,"invalid input"),r.getValue(u,"i32")-o!==e.length&&g(a,"incomplete input"),i.length=r.getValue(s,"i32"),n=i.to_Uint8Array(),m(a),n},e.from_hex=function(e){var t,n=[],a=new h((e=A(n,e,"input")).length/2),i=p(e),o=b(4);return n.push(i),n.push(a.address),n.push(a.hex_end_p),0!==r._sodium_hex2bin(a.address,a.length,i,e.length,0,0,o)&&g(n,"invalid input"),r.getValue(o,"i32")-i!==e.length&&g(n,"incomplete input"),t=a.to_Uint8Array(),m(n),t},e.from_string=a,e.increment=function(e){if(!(e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be incremented");for(var t=256,r=0,n=e.length;r>=8,t+=e[r],e[r]=255&t},e.is_zero=function(e){if(!(e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be checked");for(var t=0,r=0,n=e.length;r 0");var n,a=[],i=b(4),o=1,s=0,c=0|e.length,u=new h(c+t);a.push(i),a.push(u.address);for(var f=u.address,d=u.address+c+t;f>>48|c>>>32|c>>>16|c))-1>>16);return 0!==r._sodium_pad(i,u.address,e.length,t,u.length)&&g(a,"internal error"),u.length=r.getValue(i,"i32"),n=u.to_Uint8Array(),m(a),n},e.unpad=function(e,t){if(!(e instanceof Uint8Array))throw new TypeError("buffer must be a Uint8Array");if((t|=0)<=0)throw new Error("block size must be > 0");var n=[],a=p(e),i=b(4);return n.push(a),n.push(i),0!==r._sodium_unpad(i,a,e.length,t)&&g(n,"unsupported/invalid padding"),e=(e=new Uint8Array(e)).subarray(0,r.getValue(i,"i32")),m(n),e},e.ready=n,e.symbols=function(){return Object.keys(e).sort()},e.to_base64=u,e.to_hex=o,e.to_string=i,e},void 0!==(i="function"===typeof n?n.apply(t,a):n)&&(e.exports=i),s&&o.sodium.ready.then((function(){s(o.sodium)}))}(this)},function(e,t,r){var n=r(2968)();e.exports=n;try{regeneratorRuntime=n}catch(a){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return De})),r.d(t,"b",(function(){return G}));var n=r(0),a=r(9),i=r(33),o=r(12),s=r(25),c=r(14),u=r(10),f=function(e){return"checkbox"===e.type},d=function(e){return e instanceof Date},l=function(e){return null==e},h=function(e){return"object"===typeof e},p=function(e){return!l(e)&&!Array.isArray(e)&&h(e)&&!d(e)},b=function(e){return p(e)&&e.target?f(e.target)?e.target.checked:e.target.value:e},m=function(e,t){return Object(c.a)(e).some((function(e){return function(e){return e.substring(0,e.search(/.\d/))||e}(t)===e}))},g=function(e){return e.filter(Boolean)},v=function(e){return void 0===e},y=function(e,t,r){if(!t||!p(e))return r;var n=g(t.split(/[,[\].]+?/)).reduce((function(e,t){return l(e)?e:e[t]}),e);return v(n)||n===e?v(e[t])?r:e[t]:n},A={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},w={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},x="max",E="min",_="maxLength",C="minLength",k="pattern",B="required",I="validate",S=function(e,t){var r=Object.assign({},e);return delete r[t],r},O=u.createContext(null),M=function(){return u.useContext(O)},D=function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a={},i=function(i){Object.defineProperty(a,i,{get:function(){var a=i;return t[a]!==w.all&&(t[a]=!n||w.all),r&&(r[a]=!0),e[a]}})};for(var o in e)i(o);return a},T=function(e){return p(e)&&!Object.keys(e).length},F=function(e,t,r){var n=S(e,"name");return T(n)||Object.keys(n).length>=Object.keys(t).length||Object.keys(n).find((function(e){return t[e]===(!r||w.all)}))},R=function(e){return Array.isArray(e)?e:[e]},P=function(e,t,r){return r&&t?e===t:!e||!t||e===t||R(e).some((function(e){return e&&(e.startsWith(t)||t.startsWith(e))}))};function N(e){var t=u.useRef(e);t.current=e,u.useEffect((function(){var r=!e.disabled&&t.current.subject.subscribe({next:t.current.callback});return function(){return function(e){e&&e.unsubscribe()}(r)}}),[e.disabled])}var j=function(e){return"string"===typeof e},L=function(e,t,r,n){var a=Array.isArray(e);return j(e)?(n&&t.watch.add(e),y(r,e)):a?e.map((function(e){return n&&t.watch.add(e),y(r,e)})):(n&&(t.watchAll=!0),r)},U=function(e){return"function"===typeof e},Q=function(e){for(var t in e)if(U(e[t]))return!0;return!1};function G(e){var t=M(),r=e||{},n=r.control,a=void 0===n?t.control:n,i=r.name,o=r.defaultValue,f=r.disabled,d=r.exact,l=u.useRef(i);l.current=i;var h=u.useCallback((function(e){if(P(l.current,e.name,d)){var t=L(l.current,a._names,e.values||a._formValues);y(v(l.current)||p(t)&&!Q(t)?Object.assign({},t):Array.isArray(t)?Object(c.a)(t):v(t)?o:t)}}),[a,d,o]);N({disabled:f,subject:a._subjects.watch,callback:h});var b=u.useState(v(o)?a._getWatch(i):o),m=Object(s.a)(b,2),g=m[0],y=m[1];return u.useEffect((function(){a._removeUnmounted()})),g}var H=function(e,t,r,n,a){return t?Object.assign(Object.assign({},r[e]),{types:Object.assign(Object.assign({},r[e]&&r[e].types?r[e].types:{}),Object(o.a)({},n,a||!0))}):{}},z=function(e){return/^\w*$/.test(e)},q=function(e){return g(e.replace(/["|']|\]/g,"").split(/\.|\[/))};function K(e,t,r){for(var n=-1,a=z(t)?[t]:q(t),i=a.length,o=i-1;++n0&&(r=e);++s1&&void 0!==arguments[1]?arguments[1]:{},r=Array.isArray(e);if(p(e)||r)for(var n in e)Array.isArray(e[n])||p(e[n])&&!Q(e[n])?(t[n]=Array.isArray(e[n])?[]:{},ue(e[n],t[n])):l(e[n])||(t[n]=!0);return t}function fe(e,t,r){var n=Array.isArray(e);if(p(e)||n)for(var a in e)Array.isArray(e[a])||p(e[a])&&!Q(e[a])?v(t)||X(r[a])?r[a]=Array.isArray(e[a])?ue(e[a],[]):Object.assign({},ue(e[a])):fe(e[a],l(t)?{}:t[a],r[a]):r[a]=!Z(e[a],t[a]);return r}var de=function(e,t){return fe(e,t,ue(t))},le={value:!1,isValid:!1},he={value:!0,isValid:!0},pe=function(e){if(Array.isArray(e)){if(e.length>1){var t=e.filter((function(e){return e&&e.checked&&!e.disabled})).map((function(e){return e.value}));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!v(e[0].attributes.value)?v(e[0].value)||""===e[0].value?he:{value:e[0].value,isValid:!0}:he:le}return le},be=function(e,t){var r=t.valueAsNumber,n=t.valueAsDate,a=t.setValueAs;return v(e)?e:r?""===e?NaN:+e:n&&j(e)?new Date(e):a?a(e):e},me={isValid:!1,value:null},ge=function(e){return Array.isArray(e)?e.reduce((function(e,t){return t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e}),me):me};function ve(e){var t=e.ref;if(!(e.refs?e.refs.every((function(e){return e.disabled})):t.disabled))return te(t)?t.files:ae(t)?ge(e.refs).value:ne(t)?Object(c.a)(t.selectedOptions).map((function(e){return e.value})):f(t)?pe(e.refs).value:be(v(t.value)?e.ref.value:t.value,e)}var ye=function(e,t,r,n){var a,o={},s=Object(i.a)(e);try{for(s.s();!(a=s.n()).done;){var u=a.value,f=y(t,u);f&&K(o,u,f._f)}}catch(d){s.e(d)}finally{s.f()}return{criteriaMode:r,names:Object(c.a)(e),fields:o,shouldUseNativeValidation:n}},Ae=function(e){return e instanceof RegExp},we=function(e){return v(e)?void 0:Ae(e)?e.source:p(e)?Ae(e.value)?e.value.source:e.value:e},xe=function(e){return e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate)};function Ee(e,t,r){var n=y(e,r);if(n||z(r))return{error:n,name:r};for(var a=r.split(".");a.length;){var i=a.join("."),o=y(t,i),s=y(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};a.pop()}return{name:r}}var _e=function(e,t,r,n,a){return!a.isOnAll&&(!r&&a.isOnTouch?!(t||e):(r?n.isOnBlur:a.isOnBlur)?!e:!(r?n.isOnChange:a.isOnChange)||e)},Ce=function(e,t){return!g(y(e,t)).length&&ce(e,t)},ke=function(e){return j(e)||u.isValidElement(e)};function Be(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"validate";if(ke(e)||Array.isArray(e)&&e.every(ke)||ee(e)&&!e)return{type:r,message:ke(e)?e:"",ref:t}}var Ie=function(e){return p(e)&&!Ae(e)?e:{value:e,message:""}},Se=function(){var e=Object(a.a)(Object(n.a)().mark((function e(t,r,a,i){var o,s,c,u,d,h,b,m,g,v,y,A,w,S,O,M,D,F,R,P,N,L,Q,G,z,q,K,V,W,Y,J,X,Z,$,re,ne,ie,oe,se,ce,ue,fe,de,le;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t._f,s=o.ref,c=o.refs,u=o.required,d=o.maxLength,h=o.minLength,b=o.min,m=o.max,g=o.pattern,v=o.validate,y=o.name,A=o.valueAsNumber,w=o.mount,S=o.disabled,w&&!S){e.next=3;break}return e.abrupt("return",{});case 3:if(O=c?c[0]:s,M=function(e){i&&O.reportValidity&&(O.setCustomValidity(ee(e)?"":e||" "),O.reportValidity())},D={},F=ae(s),R=f(s),P=F||R,N=(A||te(s))&&!s.value||""===r||Array.isArray(r)&&!r.length,L=H.bind(null,y,a,D),Q=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:C,i=e?t:r;D[y]=Object.assign({type:e?n:a,message:i,ref:s},L(e?n:a,i))},!u||!(!P&&(N||l(r))||ee(r)&&!r||R&&!pe(c).isValid||F&&!ge(c).isValid)){e.next=19;break}if(G=ke(u)?{value:!!u,message:u}:Ie(u),z=G.value,q=G.message,!z){e.next=19;break}if(D[y]=Object.assign({type:B,message:q,ref:O},L(B,q)),a){e.next=19;break}return M(q),e.abrupt("return",D);case 19:if(N||l(b)&&l(m)){e.next=28;break}if(W=Ie(m),Y=Ie(b),isNaN(r)?(X=s.valueAsDate||new Date(r),j(W.value)&&(K=X>new Date(W.value)),j(Y.value)&&(V=XW.value),l(Y.value)||(V=JZ.value,ne=!l($.value)&&r.length<$.value,!re&&!ne){e.next=38;break}if(Q(re,Z.message,$.message),a){e.next=38;break}return M(D[y].message),e.abrupt("return",D);case 38:if(!g||N||!j(r)){e.next=45;break}if(ie=Ie(g),oe=ie.value,se=ie.message,!Ae(oe)||r.match(oe)){e.next=45;break}if(D[y]=Object.assign({type:k,message:se,ref:s},L(k,se)),a){e.next=45;break}return M(se),e.abrupt("return",D);case 45:if(!v){e.next=79;break}if(!U(v)){e.next=58;break}return e.next=49,v(r);case 49:if(ce=e.sent,!(ue=Be(ce,O))){e.next=56;break}if(D[y]=Object.assign(Object.assign({},ue),L(I,ue.message)),a){e.next=56;break}return M(ue.message),e.abrupt("return",D);case 56:e.next=79;break;case 58:if(!p(v)){e.next=79;break}fe={},e.t0=Object(n.a)().keys(v);case 61:if((e.t1=e.t0()).done){e.next=75;break}if(de=e.t1.value,T(fe)||a){e.next=65;break}return e.abrupt("break",75);case 65:return e.t2=Be,e.next=68,v[de](r);case 68:e.t3=e.sent,e.t4=O,e.t5=de,(le=(0,e.t2)(e.t3,e.t4,e.t5))&&(fe=Object.assign(Object.assign({},le),L(de,le.message)),M(le.message),a&&(D[y]=fe)),e.next=61;break;case 75:if(T(fe)){e.next=79;break}if(D[y]=Object.assign({ref:O},fe),a){e.next=79;break}return e.abrupt("return",D);case 79:return M(!0),e.abrupt("return",D);case 81:case"end":return e.stop()}}),e)})));return function(t,r,n,a){return e.apply(this,arguments)}}(),Oe={mode:w.onSubmit,reValidateMode:w.onChange,shouldFocusError:!0};function Me(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=Object.assign(Object.assign({},Oe),t),u={isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}},h={},p=r.defaultValues||{},x=r.shouldUnregister?{}:Y(p),E={action:!1,mount:!1,watch:!1},_={mount:new Set,unMount:new Set,array:new Set,watch:new Set},C=0,k={},B={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},I={watch:J(),array:J(),state:J()},O=$(r.mode),M=$(r.reValidateMode),D=r.criteriaMode===w.all,F=function(e,t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a2&&void 0!==l[2]?l[2]:{valid:!0},e.t0=Object(n.a)().keys(t);case 2:if((e.t1=e.t0()).done){e.next=23;break}if(o=e.t1.value,!(s=t[o])){e.next=21;break}if(c=s._f,f=S(s,"_f"),!c){e.next=17;break}return e.next=11,Se(s,y(x,c.name),D,r.shouldUseNativeValidation);case 11:if(!(d=e.sent)[c.name]){e.next=16;break}if(i.valid=!1,!a){e.next=16;break}return e.abrupt("break",23);case 16:a||(d[c.name]?K(u.errors,c.name,d[c.name]):ce(u.errors,c.name));case 17:if(e.t2=f,!e.t2){e.next=21;break}return e.next=21,ae(f,a,i);case 21:e.next=2;break;case 23:return e.abrupt("return",i.valid);case 24:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ue=function(e,t){return e&&t&&K(x,e,t),!Z(Ae(),p)},fe=function(e,t,r){var n=Object.assign({},E.mount?x:v(t)?p:j(e)?Object(o.a)({},e,t):t);return L(e,_,n,r)},le=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=y(h,e),a=t;if(n){var i=n._f;i&&(!i.disabled&&K(x,e,be(t,i)),a=oe&&re(i.ref)&&l(t)?"":t,ne(i.ref)?Object(c.a)(i.ref.options).forEach((function(e){return e.selected=a.includes(e.value)})):i.refs?f(i.ref)?i.refs.length>1?i.refs.forEach((function(e){return!e.disabled&&(e.checked=Array.isArray(a)?!!a.find((function(t){return t===e.value})):a===e.value)})):i.refs[0]&&(i.refs[0].checked=!!a):i.refs.forEach((function(e){return e.checked=e.value===a})):te(i.ref)?i.ref.value="":(i.ref.value=a,i.ref.type||I.watch.next({name:e})))}(r.shouldDirty||r.shouldTouch)&&G(e,a,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&ge(e)},he=function e(t,r,n){for(var a in r){var i=r[a],o="".concat(t,".").concat(a),s=y(h,o);!_.array.has(t)&&X(i)&&(!s||s._f)||d(i)?le(o,i,n):e(o,i,n)}},pe=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=y(h,e),a=_.array.has(e),i=Y(t);K(x,e,i),a?(I.array.next({name:e,values:x}),(B.isDirty||B.dirtyFields)&&r.shouldDirty&&(u.dirtyFields=de(p,x),I.state.next({name:e,dirtyFields:u.dirtyFields,isDirty:ue(e,i)}))):!n||n._f||l(i)?le(e,i,r):he(e,i,r),W(e,_)&&I.state.next({}),I.watch.next({name:e})},me=function(){var e=Object(a.a)(Object(n.a)().mark((function e(t){var a,i,o,s,c,f,d,l,p,m,g,v,w,E,C;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.target,i=a.name,!(o=y(h,i))){e.next=39;break}if(f=a.type?ve(o._f):b(t),d=t.type===A.BLUR||t.type===A.FOCUS_OUT,l=!xe(o._f)&&!r.resolver&&!y(u.errors,i)&&!o._f.deps||_e(d,y(u.touchedFields,i),u.isSubmitted,M,O),p=W(i,_,d),K(x,i,f),d?o._f.onBlur&&o._f.onBlur(t):o._f.onChange&&o._f.onChange(t),m=G(i,f,d,!1),g=!T(m)||p,!d&&I.watch.next({name:i,type:t.type}),!l){e.next=15;break}return e.abrupt("return",g&&I.state.next(Object.assign({name:i},p?{}:m)));case 15:if(!d&&p&&I.state.next({}),k[i]=(k[i],1),I.state.next({isValidating:!0}),!r.resolver){e.next=30;break}return e.next=21,z([i]);case 21:v=e.sent,w=v.errors,E=Ee(u.errors,h,i),C=Ee(w,h,E.name||i),s=C.error,i=C.name,c=T(w),e.next=37;break;case 30:return e.next=32,Se(o,y(x,i),D,r.shouldUseNativeValidation);case 32:return e.t0=i,s=e.sent[e.t0],e.next=36,P(!0);case 36:c=e.sent;case 37:o._f.deps&&ge(o._f.deps),H(!1,i,c,s,m);case 39:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ge=function(){var e=Object(a.a)(Object(n.a)().mark((function e(t){var i,s,c,f,d,l=arguments;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>1&&void 0!==l[1]?l[1]:{},f=R(t),I.state.next({isValidating:!0}),!r.resolver){e.next=11;break}return e.next=6,q(v(t)?t:f);case 6:d=e.sent,s=T(d),c=t?!f.some((function(e){return y(d,e)})):s,e.next=21;break;case 11:if(!t){e.next=18;break}return e.next=14,Promise.all(f.map(function(){var e=Object(a.a)(Object(n.a)().mark((function e(t){var r;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=y(h,t),e.next=3,ae(r&&r._f?Object(o.a)({},t,r):r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 14:((c=e.sent.every(Boolean))||u.isValid)&&P(),e.next=21;break;case 18:return e.next=20,ae(h);case 20:c=s=e.sent;case 21:return I.state.next(Object.assign(Object.assign(Object.assign({},!j(t)||B.isValid&&s!==u.isValid?{}:{name:t}),r.resolver?{isValid:s}:{}),{errors:u.errors,isValidating:!1})),i.shouldFocus&&!c&&V(h,(function(e){return y(u.errors,e)}),t?f:_.mount),e.abrupt("return",c);case 24:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ae=function(e){var t=Object.assign(Object.assign({},p),E.mount?x:{});return v(e)?t:j(e)?y(t,e):e.map((function(e){return y(t,e)}))},ke=function(e,t){return{invalid:!!y((t||u).errors,e),isDirty:!!y((t||u).dirtyFields,e),isTouched:!!y((t||u).touchedFields,e),error:y((t||u).errors,e)}},Be=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=Object(i.a)(e?R(e):_.mount);try{for(a.s();!(t=a.n()).done;){var o=t.value;_.mount.delete(o),_.array.delete(o),y(h,o)&&(n.keepValue||(ce(h,o),ce(x,o)),!n.keepError&&ce(u.errors,o),!n.keepDirty&&ce(u.dirtyFields,o),!n.keepTouched&&ce(u.touchedFields,o),!r.shouldUnregister&&!n.keepDefaultValue&&ce(p,o))}}catch(s){a.e(s)}finally{a.f()}I.watch.next({}),I.state.next(Object.assign(Object.assign({},u),n.keepDirty?{isDirty:ue()}:{})),!n.keepIsValid&&P()},Ie=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=y(h,t),i=ee(n.disabled);return K(h,t,{_f:Object.assign(Object.assign(Object.assign({},a&&a._f?a._f:{ref:{name:t}}),{name:t,mount:!0}),n)}),_.mount.add(t),a?i&&K(x,t,n.disabled?void 0:y(x,t,ve(a._f))):Q(t,!0,n.value),Object.assign(Object.assign(Object.assign({},i?{disabled:n.disabled}:{}),r.shouldUseNativeValidation?{required:!!n.required,min:we(n.min),max:we(n.max),minLength:we(n.minLength),maxLength:we(n.maxLength),pattern:we(n.pattern)}:{}),{name:t,onChange:me,onBlur:me,ref:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(i){if(i){e(t,n),a=y(h,t);var o=v(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,s=ie(o),u=a._f.refs||[];if(s?u.find((function(e){return e===o})):o===a._f.ref)return;K(h,t,{_f:Object.assign(Object.assign({},a._f),s?{refs:[].concat(Object(c.a)(u.filter(se)),[o]),ref:{type:o.type,name:t}}:{ref:o})}),Q(t,!1,void 0,o)}else(a=y(h,t,{}))._f&&(a._f.mount=!1),(r.shouldUnregister||n.shouldUnregister)&&(!m(_.array,t)||!E.action)&&_.unMount.add(t)}))})};return{control:{register:Ie,unregister:Be,getFieldState:ke,_executeSchema:z,_getWatch:fe,_getDirty:ue,_updateValid:P,_removeUnmounted:function(){var e,t=Object(i.a)(_.unMount);try{for(t.s();!(e=t.n()).done;){var r=e.value,n=y(h,r);n&&(n._f.refs?n._f.refs.every((function(e){return!se(e)})):!se(n._f.ref))&&Be(r)}}catch(a){t.e(a)}finally{t.f()}_.unMount=new Set},_updateFieldArray:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(n&&r){if(E.action=!0,i&&Array.isArray(y(h,e))){var o=r(y(h,e),n.argA,n.argB);a&&K(h,e,o)}if(B.errors&&i&&Array.isArray(y(u.errors,e))){var s=r(y(u.errors,e),n.argA,n.argB);a&&K(u.errors,e,s),Ce(u.errors,e)}if(B.touchedFields&&i&&Array.isArray(y(u.touchedFields,e))){var c=r(y(u.touchedFields,e),n.argA,n.argB);a&&K(u.touchedFields,e,c)}B.dirtyFields&&(u.dirtyFields=de(p,x)),I.state.next({isDirty:ue(e,t),dirtyFields:u.dirtyFields,errors:u.errors,isValid:u.isValid})}else K(x,e,t)},_getFieldArray:function(e){return g(y(E.mount?x:p,e,t.shouldUnregister?y(p,e,[]):[]))},_subjects:I,_proxyFormState:B,get _fields(){return h},get _formValues(){return x},get _stateFlags(){return E},set _stateFlags(e){E=e},get _defaultValues(){return p},get _names(){return _},set _names(e){_=e},get _formState(){return u},set _formState(e){u=e},get _options(){return r},set _options(e){r=Object.assign(Object.assign({},r),e)}},trigger:ge,register:Ie,handleSubmit:function(e,t){return function(){var i=Object(a.a)(Object(n.a)().mark((function a(i){var o,s,c,f,d;return Object(n.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i&&(i.preventDefault&&i.preventDefault(),i.persist&&i.persist()),o=!0,s=Y(x),I.state.next({isSubmitting:!0}),n.prev=4,!r.resolver){n.next=15;break}return n.next=8,z();case 8:c=n.sent,f=c.errors,d=c.values,u.errors=f,s=d,n.next=17;break;case 15:return n.next=17,ae(h);case 17:if(!T(u.errors)||!Object.keys(u.errors).every((function(e){return y(s,e)}))){n.next=23;break}return I.state.next({errors:{},isSubmitting:!0}),n.next=21,e(s,i);case 21:n.next=27;break;case 23:if(!t){n.next=26;break}return n.next=26,t(Object.assign({},u.errors),i);case 26:r.shouldFocusError&&V(h,(function(e){return y(u.errors,e)}),_.mount);case 27:n.next=33;break;case 29:throw n.prev=29,n.t0=n.catch(4),o=!1,n.t0;case 33:return n.prev=33,u.isSubmitted=!0,I.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:T(u.errors)&&o,submitCount:u.submitCount+1,errors:u.errors}),n.finish(33);case 37:case"end":return n.stop()}}),a,null,[[4,29,33,37]])})));return function(e){return i.apply(this,arguments)}}()},watch:function(e,t){return U(e)?I.watch.subscribe({next:function(r){return e(fe(void 0,t),r)}}):fe(e,t,!0)},setValue:pe,getValues:Ae,reset:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e||p,a=Y(n),c=e&&!T(e)?a:p;if(r.keepDefaultValues||(p=n),!r.keepValues){if(oe&&v(e)){var f,d=Object(i.a)(_.mount);try{for(d.s();!(f=d.n()).done;){var l=f.value,b=y(h,l);if(b&&b._f){var m=Array.isArray(b._f.refs)?b._f.refs[0]:b._f.ref;try{re(m)&&m.closest("form").reset();break}catch(g){}}}}catch(A){d.e(A)}finally{d.f()}}x=t.shouldUnregister?r.keepDefaultValues?Y(p):{}:a,h={},I.array.next({values:c}),I.watch.next({values:c})}_={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},E.mount=!B.isValid||!!r.keepIsValid,E.watch=!!t.shouldUnregister,I.state.next({submitCount:r.keepSubmitCount?u.submitCount:0,isDirty:r.keepDirty?u.isDirty:!!r.keepDefaultValues&&!Z(e,p),isSubmitted:!!r.keepIsSubmitted&&u.isSubmitted,dirtyFields:r.keepDirty?u.dirtyFields:r.keepDefaultValues&&e?Object.entries(e).reduce((function(e,t){var r=Object(s.a)(t,2),n=r[0],a=r[1];return Object.assign(Object.assign({},e),Object(o.a)({},n,a!==y(p,n)))}),{}):{},touchedFields:r.keepTouched?u.touchedFields:{},errors:r.keepErrors?u.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},resetField:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y(h,e)&&(v(t.defaultValue)?pe(e,y(p,e)):(pe(e,t.defaultValue),K(p,e,t.defaultValue)),t.keepTouched||ce(u.touchedFields,e),t.keepDirty||(ce(u.dirtyFields,e),u.isDirty=t.defaultValue?ue(e,y(p,e)):ue()),t.keepError||(ce(u.errors,e),B.isValid&&P()),I.state.next(Object.assign({},u)))},clearErrors:function(e){e?R(e).forEach((function(e){return ce(u.errors,e)})):u.errors={},I.state.next({errors:u.errors})},unregister:Be,setError:function(e,t,r){var n=(y(h,e,{_f:{}})._f||{}).ref;K(u.errors,e,Object.assign(Object.assign({},t),{ref:n})),I.state.next({name:e,errors:u.errors,isValid:!1}),r&&r.shouldFocus&&n&&n.focus&&n.focus()},setFocus:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=y(h,e)._f,n=r.refs?r.refs[0]:r.ref;t.shouldSelect?n.select():n.focus()},getFieldState:ke}}function De(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=u.useRef(),r=u.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}}),n=Object(s.a)(r,2),a=n[0],i=n[1];t.current?t.current.control._options=e:t.current=Object.assign(Object.assign({},Me(e)),{formState:a});var o=t.current.control,c=u.useCallback((function(e){F(e,o._proxyFormState,!0)&&(o._formState=Object.assign(Object.assign({},o._formState),e),i(Object.assign({},o._formState)))}),[o]);return N({subject:o._subjects.state,callback:c}),u.useEffect((function(){o._stateFlags.mount||(o._proxyFormState.isValid&&o._updateValid(),o._stateFlags.mount=!0),o._stateFlags.watch&&(o._stateFlags.watch=!1,o._subjects.state.next({})),o._removeUnmounted()})),t.current.formState=D(a,o._proxyFormState),t.current}},function(e,t,r){var n,a,i;!function(o){var s="object"==typeof o.sodium&&"function"==typeof o.sodium.onload?o.sodium.onload:null;a=[t,r(3500)],n=function(e,t){"use strict";var r,n=t.ready.then((function(){function n(){if(0!==r._sodium_init())throw new Error("libsodium was not correctly initialized.");for(var t=["crypto_aead_chacha20poly1305_decrypt","crypto_aead_chacha20poly1305_decrypt_detached","crypto_aead_chacha20poly1305_encrypt","crypto_aead_chacha20poly1305_encrypt_detached","crypto_aead_chacha20poly1305_ietf_decrypt","crypto_aead_chacha20poly1305_ietf_decrypt_detached","crypto_aead_chacha20poly1305_ietf_encrypt","crypto_aead_chacha20poly1305_ietf_encrypt_detached","crypto_aead_chacha20poly1305_ietf_keygen","crypto_aead_chacha20poly1305_keygen","crypto_aead_xchacha20poly1305_ietf_decrypt","crypto_aead_xchacha20poly1305_ietf_decrypt_detached","crypto_aead_xchacha20poly1305_ietf_encrypt","crypto_aead_xchacha20poly1305_ietf_encrypt_detached","crypto_aead_xchacha20poly1305_ietf_keygen","crypto_auth","crypto_auth_hmacsha256","crypto_auth_hmacsha256_keygen","crypto_auth_hmacsha256_verify","crypto_auth_hmacsha512","crypto_auth_hmacsha512_keygen","crypto_auth_hmacsha512_verify","crypto_auth_keygen","crypto_auth_verify","crypto_box_beforenm","crypto_box_curve25519xchacha20poly1305_keypair","crypto_box_curve25519xchacha20poly1305_seal","crypto_box_curve25519xchacha20poly1305_seal_open","crypto_box_detached","crypto_box_easy","crypto_box_easy_afternm","crypto_box_keypair","crypto_box_open_detached","crypto_box_open_easy","crypto_box_open_easy_afternm","crypto_box_seal","crypto_box_seal_open","crypto_box_seed_keypair","crypto_core_ed25519_add","crypto_core_ed25519_from_hash","crypto_core_ed25519_from_uniform","crypto_core_ed25519_is_valid_point","crypto_core_ed25519_random","crypto_core_ed25519_scalar_add","crypto_core_ed25519_scalar_complement","crypto_core_ed25519_scalar_invert","crypto_core_ed25519_scalar_mul","crypto_core_ed25519_scalar_negate","crypto_core_ed25519_scalar_random","crypto_core_ed25519_scalar_reduce","crypto_core_ed25519_scalar_sub","crypto_core_ed25519_sub","crypto_core_ristretto255_add","crypto_core_ristretto255_from_hash","crypto_core_ristretto255_is_valid_point","crypto_core_ristretto255_random","crypto_core_ristretto255_scalar_add","crypto_core_ristretto255_scalar_complement","crypto_core_ristretto255_scalar_invert","crypto_core_ristretto255_scalar_mul","crypto_core_ristretto255_scalar_negate","crypto_core_ristretto255_scalar_random","crypto_core_ristretto255_scalar_reduce","crypto_core_ristretto255_scalar_sub","crypto_core_ristretto255_sub","crypto_generichash","crypto_generichash_blake2b_salt_personal","crypto_generichash_final","crypto_generichash_init","crypto_generichash_keygen","crypto_generichash_update","crypto_hash","crypto_hash_sha256","crypto_hash_sha256_final","crypto_hash_sha256_init","crypto_hash_sha256_update","crypto_hash_sha512","crypto_hash_sha512_final","crypto_hash_sha512_init","crypto_hash_sha512_update","crypto_kdf_derive_from_key","crypto_kdf_keygen","crypto_kx_client_session_keys","crypto_kx_keypair","crypto_kx_seed_keypair","crypto_kx_server_session_keys","crypto_onetimeauth","crypto_onetimeauth_final","crypto_onetimeauth_init","crypto_onetimeauth_keygen","crypto_onetimeauth_update","crypto_onetimeauth_verify","crypto_pwhash","crypto_pwhash_scryptsalsa208sha256","crypto_pwhash_scryptsalsa208sha256_ll","crypto_pwhash_scryptsalsa208sha256_str","crypto_pwhash_scryptsalsa208sha256_str_verify","crypto_pwhash_str","crypto_pwhash_str_needs_rehash","crypto_pwhash_str_verify","crypto_scalarmult","crypto_scalarmult_base","crypto_scalarmult_ed25519","crypto_scalarmult_ed25519_base","crypto_scalarmult_ed25519_base_noclamp","crypto_scalarmult_ed25519_noclamp","crypto_scalarmult_ristretto255","crypto_scalarmult_ristretto255_base","crypto_secretbox_detached","crypto_secretbox_easy","crypto_secretbox_keygen","crypto_secretbox_open_detached","crypto_secretbox_open_easy","crypto_secretstream_xchacha20poly1305_init_pull","crypto_secretstream_xchacha20poly1305_init_push","crypto_secretstream_xchacha20poly1305_keygen","crypto_secretstream_xchacha20poly1305_pull","crypto_secretstream_xchacha20poly1305_push","crypto_secretstream_xchacha20poly1305_rekey","crypto_shorthash","crypto_shorthash_keygen","crypto_shorthash_siphashx24","crypto_sign","crypto_sign_detached","crypto_sign_ed25519_pk_to_curve25519","crypto_sign_ed25519_sk_to_curve25519","crypto_sign_ed25519_sk_to_pk","crypto_sign_ed25519_sk_to_seed","crypto_sign_final_create","crypto_sign_final_verify","crypto_sign_init","crypto_sign_keypair","crypto_sign_open","crypto_sign_seed_keypair","crypto_sign_update","crypto_sign_verify_detached","crypto_stream_chacha20","crypto_stream_chacha20_ietf_xor","crypto_stream_chacha20_ietf_xor_ic","crypto_stream_chacha20_keygen","crypto_stream_chacha20_xor","crypto_stream_chacha20_xor_ic","crypto_stream_keygen","crypto_stream_xchacha20_keygen","crypto_stream_xchacha20_xor","crypto_stream_xchacha20_xor_ic","randombytes_buf","randombytes_buf_deterministic","randombytes_close","randombytes_random","randombytes_set_implementation","randombytes_stir","randombytes_uniform","sodium_version_string"],n=[w,x,E,_,C,k,B,I,S,O,M,D,T,F,R,P,N,j,L,U,Q,G,H,z,q,K,V,W,Y,J,X,Z,$,ee,te,re,ne,ae,ie,oe,se,ce,ue,fe,de,le,he,pe,be,me,ge,ve,ye,Ae,we,xe,Ee,_e,Ce,ke,Be,Ie,Se,Oe,Me,De,Te,Fe,Re,Pe,Ne,je,Le,Ue,Qe,Ge,He,ze,qe,Ke,Ve,We,Ye,Je,Xe,Ze,$e,et,tt,rt,nt,at,it,ot,st,ct,ut,ft,dt,lt,ht,pt,bt,mt,gt,vt,yt,At,wt,xt,Et,_t,Ct,kt,Bt,It,St,Ot,Mt,Dt,Tt,Ft,Rt,Pt,Nt,jt,Lt,Ut,Qt,Gt,Ht,zt,qt,Kt,Vt,Wt,Yt,Jt,Xt,Zt,$t,er,tr,rr,nr,ar,ir,or,sr,cr,ur,fr,dr,lr],a=0;a=240?(f=4,c=!0):d>=224?(f=3,c=!0):d>=192?(f=2,c=!0):d<128&&(f=1,c=!0)}while(!c);for(var l=f-(s.length-u),h=0;h>8&-39)<<8|87+(t=e[i]>>>4)+(t-10>>8&-39),a+=String.fromCharCode(255&n)+String.fromCharCode(n>>>8);return a}var s={ORIGINAL:1,ORIGINAL_NO_PADDING:3,URLSAFE:5,URLSAFE_NO_PADDING:7};function c(e){if(null==e)return s.URLSAFE_NO_PADDING;if(e!==s.ORIGINAL&&e!==s.ORIGINAL_NO_PADDING&&e!==s.URLSAFE&&e!=s.URLSAFE_NO_PADDING)throw new Error("unsupported base64 variant");return e}function u(e,t){t=c(t),e=A(a,e,"input");var n,a=[],o=0|Math.floor(e.length/3),s=e.length-3*o,u=4*o+(0!==s?0==(2&t)?4:2+(s>>>1):0),f=new h(u+1),d=p(e);return a.push(d),a.push(f.address),0===r._sodium_bin2base64(f.address,f.length,d,e.length,t)&&g(a,"conversion failed"),f.length=u,n=i(f.to_Uint8Array()),m(a),n}function f(e,t){var r=t||"uint8array";if(!d(r))throw new Error(r+" output format is not available");if(e instanceof h){if("uint8array"===r)return e.to_Uint8Array();if("text"===r)return i(e.to_Uint8Array());if("hex"===r)return o(e.to_Uint8Array());if("base64"===r)return u(e.to_Uint8Array(),s.URLSAFE_NO_PADDING);throw new Error('What is output format "'+r+'"?')}if("object"==typeof e){for(var n=Object.keys(e),a={},c=0;c>>24>>>8,c,d);var x=f(g,o);return m(s),x}function We(e){var t=[];l(e);var n=new h(0|r._crypto_kdf_keybytes()),a=n.address;t.push(a),r._crypto_kdf_keygen(a);var i=f(n,e);return m(t),i}function Ye(e,t,n,a){var i=[];l(a),e=A(i,e,"clientPublicKey");var o,s=0|r._crypto_kx_publickeybytes();e.length!==s&&v(i,"invalid clientPublicKey length"),o=p(e),i.push(o),t=A(i,t,"clientSecretKey");var c,u=0|r._crypto_kx_secretkeybytes();t.length!==u&&v(i,"invalid clientSecretKey length"),c=p(t),i.push(c),n=A(i,n,"serverPublicKey");var d,b=0|r._crypto_kx_publickeybytes();n.length!==b&&v(i,"invalid serverPublicKey length"),d=p(n),i.push(d);var y=new h(0|r._crypto_kx_sessionkeybytes()),w=y.address;i.push(w);var x=new h(0|r._crypto_kx_sessionkeybytes()),E=x.address;if(i.push(E),0==(0|r._crypto_kx_client_session_keys(w,E,o,c,d))){var _=f({sharedRx:y,sharedTx:x},a);return m(i),_}g(i,"invalid usage")}function Je(e){var t=[];l(e);var n=new h(0|r._crypto_kx_publickeybytes()),a=n.address;t.push(a);var i=new h(0|r._crypto_kx_secretkeybytes()),o=i.address;if(t.push(o),0==(0|r._crypto_kx_keypair(a,o))){var s={publicKey:f(n,e),privateKey:f(i,e),keyType:"x25519"};return m(t),s}g(t,"internal error")}function Xe(e,t){var n=[];l(t),e=A(n,e,"seed");var a,i=0|r._crypto_kx_seedbytes();e.length!==i&&v(n,"invalid seed length"),a=p(e),n.push(a);var o=new h(0|r._crypto_kx_publickeybytes()),s=o.address;n.push(s);var c=new h(0|r._crypto_kx_secretkeybytes()),u=c.address;if(n.push(u),0==(0|r._crypto_kx_seed_keypair(s,u,a))){var d={publicKey:f(o,t),privateKey:f(c,t),keyType:"x25519"};return m(n),d}g(n,"internal error")}function Ze(e,t,n,a){var i=[];l(a),e=A(i,e,"serverPublicKey");var o,s=0|r._crypto_kx_publickeybytes();e.length!==s&&v(i,"invalid serverPublicKey length"),o=p(e),i.push(o),t=A(i,t,"serverSecretKey");var c,u=0|r._crypto_kx_secretkeybytes();t.length!==u&&v(i,"invalid serverSecretKey length"),c=p(t),i.push(c),n=A(i,n,"clientPublicKey");var d,b=0|r._crypto_kx_publickeybytes();n.length!==b&&v(i,"invalid clientPublicKey length"),d=p(n),i.push(d);var y=new h(0|r._crypto_kx_sessionkeybytes()),w=y.address;i.push(w);var x=new h(0|r._crypto_kx_sessionkeybytes()),E=x.address;if(i.push(E),0==(0|r._crypto_kx_server_session_keys(w,E,o,c,d))){var _=f({sharedRx:y,sharedTx:x},a);return m(i),_}g(i,"invalid usage")}function $e(e,t,n){var a=[];l(n);var i=p(e=A(a,e,"message")),o=e.length;a.push(i),t=A(a,t,"key");var s,c=0|r._crypto_onetimeauth_keybytes();t.length!==c&&v(a,"invalid key length"),s=p(t),a.push(s);var u=new h(0|r._crypto_onetimeauth_bytes()),d=u.address;if(a.push(d),0==(0|r._crypto_onetimeauth(d,i,o,0,s))){var b=f(u,n);return m(a),b}g(a,"invalid usage")}function et(e,t){var n=[];l(t),y(n,e,"state_address");var a=new h(0|r._crypto_onetimeauth_bytes()),i=a.address;if(n.push(i),0==(0|r._crypto_onetimeauth_final(e,i))){var o=(r._free(e),f(a,t));return m(n),o}g(n,"invalid usage")}function tt(e,t){var n=[];l(t);var a=null;null!=e&&(a=p(e=A(n,e,"key")),e.length,n.push(a));var i=new h(144).address;if(0==(0|r._crypto_onetimeauth_init(i,a))){var o=i;return m(n),o}g(n,"invalid usage")}function rt(e){var t=[];l(e);var n=new h(0|r._crypto_onetimeauth_keybytes()),a=n.address;t.push(a),r._crypto_onetimeauth_keygen(a);var i=f(n,e);return m(t),i}function nt(e,t,n){var a=[];l(n),y(a,e,"state_address");var i=p(t=A(a,t,"message_chunk")),o=t.length;a.push(i),0!=(0|r._crypto_onetimeauth_update(e,i,o))&&g(a,"invalid usage"),m(a)}function at(e,t,n){var a=[];e=A(a,e,"hash");var i,o=0|r._crypto_onetimeauth_bytes();e.length!==o&&v(a,"invalid hash length"),i=p(e),a.push(i);var s=p(t=A(a,t,"message")),c=t.length;a.push(s),n=A(a,n,"key");var u,f=0|r._crypto_onetimeauth_keybytes();n.length!==f&&v(a,"invalid key length"),u=p(n),a.push(u);var d=0==(0|r._crypto_onetimeauth_verify(i,s,c,0,u));return m(a),d}function it(e,t,n,a,i,o,s){var c=[];l(s),y(c,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&v(c,"keyLength must be an unsigned integer");var u=p(t=A(c,t,"password")),d=t.length;c.push(u),n=A(c,n,"salt");var b,w=0|r._crypto_pwhash_saltbytes();n.length!==w&&v(c,"invalid salt length"),b=p(n),c.push(b),y(c,a,"opsLimit"),("number"!=typeof a||(0|a)!==a||a<0)&&v(c,"opsLimit must be an unsigned integer"),y(c,i,"memLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&v(c,"memLimit must be an unsigned integer"),y(c,o,"algorithm"),("number"!=typeof o||(0|o)!==o||o<0)&&v(c,"algorithm must be an unsigned integer");var x=new h(0|e),E=x.address;if(c.push(E),0==(0|r._crypto_pwhash(E,e,0,u,d,0,b,a,0,i,o))){var _=f(x,s);return m(c),_}g(c,"invalid usage")}function ot(e,t,n,a,i,o){var s=[];l(o),y(s,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&v(s,"keyLength must be an unsigned integer");var c=p(t=A(s,t,"password")),u=t.length;s.push(c),n=A(s,n,"salt");var d,b=0|r._crypto_pwhash_scryptsalsa208sha256_saltbytes();n.length!==b&&v(s,"invalid salt length"),d=p(n),s.push(d),y(s,a,"opsLimit"),("number"!=typeof a||(0|a)!==a||a<0)&&v(s,"opsLimit must be an unsigned integer"),y(s,i,"memLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&v(s,"memLimit must be an unsigned integer");var w=new h(0|e),x=w.address;if(s.push(x),0==(0|r._crypto_pwhash_scryptsalsa208sha256(x,e,0,c,u,0,d,a,0,i))){var E=f(w,o);return m(s),E}g(s,"invalid usage")}function st(e,t,n,a,i,o,s){var c=[];l(s);var u=p(e=A(c,e,"password")),d=e.length;c.push(u);var b=p(t=A(c,t,"salt")),w=t.length;c.push(b),y(c,n,"opsLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&v(c,"opsLimit must be an unsigned integer"),y(c,a,"r"),("number"!=typeof a||(0|a)!==a||a<0)&&v(c,"r must be an unsigned integer"),y(c,i,"p"),("number"!=typeof i||(0|i)!==i||i<0)&&v(c,"p must be an unsigned integer"),y(c,o,"keyLength"),("number"!=typeof o||(0|o)!==o||o<0)&&v(c,"keyLength must be an unsigned integer");var x=new h(0|o),E=x.address;if(c.push(E),0==(0|r._crypto_pwhash_scryptsalsa208sha256_ll(u,d,b,w,n,0,a,i,E,o))){var _=f(x,s);return m(c),_}g(c,"invalid usage")}function ct(e,t,n,a){var i=[];l(a);var o=p(e=A(i,e,"password")),s=e.length;i.push(o),y(i,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&v(i,"opsLimit must be an unsigned integer"),y(i,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&v(i,"memLimit must be an unsigned integer");var c=new h(0|r._crypto_pwhash_scryptsalsa208sha256_strbytes()).address;if(i.push(c),0==(0|r._crypto_pwhash_scryptsalsa208sha256_str(c,o,s,0,t,0,n))){var u=r.UTF8ToString(c);return m(i),u}g(i,"invalid usage")}function ut(e,t,n){var i=[];l(n),"string"!=typeof e&&v(i,"hashed_password must be a string"),e=a(e+"\0"),null!=s&&e.length-1!==s&&v(i,"invalid hashed_password length");var o=p(e),s=e.length-1;i.push(o);var c=p(t=A(i,t,"password")),u=t.length;i.push(c);var f=0==(0|r._crypto_pwhash_scryptsalsa208sha256_str_verify(o,c,u,0));return m(i),f}function ft(e,t,n,a){var i=[];l(a);var o=p(e=A(i,e,"password")),s=e.length;i.push(o),y(i,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&v(i,"opsLimit must be an unsigned integer"),y(i,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&v(i,"memLimit must be an unsigned integer");var c=new h(0|r._crypto_pwhash_strbytes()).address;if(i.push(c),0==(0|r._crypto_pwhash_str(c,o,s,0,t,0,n))){var u=r.UTF8ToString(c);return m(i),u}g(i,"invalid usage")}function dt(e,t,n,i){var o=[];l(i),"string"!=typeof e&&v(o,"hashed_password must be a string"),e=a(e+"\0"),null!=c&&e.length-1!==c&&v(o,"invalid hashed_password length");var s=p(e),c=e.length-1;o.push(s),y(o,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&v(o,"opsLimit must be an unsigned integer"),y(o,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&v(o,"memLimit must be an unsigned integer");var u=0!=(0|r._crypto_pwhash_str_needs_rehash(s,t,0,n));return m(o),u}function lt(e,t,n){var i=[];l(n),"string"!=typeof e&&v(i,"hashed_password must be a string"),e=a(e+"\0"),null!=s&&e.length-1!==s&&v(i,"invalid hashed_password length");var o=p(e),s=e.length-1;i.push(o);var c=p(t=A(i,t,"password")),u=t.length;i.push(c);var f=0==(0|r._crypto_pwhash_str_verify(o,c,u,0));return m(i),f}function ht(e,t,n){var a=[];l(n),e=A(a,e,"privateKey");var i,o=0|r._crypto_scalarmult_scalarbytes();e.length!==o&&v(a,"invalid privateKey length"),i=p(e),a.push(i),t=A(a,t,"publicKey");var s,c=0|r._crypto_scalarmult_bytes();t.length!==c&&v(a,"invalid publicKey length"),s=p(t),a.push(s);var u=new h(0|r._crypto_scalarmult_bytes()),d=u.address;if(a.push(d),0==(0|r._crypto_scalarmult(d,i,s))){var b=f(u,n);return m(a),b}g(a,"weak public key")}function pt(e,t){var n=[];l(t),e=A(n,e,"privateKey");var a,i=0|r._crypto_scalarmult_scalarbytes();e.length!==i&&v(n,"invalid privateKey length"),a=p(e),n.push(a);var o=new h(0|r._crypto_scalarmult_bytes()),s=o.address;if(n.push(s),0==(0|r._crypto_scalarmult_base(s,a))){var c=f(o,t);return m(n),c}g(n,"unknown error")}function bt(e,t,n){var a=[];l(n),e=A(a,e,"n");var i,o=0|r._crypto_scalarmult_ed25519_scalarbytes();e.length!==o&&v(a,"invalid n length"),i=p(e),a.push(i),t=A(a,t,"p");var s,c=0|r._crypto_scalarmult_ed25519_bytes();t.length!==c&&v(a,"invalid p length"),s=p(t),a.push(s);var u=new h(0|r._crypto_scalarmult_ed25519_bytes()),d=u.address;if(a.push(d),0==(0|r._crypto_scalarmult_ed25519(d,i,s))){var b=f(u,n);return m(a),b}g(a,"invalid point or scalar is 0")}function mt(e,t){var n=[];l(t),e=A(n,e,"scalar");var a,i=0|r._crypto_scalarmult_ed25519_scalarbytes();e.length!==i&&v(n,"invalid scalar length"),a=p(e),n.push(a);var o=new h(0|r._crypto_scalarmult_ed25519_bytes()),s=o.address;if(n.push(s),0==(0|r._crypto_scalarmult_ed25519_base(s,a))){var c=f(o,t);return m(n),c}g(n,"scalar is 0")}function gt(e,t){var n=[];l(t),e=A(n,e,"scalar");var a,i=0|r._crypto_scalarmult_ed25519_scalarbytes();e.length!==i&&v(n,"invalid scalar length"),a=p(e),n.push(a);var o=new h(0|r._crypto_scalarmult_ed25519_bytes()),s=o.address;if(n.push(s),0==(0|r._crypto_scalarmult_ed25519_base_noclamp(s,a))){var c=f(o,t);return m(n),c}g(n,"scalar is 0")}function vt(e,t,n){var a=[];l(n),e=A(a,e,"n");var i,o=0|r._crypto_scalarmult_ed25519_scalarbytes();e.length!==o&&v(a,"invalid n length"),i=p(e),a.push(i),t=A(a,t,"p");var s,c=0|r._crypto_scalarmult_ed25519_bytes();t.length!==c&&v(a,"invalid p length"),s=p(t),a.push(s);var u=new h(0|r._crypto_scalarmult_ed25519_bytes()),d=u.address;if(a.push(d),0==(0|r._crypto_scalarmult_ed25519_noclamp(d,i,s))){var b=f(u,n);return m(a),b}g(a,"invalid point or scalar is 0")}function yt(e,t,n){var a=[];l(n),e=A(a,e,"scalar");var i,o=0|r._crypto_scalarmult_ristretto255_scalarbytes();e.length!==o&&v(a,"invalid scalar length"),i=p(e),a.push(i),t=A(a,t,"element");var s,c=0|r._crypto_scalarmult_ristretto255_bytes();t.length!==c&&v(a,"invalid element length"),s=p(t),a.push(s);var u=new h(0|r._crypto_scalarmult_ristretto255_bytes()),d=u.address;if(a.push(d),0==(0|r._crypto_scalarmult_ristretto255(d,i,s))){var b=f(u,n);return m(a),b}g(a,"result is identity element")}function At(e,t){var n=[];l(t),e=A(n,e,"scalar");var a,i=0|r._crypto_core_ristretto255_scalarbytes();e.length!==i&&v(n,"invalid scalar length"),a=p(e),n.push(a);var o=new h(0|r._crypto_core_ristretto255_bytes()),s=o.address;if(n.push(s),0==(0|r._crypto_scalarmult_ristretto255_base(s,a))){var c=f(o,t);return m(n),c}g(n,"scalar is 0")}function wt(e,t,n,a){var i=[];l(a);var o=p(e=A(i,e,"message")),s=e.length;i.push(o),t=A(i,t,"nonce");var c,u=0|r._crypto_secretbox_noncebytes();t.length!==u&&v(i,"invalid nonce length"),c=p(t),i.push(c),n=A(i,n,"key");var d,b=0|r._crypto_secretbox_keybytes();n.length!==b&&v(i,"invalid key length"),d=p(n),i.push(d);var y=new h(0|s),w=y.address;i.push(w);var x=new h(0|r._crypto_secretbox_macbytes()),E=x.address;if(i.push(E),0==(0|r._crypto_secretbox_detached(w,E,o,s,0,c,d))){var _=f({mac:x,cipher:y},a);return m(i),_}g(i,"invalid usage")}function xt(e,t,n,a){var i=[];l(a);var o=p(e=A(i,e,"message")),s=e.length;i.push(o),t=A(i,t,"nonce");var c,u=0|r._crypto_secretbox_noncebytes();t.length!==u&&v(i,"invalid nonce length"),c=p(t),i.push(c),n=A(i,n,"key");var d,b=0|r._crypto_secretbox_keybytes();n.length!==b&&v(i,"invalid key length"),d=p(n),i.push(d);var y=new h(s+r._crypto_secretbox_macbytes()|0),w=y.address;if(i.push(w),0==(0|r._crypto_secretbox_easy(w,o,s,0,c,d))){var x=f(y,a);return m(i),x}g(i,"invalid usage")}function Et(e){var t=[];l(e);var n=new h(0|r._crypto_secretbox_keybytes()),a=n.address;t.push(a),r._crypto_secretbox_keygen(a);var i=f(n,e);return m(t),i}function _t(e,t,n,a,i){var o=[];l(i);var s=p(e=A(o,e,"ciphertext")),c=e.length;o.push(s),t=A(o,t,"mac");var u,d=0|r._crypto_secretbox_macbytes();t.length!==d&&v(o,"invalid mac length"),u=p(t),o.push(u),n=A(o,n,"nonce");var b,y=0|r._crypto_secretbox_noncebytes();n.length!==y&&v(o,"invalid nonce length"),b=p(n),o.push(b),a=A(o,a,"key");var w,x=0|r._crypto_secretbox_keybytes();a.length!==x&&v(o,"invalid key length"),w=p(a),o.push(w);var E=new h(0|c),_=E.address;if(o.push(_),0==(0|r._crypto_secretbox_open_detached(_,s,u,c,0,b,w))){var C=f(E,i);return m(o),C}g(o,"wrong secret key for the given ciphertext")}function Ct(e,t,n,a){var i=[];l(a),e=A(i,e,"ciphertext");var o,s=r._crypto_secretbox_macbytes(),c=e.length;c>>0;return m([]),t}function ur(e,t){var n=[];l(t);for(var a=r._malloc(24),i=0;i<6;i++)r.setValue(a+4*i,r.Runtime.addFunction(e[["implementation_name","random","stir","uniform","buf","close"][i]]),"i32");0!=(0|r._randombytes_set_implementation(a))&&g(n,"unsupported implementation"),m(n)}function fr(e){l(e),r._randombytes_stir()}function dr(e,t){var n=[];l(t),y(n,e,"upper_bound"),("number"!=typeof e||(0|e)!==e||e<0)&&v(n,"upper_bound must be an unsigned integer");var a=r._randombytes_uniform(e)>>>0;return m(n),a}function lr(){var e=r._sodium_version_string(),t=r.UTF8ToString(e);return m([]),t}return h.prototype.to_Uint8Array=function(){var e=new Uint8Array(this.length);return e.set(r.HEAPU8.subarray(this.address,this.address+this.length)),e},e.add=function(e,t){if(!(e instanceof Uint8Array&&t instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can added");var r=e.length,n=0,a=0;if(t.length!=e.length)throw new TypeError("Arguments must have the same length");for(a=0;a>=8,n+=e[a]+t[a],e[a]=255&n},e.base64_variants=s,e.compare=function(e,t){if(!(e instanceof Uint8Array&&t instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be compared");if(e.length!==t.length)throw new TypeError("Only instances of identical length can be compared");for(var r=0,n=1,a=e.length;a-- >0;)r|=t[a]-e[a]>>8&n,n&=(t[a]^e[a])-1>>8;return r+r+n-1},e.from_base64=function(e,t){t=c(t);var n,a=[],i=new h(3*(e=A(a,e,"input")).length/4),o=p(e),s=b(4),u=b(4);return a.push(o),a.push(i.address),a.push(i.result_bin_len_p),a.push(i.b64_end_p),0!==r._sodium_base642bin(i.address,i.length,o,e.length,0,s,u,t)&&g(a,"invalid input"),r.getValue(u,"i32")-o!==e.length&&g(a,"incomplete input"),i.length=r.getValue(s,"i32"),n=i.to_Uint8Array(),m(a),n},e.from_hex=function(e){var t,n=[],a=new h((e=A(n,e,"input")).length/2),i=p(e),o=b(4);return n.push(i),n.push(a.address),n.push(a.hex_end_p),0!==r._sodium_hex2bin(a.address,a.length,i,e.length,0,0,o)&&g(n,"invalid input"),r.getValue(o,"i32")-i!==e.length&&g(n,"incomplete input"),t=a.to_Uint8Array(),m(n),t},e.from_string=a,e.increment=function(e){if(!(e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be incremented");for(var t=256,r=0,n=e.length;r>=8,t+=e[r],e[r]=255&t},e.is_zero=function(e){if(!(e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be checked");for(var t=0,r=0,n=e.length;r 0");var n,a=[],i=b(4),o=1,s=0,c=0|e.length,u=new h(c+t);a.push(i),a.push(u.address);for(var f=u.address,d=u.address+c+t;f>>48|c>>>32|c>>>16|c))-1>>16);return 0!==r._sodium_pad(i,u.address,e.length,t,u.length)&&g(a,"internal error"),u.length=r.getValue(i,"i32"),n=u.to_Uint8Array(),m(a),n},e.unpad=function(e,t){if(!(e instanceof Uint8Array))throw new TypeError("buffer must be a Uint8Array");if((t|=0)<=0)throw new Error("block size must be > 0");var n=[],a=p(e),i=b(4);return n.push(a),n.push(i),0!==r._sodium_unpad(i,a,e.length,t)&&g(n,"unsupported/invalid padding"),e=(e=new Uint8Array(e)).subarray(0,r.getValue(i,"i32")),m(n),e},e.ready=n,e.symbols=function(){return Object.keys(e).sort()},e.to_base64=u,e.to_hex=o,e.to_string=i,e},void 0!==(i="function"===typeof n?n.apply(t,a):n)&&(e.exports=i),s&&o.sodium.ready.then((function(){s(o.sodium)}))}(this)},function(e,t,r){"use strict";r(211);var n=r(494);r.d(t,"parseConnectionError",(function(){return n.d}));var a=r(1531);r.o(a,"IJsonRpcProvider")&&r.d(t,"IJsonRpcProvider",(function(){return a.IJsonRpcProvider})),r.o(a,"formatJsonRpcError")&&r.d(t,"formatJsonRpcError",(function(){return a.formatJsonRpcError})),r.o(a,"formatJsonRpcRequest")&&r.d(t,"formatJsonRpcRequest",(function(){return a.formatJsonRpcRequest})),r.o(a,"formatJsonRpcResult")&&r.d(t,"formatJsonRpcResult",(function(){return a.formatJsonRpcResult})),r.o(a,"getBigIntRpcId")&&r.d(t,"getBigIntRpcId",(function(){return a.getBigIntRpcId})),r.o(a,"isHttpUrl")&&r.d(t,"isHttpUrl",(function(){return a.isHttpUrl})),r.o(a,"isJsonRpcError")&&r.d(t,"isJsonRpcError",(function(){return a.isJsonRpcError})),r.o(a,"isJsonRpcRequest")&&r.d(t,"isJsonRpcRequest",(function(){return a.isJsonRpcRequest})),r.o(a,"isJsonRpcResponse")&&r.d(t,"isJsonRpcResponse",(function(){return a.isJsonRpcResponse})),r.o(a,"isJsonRpcResult")&&r.d(t,"isJsonRpcResult",(function(){return a.isJsonRpcResult})),r.o(a,"isLocalhostUrl")&&r.d(t,"isLocalhostUrl",(function(){return a.isLocalhostUrl})),r.o(a,"isReactNative")&&r.d(t,"isReactNative",(function(){return a.isReactNative})),r.o(a,"isWsUrl")&&r.d(t,"isWsUrl",(function(){return a.isWsUrl})),r.o(a,"payloadId")&&r.d(t,"payloadId",(function(){return a.payloadId}));var i=r(1532);r.d(t,"formatJsonRpcError",(function(){return i.a})),r.d(t,"formatJsonRpcRequest",(function(){return i.b})),r.d(t,"formatJsonRpcResult",(function(){return i.c})),r.d(t,"getBigIntRpcId",(function(){return i.d})),r.d(t,"payloadId",(function(){return i.e}));r(1533);var o=r(1571);r.d(t,"IJsonRpcProvider",(function(){return o.a}));var s=r(1534);r.d(t,"isHttpUrl",(function(){return s.a})),r.d(t,"isLocalhostUrl",(function(){return s.b})),r.d(t,"isWsUrl",(function(){return s.c}));var c=r(1535);r.d(t,"isJsonRpcError",(function(){return c.a})),r.d(t,"isJsonRpcRequest",(function(){return c.b})),r.d(t,"isJsonRpcResponse",(function(){return c.c})),r.d(t,"isJsonRpcResult",(function(){return c.d}))},function(e,t,r){var n=r(951);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(e,t,r){var n=r(634),a=Function.prototype,i=a.bind,o=a.call,s=n&&i.bind(o,o);e.exports=n?function(e){return e&&s(e)}:function(e){return e&&function(){return o.apply(e,arguments)}}},,function(e,t,r){"use strict";r.d(t,"i",(function(){return o})),r.d(t,"h",(function(){return c})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return f})),r.d(t,"k",(function(){return d})),r.d(t,"j",(function(){return l})),r.d(t,"g",(function(){return p})),r.d(t,"d",(function(){return b})),r.d(t,"e",(function(){return m})),r.d(t,"c",(function(){return g})),r.d(t,"f",(function(){return v}));var n=new(r(144).a)("bytes/5.6.1");function a(e){return!!e.toHexString}function i(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return i(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function o(e){return l(e)&&!(e.length%2)||c(e)}function s(e){return"number"===typeof e&&e==e&&e%1===0}function c(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(!s(e.length)||e.length<0)return!1;for(var t=0;t=256)return!1}return!0}function u(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),i(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),l(e)){var o=e.substring(2);o.length%2&&("left"===t.hexPad?o="0"+o:"right"===t.hexPad?o+="0":n.throwArgumentError("hex data is odd-length","value",e));for(var s=[],u=0;u>4]+h[15&s]}return i}return n.throwArgumentError("invalid hexlify value","value",e)}function b(e){if("string"!==typeof e)e=p(e);else if(!l(e)||e.length%2)return null;return(e.length-2)/2}function m(e,t,r){return"string"!==typeof e?e=p(e):(!l(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function g(e){var t="0x";return e.forEach((function(e){t+=p(e).substring(2)})),t}function v(e,t){for("string"!==typeof e?e=p(e):l(e)||n.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){var n=r(15),a=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return a(e,t,r)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o),o.prototype=Object.create(a.prototype),i(a,o),o.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return a(e,t,r)},o.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=a(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return a(e)},o.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"f",(function(){return c})),r.d(t,"e",(function(){return u})),r.d(t,"h",(function(){return f})),r.d(t,"i",(function(){return d})),r.d(t,"j",(function(){return l})),r.d(t,"g",(function(){return p})),r.d(t,"k",(function(){return m}));var n={prefix:"fas",iconName:"angle-left",icon:[256,512,[8249],"f104","M192 448c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l137.4 137.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448z"]},a={prefix:"fas",iconName:"check",icon:[448,512,[10004,10003],"f00c","M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z"]},i={prefix:"fas",iconName:"check-double",icon:[448,512,[],"f560","M182.6 246.6C170.1 259.1 149.9 259.1 137.4 246.6L57.37 166.6C44.88 154.1 44.88 133.9 57.37 121.4C69.87 108.9 90.13 108.9 102.6 121.4L159.1 178.7L297.4 41.37C309.9 28.88 330.1 28.88 342.6 41.37C355.1 53.87 355.1 74.13 342.6 86.63L182.6 246.6zM182.6 470.6C170.1 483.1 149.9 483.1 137.4 470.6L9.372 342.6C-3.124 330.1-3.124 309.9 9.372 297.4C21.87 284.9 42.13 284.9 54.63 297.4L159.1 402.7L393.4 169.4C405.9 156.9 426.1 156.9 438.6 169.4C451.1 181.9 451.1 202.1 438.6 214.6L182.6 470.6z"]},o={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"]},s={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM232 152C232 138.8 242.8 128 256 128s24 10.75 24 24v128c0 13.25-10.75 24-24 24S232 293.3 232 280V152zM256 400c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 385.9 273.4 400 256 400z"]},c=s,u={prefix:"fas",iconName:"copy",icon:[512,512,[],"f0c5","M384 96L384 0h-112c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48H464c26.51 0 48-21.49 48-48V128h-95.1C398.4 128 384 113.6 384 96zM416 0v96h96L416 0zM192 352V128h-144c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h192c26.51 0 48-21.49 48-48L288 416h-32C220.7 416 192 387.3 192 352z"]},f={prefix:"fas",iconName:"file-signature",icon:[576,512,[],"f573","M292.7 342.3C289.7 345.3 288 349.4 288 353.7V416h62.34c4.264 0 8.35-1.703 11.35-4.727l156.9-158l-67.88-67.88L292.7 342.3zM568.5 167.4L536.6 135.5c-9.875-10-26-10-36 0l-27.25 27.25l67.88 67.88l27.25-27.25C578.5 193.4 578.5 177.3 568.5 167.4zM256 0v128h128L256 0zM256 448c-16.07-.2852-30.62-9.359-37.88-23.88c-2.875-5.875-8-6.5-10.12-6.5s-7.25 .625-10 6.125l-7.749 15.38C187.6 444.6 181.1 448 176 448H174.9c-6.5-.5-12-4.75-14-11L144 386.6L133.4 418.5C127.5 436.1 111 448 92.45 448H80C71.13 448 64 440.9 64 432S71.13 416 80 416h12.4c4.875 0 9.102-3.125 10.6-7.625l18.25-54.63C124.5 343.9 133.6 337.3 144 337.3s19.5 6.625 22.75 16.5l13.88 41.63c19.75-16.25 54.13-9.75 66 14.12C248.5 413.2 252.2 415.6 256 415.9V347c0-8.523 3.402-16.7 9.451-22.71L384 206.5V160H256c-17.67 0-32-14.33-32-32L224 0H48C21.49 0 0 21.49 0 48v416C0 490.5 21.49 512 48 512h288c26.51 0 48-21.49 48-48V448H256z"]},d={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M172.5 131.1C228.1 75.51 320.5 75.51 376.1 131.1C426.1 181.1 433.5 260.8 392.4 318.3L391.3 319.9C381 334.2 361 337.6 346.7 327.3C332.3 317 328.9 297 339.2 282.7L340.3 281.1C363.2 249 359.6 205.1 331.7 177.2C300.3 145.8 249.2 145.8 217.7 177.2L105.5 289.5C73.99 320.1 73.99 372 105.5 403.5C133.3 431.4 177.3 435 209.3 412.1L210.9 410.1C225.3 400.7 245.3 404 255.5 418.4C265.8 432.8 262.5 452.8 248.1 463.1L246.5 464.2C188.1 505.3 110.2 498.7 60.21 448.8C3.741 392.3 3.741 300.7 60.21 244.3L172.5 131.1zM467.5 380C411 436.5 319.5 436.5 263 380C213 330 206.5 251.2 247.6 193.7L248.7 192.1C258.1 177.8 278.1 174.4 293.3 184.7C307.7 194.1 311.1 214.1 300.8 229.3L299.7 230.9C276.8 262.1 280.4 306.9 308.3 334.8C339.7 366.2 390.8 366.2 422.3 334.8L534.5 222.5C566 191 566 139.1 534.5 108.5C506.7 80.63 462.7 76.99 430.7 99.9L429.1 101C414.7 111.3 394.7 107.1 384.5 93.58C374.2 79.2 377.5 59.21 391.9 48.94L393.5 47.82C451 6.731 529.8 13.25 579.8 63.24C636.3 119.7 636.3 211.3 579.8 267.7L467.5 380z"]},l={prefix:"fas",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127","M185.7 120.3C242.5 75.82 324.7 79.73 376.1 131.1C420.1 175.1 430.9 239.6 406.7 293.5L438.6 318.4L534.5 222.5C566 191 566 139.1 534.5 108.5C506.7 80.63 462.7 76.1 430.7 99.9L429.1 101C414.7 111.3 394.7 107.1 384.5 93.58C374.2 79.2 377.5 59.21 391.9 48.94L393.5 47.82C451 6.732 529.8 13.25 579.8 63.24C636.3 119.7 636.3 211.3 579.8 267.7L489.3 358.2L630.8 469.1C641.2 477.3 643.1 492.4 634.9 502.8C626.7 513.2 611.6 515.1 601.2 506.9L9.196 42.89C-1.236 34.71-3.065 19.63 5.112 9.196C13.29-1.236 28.37-3.065 38.81 5.112L185.7 120.3zM238.1 161.1L353.4 251.7C359.3 225.5 351.7 197.2 331.7 177.2C306.6 152.1 269.1 147 238.1 161.1V161.1zM263 380C233.1 350.1 218.7 309.8 220.9 270L406.6 416.4C357.4 431 301.9 418.9 263 380V380zM116.6 187.9L167.2 227.8L105.5 289.5C73.99 320.1 73.99 372 105.5 403.5C133.3 431.4 177.3 435 209.3 412.1L210.9 410.1C225.3 400.7 245.3 404 255.5 418.4C265.8 432.8 262.5 452.8 248.1 463.1L246.5 464.2C188.1 505.3 110.2 498.7 60.21 448.8C3.741 392.3 3.741 300.7 60.21 244.3L116.6 187.9z"]},h={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z"]},p=h,b={prefix:"fas",iconName:"xmark",icon:[320,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"]},m=b},function(e,t,r){var n=r(190);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t0&&o.length>a&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,s=c,console&&console.warn&&console.warn(s)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=l.bind(n);return a.listener=r,n.wrapFn=a,a}function p(e,t,r){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:"function"===typeof a?r?[a.listener||a]:[a]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[e];if(void 0===c)return!1;if("function"===typeof c)i(c,this,t);else{var u=c.length,f=m(c,u);for(r=0;r=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,a=i;break}if(a<0)return this;0===a?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},s.prototype.listenerCount=b,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(1),a=r(2),i=!1,o=!1,s={debug:1,default:2,info:2,warning:3,error:4,off:5},c=s.default,u=null;var f,d,l=function(){try{var e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(f||(f={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(d||(d={}));var h="0123456789abcdef",p=function(){function e(t){Object(n.a)(this,e),Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}return Object(a.a)(e,[{key:"_log",value:function(e,t){var r=e.toLowerCase();null==s[r]&&this.throwArgumentError("invalid log level name","logLevel",e),c>s[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=h[15&t[i]];a.push(e+"=Uint8Array(0x"+r+")")}else a.push(e+"="+JSON.stringify(t))}catch(u){a.push(e+"="+JSON.stringify(n[e].toString()))}})),a.push("code=".concat(r)),a.push("version=".concat(this.version));var i=t,s="";switch(r){case d.NUMERIC_FAULT:s="NUMERIC_FAULT";var c=t;switch(c){case"overflow":case"underflow":case"division-by-zero":s+="-"+c;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case d.CALL_EXCEPTION:case d.INSUFFICIENT_FUNDS:case d.MISSING_NEW:case d.NONCE_EXPIRED:case d.REPLACEMENT_UNDERPRICED:case d.TRANSACTION_REPLACED:case d.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),a.length&&(t+=" ("+a.join(", ")+")");var u=new Error(t);return u.reason=i,u.code=r,Object.keys(n).forEach((function(e){u[e]=n[e]})),u}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),l&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:l})}},{key:"checkSafeUint53",value:function(t,r){"number"===typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return u||(u=new e("logger/5.6.0")),u}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),i){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}o=!!t,i=!!r}},{key:"setLogLevel",value:function(t){var r=s[t.toLowerCase()];null!=r?c=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();p.errors=d,p.levels=f},function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(1),a=r(2),i=!1,o=!1,s={debug:1,default:2,info:2,warning:3,error:4,off:5},c=s.default,u=null;var f,d,l=function(){try{var e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(f||(f={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(d||(d={}));var h="0123456789abcdef",p=function(){function e(t){Object(n.a)(this,e),Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}return Object(a.a)(e,[{key:"_log",value:function(e,t){var r=e.toLowerCase();null==s[r]&&this.throwArgumentError("invalid log level name","logLevel",e),c>s[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=h[15&t[i]];a.push(e+"=Uint8Array(0x"+r+")")}else a.push(e+"="+JSON.stringify(t))}catch(u){a.push(e+"="+JSON.stringify(n[e].toString()))}})),a.push("code=".concat(r)),a.push("version=".concat(this.version));var i=t,s="";switch(r){case d.NUMERIC_FAULT:s="NUMERIC_FAULT";var c=t;switch(c){case"overflow":case"underflow":case"division-by-zero":s+="-"+c;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case d.CALL_EXCEPTION:case d.INSUFFICIENT_FUNDS:case d.MISSING_NEW:case d.NONCE_EXPIRED:case d.REPLACEMENT_UNDERPRICED:case d.TRANSACTION_REPLACED:case d.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),a.length&&(t+=" ("+a.join(", ")+")");var u=new Error(t);return u.reason=i,u.code=r,Object.keys(n).forEach((function(e){u[e]=n[e]})),u}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),l&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:l})}},{key:"checkSafeUint53",value:function(t,r){"number"===typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return u||(u=new e("logger/5.6.0")),u}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),i){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}o=!!t,i=!!r}},{key:"setLogLevel",value:function(t){var r=s[t.toLowerCase()];null!=r?c=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();p.errors=d,p.levels=f},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return x})),r.d(t,"c",(function(){return y})),r.d(t,"d",(function(){return A})),r.d(t,"e",(function(){return w})),r.d(t,"f",(function(){return k})),r.d(t,"g",(function(){return O})),r.d(t,"h",(function(){return I})),r.d(t,"i",(function(){return S}));var n=r(1092),a=r.n(n),i=r(1103),o=r.n(i),s=r(1104),c=r.n(s),u=r(691),f=r.n(u),d=r(437),l=r.n(d),h=r(396),p=r.n(h),b=r(1624),m=r.n(b),g=function(){var e,t=[];return{deliver:function(r){return f()(p.a.mark((function n(){return p.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t.push(r),e&&(e(t.shift()),e=void 0);case 2:case"end":return n.stop()}}),n)})))()},receive:function(){return new Promise((function(r){var n=t.shift();if(n)return r(n);e=r}))}}},v="INIT",y="SUBSCRIBE",A="UNSUBSCRIBE",w="UPDATED",x="SNAPSHOT",E="TERMINATE",_="object"===("undefined"===typeof self?"undefined":l()(self))&&self.self===self&&self||"object"===("undefined"===typeof e?"undefined":l()(e))&&e.global===e&&e||"object"===("undefined"===typeof window?"undefined":l()(window))&&window.window===window&&window;_.FCL_REGISTRY=null==_.FCL_REGISTRY?{}:_.FCL_REGISTRY;var C=0,k=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(a,i){var o=n.expectReply||!1,s=null!=n.timeout?n.timeout:5e3;o&&s&&setTimeout((function(){return i(new Error("Timeout: ".concat(s,"ms passed without a response.")))}),s);var c={to:e,from:n.from,tag:t,data:r,timeout:s,reply:a,reject:i};try{_.FCL_REGISTRY[e]&&_.FCL_REGISTRY[e].mailbox.deliver(c),o||a(!0)}catch(u){console.error("FCL.Actor -- Could Not Deliver Message",c,_.FCL_REGISTRY[e],u)}}))},B=function(e){delete _.FCL_REGISTRY[e]},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==t&&(t=++C),null!=_.FCL_REGISTRY[t])return t;_.FCL_REGISTRY[t]={addr:t,mailbox:g(),subs:new Set,kvs:{},error:null};var r={self:function(){return t},receive:function(){return _.FCL_REGISTRY[t].mailbox.receive()},send:function(e,r,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a.from=t,k(e,r,n,a)},sendSelf:function(e,r,n){_.FCL_REGISTRY[t]&&k(t,e,r,n)},broadcast:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.from=t;var a,i=c()(_.FCL_REGISTRY[t].subs);try{for(i.s();!(a=i.n()).done;){var o=a.value;k(o,e,r,n)}}catch(s){i.e(s)}finally{i.f()}},subscribe:function(e){return null!=e&&_.FCL_REGISTRY[t].subs.add(e)},unsubscribe:function(e){return null!=e&&_.FCL_REGISTRY[t].subs.delete(e)},subscriberCount:function(){return _.FCL_REGISTRY[t].subs.size},hasSubs:function(){return!!_.FCL_REGISTRY[t].subs.size},put:function(e,r){null!=e&&(_.FCL_REGISTRY[t].kvs[e]=r)},get:function(e,r){var n=_.FCL_REGISTRY[t].kvs[e];return null==n?r:n},delete:function(e){delete _.FCL_REGISTRY[t].kvs[e]},update:function(e,r){null!=e&&(_.FCL_REGISTRY[t].kvs[e]=r(_.FCL_REGISTRY[t].kvs[e]))},keys:function(){return Object.keys(_.FCL_REGISTRY[t].kvs)},all:function(){return _.FCL_REGISTRY[t].kvs},where:function(e){return Object.keys(_.FCL_REGISTRY[t].kvs).reduce((function(r,n){return e.test(n)?o()(o()({},r),{},a()({},n,_.FCL_REGISTRY[t].kvs[n])):r}),{})},merge:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(e).forEach((function(r){return _.FCL_REGISTRY[t].kvs[r]=e[r]}))},fatalError:function(e){_.FCL_REGISTRY[t].error=e;var r,n=c()(_.FCL_REGISTRY[t].subs);try{for(n.s();!(r=n.n()).done;){var a=r.value;k(a,w)}}catch(i){n.e(i)}finally{n.f()}}};return"object"===l()(e)&&(e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var t=f()(p.a.mark((function t(r){var n;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("function"!==typeof e[v]){t.next=3;break}return t.next=3,e[v](r);case 3:return t.next=6,r.receive();case 6:if(n=t.sent,t.prev=7,"EXIT"!==n.tag){t.next=13;break}if("function"!==typeof e[E]){t.next=12;break}return t.next=12,e[E](r,n,n.data||{});case 12:return t.abrupt("break",25);case 13:return t.next=15,e[n.tag](r,n,n.data||{});case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(7),console.error("".concat(r.self()," Error"),n,t.t0);case 20:return t.prev=20,t.abrupt("continue",3);case 23:t.next=3;break;case 25:case"end":return t.stop()}}),t,null,[[7,17,20,23]])})));return function(e){return t.apply(this,arguments)}}()}(e)),m()(f()(p.a.mark((function n(){return p.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e(r);case 2:B(t);case 3:case"end":return n.stop()}}),n)})))),t};function S(e,t,r){t(e);var n="@EXIT",a=I(function(){var t=f()(p.a.mark((function t(a){var i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a.send(e,y);case 1:return t.next=4,a.receive();case 4:if(i=t.sent,o=_.FCL_REGISTRY[e].error,i.tag!==n){t.next=9;break}return a.send(e,A),t.abrupt("return");case 9:if(!o){t.next=13;break}return r(null,o),a.send(e,A),t.abrupt("return");case 13:r(i.data,null),t.next=1;break;case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());return function(){return k(a,n)}}function O(e,t){return t(e),k(e,x,null,{expectReply:!0,timeout:0})}}).call(this,r(55))},function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n=0||(a[r]=e[r]);return a}r.d(t,"a",(function(){return n}))},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2794).Buffer}catch(I){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,a){for(var i=0,o=0,s=Math.min(e.length,r),c=t;c=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&o0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=c(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(I){i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o>>24-a&16777215,(a+=2)>=26&&(a-=26,o--),r=0!==i||o!==this.length-1?l[6-c.length]+c+r:c+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(f).toString(e);r=(d=d.idivn(f)).isZero()?b+r:l[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function b(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(o=(a=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,a),o},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===i?(r>=0&&(e[r--]=o>>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],A=8191&y,w=y>>>13,x=0|o[4],E=8191&x,_=x>>>13,C=0|o[5],k=8191&C,B=C>>>13,I=0|o[6],S=8191&I,O=I>>>13,M=0|o[7],D=8191&M,T=M>>>13,F=0|o[8],R=8191&F,P=F>>>13,N=0|o[9],j=8191&N,L=N>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,Y=0|s[3],J=8191&Y,X=Y>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,Q))|0)+((8191&(a=(a=Math.imul(d,G))+Math.imul(l,Q)|0))<<13)|0;u=((i=Math.imul(l,G))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,Q),a=(a=Math.imul(p,G))+Math.imul(b,Q)|0,i=Math.imul(b,G);var ge=(u+(n=n+Math.imul(d,z)|0)|0)+((8191&(a=(a=a+Math.imul(d,q)|0)+Math.imul(l,z)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,Q),a=(a=Math.imul(g,G))+Math.imul(v,Q)|0,i=Math.imul(v,G),n=n+Math.imul(p,z)|0,a=(a=a+Math.imul(p,q)|0)+Math.imul(b,z)|0,i=i+Math.imul(b,q)|0;var ve=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,Q),a=(a=Math.imul(A,G))+Math.imul(w,Q)|0,i=Math.imul(w,G),n=n+Math.imul(g,z)|0,a=(a=a+Math.imul(g,q)|0)+Math.imul(v,z)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(p,V)|0,a=(a=a+Math.imul(p,W)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ye=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(a=(a=a+Math.imul(d,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((i=i+Math.imul(l,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,Q),a=(a=Math.imul(E,G))+Math.imul(_,Q)|0,i=Math.imul(_,G),n=n+Math.imul(A,z)|0,a=(a=a+Math.imul(A,q)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,q)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(p,J)|0,a=(a=a+Math.imul(p,X)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,X)|0;var Ae=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,Q),a=(a=Math.imul(k,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),n=n+Math.imul(E,z)|0,a=(a=a+Math.imul(E,q)|0)+Math.imul(_,z)|0,i=i+Math.imul(_,q)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(g,J)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,a=(a=a+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((i=i+Math.imul(l,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,Q),a=(a=Math.imul(S,G))+Math.imul(O,Q)|0,i=Math.imul(O,G),n=n+Math.imul(k,z)|0,a=(a=a+Math.imul(k,q)|0)+Math.imul(B,z)|0,i=i+Math.imul(B,q)|0,n=n+Math.imul(E,V)|0,a=(a=a+Math.imul(E,W)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(A,J)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,a=(a=a+Math.imul(p,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var xe=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,oe)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),a=(a=Math.imul(D,G))+Math.imul(T,Q)|0,i=Math.imul(T,G),n=n+Math.imul(S,z)|0,a=(a=a+Math.imul(S,q)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,q)|0,n=n+Math.imul(k,V)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(A,$)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(p,ie)|0,a=(a=a+Math.imul(p,oe)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,oe)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,Q),a=(a=Math.imul(R,G))+Math.imul(P,Q)|0,i=Math.imul(P,G),n=n+Math.imul(D,z)|0,a=(a=a+Math.imul(D,q)|0)+Math.imul(T,z)|0,i=i+Math.imul(T,q)|0,n=n+Math.imul(S,V)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,n=n+Math.imul(E,$)|0,a=(a=a+Math.imul(E,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(p,ce)|0,a=(a=a+Math.imul(p,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0;var _e=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),a=(a=Math.imul(j,G))+Math.imul(L,Q)|0,i=Math.imul(L,G),n=n+Math.imul(R,z)|0,a=(a=a+Math.imul(R,q)|0)+Math.imul(P,z)|0,i=i+Math.imul(P,q)|0,n=n+Math.imul(D,V)|0,a=(a=a+Math.imul(D,W)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,W)|0,n=n+Math.imul(S,J)|0,a=(a=a+Math.imul(S,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,a=(a=a+Math.imul(E,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(g,ce)|0,a=(a=a+Math.imul(g,ue)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,a=(a=a+Math.imul(p,le)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,le)|0;var Ce=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(a=(a=a+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((i=i+Math.imul(l,be)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,z),a=(a=Math.imul(j,q))+Math.imul(L,z)|0,i=Math.imul(L,q),n=n+Math.imul(R,V)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(S,$)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(E,ie)|0,a=(a=a+Math.imul(E,oe)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(A,ce)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,n=n+Math.imul(g,de)|0,a=(a=a+Math.imul(g,le)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0;var ke=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(a=(a=a+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),a=(a=Math.imul(j,W))+Math.imul(L,V)|0,i=Math.imul(L,W),n=n+Math.imul(R,J)|0,a=(a=a+Math.imul(R,X)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(E,ce)|0,a=(a=a+Math.imul(E,ue)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,le)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0;var Be=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(a=(a=a+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((i=i+Math.imul(v,be)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,J),a=(a=Math.imul(j,X))+Math.imul(L,J)|0,i=Math.imul(L,X),n=n+Math.imul(R,$)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(D,re)|0,a=(a=a+Math.imul(D,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(k,ce)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,n=n+Math.imul(E,de)|0,a=(a=a+Math.imul(E,le)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,le)|0;var Ie=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(a=(a=a+Math.imul(A,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,$),a=(a=Math.imul(j,ee))+Math.imul(L,$)|0,i=Math.imul(L,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(D,ie)|0,a=(a=a+Math.imul(D,oe)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,oe)|0,n=n+Math.imul(S,ce)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,le)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,le)|0;var Se=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(a=(a=a+Math.imul(E,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((i=i+Math.imul(_,be)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,re),a=(a=Math.imul(j,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(D,ce)|0,a=(a=a+Math.imul(D,ue)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,le)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(a=(a=a+Math.imul(k,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ie),a=(a=Math.imul(j,oe))+Math.imul(L,ie)|0,i=Math.imul(L,oe),n=n+Math.imul(R,ce)|0,a=(a=a+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,n=n+Math.imul(D,de)|0,a=(a=a+Math.imul(D,le)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,le)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(a=(a=a+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,ce),a=(a=Math.imul(j,ue))+Math.imul(L,ce)|0,i=Math.imul(L,ue),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,le)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,le)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(a=(a=a+Math.imul(D,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,de),a=(a=Math.imul(j,le))+Math.imul(L,de)|0,i=Math.imul(L,le);var Te=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(a=(a=a+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Fe=(u+(n=Math.imul(j,pe))|0)+((8191&(a=(a=Math.imul(j,be))+Math.imul(L,pe)|0))<<13)|0;return u=((i=Math.imul(L,be))+(a>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=Ae,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=_e,c[9]=Ce,c[10]=ke,c[11]=Be,c[12]=Ie,c[13]=Se,c[14]=Oe,c[15]=Me,c[16]=De,c[17]=Te,c[18]=Fe,0!==u&&(c[19]=u,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function v(e,t,r){return g(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(m=b),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?b(this,e,t):r<1024?g(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,r+=i/67108864|0,r+=o>>>26,this.words[a]=67108863&o}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==f||u>=a);u--){var d=0|this.words[u];this.words[u]=f<<26-i|d>>>i,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this._strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,c=n.length-a.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(a,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0===(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(f),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,l=1;0===(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function B(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},a(x,w),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=o}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(A[e])return A[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new E;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return A[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,a),l=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),p=o;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var d=u>>f&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===f)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}c=26}return a},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new B(e)},a(B,k),B.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},B.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},B.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},B.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},B.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(98)(e))},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2795).Buffer}catch(I){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,a){for(var i=0,o=0,s=Math.min(e.length,r),c=t;c=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&o0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=c(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(I){i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o>>24-a&16777215,(a+=2)>=26&&(a-=26,o--),r=0!==i||o!==this.length-1?l[6-c.length]+c+r:c+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(f).toString(e);r=(d=d.idivn(f)).isZero()?b+r:l[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function b(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(o=(a=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,a),o},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===i?(r>=0&&(e[r--]=o>>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],A=8191&y,w=y>>>13,x=0|o[4],E=8191&x,_=x>>>13,C=0|o[5],k=8191&C,B=C>>>13,I=0|o[6],S=8191&I,O=I>>>13,M=0|o[7],D=8191&M,T=M>>>13,F=0|o[8],R=8191&F,P=F>>>13,N=0|o[9],j=8191&N,L=N>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,Y=0|s[3],J=8191&Y,X=Y>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,Q))|0)+((8191&(a=(a=Math.imul(d,G))+Math.imul(l,Q)|0))<<13)|0;u=((i=Math.imul(l,G))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,Q),a=(a=Math.imul(p,G))+Math.imul(b,Q)|0,i=Math.imul(b,G);var ge=(u+(n=n+Math.imul(d,z)|0)|0)+((8191&(a=(a=a+Math.imul(d,q)|0)+Math.imul(l,z)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,Q),a=(a=Math.imul(g,G))+Math.imul(v,Q)|0,i=Math.imul(v,G),n=n+Math.imul(p,z)|0,a=(a=a+Math.imul(p,q)|0)+Math.imul(b,z)|0,i=i+Math.imul(b,q)|0;var ve=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,Q),a=(a=Math.imul(A,G))+Math.imul(w,Q)|0,i=Math.imul(w,G),n=n+Math.imul(g,z)|0,a=(a=a+Math.imul(g,q)|0)+Math.imul(v,z)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(p,V)|0,a=(a=a+Math.imul(p,W)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ye=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(a=(a=a+Math.imul(d,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((i=i+Math.imul(l,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,Q),a=(a=Math.imul(E,G))+Math.imul(_,Q)|0,i=Math.imul(_,G),n=n+Math.imul(A,z)|0,a=(a=a+Math.imul(A,q)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,q)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(p,J)|0,a=(a=a+Math.imul(p,X)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,X)|0;var Ae=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,Q),a=(a=Math.imul(k,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),n=n+Math.imul(E,z)|0,a=(a=a+Math.imul(E,q)|0)+Math.imul(_,z)|0,i=i+Math.imul(_,q)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(g,J)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,a=(a=a+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((i=i+Math.imul(l,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,Q),a=(a=Math.imul(S,G))+Math.imul(O,Q)|0,i=Math.imul(O,G),n=n+Math.imul(k,z)|0,a=(a=a+Math.imul(k,q)|0)+Math.imul(B,z)|0,i=i+Math.imul(B,q)|0,n=n+Math.imul(E,V)|0,a=(a=a+Math.imul(E,W)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(A,J)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,a=(a=a+Math.imul(p,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var xe=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,oe)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),a=(a=Math.imul(D,G))+Math.imul(T,Q)|0,i=Math.imul(T,G),n=n+Math.imul(S,z)|0,a=(a=a+Math.imul(S,q)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,q)|0,n=n+Math.imul(k,V)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(A,$)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(p,ie)|0,a=(a=a+Math.imul(p,oe)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,oe)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,Q),a=(a=Math.imul(R,G))+Math.imul(P,Q)|0,i=Math.imul(P,G),n=n+Math.imul(D,z)|0,a=(a=a+Math.imul(D,q)|0)+Math.imul(T,z)|0,i=i+Math.imul(T,q)|0,n=n+Math.imul(S,V)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,n=n+Math.imul(E,$)|0,a=(a=a+Math.imul(E,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(p,ce)|0,a=(a=a+Math.imul(p,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0;var _e=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),a=(a=Math.imul(j,G))+Math.imul(L,Q)|0,i=Math.imul(L,G),n=n+Math.imul(R,z)|0,a=(a=a+Math.imul(R,q)|0)+Math.imul(P,z)|0,i=i+Math.imul(P,q)|0,n=n+Math.imul(D,V)|0,a=(a=a+Math.imul(D,W)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,W)|0,n=n+Math.imul(S,J)|0,a=(a=a+Math.imul(S,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,a=(a=a+Math.imul(E,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(g,ce)|0,a=(a=a+Math.imul(g,ue)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,a=(a=a+Math.imul(p,le)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,le)|0;var Ce=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(a=(a=a+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((i=i+Math.imul(l,be)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,z),a=(a=Math.imul(j,q))+Math.imul(L,z)|0,i=Math.imul(L,q),n=n+Math.imul(R,V)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(S,$)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(E,ie)|0,a=(a=a+Math.imul(E,oe)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(A,ce)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,n=n+Math.imul(g,de)|0,a=(a=a+Math.imul(g,le)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0;var ke=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(a=(a=a+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),a=(a=Math.imul(j,W))+Math.imul(L,V)|0,i=Math.imul(L,W),n=n+Math.imul(R,J)|0,a=(a=a+Math.imul(R,X)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(E,ce)|0,a=(a=a+Math.imul(E,ue)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,le)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0;var Be=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(a=(a=a+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((i=i+Math.imul(v,be)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,J),a=(a=Math.imul(j,X))+Math.imul(L,J)|0,i=Math.imul(L,X),n=n+Math.imul(R,$)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(D,re)|0,a=(a=a+Math.imul(D,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(k,ce)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,n=n+Math.imul(E,de)|0,a=(a=a+Math.imul(E,le)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,le)|0;var Ie=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(a=(a=a+Math.imul(A,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,$),a=(a=Math.imul(j,ee))+Math.imul(L,$)|0,i=Math.imul(L,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(D,ie)|0,a=(a=a+Math.imul(D,oe)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,oe)|0,n=n+Math.imul(S,ce)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,le)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,le)|0;var Se=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(a=(a=a+Math.imul(E,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((i=i+Math.imul(_,be)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,re),a=(a=Math.imul(j,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(D,ce)|0,a=(a=a+Math.imul(D,ue)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,le)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(a=(a=a+Math.imul(k,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ie),a=(a=Math.imul(j,oe))+Math.imul(L,ie)|0,i=Math.imul(L,oe),n=n+Math.imul(R,ce)|0,a=(a=a+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,n=n+Math.imul(D,de)|0,a=(a=a+Math.imul(D,le)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,le)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(a=(a=a+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,ce),a=(a=Math.imul(j,ue))+Math.imul(L,ce)|0,i=Math.imul(L,ue),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,le)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,le)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(a=(a=a+Math.imul(D,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,de),a=(a=Math.imul(j,le))+Math.imul(L,de)|0,i=Math.imul(L,le);var Te=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(a=(a=a+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Fe=(u+(n=Math.imul(j,pe))|0)+((8191&(a=(a=Math.imul(j,be))+Math.imul(L,pe)|0))<<13)|0;return u=((i=Math.imul(L,be))+(a>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=Ae,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=_e,c[9]=Ce,c[10]=ke,c[11]=Be,c[12]=Ie,c[13]=Se,c[14]=Oe,c[15]=Me,c[16]=De,c[17]=Te,c[18]=Fe,0!==u&&(c[19]=u,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function v(e,t,r){return g(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(m=b),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?b(this,e,t):r<1024?g(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,r+=i/67108864|0,r+=o>>>26,this.words[a]=67108863&o}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==f||u>=a);u--){var d=0|this.words[u];this.words[u]=f<<26-i|d>>>i,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this._strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,c=n.length-a.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(a,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0===(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(f),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,l=1;0===(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function B(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},a(x,w),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=o}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(A[e])return A[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new E;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return A[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,a),l=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),p=o;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var d=u>>f&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===f)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}c=26}return a},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new B(e)},a(B,k),B.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},B.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},B.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},B.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},B.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(98)(e))},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2796).Buffer}catch(I){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,a){for(var i=0,o=0,s=Math.min(e.length,r),c=t;c=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&o0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=c(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(I){i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o>>24-a&16777215,(a+=2)>=26&&(a-=26,o--),r=0!==i||o!==this.length-1?l[6-c.length]+c+r:c+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(f).toString(e);r=(d=d.idivn(f)).isZero()?b+r:l[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function b(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(o=(a=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,a),o},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===i?(r>=0&&(e[r--]=o>>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],A=8191&y,w=y>>>13,x=0|o[4],E=8191&x,_=x>>>13,C=0|o[5],k=8191&C,B=C>>>13,I=0|o[6],S=8191&I,O=I>>>13,M=0|o[7],D=8191&M,T=M>>>13,F=0|o[8],R=8191&F,P=F>>>13,N=0|o[9],j=8191&N,L=N>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,Y=0|s[3],J=8191&Y,X=Y>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,Q))|0)+((8191&(a=(a=Math.imul(d,G))+Math.imul(l,Q)|0))<<13)|0;u=((i=Math.imul(l,G))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,Q),a=(a=Math.imul(p,G))+Math.imul(b,Q)|0,i=Math.imul(b,G);var ge=(u+(n=n+Math.imul(d,z)|0)|0)+((8191&(a=(a=a+Math.imul(d,q)|0)+Math.imul(l,z)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,Q),a=(a=Math.imul(g,G))+Math.imul(v,Q)|0,i=Math.imul(v,G),n=n+Math.imul(p,z)|0,a=(a=a+Math.imul(p,q)|0)+Math.imul(b,z)|0,i=i+Math.imul(b,q)|0;var ve=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,Q),a=(a=Math.imul(A,G))+Math.imul(w,Q)|0,i=Math.imul(w,G),n=n+Math.imul(g,z)|0,a=(a=a+Math.imul(g,q)|0)+Math.imul(v,z)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(p,V)|0,a=(a=a+Math.imul(p,W)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ye=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(a=(a=a+Math.imul(d,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((i=i+Math.imul(l,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,Q),a=(a=Math.imul(E,G))+Math.imul(_,Q)|0,i=Math.imul(_,G),n=n+Math.imul(A,z)|0,a=(a=a+Math.imul(A,q)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,q)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(p,J)|0,a=(a=a+Math.imul(p,X)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,X)|0;var Ae=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,Q),a=(a=Math.imul(k,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),n=n+Math.imul(E,z)|0,a=(a=a+Math.imul(E,q)|0)+Math.imul(_,z)|0,i=i+Math.imul(_,q)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(g,J)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,a=(a=a+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((i=i+Math.imul(l,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,Q),a=(a=Math.imul(S,G))+Math.imul(O,Q)|0,i=Math.imul(O,G),n=n+Math.imul(k,z)|0,a=(a=a+Math.imul(k,q)|0)+Math.imul(B,z)|0,i=i+Math.imul(B,q)|0,n=n+Math.imul(E,V)|0,a=(a=a+Math.imul(E,W)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(A,J)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,a=(a=a+Math.imul(p,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var xe=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,oe)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),a=(a=Math.imul(D,G))+Math.imul(T,Q)|0,i=Math.imul(T,G),n=n+Math.imul(S,z)|0,a=(a=a+Math.imul(S,q)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,q)|0,n=n+Math.imul(k,V)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(A,$)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(p,ie)|0,a=(a=a+Math.imul(p,oe)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,oe)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,Q),a=(a=Math.imul(R,G))+Math.imul(P,Q)|0,i=Math.imul(P,G),n=n+Math.imul(D,z)|0,a=(a=a+Math.imul(D,q)|0)+Math.imul(T,z)|0,i=i+Math.imul(T,q)|0,n=n+Math.imul(S,V)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,n=n+Math.imul(E,$)|0,a=(a=a+Math.imul(E,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(p,ce)|0,a=(a=a+Math.imul(p,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0;var _e=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),a=(a=Math.imul(j,G))+Math.imul(L,Q)|0,i=Math.imul(L,G),n=n+Math.imul(R,z)|0,a=(a=a+Math.imul(R,q)|0)+Math.imul(P,z)|0,i=i+Math.imul(P,q)|0,n=n+Math.imul(D,V)|0,a=(a=a+Math.imul(D,W)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,W)|0,n=n+Math.imul(S,J)|0,a=(a=a+Math.imul(S,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,a=(a=a+Math.imul(E,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(g,ce)|0,a=(a=a+Math.imul(g,ue)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,a=(a=a+Math.imul(p,le)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,le)|0;var Ce=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(a=(a=a+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((i=i+Math.imul(l,be)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,z),a=(a=Math.imul(j,q))+Math.imul(L,z)|0,i=Math.imul(L,q),n=n+Math.imul(R,V)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(S,$)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(E,ie)|0,a=(a=a+Math.imul(E,oe)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(A,ce)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,n=n+Math.imul(g,de)|0,a=(a=a+Math.imul(g,le)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0;var ke=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(a=(a=a+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),a=(a=Math.imul(j,W))+Math.imul(L,V)|0,i=Math.imul(L,W),n=n+Math.imul(R,J)|0,a=(a=a+Math.imul(R,X)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(E,ce)|0,a=(a=a+Math.imul(E,ue)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,le)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0;var Be=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(a=(a=a+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((i=i+Math.imul(v,be)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,J),a=(a=Math.imul(j,X))+Math.imul(L,J)|0,i=Math.imul(L,X),n=n+Math.imul(R,$)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(D,re)|0,a=(a=a+Math.imul(D,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(k,ce)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,n=n+Math.imul(E,de)|0,a=(a=a+Math.imul(E,le)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,le)|0;var Ie=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(a=(a=a+Math.imul(A,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,$),a=(a=Math.imul(j,ee))+Math.imul(L,$)|0,i=Math.imul(L,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(D,ie)|0,a=(a=a+Math.imul(D,oe)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,oe)|0,n=n+Math.imul(S,ce)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,le)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,le)|0;var Se=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(a=(a=a+Math.imul(E,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((i=i+Math.imul(_,be)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,re),a=(a=Math.imul(j,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(D,ce)|0,a=(a=a+Math.imul(D,ue)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,le)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(a=(a=a+Math.imul(k,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ie),a=(a=Math.imul(j,oe))+Math.imul(L,ie)|0,i=Math.imul(L,oe),n=n+Math.imul(R,ce)|0,a=(a=a+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,n=n+Math.imul(D,de)|0,a=(a=a+Math.imul(D,le)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,le)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(a=(a=a+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,ce),a=(a=Math.imul(j,ue))+Math.imul(L,ce)|0,i=Math.imul(L,ue),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,le)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,le)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(a=(a=a+Math.imul(D,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,de),a=(a=Math.imul(j,le))+Math.imul(L,de)|0,i=Math.imul(L,le);var Te=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(a=(a=a+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Fe=(u+(n=Math.imul(j,pe))|0)+((8191&(a=(a=Math.imul(j,be))+Math.imul(L,pe)|0))<<13)|0;return u=((i=Math.imul(L,be))+(a>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=Ae,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=_e,c[9]=Ce,c[10]=ke,c[11]=Be,c[12]=Ie,c[13]=Se,c[14]=Oe,c[15]=Me,c[16]=De,c[17]=Te,c[18]=Fe,0!==u&&(c[19]=u,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function v(e,t,r){return g(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(m=b),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?b(this,e,t):r<1024?g(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,r+=i/67108864|0,r+=o>>>26,this.words[a]=67108863&o}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==f||u>=a);u--){var d=0|this.words[u];this.words[u]=f<<26-i|d>>>i,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this._strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,c=n.length-a.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(a,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0===(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(f),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,l=1;0===(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function B(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},a(x,w),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=o}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(A[e])return A[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new E;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return A[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,a),l=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),p=o;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var d=u>>f&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===f)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}c=26}return a},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new B(e)},a(B,k),B.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},B.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},B.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},B.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},B.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(98)(e))},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2800).Buffer}catch(I){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,a){for(var i=0,o=0,s=Math.min(e.length,r),c=t;c=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&o0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=c(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(I){i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o>>24-a&16777215,(a+=2)>=26&&(a-=26,o--),r=0!==i||o!==this.length-1?l[6-c.length]+c+r:c+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(f).toString(e);r=(d=d.idivn(f)).isZero()?b+r:l[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function b(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(o=(a=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,a),o},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===i?(r>=0&&(e[r--]=o>>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],A=8191&y,w=y>>>13,x=0|o[4],E=8191&x,_=x>>>13,C=0|o[5],k=8191&C,B=C>>>13,I=0|o[6],S=8191&I,O=I>>>13,M=0|o[7],D=8191&M,T=M>>>13,F=0|o[8],R=8191&F,P=F>>>13,N=0|o[9],j=8191&N,L=N>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,Y=0|s[3],J=8191&Y,X=Y>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,Q))|0)+((8191&(a=(a=Math.imul(d,G))+Math.imul(l,Q)|0))<<13)|0;u=((i=Math.imul(l,G))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,Q),a=(a=Math.imul(p,G))+Math.imul(b,Q)|0,i=Math.imul(b,G);var ge=(u+(n=n+Math.imul(d,z)|0)|0)+((8191&(a=(a=a+Math.imul(d,q)|0)+Math.imul(l,z)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,Q),a=(a=Math.imul(g,G))+Math.imul(v,Q)|0,i=Math.imul(v,G),n=n+Math.imul(p,z)|0,a=(a=a+Math.imul(p,q)|0)+Math.imul(b,z)|0,i=i+Math.imul(b,q)|0;var ve=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,Q),a=(a=Math.imul(A,G))+Math.imul(w,Q)|0,i=Math.imul(w,G),n=n+Math.imul(g,z)|0,a=(a=a+Math.imul(g,q)|0)+Math.imul(v,z)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(p,V)|0,a=(a=a+Math.imul(p,W)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ye=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(a=(a=a+Math.imul(d,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((i=i+Math.imul(l,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,Q),a=(a=Math.imul(E,G))+Math.imul(_,Q)|0,i=Math.imul(_,G),n=n+Math.imul(A,z)|0,a=(a=a+Math.imul(A,q)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,q)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(p,J)|0,a=(a=a+Math.imul(p,X)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,X)|0;var Ae=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,Q),a=(a=Math.imul(k,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),n=n+Math.imul(E,z)|0,a=(a=a+Math.imul(E,q)|0)+Math.imul(_,z)|0,i=i+Math.imul(_,q)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(g,J)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,a=(a=a+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((i=i+Math.imul(l,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,Q),a=(a=Math.imul(S,G))+Math.imul(O,Q)|0,i=Math.imul(O,G),n=n+Math.imul(k,z)|0,a=(a=a+Math.imul(k,q)|0)+Math.imul(B,z)|0,i=i+Math.imul(B,q)|0,n=n+Math.imul(E,V)|0,a=(a=a+Math.imul(E,W)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(A,J)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,a=(a=a+Math.imul(p,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var xe=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,oe)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),a=(a=Math.imul(D,G))+Math.imul(T,Q)|0,i=Math.imul(T,G),n=n+Math.imul(S,z)|0,a=(a=a+Math.imul(S,q)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,q)|0,n=n+Math.imul(k,V)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(A,$)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(p,ie)|0,a=(a=a+Math.imul(p,oe)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,oe)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,Q),a=(a=Math.imul(R,G))+Math.imul(P,Q)|0,i=Math.imul(P,G),n=n+Math.imul(D,z)|0,a=(a=a+Math.imul(D,q)|0)+Math.imul(T,z)|0,i=i+Math.imul(T,q)|0,n=n+Math.imul(S,V)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,n=n+Math.imul(E,$)|0,a=(a=a+Math.imul(E,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(p,ce)|0,a=(a=a+Math.imul(p,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0;var _e=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),a=(a=Math.imul(j,G))+Math.imul(L,Q)|0,i=Math.imul(L,G),n=n+Math.imul(R,z)|0,a=(a=a+Math.imul(R,q)|0)+Math.imul(P,z)|0,i=i+Math.imul(P,q)|0,n=n+Math.imul(D,V)|0,a=(a=a+Math.imul(D,W)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,W)|0,n=n+Math.imul(S,J)|0,a=(a=a+Math.imul(S,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,a=(a=a+Math.imul(E,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(g,ce)|0,a=(a=a+Math.imul(g,ue)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,a=(a=a+Math.imul(p,le)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,le)|0;var Ce=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(a=(a=a+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((i=i+Math.imul(l,be)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,z),a=(a=Math.imul(j,q))+Math.imul(L,z)|0,i=Math.imul(L,q),n=n+Math.imul(R,V)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(S,$)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(E,ie)|0,a=(a=a+Math.imul(E,oe)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(A,ce)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,n=n+Math.imul(g,de)|0,a=(a=a+Math.imul(g,le)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0;var ke=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(a=(a=a+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),a=(a=Math.imul(j,W))+Math.imul(L,V)|0,i=Math.imul(L,W),n=n+Math.imul(R,J)|0,a=(a=a+Math.imul(R,X)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(E,ce)|0,a=(a=a+Math.imul(E,ue)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,le)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0;var Be=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(a=(a=a+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((i=i+Math.imul(v,be)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,J),a=(a=Math.imul(j,X))+Math.imul(L,J)|0,i=Math.imul(L,X),n=n+Math.imul(R,$)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(D,re)|0,a=(a=a+Math.imul(D,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(k,ce)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,n=n+Math.imul(E,de)|0,a=(a=a+Math.imul(E,le)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,le)|0;var Ie=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(a=(a=a+Math.imul(A,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,$),a=(a=Math.imul(j,ee))+Math.imul(L,$)|0,i=Math.imul(L,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(D,ie)|0,a=(a=a+Math.imul(D,oe)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,oe)|0,n=n+Math.imul(S,ce)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,le)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,le)|0;var Se=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(a=(a=a+Math.imul(E,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((i=i+Math.imul(_,be)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,re),a=(a=Math.imul(j,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(D,ce)|0,a=(a=a+Math.imul(D,ue)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,le)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(a=(a=a+Math.imul(k,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ie),a=(a=Math.imul(j,oe))+Math.imul(L,ie)|0,i=Math.imul(L,oe),n=n+Math.imul(R,ce)|0,a=(a=a+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,n=n+Math.imul(D,de)|0,a=(a=a+Math.imul(D,le)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,le)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(a=(a=a+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,ce),a=(a=Math.imul(j,ue))+Math.imul(L,ce)|0,i=Math.imul(L,ue),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,le)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,le)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(a=(a=a+Math.imul(D,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,de),a=(a=Math.imul(j,le))+Math.imul(L,de)|0,i=Math.imul(L,le);var Te=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(a=(a=a+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Fe=(u+(n=Math.imul(j,pe))|0)+((8191&(a=(a=Math.imul(j,be))+Math.imul(L,pe)|0))<<13)|0;return u=((i=Math.imul(L,be))+(a>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=Ae,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=_e,c[9]=Ce,c[10]=ke,c[11]=Be,c[12]=Ie,c[13]=Se,c[14]=Oe,c[15]=Me,c[16]=De,c[17]=Te,c[18]=Fe,0!==u&&(c[19]=u,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function v(e,t,r){return g(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(m=b),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?b(this,e,t):r<1024?g(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,r+=i/67108864|0,r+=o>>>26,this.words[a]=67108863&o}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==f||u>=a);u--){var d=0|this.words[u];this.words[u]=f<<26-i|d>>>i,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this._strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,c=n.length-a.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(a,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0===(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(f),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,l=1;0===(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function B(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},a(x,w),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=o}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(A[e])return A[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new E;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return A[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,a),l=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),p=o;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var d=u>>f&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===f)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}c=26}return a},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new B(e)},a(B,k),B.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},B.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},B.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},B.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},B.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(98)(e))},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2801).Buffer}catch(I){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,a){for(var i=0,o=0,s=Math.min(e.length,r),c=t;c=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&o0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=c(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(I){i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o>>24-a&16777215,(a+=2)>=26&&(a-=26,o--),r=0!==i||o!==this.length-1?l[6-c.length]+c+r:c+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(f).toString(e);r=(d=d.idivn(f)).isZero()?b+r:l[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function b(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(o=(a=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,a),o},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===i?(r>=0&&(e[r--]=o>>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],A=8191&y,w=y>>>13,x=0|o[4],E=8191&x,_=x>>>13,C=0|o[5],k=8191&C,B=C>>>13,I=0|o[6],S=8191&I,O=I>>>13,M=0|o[7],D=8191&M,T=M>>>13,F=0|o[8],R=8191&F,P=F>>>13,N=0|o[9],j=8191&N,L=N>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,Y=0|s[3],J=8191&Y,X=Y>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,Q))|0)+((8191&(a=(a=Math.imul(d,G))+Math.imul(l,Q)|0))<<13)|0;u=((i=Math.imul(l,G))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,Q),a=(a=Math.imul(p,G))+Math.imul(b,Q)|0,i=Math.imul(b,G);var ge=(u+(n=n+Math.imul(d,z)|0)|0)+((8191&(a=(a=a+Math.imul(d,q)|0)+Math.imul(l,z)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,Q),a=(a=Math.imul(g,G))+Math.imul(v,Q)|0,i=Math.imul(v,G),n=n+Math.imul(p,z)|0,a=(a=a+Math.imul(p,q)|0)+Math.imul(b,z)|0,i=i+Math.imul(b,q)|0;var ve=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,Q),a=(a=Math.imul(A,G))+Math.imul(w,Q)|0,i=Math.imul(w,G),n=n+Math.imul(g,z)|0,a=(a=a+Math.imul(g,q)|0)+Math.imul(v,z)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(p,V)|0,a=(a=a+Math.imul(p,W)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ye=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(a=(a=a+Math.imul(d,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((i=i+Math.imul(l,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,Q),a=(a=Math.imul(E,G))+Math.imul(_,Q)|0,i=Math.imul(_,G),n=n+Math.imul(A,z)|0,a=(a=a+Math.imul(A,q)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,q)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(p,J)|0,a=(a=a+Math.imul(p,X)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,X)|0;var Ae=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,Q),a=(a=Math.imul(k,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),n=n+Math.imul(E,z)|0,a=(a=a+Math.imul(E,q)|0)+Math.imul(_,z)|0,i=i+Math.imul(_,q)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(g,J)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,a=(a=a+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((i=i+Math.imul(l,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,Q),a=(a=Math.imul(S,G))+Math.imul(O,Q)|0,i=Math.imul(O,G),n=n+Math.imul(k,z)|0,a=(a=a+Math.imul(k,q)|0)+Math.imul(B,z)|0,i=i+Math.imul(B,q)|0,n=n+Math.imul(E,V)|0,a=(a=a+Math.imul(E,W)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(A,J)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,a=(a=a+Math.imul(p,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var xe=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,oe)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),a=(a=Math.imul(D,G))+Math.imul(T,Q)|0,i=Math.imul(T,G),n=n+Math.imul(S,z)|0,a=(a=a+Math.imul(S,q)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,q)|0,n=n+Math.imul(k,V)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(A,$)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(p,ie)|0,a=(a=a+Math.imul(p,oe)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,oe)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,Q),a=(a=Math.imul(R,G))+Math.imul(P,Q)|0,i=Math.imul(P,G),n=n+Math.imul(D,z)|0,a=(a=a+Math.imul(D,q)|0)+Math.imul(T,z)|0,i=i+Math.imul(T,q)|0,n=n+Math.imul(S,V)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,n=n+Math.imul(E,$)|0,a=(a=a+Math.imul(E,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(p,ce)|0,a=(a=a+Math.imul(p,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0;var _e=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),a=(a=Math.imul(j,G))+Math.imul(L,Q)|0,i=Math.imul(L,G),n=n+Math.imul(R,z)|0,a=(a=a+Math.imul(R,q)|0)+Math.imul(P,z)|0,i=i+Math.imul(P,q)|0,n=n+Math.imul(D,V)|0,a=(a=a+Math.imul(D,W)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,W)|0,n=n+Math.imul(S,J)|0,a=(a=a+Math.imul(S,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,a=(a=a+Math.imul(E,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(g,ce)|0,a=(a=a+Math.imul(g,ue)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,a=(a=a+Math.imul(p,le)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,le)|0;var Ce=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(a=(a=a+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((i=i+Math.imul(l,be)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,z),a=(a=Math.imul(j,q))+Math.imul(L,z)|0,i=Math.imul(L,q),n=n+Math.imul(R,V)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(S,$)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(E,ie)|0,a=(a=a+Math.imul(E,oe)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(A,ce)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,n=n+Math.imul(g,de)|0,a=(a=a+Math.imul(g,le)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0;var ke=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(a=(a=a+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),a=(a=Math.imul(j,W))+Math.imul(L,V)|0,i=Math.imul(L,W),n=n+Math.imul(R,J)|0,a=(a=a+Math.imul(R,X)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(E,ce)|0,a=(a=a+Math.imul(E,ue)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,le)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0;var Be=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(a=(a=a+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((i=i+Math.imul(v,be)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,J),a=(a=Math.imul(j,X))+Math.imul(L,J)|0,i=Math.imul(L,X),n=n+Math.imul(R,$)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(D,re)|0,a=(a=a+Math.imul(D,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(k,ce)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,n=n+Math.imul(E,de)|0,a=(a=a+Math.imul(E,le)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,le)|0;var Ie=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(a=(a=a+Math.imul(A,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,$),a=(a=Math.imul(j,ee))+Math.imul(L,$)|0,i=Math.imul(L,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(D,ie)|0,a=(a=a+Math.imul(D,oe)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,oe)|0,n=n+Math.imul(S,ce)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,le)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,le)|0;var Se=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(a=(a=a+Math.imul(E,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((i=i+Math.imul(_,be)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,re),a=(a=Math.imul(j,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(D,ce)|0,a=(a=a+Math.imul(D,ue)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,le)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(a=(a=a+Math.imul(k,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ie),a=(a=Math.imul(j,oe))+Math.imul(L,ie)|0,i=Math.imul(L,oe),n=n+Math.imul(R,ce)|0,a=(a=a+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,n=n+Math.imul(D,de)|0,a=(a=a+Math.imul(D,le)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,le)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(a=(a=a+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,ce),a=(a=Math.imul(j,ue))+Math.imul(L,ce)|0,i=Math.imul(L,ue),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,le)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,le)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(a=(a=a+Math.imul(D,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,de),a=(a=Math.imul(j,le))+Math.imul(L,de)|0,i=Math.imul(L,le);var Te=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(a=(a=a+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Fe=(u+(n=Math.imul(j,pe))|0)+((8191&(a=(a=Math.imul(j,be))+Math.imul(L,pe)|0))<<13)|0;return u=((i=Math.imul(L,be))+(a>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=Ae,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=_e,c[9]=Ce,c[10]=ke,c[11]=Be,c[12]=Ie,c[13]=Se,c[14]=Oe,c[15]=Me,c[16]=De,c[17]=Te,c[18]=Fe,0!==u&&(c[19]=u,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function v(e,t,r){return g(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(m=b),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?b(this,e,t):r<1024?g(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,r+=i/67108864|0,r+=o>>>26,this.words[a]=67108863&o}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==f||u>=a);u--){var d=0|this.words[u];this.words[u]=f<<26-i|d>>>i,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this._strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,c=n.length-a.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(a,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0===(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(f),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,l=1;0===(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function B(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},a(x,w),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=o}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(A[e])return A[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new E;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return A[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,a),l=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),p=o;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var d=u>>f&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===f)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}c=26}return a},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new B(e)},a(B,k),B.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},B.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},B.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},B.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},B.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(98)(e))},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2804).Buffer}catch(I){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,a){for(var i=0,o=0,s=Math.min(e.length,r),c=t;c=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&o0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=c(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(I){i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o>>24-a&16777215,(a+=2)>=26&&(a-=26,o--),r=0!==i||o!==this.length-1?l[6-c.length]+c+r:c+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(f).toString(e);r=(d=d.idivn(f)).isZero()?b+r:l[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function b(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(o=(a=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,a),o},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===i?(r>=0&&(e[r--]=o>>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],A=8191&y,w=y>>>13,x=0|o[4],E=8191&x,_=x>>>13,C=0|o[5],k=8191&C,B=C>>>13,I=0|o[6],S=8191&I,O=I>>>13,M=0|o[7],D=8191&M,T=M>>>13,F=0|o[8],R=8191&F,P=F>>>13,N=0|o[9],j=8191&N,L=N>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,Y=0|s[3],J=8191&Y,X=Y>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,Q))|0)+((8191&(a=(a=Math.imul(d,G))+Math.imul(l,Q)|0))<<13)|0;u=((i=Math.imul(l,G))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,Q),a=(a=Math.imul(p,G))+Math.imul(b,Q)|0,i=Math.imul(b,G);var ge=(u+(n=n+Math.imul(d,z)|0)|0)+((8191&(a=(a=a+Math.imul(d,q)|0)+Math.imul(l,z)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,Q),a=(a=Math.imul(g,G))+Math.imul(v,Q)|0,i=Math.imul(v,G),n=n+Math.imul(p,z)|0,a=(a=a+Math.imul(p,q)|0)+Math.imul(b,z)|0,i=i+Math.imul(b,q)|0;var ve=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,Q),a=(a=Math.imul(A,G))+Math.imul(w,Q)|0,i=Math.imul(w,G),n=n+Math.imul(g,z)|0,a=(a=a+Math.imul(g,q)|0)+Math.imul(v,z)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(p,V)|0,a=(a=a+Math.imul(p,W)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ye=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(a=(a=a+Math.imul(d,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((i=i+Math.imul(l,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,Q),a=(a=Math.imul(E,G))+Math.imul(_,Q)|0,i=Math.imul(_,G),n=n+Math.imul(A,z)|0,a=(a=a+Math.imul(A,q)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,q)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(p,J)|0,a=(a=a+Math.imul(p,X)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,X)|0;var Ae=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,Q),a=(a=Math.imul(k,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),n=n+Math.imul(E,z)|0,a=(a=a+Math.imul(E,q)|0)+Math.imul(_,z)|0,i=i+Math.imul(_,q)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(g,J)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,a=(a=a+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((i=i+Math.imul(l,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,Q),a=(a=Math.imul(S,G))+Math.imul(O,Q)|0,i=Math.imul(O,G),n=n+Math.imul(k,z)|0,a=(a=a+Math.imul(k,q)|0)+Math.imul(B,z)|0,i=i+Math.imul(B,q)|0,n=n+Math.imul(E,V)|0,a=(a=a+Math.imul(E,W)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(A,J)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,a=(a=a+Math.imul(p,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var xe=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,oe)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),a=(a=Math.imul(D,G))+Math.imul(T,Q)|0,i=Math.imul(T,G),n=n+Math.imul(S,z)|0,a=(a=a+Math.imul(S,q)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,q)|0,n=n+Math.imul(k,V)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(A,$)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(p,ie)|0,a=(a=a+Math.imul(p,oe)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,oe)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,Q),a=(a=Math.imul(R,G))+Math.imul(P,Q)|0,i=Math.imul(P,G),n=n+Math.imul(D,z)|0,a=(a=a+Math.imul(D,q)|0)+Math.imul(T,z)|0,i=i+Math.imul(T,q)|0,n=n+Math.imul(S,V)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,n=n+Math.imul(E,$)|0,a=(a=a+Math.imul(E,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(p,ce)|0,a=(a=a+Math.imul(p,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0;var _e=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),a=(a=Math.imul(j,G))+Math.imul(L,Q)|0,i=Math.imul(L,G),n=n+Math.imul(R,z)|0,a=(a=a+Math.imul(R,q)|0)+Math.imul(P,z)|0,i=i+Math.imul(P,q)|0,n=n+Math.imul(D,V)|0,a=(a=a+Math.imul(D,W)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,W)|0,n=n+Math.imul(S,J)|0,a=(a=a+Math.imul(S,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,a=(a=a+Math.imul(E,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(g,ce)|0,a=(a=a+Math.imul(g,ue)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,a=(a=a+Math.imul(p,le)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,le)|0;var Ce=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(a=(a=a+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((i=i+Math.imul(l,be)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,z),a=(a=Math.imul(j,q))+Math.imul(L,z)|0,i=Math.imul(L,q),n=n+Math.imul(R,V)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(S,$)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(E,ie)|0,a=(a=a+Math.imul(E,oe)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(A,ce)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,n=n+Math.imul(g,de)|0,a=(a=a+Math.imul(g,le)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0;var ke=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(a=(a=a+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),a=(a=Math.imul(j,W))+Math.imul(L,V)|0,i=Math.imul(L,W),n=n+Math.imul(R,J)|0,a=(a=a+Math.imul(R,X)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(E,ce)|0,a=(a=a+Math.imul(E,ue)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,le)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0;var Be=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(a=(a=a+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((i=i+Math.imul(v,be)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,J),a=(a=Math.imul(j,X))+Math.imul(L,J)|0,i=Math.imul(L,X),n=n+Math.imul(R,$)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(D,re)|0,a=(a=a+Math.imul(D,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(k,ce)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,n=n+Math.imul(E,de)|0,a=(a=a+Math.imul(E,le)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,le)|0;var Ie=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(a=(a=a+Math.imul(A,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,$),a=(a=Math.imul(j,ee))+Math.imul(L,$)|0,i=Math.imul(L,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(D,ie)|0,a=(a=a+Math.imul(D,oe)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,oe)|0,n=n+Math.imul(S,ce)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,le)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,le)|0;var Se=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(a=(a=a+Math.imul(E,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((i=i+Math.imul(_,be)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,re),a=(a=Math.imul(j,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(D,ce)|0,a=(a=a+Math.imul(D,ue)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,le)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(a=(a=a+Math.imul(k,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ie),a=(a=Math.imul(j,oe))+Math.imul(L,ie)|0,i=Math.imul(L,oe),n=n+Math.imul(R,ce)|0,a=(a=a+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,n=n+Math.imul(D,de)|0,a=(a=a+Math.imul(D,le)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,le)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(a=(a=a+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,ce),a=(a=Math.imul(j,ue))+Math.imul(L,ce)|0,i=Math.imul(L,ue),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,le)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,le)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(a=(a=a+Math.imul(D,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,de),a=(a=Math.imul(j,le))+Math.imul(L,de)|0,i=Math.imul(L,le);var Te=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(a=(a=a+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Fe=(u+(n=Math.imul(j,pe))|0)+((8191&(a=(a=Math.imul(j,be))+Math.imul(L,pe)|0))<<13)|0;return u=((i=Math.imul(L,be))+(a>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=Ae,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=_e,c[9]=Ce,c[10]=ke,c[11]=Be,c[12]=Ie,c[13]=Se,c[14]=Oe,c[15]=Me,c[16]=De,c[17]=Te,c[18]=Fe,0!==u&&(c[19]=u,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function v(e,t,r){return g(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(m=b),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?b(this,e,t):r<1024?g(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,r+=i/67108864|0,r+=o>>>26,this.words[a]=67108863&o}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==f||u>=a);u--){var d=0|this.words[u];this.words[u]=f<<26-i|d>>>i,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this._strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,c=n.length-a.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(a,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0===(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(f),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,l=1;0===(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function B(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},a(x,w),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=o}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(A[e])return A[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new E;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return A[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,a),l=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),p=o;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var d=u>>f&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===f)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}c=26}return a},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new B(e)},a(B,k),B.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},B.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},B.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},B.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},B.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(98)(e))},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2805).Buffer}catch(I){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,a){for(var i=0,o=0,s=Math.min(e.length,r),c=t;c=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&o0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=c(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(I){i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o>>24-a&16777215,(a+=2)>=26&&(a-=26,o--),r=0!==i||o!==this.length-1?l[6-c.length]+c+r:c+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(f).toString(e);r=(d=d.idivn(f)).isZero()?b+r:l[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function b(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(o=(a=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,a),o},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===i?(r>=0&&(e[r--]=o>>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],A=8191&y,w=y>>>13,x=0|o[4],E=8191&x,_=x>>>13,C=0|o[5],k=8191&C,B=C>>>13,I=0|o[6],S=8191&I,O=I>>>13,M=0|o[7],D=8191&M,T=M>>>13,F=0|o[8],R=8191&F,P=F>>>13,N=0|o[9],j=8191&N,L=N>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,Y=0|s[3],J=8191&Y,X=Y>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,Q))|0)+((8191&(a=(a=Math.imul(d,G))+Math.imul(l,Q)|0))<<13)|0;u=((i=Math.imul(l,G))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,Q),a=(a=Math.imul(p,G))+Math.imul(b,Q)|0,i=Math.imul(b,G);var ge=(u+(n=n+Math.imul(d,z)|0)|0)+((8191&(a=(a=a+Math.imul(d,q)|0)+Math.imul(l,z)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,Q),a=(a=Math.imul(g,G))+Math.imul(v,Q)|0,i=Math.imul(v,G),n=n+Math.imul(p,z)|0,a=(a=a+Math.imul(p,q)|0)+Math.imul(b,z)|0,i=i+Math.imul(b,q)|0;var ve=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,Q),a=(a=Math.imul(A,G))+Math.imul(w,Q)|0,i=Math.imul(w,G),n=n+Math.imul(g,z)|0,a=(a=a+Math.imul(g,q)|0)+Math.imul(v,z)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(p,V)|0,a=(a=a+Math.imul(p,W)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ye=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(a=(a=a+Math.imul(d,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((i=i+Math.imul(l,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,Q),a=(a=Math.imul(E,G))+Math.imul(_,Q)|0,i=Math.imul(_,G),n=n+Math.imul(A,z)|0,a=(a=a+Math.imul(A,q)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,q)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(p,J)|0,a=(a=a+Math.imul(p,X)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,X)|0;var Ae=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,Q),a=(a=Math.imul(k,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),n=n+Math.imul(E,z)|0,a=(a=a+Math.imul(E,q)|0)+Math.imul(_,z)|0,i=i+Math.imul(_,q)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(g,J)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,a=(a=a+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((i=i+Math.imul(l,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,Q),a=(a=Math.imul(S,G))+Math.imul(O,Q)|0,i=Math.imul(O,G),n=n+Math.imul(k,z)|0,a=(a=a+Math.imul(k,q)|0)+Math.imul(B,z)|0,i=i+Math.imul(B,q)|0,n=n+Math.imul(E,V)|0,a=(a=a+Math.imul(E,W)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(A,J)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,a=(a=a+Math.imul(p,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var xe=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,oe)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),a=(a=Math.imul(D,G))+Math.imul(T,Q)|0,i=Math.imul(T,G),n=n+Math.imul(S,z)|0,a=(a=a+Math.imul(S,q)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,q)|0,n=n+Math.imul(k,V)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(A,$)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(p,ie)|0,a=(a=a+Math.imul(p,oe)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,oe)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,Q),a=(a=Math.imul(R,G))+Math.imul(P,Q)|0,i=Math.imul(P,G),n=n+Math.imul(D,z)|0,a=(a=a+Math.imul(D,q)|0)+Math.imul(T,z)|0,i=i+Math.imul(T,q)|0,n=n+Math.imul(S,V)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,n=n+Math.imul(E,$)|0,a=(a=a+Math.imul(E,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(p,ce)|0,a=(a=a+Math.imul(p,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0;var _e=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),a=(a=Math.imul(j,G))+Math.imul(L,Q)|0,i=Math.imul(L,G),n=n+Math.imul(R,z)|0,a=(a=a+Math.imul(R,q)|0)+Math.imul(P,z)|0,i=i+Math.imul(P,q)|0,n=n+Math.imul(D,V)|0,a=(a=a+Math.imul(D,W)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,W)|0,n=n+Math.imul(S,J)|0,a=(a=a+Math.imul(S,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,a=(a=a+Math.imul(E,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(g,ce)|0,a=(a=a+Math.imul(g,ue)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,a=(a=a+Math.imul(p,le)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,le)|0;var Ce=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(a=(a=a+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((i=i+Math.imul(l,be)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,z),a=(a=Math.imul(j,q))+Math.imul(L,z)|0,i=Math.imul(L,q),n=n+Math.imul(R,V)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(S,$)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(E,ie)|0,a=(a=a+Math.imul(E,oe)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(A,ce)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,n=n+Math.imul(g,de)|0,a=(a=a+Math.imul(g,le)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0;var ke=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(a=(a=a+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),a=(a=Math.imul(j,W))+Math.imul(L,V)|0,i=Math.imul(L,W),n=n+Math.imul(R,J)|0,a=(a=a+Math.imul(R,X)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(E,ce)|0,a=(a=a+Math.imul(E,ue)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,le)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0;var Be=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(a=(a=a+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((i=i+Math.imul(v,be)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,J),a=(a=Math.imul(j,X))+Math.imul(L,J)|0,i=Math.imul(L,X),n=n+Math.imul(R,$)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(D,re)|0,a=(a=a+Math.imul(D,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(k,ce)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,n=n+Math.imul(E,de)|0,a=(a=a+Math.imul(E,le)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,le)|0;var Ie=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(a=(a=a+Math.imul(A,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,$),a=(a=Math.imul(j,ee))+Math.imul(L,$)|0,i=Math.imul(L,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(D,ie)|0,a=(a=a+Math.imul(D,oe)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,oe)|0,n=n+Math.imul(S,ce)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,le)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,le)|0;var Se=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(a=(a=a+Math.imul(E,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((i=i+Math.imul(_,be)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,re),a=(a=Math.imul(j,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(D,ce)|0,a=(a=a+Math.imul(D,ue)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,le)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(a=(a=a+Math.imul(k,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ie),a=(a=Math.imul(j,oe))+Math.imul(L,ie)|0,i=Math.imul(L,oe),n=n+Math.imul(R,ce)|0,a=(a=a+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,n=n+Math.imul(D,de)|0,a=(a=a+Math.imul(D,le)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,le)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(a=(a=a+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,ce),a=(a=Math.imul(j,ue))+Math.imul(L,ce)|0,i=Math.imul(L,ue),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,le)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,le)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(a=(a=a+Math.imul(D,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,de),a=(a=Math.imul(j,le))+Math.imul(L,de)|0,i=Math.imul(L,le);var Te=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(a=(a=a+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Fe=(u+(n=Math.imul(j,pe))|0)+((8191&(a=(a=Math.imul(j,be))+Math.imul(L,pe)|0))<<13)|0;return u=((i=Math.imul(L,be))+(a>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=Ae,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=_e,c[9]=Ce,c[10]=ke,c[11]=Be,c[12]=Ie,c[13]=Se,c[14]=Oe,c[15]=Me,c[16]=De,c[17]=Te,c[18]=Fe,0!==u&&(c[19]=u,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function v(e,t,r){return g(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(m=b),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?b(this,e,t):r<1024?g(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,r+=i/67108864|0,r+=o>>>26,this.words[a]=67108863&o}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==f||u>=a);u--){var d=0|this.words[u];this.words[u]=f<<26-i|d>>>i,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this._strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,c=n.length-a.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(a,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0===(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(f),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,l=1;0===(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function B(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},a(x,w),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=o}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(A[e])return A[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new E;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return A[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,a),l=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),p=o;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var d=u>>f&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===f)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}c=26}return a},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new B(e)},a(B,k),B.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},B.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},B.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},B.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},B.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(98)(e))},function(e,t){function r(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(u){return void r(u)}s.done?t(c):Promise.resolve(c).then(n,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var o=e.apply(t,n);function s(e){r(o,a,i,s,c,"next",e)}function c(e){r(o,a,i,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";(function(e){var n=r(21).default,a=r(22).default,i=r(37).default,o=r(38).default,s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.map=t.array=t.rustEnum=t.str=t.vecU8=t.tagged=t.vec=t.bool=t.option=t.publicKey=t.i128=t.u128=t.i64=t.u64=t.struct=t.f64=t.f32=t.i32=t.u32=t.i16=t.u16=t.i8=t.u8=void 0;var c=r(1297),u=r(32),f=s(r(2588)),d=r(1297);Object.defineProperty(t,"u8",{enumerable:!0,get:function(){return d.u8}}),Object.defineProperty(t,"i8",{enumerable:!0,get:function(){return d.s8}}),Object.defineProperty(t,"u16",{enumerable:!0,get:function(){return d.u16}}),Object.defineProperty(t,"i16",{enumerable:!0,get:function(){return d.s16}}),Object.defineProperty(t,"u32",{enumerable:!0,get:function(){return d.u32}}),Object.defineProperty(t,"i32",{enumerable:!0,get:function(){return d.s32}}),Object.defineProperty(t,"f32",{enumerable:!0,get:function(){return d.f32}}),Object.defineProperty(t,"f64",{enumerable:!0,get:function(){return d.f64}}),Object.defineProperty(t,"struct",{enumerable:!0,get:function(){return d.struct}});var l=function(t){i(s,t);var r=o(s);function s(e,t,a){var i;return n(this,s),(i=r.call(this,e,a)).blob=c.blob(e),i.signed=t,i}return a(s,[{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=new f.default(this.blob.decode(e,t),10,"le");return this.signed?r.fromTwos(8*this.span).clone():r}},{key:"encode",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.signed&&(t=t.toTwos(8*this.span)),this.blob.encode(t.toArrayLike(e,"le",this.span),r,n)}}]),s}(c.Layout);function h(e){return new l(8,!1,e)}t.u64=h,t.i64=function(e){return new l(8,!0,e)},t.u128=function(e){return new l(16,!1,e)},t.i128=function(e){return new l(16,!0,e)};var p=function(e){i(r,e);var t=o(r);function r(e,a,i,o){var s;return n(this,r),(s=t.call(this,e.span,o)).layout=e,s.decoder=a,s.encoder=i,s}return a(r,[{key:"decode",value:function(e,t){return this.decoder(this.layout.decode(e,t))}},{key:"encode",value:function(e,t,r){return this.layout.encode(this.encoder(e),t,r)}},{key:"getSpan",value:function(e,t){return this.layout.getSpan(e,t)}}]),r}(c.Layout);t.publicKey=function(e){return new p(c.blob(32),(function(e){return new u.PublicKey(e)}),(function(e){return e.toBuffer()}),e)};var b=function(e){i(r,e);var t=o(r);function r(e,a){var i;return n(this,r),(i=t.call(this,-1,a)).layout=e,i.discriminator=c.u8(),i}return a(r,[{key:"encode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null===e||void 0===e?this.discriminator.encode(0,t,r):(this.discriminator.encode(1,t,r),this.layout.encode(e,t,r+1)+1)}},{key:"decode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.discriminator.decode(e,t);if(0===r)return null;if(1===r)return this.layout.decode(e,t+1);throw new Error("Invalid option "+this.property)}},{key:"getSpan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.discriminator.decode(e,t);if(0===r)return 1;if(1===r)return this.layout.getSpan(e,t+1)+1;throw new Error("Invalid option "+this.property)}}]),r}(c.Layout);function m(e){if(0===e)return!1;if(1===e)return!0;throw new Error("Invalid bool: "+e)}function g(e){return e?1:0}function v(e){var t=c.u32("length"),r=c.struct([t,c.blob(c.offset(t,-t.span),"data")]);return new p(r,(function(e){return e.data}),(function(e){return{data:e}}),e)}t.option=function(e,t){return new b(e,t)},t.bool=function(e){return new p(c.u8(),m,g,e)},t.vec=function(e,t){var r=c.u32("length"),n=c.struct([r,c.seq(e,c.offset(r,-r.span),"values")]);return new p(n,(function(e){return e.values}),(function(e){return{values:e}}),t)},t.tagged=function(e,t,r){var n=c.struct([h("tag"),t.replicate("data")]);return new p(n,(function(t){var r=t.tag,n=t.data;if(!r.eq(e))throw new Error("Invalid tag, expected: "+e.toString("hex")+", got: "+r.toString("hex"));return n}),(function(t){return{tag:e,data:t}}),r)},t.vecU8=v,t.str=function(t){return new p(v(),(function(e){return e.toString("utf-8")}),(function(t){return e.from(t,"utf-8")}),t)},t.rustEnum=function(e,t,r){var n=c.union(null!==r&&void 0!==r?r:c.u8(),t);return e.forEach((function(e,t){return n.addVariant(t,e,e.property)})),n},t.array=function(e,t,r){var n=c.struct([c.seq(e,t,"values")]);return new p(n,(function(e){return e.values}),(function(e){return{values:e}}),r)};var y=function(e){i(r,e);var t=o(r);function r(e,a,i){var o;return n(this,r),(o=t.call(this,e.span+a.span,i)).keyLayout=e,o.valueLayout=a,o}return a(r,[{key:"decode",value:function(e,t){return t=t||0,[this.keyLayout.decode(e,t),this.valueLayout.decode(e,t+this.keyLayout.getSpan(e,t))]}},{key:"encode",value:function(e,t,r){r=r||0;var n=this.keyLayout.encode(e[0],t,r);return n+this.valueLayout.encode(e[1],t,r+n)}},{key:"getSpan",value:function(e,t){return this.keyLayout.getSpan(e,t)+this.valueLayout.getSpan(e,t)}}]),r}(c.Layout);t.map=function(e,t,r){var n=c.u32("length"),a=c.struct([n,c.seq(new y(e,t),c.offset(n,-n.span),"values")]);return new p(a,(function(e){var t=e.values;return new Map(t)}),(function(e){return{values:Array.from(e.entries())}}),r)}}).call(this,r(15).Buffer)},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(140),a=r(570),i=r(317),o=r(492),s=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var t;if(!this.closed){var r=this,s=r._parentOrParents,u=r._ctorUnsubscribe,f=r._unsubscribe,d=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,s instanceof e)s.remove(this);else if(null!==s)for(var l=0;l=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"b",(function(){return l})),r.d(t,"a",(function(){return h}));var n=r(1),a=r(2),i=r(1594),o=r.n(i),s=r(499);var c=r(4150);function u(e){return t=Object(c.a)(e),"0x"+o.a.keccak_256(Object(s.a)(t));var t}r(0);var f=r(441);new f.a("properties/5.6.0");function d(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}var l=new f.a("wordlists/5.4.0"),h=function(){function e(t){Object(n.a)(this,e),l.checkAbstract(this instanceof e?this.constructor:void 0,e),d(this,"locale",t)}return Object(a.a)(e,[{key:"split",value:function(e){return e.toLowerCase().split(/ +/g)}},{key:"join",value:function(e){return e.join(" ")}}],[{key:"check",value:function(e){for(var t=[],r=0;r<2048;r++){var n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return u(t.join("\n")+"\n")}},{key:"register",value:function(e,t){t||(t=e.locale)}}]),e}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return R})),r.d(t,"b",(function(){return P})),r.d(t,"c",(function(){return N})),r.d(t,"d",(function(){return I})),r.d(t,"e",(function(){return O})),r.d(t,"f",(function(){return M})),r.d(t,"g",(function(){return D})),r.d(t,"h",(function(){return T}));var n=r(25),a=r(187),i=r(10),o=Object(i.createContext)(null);var s=Object(i.createContext)(null);var c=Object(i.createContext)({outlet:null,matches:[]});function u(e,t){if(!e)throw new Error(t)}function f(e,t,r){void 0===r&&(r="/");var n=E(("string"===typeof t?Object(a.f)(t):t).pathname||"/",r);if(null==n)return null;var i=d(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var r=e.length===t.length&&e.slice(0,-1).every((function(e,r){return e===t[r]}));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,s=0;null==o&&s0&&(!0===e.index&&u(!1),d(e.children,t,s,o)),(null!=e.path||e.index)&&t.push({path:o,score:y(o,e.index),routesMeta:s})})),t}var l=/^:\w+$/,h=3,p=2,b=1,m=10,g=-2,v=function(e){return"*"===e};function y(e,t){var r=e.split("/"),n=r.length;return r.some(v)&&(n+=g),t&&(n+=p),r.filter((function(e){return!v(e)})).reduce((function(e,t){return e+(l.test(t)?h:""===t?b:m)}),n)}function A(e,t){for(var r=e.routesMeta,n={},a="/",i=[],o=0;o=0?t[s]:"/"}var u=function(e,t){void 0===t&&(t="/");var r="string"===typeof e?Object(a.f)(e):e,n=r.pathname,i=r.search,o=void 0===i?"":i,s=r.hash,c=void 0===s?"":s,u=n?n.startsWith("/")?n:function(e,t){var r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(n,t):t;return{pathname:u,search:k(o),hash:B(c)}}(i,n);return o&&"/"!==o&&o.endsWith("/")&&!u.pathname.endsWith("/")&&(u.pathname+="/"),u}function E(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var r=e.charAt(t.length);return r&&"/"!==r?null:e.slice(t.length)||"/"}var _=function(e){return e.join("/").replace(/\/\/+/g,"/")},C=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},k=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},B=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};function I(e){S()||u(!1);var t=Object(i.useContext)(o),r=t.basename,n=t.navigator,s=T(e),c=s.hash,f=s.pathname,d=s.search,l=f;if("/"!==r){var h=function(e){return""===e||""===e.pathname?"/":"string"===typeof e?Object(a.f)(e).pathname:e.pathname}(e),p=null!=h&&h.endsWith("/");l="/"===f?r+(p?"/":""):_([r,f])}return n.createHref({pathname:l,search:d,hash:c})}function S(){return null!=Object(i.useContext)(s)}function O(){return S()||u(!1),Object(i.useContext)(s).location}function M(){S()||u(!1);var e=Object(i.useContext)(o),t=e.basename,r=e.navigator,n=Object(i.useContext)(c).matches,a=O().pathname,s=JSON.stringify(n.map((function(e){return e.pathnameBase}))),f=Object(i.useRef)(!1);return Object(i.useEffect)((function(){f.current=!0})),Object(i.useCallback)((function(e,n){if(void 0===n&&(n={}),f.current)if("number"!==typeof e){var i=x(e,JSON.parse(s),a);"/"!==t&&(i.pathname=_([t,i.pathname])),(n.replace?r.replace:r.push)(i,n.state)}else r.go(e)}),[t,r,s,a])}function D(){var e=Object(i.useContext)(c).matches,t=e[e.length-1];return t?t.params:{}}function T(e){var t=Object(i.useContext)(c).matches,r=O().pathname,n=JSON.stringify(t.map((function(e){return e.pathnameBase})));return Object(i.useMemo)((function(){return x(e,JSON.parse(n),r)}),[e,n,r])}function F(e,t){return void 0===t&&(t=[]),null==e?null:e.reduceRight((function(r,n,a){return Object(i.createElement)(c.Provider,{children:void 0!==n.route.element?n.route.element:r,value:{outlet:r,matches:t.concat(e.slice(0,a+1))}})}),null)}function R(e){u(!1)}function P(e){var t=e.basename,r=void 0===t?"/":t,n=e.children,c=void 0===n?null:n,f=e.location,d=e.navigationType,l=void 0===d?a.a.Pop:d,h=e.navigator,p=e.static,b=void 0!==p&&p;S()&&u(!1);var m=C(r),g=Object(i.useMemo)((function(){return{basename:m,navigator:h,static:b}}),[m,h,b]);"string"===typeof f&&(f=Object(a.f)(f));var v=f,y=v.pathname,A=void 0===y?"/":y,w=v.search,x=void 0===w?"":w,_=v.hash,k=void 0===_?"":_,B=v.state,I=void 0===B?null:B,O=v.key,M=void 0===O?"default":O,D=Object(i.useMemo)((function(){var e=E(A,m);return null==e?null:{pathname:e,search:x,hash:k,state:I,key:M}}),[m,A,x,k,I,M]);return null==D?null:Object(i.createElement)(o.Provider,{value:g},Object(i.createElement)(s.Provider,{children:c,value:{location:D,navigationType:l}}))}function N(e){var t=e.children,r=e.location;return function(e,t){S()||u(!1);var r,n=Object(i.useContext)(c).matches,o=n[n.length-1],s=o?o.params:{},d=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,O());if(t){var h,p="string"===typeof t?Object(a.f)(t):t;"/"===d||(null==(h=p.pathname)?void 0:h.startsWith(d))||u(!1),r=p}else r=l;var b=r.pathname||"/",m=f(e,{pathname:"/"===d?b:b.slice(d.length)||"/"});return F(m&&m.map((function(e){return Object.assign({},e,{params:Object.assign({},s,e.params),pathname:_([d,e.pathname]),pathnameBase:"/"===e.pathnameBase?d:_([d,e.pathnameBase])})})),n)}(j(t),r)}function j(e){var t=[];return i.Children.forEach(e,(function(e){if(Object(i.isValidElement)(e))if(e.type!==i.Fragment){e.type!==R&&u(!1);var r={caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path};e.props.children&&(r.children=j(e.props.children)),t.push(r)}else t.push.apply(t,j(e.props.children))})),t}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=[function(e){}],a={postMessage:function(e,t){console.log("GOT MOCK POST MESSAGE",e),n.forEach((function(t){t({data:e})}))},addEventListener:function(e,t){n.push(t)},removeEventListener:function(e,t){n.splice(n.indexOf((function(e){return e===t})),1)},location:{origin:"*"}};try{"undefined"!==typeof window&&(a=window)}catch(i){console.log("not defined: ".concat(i))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19);(0,n.__exportStar)(r(1227),t),(0,n.__exportStar)(r(2050),t),(0,n.__exportStar)(r(2051),t)},function(e,t,r){"use strict";r.d(t,"h",(function(){return n})),r.d(t,"i",(function(){return a})),r.d(t,"f",(function(){return i})),r.d(t,"g",(function(){return o})),r.d(t,"e",(function(){return s})),r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return u})),r.d(t,"d",(function(){return f})),r.d(t,"c",(function(){return d})),r.d(t,"l",(function(){return l})),r.d(t,"k",(function(){return h})),r.d(t,"m",(function(){return p})),r.d(t,"n",(function(){return b})),r.d(t,"j",(function(){return m}));var n="EdDSA",a="JWT",i=".",o="base64url",s="utf8",c="utf8",u=":",f="did",d="key",l="base58btc",h="z",p="K36",b=32,m=32},function(e,t,r){(function(n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(a=n))})),t.splice(a,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(r){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(r){}!e&&"undefined"!==typeof n&&"env"in n&&(e=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TESTNETS_API_KEY:"2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5",REACT_APP_PROD_API_KEY:"666ad781-aa60-4000-9e3e-cf5ae2d41bd3",REACT_APP_WALLET_CONNECT_V2_PROJECT_ID:"27c21e9982ee7b6e3f22764ab806719b"}).DEBUG);return e},t.useColors=function(){if("undefined"!==typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=function(){var e=!1;return function(){e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=r(2655)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,r(80))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;var n=r(3632),a=n.__importDefault(r(3633));Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return a.default}}),n.__exportStar(r(1530),t),n.__exportStar(r(3635),t)},function(e,t,r){e.exports=r(2225)},function(e,t,r){"use strict";!function(t){function r(e){return parseInt(e)===e}function n(e){if(!r(e.length))return!1;for(var t=0;t255)return!1;return!0}function a(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function i(e){return new Uint8Array(e)}function o(e,t,r,n,a){null==n&&null==a||(e=e.slice?e.slice(n,a):Array.prototype.slice.call(e,n,a)),t.set(e,r)}var s={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},c=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],r=0;r>4]+e[15&a])}return r.join("")}}}(),u={16:10,24:12,32:14},f=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],l=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],h=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],b=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],m=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],v=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],y=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],A=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],w=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],x=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],E=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],_=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function C(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=i[t],this._Kd[e-r][t%4]=i[t];for(var o,s=0,c=a;c>16&255]<<24^d[o>>8&255]<<16^d[255&o]<<8^d[o>>24&255]^f[s]<<24,s+=1,8!=a)for(t=1;t>8&255]<<8^d[o>>16&255]<<16^d[o>>24&255]<<24;for(t=a/2+1;t>2,h=c%4,this._Ke[l][h]=i[t],this._Kd[e-l][h]=i[t++],c++}for(var l=1;l>24&255]^x[o>>16&255]^E[o>>8&255]^_[255&o]},k.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=C(e),a=0;a<4;a++)n[a]^=this._Ke[0][a];for(var o=1;o>24&255]^p[n[(a+1)%4]>>16&255]^b[n[(a+2)%4]>>8&255]^m[255&n[(a+3)%4]]^this._Ke[o][a];n=r.slice()}var s,c=i(16);for(a=0;a<4;a++)s=this._Ke[t][a],c[4*a]=255&(d[n[a]>>24&255]^s>>24),c[4*a+1]=255&(d[n[(a+1)%4]>>16&255]^s>>16),c[4*a+2]=255&(d[n[(a+2)%4]>>8&255]^s>>8),c[4*a+3]=255&(d[255&n[(a+3)%4]]^s);return c},k.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=C(e),a=0;a<4;a++)n[a]^=this._Kd[0][a];for(var o=1;o>24&255]^v[n[(a+3)%4]>>16&255]^y[n[(a+2)%4]>>8&255]^A[255&n[(a+1)%4]]^this._Kd[o][a];n=r.slice()}var s,c=i(16);for(a=0;a<4;a++)s=this._Kd[t][a],c[4*a]=255&(l[n[a]>>24&255]^s>>24),c[4*a+1]=255&(l[n[(a+3)%4]>>16&255]^s>>16),c[4*a+2]=255&(l[n[(a+2)%4]>>8&255]^s>>8),c[4*a+3]=255&(l[255&n[(a+1)%4]]^s);return c};var B=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new k(t)};B.prototype.encrypt=function(e){if((e=a(e)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=i(e.length),r=i(16),n=0;n=0;--t)this._counter[t]=e%256,e>>=8},M.prototype.setBytes=function(e){if(16!=(e=a(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},M.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var D=function e(t,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",r instanceof M||(r=new M(r)),this._counter=r,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new k(t)};D.prototype.encrypt=function(e){for(var t=a(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,n=0;n>>2]>>>24-i%4*8&255;t[n+i>>>2]|=o<<24-(n+i)%4*8}else for(i=0;i>>2]=r[i>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],a=function(t){var r=987654321,n=4294967295;return function(){var a=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return a/=4294967296,(a+=.5)*(e.random()>.5?1:-1)}},i=0;i>>2]>>>24-a%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},u=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],a=0;a>>2]>>>24-a%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,t)}},f=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},d=a.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,a=r.sigBytes,i=this.blockSize,s=a/(4*i),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,u=e.min(4*c,a);if(c){for(var f=0;f1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n2&&void 0!==arguments[2]?arguments[2]:[];if(Object(o.a)()){var u="[BEACON] ".concat((new Date).toISOString()," [").concat(this.name,"](").concat(t,")"),f=c;switch(c[0]&&"string"===typeof c[0]&&(u+=" ".concat(c[0]),f=c.slice(1)),e){case"error":console.group(u),(r=console).error.apply(r,Object(n.a)(f));break;case"warn":console.group(u),(a=console).warn.apply(a,Object(n.a)(f));break;case"debug":console.groupCollapsed(u),(i=console).debug.apply(i,Object(n.a)(f));break;default:console.group(u),(s=console).log.apply(s,Object(n.a)(f))}console.groupEnd()}}}]),e}()},function(e,t,r){"use strict";(function(e){r.d(t,"i",(function(){return c})),r.d(t,"d",(function(){return u})),r.d(t,"e",(function(){return f})),r.d(t,"b",(function(){return d})),r.d(t,"a",(function(){return l})),r.d(t,"h",(function(){return h})),r.d(t,"f",(function(){return p})),r.d(t,"c",(function(){return b})),r.d(t,"g",(function(){return m}));var n=r(25),a=r(0),i=r(148),o=r(82),s=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};function c(t){return e.from(t).toString("hex")}function u(e){return s(this,void 0,void 0,Object(a.a)().mark((function t(){return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.ready;case 2:return t.abrupt("return",c(o.crypto_generichash(32,e)));case 3:case"end":return t.stop()}}),t)})))}function f(e){return s(this,void 0,void 0,Object(a.a)().mark((function t(){return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.ready;case 2:return t.abrupt("return",o.crypto_sign_seed_keypair(o.crypto_generichash(32,o.from_string(e))));case 3:case"end":return t.stop()}}),t)})))}function d(t,r){return s(this,void 0,void 0,Object(a.a)().mark((function n(){var i,s;return Object(a.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,o.ready;case 2:return i=e.from(o.randombytes_buf(o.crypto_secretbox_NONCEBYTES)),s=e.concat([i,e.from(o.crypto_secretbox_easy(e.from(t,"utf8"),i,r))]),n.abrupt("return",c(s));case 5:case"end":return n.stop()}}),n)})))}function l(t,r){return s(this,void 0,void 0,Object(a.a)().mark((function n(){var i,s;return Object(a.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,o.ready;case 2:return i=t.slice(0,o.crypto_secretbox_NONCEBYTES),s=t.slice(o.crypto_secretbox_NONCEBYTES),n.abrupt("return",e.from(o.crypto_secretbox_open_easy(s,i,r)).toString("utf8"));case 5:case"end":return n.stop()}}),n)})))}function h(t,r){return s(this,void 0,void 0,Object(a.a)().mark((function n(){var i,s;return Object(a.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,o.ready;case 2:return i=o.crypto_sign_ed25519_pk_to_curve25519(e.from(r)),s=o.crypto_box_seal(t,i),n.abrupt("return",c(s));case 5:case"end":return n.stop()}}),n)})))}function p(t,r,n){return s(this,void 0,void 0,Object(a.a)().mark((function i(){var s,c,u;return Object(a.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,o.ready;case 2:return s=o.crypto_sign_ed25519_sk_to_curve25519(e.from(n)),c=o.crypto_sign_ed25519_pk_to_curve25519(e.from(r)),u=o.crypto_box_seal_open(t,c,s),a.abrupt("return",e.from(u).toString());case 6:case"end":return a.stop()}}),i)})))}function b(t){return s(this,void 0,void 0,Object(a.a)().mark((function r(){var s,c,u,f,d,l,h,p,b,m;return Object(a.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,o.ready;case 2:if(s={edpk:{length:54,prefix:e.from(new Uint8Array([6,161,159]))},sppk:{length:55,prefix:e.from(new Uint8Array([6,161,161]))},p2pk:{length:55,prefix:e.from(new Uint8Array([6,161,164]))}},64!==t.length){r.next=8;break}c=s.edpk.prefix,u=t,r.next=20;break;case 8:f=Object.entries(s),d=0;case 10:if(!(d>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function N(e,t,r){P.call(this,e,t,r)}P.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,a,i=this.blocks,s=this.byteCount,c=e.length,u=this.blockCount,f=0,d=this.s;f>2]|=e[f]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(i[n>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=s){for(this.start=n-s,this.block=i[u],n=0;n>=8);r>0;)a.unshift(r),r=255&(e>>=8),++n;return t?a.push(n):a.unshift(n),this.update(a),a.length},P.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,a=e.length;if(t)n=a;else for(var i=0;i=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++i)),n+=4)}return n+=this.encode(8*n),this.update(e),n},P.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];o%t===0&&(j(r),i=0)}return a&&(e=r[i],s+=h[e>>4&15]+h[15&e],a>1&&(s+=h[e>>12&15]+h[e>>8&15]),a>2&&(s+=h[e>>20&15]+h[e>>16&15])),s},P.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,a=this.extraBytes,i=0,o=0,s=this.outputBits>>3;e=a?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);o>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%r===0&&j(n)}return i&&(e=s<<2,t=n[o],c[e]=255&t,i>1&&(c[e+1]=t>>8&255),i>2&&(c[e+2]=t>>16&255)),c},N.prototype=new P,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),P.prototype.finalize.call(this)};var j=function(e){var t,r,n,a,i,o,s,c,u,f,d,l,h,p,b,g,v,y,A,w,x,E,_,C,k,B,I,S,O,M,D,T,F,R,P,N,j,L,U,Q,G,H,z,q,K,V,W,Y,J,X,Z,$,ee,te,re,ne,ae,ie,oe,se,ce,ue,fe;for(n=0;n<48;n+=2)a=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|o>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=a^(c<<1|u>>>31),r=i^(u<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=o^(f<<1|d>>>31),r=s^(d<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(a<<1|i>>>31),r=d^(i<<1|a>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],b=e[1],V=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,S=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,z=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,P=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,D=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,T=e[45]<<29|e[44]>>>3,F=e[44]<<29|e[45]>>>3,C=e[6]<<28|e[7]>>>4,k=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,Q=e[38]<<8|e[39]>>>24,G=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,_=e[49]<<14|e[48]>>>18,e[0]=p^~g&y,e[1]=b^~v&A,e[10]=C^~B&S,e[11]=k^~I&O,e[20]=R^~N&L,e[21]=P^~j&U,e[30]=q^~V&Y,e[31]=K^~W&J,e[40]=te^~ne&ie,e[41]=re^~ae&oe,e[2]=g^~y&w,e[3]=v^~A&x,e[12]=B^~S&M,e[13]=I^~O&D,e[22]=N^~L&Q,e[23]=j^~U&G,e[32]=V^~Y&X,e[33]=W^~J&Z,e[42]=ne^~ie&se,e[43]=ae^~oe&ce,e[4]=y^~w&E,e[5]=A^~x&_,e[14]=S^~M&T,e[15]=O^~D&F,e[24]=L^~Q&H,e[25]=U^~G&z,e[34]=Y^~X&$,e[35]=J^~Z&ee,e[44]=ie^~se&ue,e[45]=oe^~ce&fe,e[6]=w^~E&p,e[7]=x^~_&b,e[16]=M^~T&C,e[17]=D^~F&k,e[26]=Q^~H&R,e[27]=G^~z&P,e[36]=X^~$&q,e[37]=Z^~ee&K,e[46]=se^~ue&te,e[47]=ce^~fe&re,e[8]=E^~p&g,e[9]=_^~b&v,e[18]=T^~C&B,e[19]=F^~k&I,e[28]=H^~R&N,e[29]=z^~P&j,e[38]=$^~q&V,e[39]=ee^~K&W,e[48]=ue^~te&ne,e[49]=fe^~re&ae,e[0]^=m[n],e[1]^=m[n+1]};if(f)e.exports=I;else{for(O=0;O0&&(a=i.classList).add.apply(a,Object(A.a)(t.filter((function(e){return!!e})).map((function(e){return C(e)}))));return r.forEach((function(e){i.setAttribute(C(e[0]),C(e[1]))})),"object"===typeof n&&Array.isArray(n)?n.filter((function(e){return!!e})).forEach((function(e){i.appendChild(e)})):"string"===typeof n&&(i.innerText=n),i},x=function(e,t,r){var n,a=document.createElementNS("http://www.w3.org/2000/svg","svg");e.length>0&&(n=a.classList).add.apply(n,Object(A.a)(e.filter((function(e){return!!e}))));return t.forEach((function(e){a.setAttribute(C(e[0]),C(e[1]))})),"object"===typeof r&&Array.isArray(r)&&r.filter((function(e){return!!e})).forEach((function(e){a.appendChild(e)})),a},E=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","path");return e.forEach((function(e){t.setAttribute(C(e[0]),C(e[1]))})),t},_=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return e.filter((function(e){return!!e})).forEach((function(e){t.appendChild(e)})),t},C=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML},k=function(e){e.innerHTML=""};!function(e){e.LIGHT="light",e.DARK="dark"}(f||(f={}));var B=f.LIGHT,I=function(e){B=e},S=function(){return B},O=r(114),M=r(234),D={css:":host {\n --animation-duration: 300ms;\n all: initial;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n.beacon-modal__wrapper {\n position: relative;\n top: 0;\n display: inline-block;\n z-index: 2147483000;\n max-width: 500px;\n width: 80%;\n padding: 24px;\n}\n\n@media (min-height: 700px) {\n .beacon-modal__wrapper {\n top: 50%;\n transform: translateY(-50%);\n }\n}\n\n.theme__light .beacon-modal__base,\n.theme__light .beacon-modal__close__wrapper {\n background: #fff;\n}\n\n.theme__dark .beacon-modal__base,\n.theme__dark .beacon-modal__close__wrapper {\n background: #27334c;\n}\n\n.beacon-modal__base,\n.beacon-modal__close__wrapper {\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1);\n}\n\n.beacon-modal__base {\n margin: 0 auto;\n border-radius: 32px;\n overflow: hidden;\n}\n\n.beacon-modal__header {\n padding: 16px 0;\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n\n.beacon-modal__headerLogo {\n width: 100%;\n max-width: 320px;\n margin: 20px auto;\n height: 100%;\n}\n\na,\nbutton {\n cursor: pointer;\n}\n\n.beacon-modal__close__wrapper {\n position: absolute;\n top: 44px;\n right: 24px;\n z-index: 10000;\n cursor: pointer;\n border-radius: 100%;\n}\n\n.beacon-modal__close__icon {\n width: 16px;\n height: 16px;\n position: relative;\n top: 0;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n margin: 8px;\n}\n\n.beacon-modal__close__line1 {\n position: absolute;\n width: 90%;\n}\n\n.beacon-modal__close__line2 {\n position: absolute;\n width: 90%;\n transform: rotate(90deg);\n}\n\n.theme__light .beacon-modal__close__line2,\n.theme__light .beacon-modal__close__line1 {\n border: 1px solid #000;\n}\n\n.theme__dark .beacon-modal__close__line2,\n.theme__dark .beacon-modal__close__line1 {\n border: 1px solid #fff;\n}\n\n.beacon-alert__base {\n position: fixed;\n overflow-y: scroll;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 2147482999;\n background-color: rgb(17 17 17 / 0.84);\n text-align: center;\n -ms-overflow-style: none;\n scrollbar-width: none;\n font-family: Roboto, Helvetica, sans-serif;\n}\n\n.beacon-alert__base::-webkit-scrollbar {\n display: none;\n}\n\n.beacon-alert__title {\n text-align: center;\n}\n\n.beacon-alert__text,\n.beacon-alert__title {\n margin: 0 auto;\n padding: 0 0 24px;\n}\n\n.margin__bottom {\n margin-bottom: 16px;\n}\n\n.beacon-alert__title {\n font-size: 18px;\n}\n\n.theme__light .beacon-alert__title {\n color: #3b3d40;\n}\n\n.theme__dark .beacon-alert__title,\n.theme__dark .beacon-alert__text {\n color: #7c99d6;\n}\n\n.beacon-alert__text {\n color: #000;\n font-size: 14px;\n}\n\n.beacon-modal__button,\n.beacon-modal__button--outline {\n height: 36px;\n font-size: 14px;\n letter-spacing: 0.84px;\n margin-bottom: 4px;\n margin-inline-end: 2px;\n margin-inline-start: 2px;\n margin-left: 2px;\n margin-right: 2px;\n margin-top: 4px;\n padding-inline-end: 15.4px;\n padding-inline-start: 15.4px;\n padding-left: 15.4px;\n padding-right: 15.4px;\n overflow-wrap: break-word;\n pointer-events: auto;\n text-align: center;\n border-radius: 4px;\n border: 2px solid #3880ff;\n}\n\n.beacon-modal__button {\n background: #3880ff;\n color: #fff;\n}\n\n.beacon-modal__button--outline {\n background: #fff;\n color: #444444;\n border: 1px solid #444444;\n}\n\n.beacon-alert__image {\n width: 200px;\n height: 200px;\n box-sizing: border-box;\n box-shadow: 0 10px 20px 0 rgba(17, 17, 17, 0.12);\n border: 1px solid rgba(17, 17, 17, 0.04);\n border-radius: 16px;\n}\n.connect__btn {\n margin: 24px 0;\n width: 100%;\n}\n\n#beacon-modal__content {\n padding: 24px;\n}\n\n#beacon-switch {\n margin-top: 24px;\n}\n\n#beacon-title {\n margin: 0 0 24px;\n}\n\na {\n text-decoration: none;\n}\n\npre {\n white-space: pre-wrap; /* css-3 */\n white-space: -moz-pre-wrap; /* Mozilla, since 1999 */\n white-space: -pre-wrap; /* Opera 4-6 */\n white-space: -o-pre-wrap; /* Opera 7 */\n word-wrap: break-word; /* Internet Explorer 5.5+ */\n padding: 16px;\n background: #ececec;\n line-height: 1.25rem;\n}\n"},T={css:"#beacon-main-text {\n display: initial;\n}\n.beacon-selection__container {\n padding: 16px 16px 0;\n}\n.beacon-selection__list {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n text-decoration: none;\n padding-bottom: 12px;\n align-items: center;\n}\n.beacon-list__title {\n text-align: left;\n font-size: 12px;\n}\n.beacon-list__wrapper:nth-child(-n + 3) {\n padding: 0 0 1rem;\n}\n.theme__light .beacon-list__title {\n color: #7c828b;\n}\n.theme__dark .beacon-list__title,\n.theme__dark #beacon--disclaimer {\n color: #7c99d6;\n}\n\n.beacon-selection__name {\n font-size: 1rem;\n font-weight: 600;\n text-align: left;\n}\n.theme__light .beacon-selection__name,\n.theme__light .beacon--selection__name__lg {\n color: #3b3d40;\n}\n.theme__dark .beacon-selection__name,\n.theme__dark .beacon--selection__name__lg {\n color: #6183ff;\n}\n.beacon-selection__img {\n width: 48px;\n height: 48px;\n box-shadow: 0 4px 12px 0 rgba(17, 17, 17, 0.24);\n border-radius: 16px;\n background-color: #fff;\n}\n.beacon--selection__name__lg {\n font-size: 1.5rem;\n font-weight: 600;\n text-align: center;\n padding: 1rem 0;\n}\n.beacon--selected__container {\n padding: 2rem 0 0;\n}\n#beacon--qr__copy__container {\n height: 0;\n}\n#beacon--qr__copy {\n display: none;\n position: relative;\n top: -190px;\n left: 138px;\n margin: 0;\n}\n#beacon--qr__container {\n margin-left: auto;\n margin-right: auto;\n}\n#beacon--qr__container:hover #beacon--qr__copy {\n display: block;\n}\n.disabled {\n cursor: initial;\n}\n.disabled span,\n.disabled img {\n opacity: 0.48;\n}\n.disabled p {\n text-align: left;\n margin: 0;\n font-size: 10px;\n font-weight: 300;\n}\n.disabled img {\n -webkit-filter: grayscale(100%);\n -moz-filter: grayscale(100%);\n -ms-filter: grayscale(100%);\n -o-filter: grayscale(100%);\n filter: grayscale(100%);\n filter: gray;\n}\n\n#beacon--disclaimer {\n text-align: left;\n padding-top: 24px;\n font-size: 0.875rem;\n}\n.progress-line,\n.progress-line:before {\n height: 3px;\n width: -webkit-fill-available;\n margin-left: -24px;\n margin-right: -24px;\n}\n.progress-line {\n background-color: #a7c4f7;\n display: -webkit-flex;\n display: flex;\n}\n.progress-line:before {\n background-color: #3880ff;\n content: '';\n -webkit-animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n}\n@-webkit-keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n@keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n"},F=r(567),R=r(132),P=function(e,t){return t.test(e.navigator.userAgent)},N=function(e){return function(e,t){return e.matchMedia(t).matches}(e,"(any-pointer:coarse)")},j=function(e){return P(e,/iPhone|iPod/i)||function(e){return!!P(e,/iPad/i)||!(!P(e,/Macintosh/i)||!N(e))}(e)},L=function(e){return P(e,/android|sink/i)},U=r(863),Q=new R.a("QR"),G=function(e,t){var r=U(0,"L");e.length>500&&Q.warn("getQrData",'The size of the payload in the QR code is quite long and some devices might not be able to scan it anymore. To reduce the QR size, try using a shorter "name", "appUrl" and "iconUrl"');try{if(r.addData(e),r.make(),"svg"===t)return r.createSvgTag();if("ascii"===t){var n=r.getModuleCount(),a="\x1b[40m \x1b[0m",i="\x1b[47m \x1b[0m",o=new Array(n+3).join(i),s=new Array(n+3).join(a),c="";c+="".concat(s,"\n"),c+="".concat(o,"\n");for(var u=0;u2&&void 0!==arguments[2])||arguments[2];return z(this,void 0,void 0,Object(d.a)().mark((function n(){var a,i;return Object(d.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.storage.get(this.storageKey);case 2:if((a=n.sent).some(t)){if(r)for(i=0;i0&&(ie.log("connect","connecting to ".concat(r.length," peers")),n=r.map((function(e){return ae(a,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.listen(e.publicKey));case 1:case"end":return t.stop()}}),t,this)})))})),Promise.all(n).catch((function(e){return ie.error("connect",e)}))),e.next=10,this.startOpenChannelListener();case 10:return e.next=12,t.connect.call(this);case 12:case"end":return e.stop()}}),e,this)})))}},{key:"startOpenChannelListener",value:function(){return ae(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))}},{key:"getPairingRequestInfo",value:function(){return ae(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.getPairingRequestInfo());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"listen",value:function(e){return ae(this,void 0,void 0,Object(d.a)().mark((function t(){var r=this;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return ie.log("listen",e),t.next=3,this.client.listenForEncryptedMessage(e,(function(e,t){var n={origin:s.EXTENSION,id:t.id};r.notifyListeners(e,n).catch((function(e){throw e}))})).catch((function(e){throw e}));case 3:case"end":return t.stop()}}),t,this)})))}}],[{key:"isAvailable",value:function(){return ae(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){O.a.addEventListener("message",(function t(r){var n=r.data;n&&"pong"===n.payload&&(e(!0),O.a.removeEventListener("message",t))}));var t={target:c.EXTENSION,payload:"ping"};O.a.postMessage(t,O.a.location.origin)})));case 1:case"end":return e.stop()}}),e)})))}},{key:"getAvailableExtensions",value:function(){return ae(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!J){e.next=2;break}return e.abrupt("return",J);case 2:if(!X){e.next=4;break}return e.abrupt("return",X);case 4:return X=[],J=new Promise((function(e){r.listenForExtensions(),setTimeout((function(){e(null!==X&&void 0!==X?X:[])}),1e3)})).finally((function(){J=void 0})),e.abrupt("return",J);case 7:case"end":return e.stop()}}),e)})))}},{key:"listenForExtensions",value:function(){if(!oe){O.a.addEventListener("message",(function(e){if(e.source===O.a&&e.origin===O.a.location.origin){var t,r=e.data,n=r.sender;r&&"pong"===r.payload&&n&&(ie.log("getAvailableExtensions",'extension "'.concat(n.name,'" is available'),n),t=n,X||(X=[]),X.some((function(e){return e.id===t.id}))||(X.push(t),O.a.postMessage("extensionsUpdated",O.a.location.origin)))}}));var e={target:c.EXTENSION,payload:"ping"};O.a.postMessage(e,O.a.location.origin),oe=!0}}}]),r}(ne),ce=[{key:"spire_chrome",id:"gpfndedineagiepkpinficbcbbgjoenn",name:"Spire",shortName:"Spire",color:"",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAIIElEQVR4Ae3Ba5BeZWEA4Oc9u9kkJGHZkIQkLhQziQmVBpJwOTDg7saKEIQwnYq2/WWnUjuxHTOOgbYq77ZqSVGrtZliae2P/gE74zQIodoZEmwrR6pQlTYJ0DWNuWAChBBIyN7exsGZL2e/3Xy3Xf3RPI+zzvr/LfgFyGMKCMPHX/JT7eec75RUxJD8nAVTKI/JKe1YjquxEsuwCHOPH/phm9ER5yy8fAQv4yCeww/wHezGcBGDqRJMgTymaejD+3AjFhvHC09+SRodtijfaAIH8CgexI4ihiGTLJhEeUzn4Q58CG9Vw7MP/po0OmL5b2xVhx/hPny5iOGoSRJMgjymmfgwNmGeOowOnfD0F5eQRq36yIBs2ix1OoR7saWI4YQWBS3IYwrowxasMLGEo3gK/4UfDXz9d+ce+t79HydZsPp3PrPk1vtfxBK8HatxLoKJ7cQGbC9i0KygSXlM0/EpbESbagl78QAewneLGAZVbMTnvWkT7vUzeUwduBK34b24CEG1YXwOdxcxnNSEoAl5TAvwAPpUS3gS9+CRIoYh43sYN3vTNtxsHHlMHViHu3AVgmqP4f1FDIc1KGhQHtMSPIIVqu3GXXioiGHUxGZhAAu86UUswTETyGPKsB6bsUy1nXhPEcOABgQNyGNagn/BEmXD+BI+WcTwmtquxJPKrsUTashjmo0/we+jXdkA3lXEMKBOQZ3ymBbgcaxQdgQfKGLYqn6bsFnZH+HP1CmP6TZ8BV3KdqKniOGwOrSpQx7TdGzFFcr24sYihsc15hNYqmwU/6BO+3b07+rujd/EOnSqmI813b3xwX07+kfUkKkhjyngU+hVthfvLmL4vsbMwRrVrkCnBhQxPI0b8GNla9Gfx6SWTG192KjsCG4tYtilcZdinmpdWKlBRQy7sB5HlH0UfWrInEEe00xsQZuKYXygiOH7mvOrJtarCUUMT+O3MayiHVvymGY6g8yZfRgrlP1lEcNWzesxsT5NKmL4J2xRdgk2OIPMBPKYunCnst24W/POxWoTW43zNO8TeF7Zx/KYOk0gM7EP4nwVCXcVMbymeavQZWKdWKVJRQzHsAlJxQLcYQKZceQxTcPvKfs2HtKatWrr1ZqteFLZh/KY2o0jM761uFhFwr1FDKNa06O2Pi0oYhjFPUgqlqDXODJj5DE55XZl/4ttWtOFy9V2OeZqzTbsVXa7cWSqteNGZQ8UMQxpzRXoVNscrNGCIoZB/KOydXlMbcbIVFuOxSoSvq51PerXo3VbkVS8BcuNkal2jbKj+K7WBPSq31oErfkPvKrsamNkql2q7HtFDINaMxeXqd9KnK8FRQwn8bSylcbIVFum7L+17irMVr9ZuFLrnlG21BiZ0+QxBSxWNqB1PRrXq3V7lC3OYwpOkykL6FJ2WGsCejVuLYLWHFI2F8FpMtVmKntda+Zjpca9HfO1ZlBZZozM1LsaMzVuJq42xTLVTiibpTU9mterNR3KRo2RKUs4omy+5mVYq3l9yDRvgbKXkZwmc5oihoQDypZo3gW4RPMuwQWad7GyA0UMyWky1Z5T9sual2OG5s1ArnmXKnveGJlqzyhbk8fUoTl9WterCXlM07FK2Q+Mkan2hLJOXKFxbejVuj60adyVOFfZd4yRqbYbB1QE3KJxC7Fc65ZjocatR1CxH7uNkak2jH9W9v48pmkacy06tK4D12pAHlMH3qtsWxHDiDEyYxQxOOWryn4J6zTmnSZPn8bcjIuUfdU4MuN7DHtUBHwsjylTnzZcb/L0oE0d8pgy3ImgYgA7jCMzjiKGIfy1smtxq/osxttMnrdhsfqsx1XK7itiGDaOzMTux0sqAu7JY5qttneg3eRpx3VqyGOagz9HUHEIf2MCmQkUMRzBZmXL0a+2PpNvrdr+FEuV3VvEcNQEMmf2V9il7A/ymNabWDuuM/muR7sJ5DHdhg3KdmKLM8icQRHDCWzAiIp2/H0e02XGdyGWmnxL0W0ceUyr8BW0qxjGhiKGE84gU9t2/IWyLjyUx7RCtR60mXxtuM4YeUwrsBVdyj6H7WrI1FDEkPBxbFd2Eb6Rx3SZsl5T551Ok8e0Ct/Ehcoew91FDGppU4d9O/pHunvjo7gF81R04n3dvXH3vh39uzANmzHX1JiN+zCax3QbvoYLlO3Ee4oYXlWHNnXat6P/9e7e+ChuQZeKmfj17t7YdeTZh38ydOzgnQimxnmzFq/52pqPHrgTn8UsZQO4qYhhvzq1acC+Hf1Hunvjw3g35qnIcI00+puvPPvIDFMnXNjX/1uzFq3pQaZsJ24qYhjQgEyDihgG0IPtxji299/mmGKv7nl8jmqPoaeIYUCDMk0oYjiEm/BZjDgljQw6tvffTbVjP/62NDLoZ4axGeuKGA5rQqZJRQwnsQk3YNcbL/+Pk6/sMdVOvrLHyVf2OGUnbsBdRQwnNSmYBHlMM/d/69Mb9//rZzaNDh3vNIWy9hlHu3s+uXnx9X/4hSKGE1oUTKKLb/ri/ENP/d2GwVf33zF84qVFJlH7jK4XOjq7vyylLccPPXPYJAmmwII1H+x44+Xn140Onbj9jRd33zj8xpEuTWibcd6R6Z0XfaN9ZteDM+Yu23boqb8dNMmCKfSWd/yx0eGT04ZeO3j56wefytPwyV8ZOv7israO2RekkcFFieCUQAptHQdHBl/7ybRz5j0X2qf/cNai1cW02Qv/M2ufMbT/W582VYJfgEXXfCQMHXshS2nET4XQZtqchaMHn/hCctZZZ/08/R8wPGmSSU1PIgAAAABJRU5ErkJggg==",link:"https://spirewallet.com/"},{key:"temple_chrome",id:"ookjlbkiijinhpmnjffcofjonbfbgaoc",name:"Temple Wallet",shortName:"Temple",color:"",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAGbElEQVR4Ae3B32/ddR3H8efr/f1+z2m7dT1n3Vp+De22EsxmxARvCNDGhBvDj3/AaxdMJEpIUAOJxl8IXJnFGyNX3i3BiEG9ELIqZNSLmRBYYD+7CS3tuv5Y23N6es7n87Zd2uULxAXDt2cmnseDjo6Ojo6Ojo6Ojo7/S6Jgje/sGdTdu1+2ewZvwwQSMsAEJjCBBCYwwAQSMoEJDDCBBCYwgQmJN3XLH79JwUSBGt/dO4jzmqrlQ/bQEJhAQgaYwAQmkMAEBphAQiYwgQEmkMAEJjAhsYxU1eArLQpkFKTx5MAg0mskOuTLTVgLFErsBO6lYEZRTN8i0SESgQmfq1M4MUrBUoqS6E2xTgIBc6twWy8bfLkJszWukfgUgZMj1okN6iujQ3vYNAI8R4FSCiLTCaQGoozA51cRmxotwvFLEBxChOAQHYJDiHhwCA7RIUQIDsEBRweqZF/qBxPr7vfLj6Xa+4cWBUkpSOkXU/W1Z28fRzwIgloTmgFKKezuJnn4IAiQQIDENQIkJECsEwgQ+L+WCK9fxCeX0Z29rNsJ3Au8RUFSipTYGOJBNkj4QgMNpEjAQA+YwAQSmMAAE0jIBCYwwAQS2ttD+NM5/PQc3NnLNWIUeIuCGEVKdJxEkBgkgoUGn8uuMvSWiKeukDNCgYwiJTpBYg0SQSL8aoP/RnhtApyPSY98leTRg+Tc71ceSymIUaDSDy/WSTROIkgMVlvQinwW8Z3LhGPv49Mr5OmWHejOXeTsBN1LQYyimY0pMZQIJYKlBp+FBnaAwE/P8xmMUpCUginVceBZJAiR8Oo5MKHUIDVIDUoJ9pUBdFeVLRroQdUu4pk5bHQfG/zSVcKJD1EpgVICpQSVzCmnH1CQlKKZTiA1CLEcT07jy2uQJZAaZAalBB2s4HN1RJU83bUbPzMPDgioduFTy1BOoZxAOXVKdiR78tzvKIhRsOyJM3VCHI/jU/jCKh9jQkN9qDuDpTVYDeTZcBVfWsOnV9ig3hKqdLHJcT+SPXnuNxQoZRuEv33wbVbW9pEZeTZcfZSe7HFCxB18ro56etmi4d0g8LPz6NadbEge+uJL4ZWzx3DmSj+Y+AcFS9kGXS+vvgu8C5G8tRcH52jFx3Fng8/W0R29bNFAD6p0Ec8sYA/sY4P27aqUfj75F7aJ0U7BTxLiVYJDK+IzK3yShqv4uXlyRuLkw8Y2Mdqo9PSFFi1/g1aE4LDYgFqLPBuu4str+MwKm/qBw2wTo91CHCM4tCK0HJ9ZIU8HqyDhZxfIGWWbGO3WiscJEYJDiPjUCnna240qZeK5eXJG2CZGu0U/SStepRUhOD65xCfpYBU/v8B10oh/9IixDYw2K/1ssuXB3/AQ8VbE51dhpUmeHajgy018psamfuAw28C4GVpxjOAQIgTHJ5fI04EqkvDzC+SMsg1SbgL1ZL32tVtAYoN2d5OnPd2oUsbPL8B9t7NpBPgVBTParPG9vU95rfmMbutFBypouAr93XyMQPsrxAsL5Iz49KNGwYw2ajw1+BSpvUBm+EyNG9GBCiw38cs1rhH9wGEKZrTJ2vdv/bIye0FZgjLDZ2vciPZXQODnF7hOjFIwo11SO02W1MkMsgTmV7kR9XejvjJ+YZGcEQpmtEnppx82yOwEpQQyw+stWAvciPZXiBOL4GwZ8cuPGQVKaadSMob4OhJEJ/z+DHSlKDPoLZE8cAd0p2zRUAXeuQyzNRjsYV0/cBh4m4IYbaTMjitLkMBPzRLfu4KfmiVOLEK9hV+pk6ehPpCIE4vkjFIgo51SGwfq8Z/T+GKDa7pTbKgP3PGZGnnq70Z9ZfzCIteJEQqU0EY/+fNceOb2cNpn66+T6FUSe9UO7XkQKBMc1gI2XAUJJJDwj1bwS4sk990BEkgDP3r67hd//Pz7TgFS2qz80uIxctbu4RFC/Abu+HyAWgt2ZmzRUB/x1Cx+pY729rCuH3QYeJsCGDdbM4zRjNCM0Az41DJ5+kIfSPjEIjmjFCTlZmvG47iDA9EJf72ITk5DapAIMoNEhPEpfLoGBkg9FCTlZmvFkx79Ku67fHIZ5huQGaSGMoMdGSTCP1omzNbAdBT4JQUxbrLSc1MtmuENv7QEM3U+pRGgGdl0FHiifPSKU5CU/wE+ufI8l2t/JzH+I2eW6L8t/3rO6ejo6Ojo6Ojo6Ojo+Jz+DTK0Yr9D+W0JAAAAAElFTkSuQmCC",link:"https://templewallet.com/"}],ue=[{key:"galleon_desktop",name:"Galleon",shortName:"Galleon",color:"",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAN6ElEQVR4Ad3BC3SW9X3A8e/v/7yX3IAQCLdwhyCKGlARRBRorbdZaWu1lx27Xlydp+txW1vtXLs2nh0723o6e13VdhU7dahzFdGCchOEAAICohAScg/kfnnzXvI+z/P/7U0lPVlGIIE31O3zEYaZqoI2OerlTLfqzzJGJnmJ7rxAOJiFVZP0bTJkJKJOoEGUanGkFMdvhxGICMNNSDNVhY62IBnBpSpcD+5SVRagZINyRiIKUilGSnDZJMZ5lYycWhFhOAhpoloBfv6Vat0vqdXbUB1DOohYEXbiOE+JJJ/GjO0QEdJFOEdquyQRdz8WDsj9av1FDCeRTjHBXx1vbPnhpIJd9SJ3cK6Es6SqqI0tU899BOtfzvkkEhcn9KgY7yFxciOcA+EsWK87Dxv7kfr2TkD4UxFTK478tQRG/U5EOBvCEKgqfjK2QrR7FaqT+YAQE3wiltR7c0aMijFEDoOkWoF6oW/gJ54EcvkgUXtZKCC3fLf4W+uKH3yonSFwGAS11vG73V9i7TcBwweR6gTr+5/+bvHfbC5+8JF6BsnhDDQRDagXexrkc3zACeSgwU8X33//tuLvPVzNIDichlrfqO3+jar/Gf7vCKsjnywu/vbrxQ8+VM8ZOAxAVfGT7Q+j/j0MM5vsRpwAaRS2vr+y+MFvvVD84PfaOQ3DAGyy689F9RsMIzfSRndLA1UvPkW6CYy3rn0x2R3P4jQMp6Be9wVY95cMM7ezDT/RRe3a1cSO15B26hcFSD6qqgzE0I/aSMB6sadAszlPrO9R/uSPGQ5qvbvUi6xkAIZ+1NevonYh51nr/t207HmT4aC+9zP14yM4BUMf6sfHqe99hz+R8qd+hnoeaadaoL77gOpq+jOcpKokE7EHUB3FeeDFuvBiXfQVb6in9vfPMxzUevdGI9dNoh/DSWqTEwKOfJnzpOLZx/DicfqrfvEp3K5O0k41MyvD+bqq0pehl9/1V6hmch50lr1L/WsvcSpeLErVC79hOKj1v4StG0UfhhS10YBauYvzQK1P6eM/BFUGUv/6SySajpN2qiPVjvgsfRhS1Pc+jGoB50Ht2tVEq49xOup5VD73a4aD+v6dqkovo6rg2ds4DxJNJ6h6/jcMRuO214nVVZN2yiKiHZM5ydDUKCp6M+fB0V//CD/ZzWCoKlX/+STpp0aN3sRJhrwRc1AKGGZNJZtofXsnQ9G0YyPxEzWknWNWqCo9jNrkYlCGkxfrouzJnzBUqkrNmv8g3VTtYminhwEpYphVPPsYyfZWzkbD1nW4kQ7SS6fjB3JJMVh7AcOo8+gh6l9fw9myrsuJTWtJK1VRnzmkGIWpDBP1fUof/yGoci6Ob3wZVEknC1NJMaDjGSY1Lz9DtKaCcxVvqKf93X2kk7H+eFIMMJJhEG+oo+qFVaTL8U1rSSdfdQQpBtUQw+DoE49g3STp0rxrK148Sro4jgmRYgBLmjW88Xva3tlLOlk3SVPJJtJGxJJiEBMjjdxIO+VP/Zzh0LjtddLFT7oxUgxoK2lUvupnuF2dDIf29/aT7GglHZxQqJUUA1LHIFlrUQbWdmA3Ddte438TQAABBBAQ+hAGRZWW3dtIB1XqSQkI5phil3AG1lruL/457ZEY//T3dzE+P4/+wmPGMf87P+Z/EFKEPxAQThIwoRA9ir79I1BlMMKjx3LuBEHKSQlgvEP4nFYy6fL14l+wbssuetz02fv4yuc/zp133EAoGKCXk5FFtPYYg9Xd2kCPcN54BkVh5OyLOGdCVIKRSlICSOgtSDKQxuZ27v2HR9l76Ci9ovEE3//FM6x6fh1f/PTNfPKjy8jOyiQ0egxNJZtpKtnCcJj9hXsxwSBDYa3ltS17eOfdMv72nk9hjCFlHzLBJyUgSd2pjrioBuln85v7eOCfH6elrZNTOdHUykM/+S3/8thzXL98ITcsX8hVf/lNUEvTzq2k0+zP30vB9R9nMKxV9h8qY/2W3bz82nYaW9rpUd/QwsP/eA/BYHibiNAjQDQRkVGh7ar+Mk5qaGrl+z99hpc37GAwYt3d/Ne6bfxu3TYcY5hXOJWrE1nMz4iRDi9E80luOMYFFauZUjCO/DG55ORk4WDw1CcSidLY0k5VbQOHj1ax/1AZXfEE/b28sYSW9ghfu/v29ZwkpNhE+9+p+o80NrXx62de4ZkXXyfhuvQwIiiKtSACRgQFVJXTcUS5e0wr8zPjnItn23PZGMmhPxFSBFRRhkJa4k2HJ9ZVH3NJCZCy6ulnV+8+WPf998pqnDmzp3PNVQvooVZRAd9TMsLg++C6EAg6gI+Ig7VKIGA4VlVHWUUNyvt8FX7Zksfn89qYGkpyNkrcsTiXXc0NpIhQXllLWUUNiKBKijJUin2+rvqYy0kBepi5tT4n1o8ckXPTpq07sYAqgyICapUZUydx3bLFiCrGMRyrqqO0vIpfteQhDJ1y0pad/IEqs2ZM5vrlV4EqIhBLJDlaXkV9YzOO46CqnEnCDf4bfQgnTbtk5U3BUPIV0kGVGVMLuGDWNKwq8USCnXvfIel6pI0qmeEQhbOmM3H8GHzf8j5FRFCrBEMhPN9HfZduV/HV7nzj1R2LKys300s4KTD/MpnmjNsryHzOgghY35I/ZjSTC8YzJncUoVCIZLKb7KxsFl5xCQcOHKa5rR0siAHHOPjWJxwOknQ9GpvbqKiqIxKNImI4WyKCquK7HggEwyFCJkA4y3xiz8YXX6QPoY+pl3/01hDe7xgEVSU/L5eLLyok6Bh6iDE0t7RRU3eC5tZOPM8lEAzSQ1XpTwQEwfU8Ao7D+Pw8ZkwrYGRODmotCBw6coza442ICOfG7Kn0Wei9vVbpI0AfsUT1S8HgxI3iyIc4BccYFi6Yx6gR2YDQ3NLG9p37SHo+p+IEAqgqA1EFRXEcBwVONLVyoqmVXgJ87o5b6IrGiMYSHK2opryiBkQYIk3GE1/z3t2g9CP0M6Xo2gvDgex9QJgeqswtnMGMKZPwrWXX3ndoj3QhAoKgpKiipN81VxbR1NbJ4aMVqCqFM6cyZ8YURAxbS/bSGY0xGKr+qvLwlL9gx6/oT+jv9tuZVRa7LxDg4aWLFpCdmUEymcQ4BmsVARQLOCjvM6KoVUSEHj5wtKySmvoGEGGoFLhpxVW8d7SSqtrj9DU2L5eii+bQnXQZNSKbg++VU11/nIEI1HZ1ZRcdP/J8K6cgnMLd93zFXLH42nVHSyuv64onKK+qpbyiBjEGVeVMHCMUzpzOtMnjQZWE67HzrYMkkknOJOA4rLxxGZve3ENrewd9BRyHlTcu5/mXNyACqHLpRYVcueASXt24jboTTfTj+9Z+pGLfuk0MQBjAvKU35yei/i4xZjrnKBwKseSKS8nMCHO4rJJj1XWcSu7IHK67djFr1m2h23XpS4DbbrmONes20+169LrmyiKq6hoZm5dLwYSxbN25j/bOLnq4ycR9Eqn4QWVlJQMRTmPCrI9cnJMbeAMYTTqoMrdwJrOnFVBaUU3psWp6zZ09nakFE1i/pYT+FFh54wq2vLmTjkiMXpdfOpdorJvDZRX0EOCaxZeRGQ6xedvbj3eM9b5c+8oaTsfhNLrajjVOnFH4hu9zBxAmRQRUwXoWtRaL4DgGYRBEaG5tp7SimrGjc7l64Xyam9tZumgB8XiCHXsO0J8RuO3mFWx+8y06IlF6zb+oEAEOHi6nr6ra4zQ2Na1+4tEHvvjIfd9QzkAYhE996atXjcoZvTZgzGirihEwThAERC1J1wUMxoAxhtb2CAcOHSHpeigDK5iQzyf+7MOsWr2GjkiU/jJCIT56wzJe3bCNrlicXpfOLSQUNLx18Aj9+RL87fjM6BdKtm7wGARhkBbfcvvFTfWda0TMdE5DVckbNZKii+cQCgYQMZRVVFNWWYuI0CM7K4PlS66gsamV3fsPAUJ/UyaO4/KiC1mzfiu+tfS6/JILAGXPwVL6s+r+oK3KfrOtZaNlkIQhmHHhsnwysp52DNcxWKoUzpzKzOlTCAUcfN+SSCTZsmMPvlr6U4VrFy3A8z127DlIX1cvLKKto4t3S8vpJxpL2rtDGa3/Xrl7N0MhDFHBkmtNOJH5dSPmQSDMIMyYMomL5syksyvKm7vexqpyKuPGjmbpwgVs27WPxpY2eglw04eXcuhIOVW1x+lL0d3GDd159MBLRzgLwtm4/XYmVMcvzEqYn5qA+yFOIRQMsGRhEVkZGVTU1PFeaQWIcCrhYJAVS6+kIxJh++4DiPBHeaNGsGLpItZv3k4kGuOPNNDRnbTFMXPiJy0H9nicJeEc5M6YQzB/zq0jfa9YkPkoFM0rZNL4fJKux/bd+4l3dzOQjFCIa6+6DBQ273iLpOvxR6osvryIzIwQm7a/RR/xOP5j3SbwUPPuVxo5R0IaBJYslWmJSTd+8uZFX92xd//19Q1NDgNRZea0ycydPZ3uZJI3Svbheh59TRw3lsWXXULJ3gMcb2zhfVLneYEnWqIj/jWyIHmC554jHYR0Gnkr4yc0TM4MmDska9StjsoSgaAIzJs7m4IJ+QhCeVUtpeVVIEJf2VkZLF+ykKamVnbtP0RKXbdNvOIkEi90BXI2NB98zSPNhGGSPXEiubnTRnzuMx9bNH3yxCtWPbN2XkNL50zEFACjQTMBA7jhcCiy8sblDR0dsepX168/4pnAft/rLIn62aXthzcr/1/kXng15OQzadZCcifPkbyCQpORP5fr77qLd8rKgHmcb/8N3VaULP16cD8AAAAASUVORK5CYII=",deepLink:"galleon://"},{key:"umami_desktop",name:"Umami",shortName:"Umami",color:"",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAANSklEQVR4Ae3BC1RVZaLA8f+39z4HgQXiJBmgLWpEHRXFQhHMiJGsMTR5zJjL8Iosb2KOaRpZ4gulScXedWOIAequtGmC1mAjjSmWYyRpoGiTiEp6xgxWJ5QAOY/9XbhLW3DcoFQ+6/fjF7/4eRN0k5TSExgLhAD9AA+urCbgOFAB7BBCNNINgoskpQwBFgFxgDtXp2agAMgUQlRwEQQXIKXsCawHkgClsrKSwsJCSktLqampobGxESklV4IQAk9PTwIDAwkPDyc2Npbg4GBa6UAusFAIcYouCLogpRwIFAFBu3fvJjU1lZKSEtooioKfnx9eXl4IIbgSpJQ0NDTw1Vdfoes6baKioli7di2hoaG0OgRMFEIcpBOCTkgpBwIfSin7rFq1ivT0dHRdJyYmhuTkZKKiovD29uZqcPr0aUpKSsjJyWHTpk0oisKyZctYunQpQoivgTuFEFUYEBiQUvYEPpVSBs2aNYucnByCgoLIy8sjIiKCq9nHH3/MjBkzOHToEMnJyWRnZyOEOASMFEKcwoWCsfVA0KpVq8jJyWHMmDGUlZURERHB1S4iIoKysjLGjBlDTk4Oq1atolUQsB4DCi6klCFA0u7du0lPTycoKIhNmzbh4+PDtcLHx4dNmzYRFBREeno6u3fvplWSlDIEFxrnWwQoqamp6LpOXl4ePj4+uNKrPkP/9J/Ib2tR+g9Hvfe/kKe/wfF6BkhJByYz6p1xKIPDwHYGe/YS0HXOIxSUXwejjn8QVA2kxP7nJ8F2BkNCIHrdiDJyPMqA22jPx8eHvLw87rjjDlJTU9m2bZsCLAIepB2NdqSUnkBcZWUlJSUlTJw4kYiICDqwncH+0qM4PyrkHOfWtxCBQ1AG3Y785iv08u24cn6wEXP6X1EGhyF6B+DYsA4jzg/A+VEBpvkvIfrcjHbfTOx56ei7P6BTbz+POnYypj8+C+YenBMREUFMTAxFRUVUVlYSHBwcJ6X0FEI0cpZCR2MB98LCQtokJyfjyrE5D+dHhXQgdeyvPAYOO6Y5mQjPnpzHYcP+9Ezkfw6jTXkUbfJsOqP/+1Na5v8Wx9+zEH63YE57A/O6f6COmQSaCSPOHe9if3EBrpKTk2lTWFhIK3dgLO0odBRCq9LSUhRFISoqClfqyPFgMuNKHvsCx4ZMhG8A2py1GJGnrdhWPICsPY42Yzna7+fTqeZGHH9ZQcu8u3DueBfl18MwPZaFW045ptlrUEKjwcOL9pw73kWv+oz2oqKiUBSF0tJSzgqhHY2O+tGqpqYGPz8/vL296cBhR/jfinZ/Co6/PY8rR+HLKCGRqGMmIf/9KY5Nr+FK1lmwpcVjXvkW2rTHEb39sWcvAYcdI/I/h7GvT8Hxv39CvScRNTIe9d7pqPdOB92JtFSjWw4h6yxw2oowmWnP29sbPz8/jh49yln9aEejIw9aNTY24uXlhStHfjrq5Dlof5iP8+Mi5IkjdKDr2J+ZgzmzGC1pObrlEHrFh7iStcexPXE/piX5qPckIvoNwL4+BfnNV3RGfn0Mx+sZON74E8qAESghd6EMDkPcOgT15oF0xcvLi8bGRs7yoB0FA1JKhBC4kk3fYc9aDOYemOY9B4qKK/ltLfanZ4LDjjk1G+XWoRiR9XXYlsThLHkbZXAY5ue2ot5xPxckdfSDe3C8tR7b8j/QkjiElsQh2B4dj23lVPQDn+BKCIGUEiMK3aSX/RNnydsog0ai/f4RjOiHKrA/MwfcPDAt34DoNwBDtjPYn5+H/cUFCM2EadGrmNNeR/jdQnfIBiv6kUr08u04S/5Kdyj8APbsJciTNWhTHkUJHoMR565i7C8vRHj/CvOqvyECB9MZ59aNtDzyW/TPtqGE3o3bi9sx/fdTiBv86DYp6Q6FH6KpAXvmbHA6MC16FeHbFyPObW9hf2khwvtXuGUUoAwJpzOy9ji29GnYn5qBPPkl6oQk3LI+wTT/RZRBoVwqCj+QXr0X+6tPIHr2xrwkHzy8MOLcuhF7ZgqYe2BesRE1eipdcZa9T8u8KOzPzkVaqlHvSsD8dBFur+xEe/AJlEEjQdXonKA7NDqh6zrnUVTac27dgOgXhDY5BfPjr2FbnQh2G66cHxch67/G9HgOprnPoAy8HXt2GtjOYEh34vzwHZwfvoMyZDRq9FTUsN+hJcyDhHnQ3IheXYF+ZD/ScghZZ0HW10HjacTNA3Gl6zqd0ehEfX09rsSNfXHleH01orc/6h33Y1r4P9jXPQROB670z8uwLfodptQ/o949DeU3o7A/90f06r10RT/wCfqBT7CbUlGGjUEdEYUyZDTK4NEowWO4GPX19ZhMJoxodKK2tpa6ujp8fX05R42IwbEhE3Qn39N17M/NQ3h4oY6eAItexb4+BRx2XMk6C7YnJqM9+DjapNmY17yHY1M2jo3rofk7umRvQd+zDX3PNv6fmztKv4EI/1sRvv7Q0xfR60bUsZNpr66ujtraWgICAjCi0AkpJcXFxbQnAvqjTU7hPA4btqdnopeXoIbfh/nJfOjhgSGHDUfeKmxpsciTR9Hun43by/9CvXsaqBoXraUZvboC50cFON55CcdfliOPHsBVcXExUko6o9CFrKwsXGmJT6JNfQxMbnRga8H21Aycpf9AuS0K8+oChG8AndE/L6Nl/jgcbzyFcPfE9HAmbi99hBo9FUxmusXkhjb1MbTEJ3GVlZVFVzS6sHPnTgoKCoiLi+N7QqBNeRT13uno5R8iv/0akHzvzHe0UfoPx+3lf+Hc/QGy9hhISWf0w/tQhkYg/G7BNPcZtAefQN+1GdnUQNcEoteNKCPuQvTsjauCggJ27txJVzQuYPbs2dx2220EBgbSnujZG/WueLpk7oEaEUN3CR9f1Hum82PU1NQwe/ZsLkThAurq6oiOjqa6upprRXV1NdHR0dTV1XFOjx49MKJwEQ4fPszIkSPJzc1F13WuVrquk5uby6hRozh8+DDtBQQEYETjItXX1zNz5kzWrFlDUlIS48aNY8CAAXh5eSGE4EqQUtLQ0EBVVRVbt24lNzeXgwcPYuT222/HiEY3HTx4kMWLF3O5nDhxAqvVytChQ/kxYmJiMKLwMzBo0CAiIyMxovAzsHr1ahRFwYjCdW7KlCnEx8fz+eefY0ThOjZ69GhycnI4deoUKSkpGNG4Tt13331s2LABk8lEfHw8R44cwYjGdcbX15f09HQeeughmpqaiI+P5/3336d///4Y0bgO3HDDDYwePZrY2FgeeOABPD09qaioIDExkf3799Omb9++GNG4AqKjo0lJSSEkJAR3d3e60qdPH3x9fTlx4gRGPD098fb25pyqqioyMzPJzc3F4XBwTmhoKEY0LiMhBC+88AJz586lzZdffonVaqUrVquVzkgpsVgsWCwWysvL2bJlC7t27UJKiauJEydiROMyWrBgAXPnzmXPnj0kJSVRWVnJ5TB06FDGjh2LEY3LxN3dnbS0NE6ePMn48eOxWq1cLhkZGQghMKJwmYSFhdGrVy9yc3OxWq34+/uzb98+9u3bh7+/P5dKYmIikyZNYu/evRhRuEz69OlDm5qaGtpER0cTHBxMcHAw0dHRXAqRkZFkZWVhtVqZM2cORjQuE4vFQptBgwbRpqioiM2bN9OmqKiIn1pCQgL5+fkIIUhISODYsWMY0TAghOCnVlZWxsmTJ0lKSuLZZ5/l+PHjTJgwgZ9aQEAAGRkZTJ8+nYaGBhISEigpKaFfv34Y0eioiVaenp781Ox2O4sXLyYvL4/t27fz8MMPs2XLFpxOJz+GEIK+ffsSFhZGXFwccXFxuLm5sWvXLqZPn05VVRVtPDw8OKuJdjQ6Ok6rwMBAvvjiC35q+fn53HTTTWRkZLB582ZaWlpobm7mx/Dw8MBsNnPOvn37WLduHW+++Sa6rnNOYGAgZ1loR6OjClqFh4dTXFzMpbBmzRree+89Zs2axYgRI3B3d6crw4cPx+FwcODAAVxJKWlubsZisVBeXs6WLVvYu3cvRsLDwzmrgnY0OtoBNMfGxrovX76cS2X//v088sgjXIwTJ05gtVoZOXIkP0ZsbCytmoEdtKPQjhCiESgIDg4mKiqK60VkZCTDhg2j1btCiO9oR+F8mYC+du1aVFXlWqeqKmvXrqWVBDJxoeBCCFEB5IaGhrJs2TKudWlpaYwaNYpW+UKIz3ChYGwhcGjp0qUkJydzrUpKSmLZsmW0OgwswICCASHEKWCiEOLr7OxsVq5ciaqqXCtUVWX58uW89tprKIpSC8QIIeoxoNKJlStXfrNixYoiIcQ9kZGRN0yYMIHq6mpqamq4nBYuXEhzczOvvPIKFyMyMpKNGzcybdo0hBCHgfFCiC/ohOACpJQ9gfVAEqBUVlZSWFhIaWkpR48epampCSkll8qePXuor69n3LhxuBJC4OHhQWBgIOHh4cTGxjJs2DBaSSAfWCCEqKcLgoskpRwBLAJiAXeuTs3Au0CmEOIzLoKgm6SUnsCdwHCgH+DBldUEWIAKYIcQ4jt+8YtfXKz/A/OhBgM5KLZoAAAAAElFTkSuQmCC",deepLink:"umami://"}],fe=[{key:"kukai_web",name:"Kukai Wallet",shortName:"Kukai",color:"",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAHNklEQVR4Ae3BbWyUhQEA4Ofevg0f7d0RsAllEJSpQVy1K3SQIQro2HRoVIymS/Zj6w8xfk6NWzRzoJkO48d0MUaTZv6yMRFNxM2EIX4wIthSUJERgrCmjHZWCXdXapsWbgk/iLbvlXuPsgHjeZx11ln/1xJiaGjMV+NazMU0lDs1DKADm7GmuSnRqUgJRWhozF+AR7EMoVPbIFbjoeamxOeOI+E4Ghrzy/EMxjq99OGe5qbEi0ZQZgQNjfk/4HGETj8hltbUrRi3fevKdQooU0BDY345Hnf6u6ymbkXX9q0rt4gQiNDQmL8Azzhz/LGhMf9dEQLRHsVYZ46x+L0IgSEaGvPVWObMs6yhMV9tiNBw1yJ0EiQSVJ1D9WQmTmDsGEf19XPgIJ1ddH9JPu9kCHEtXvINoeHmGkXl5cyppb6Oiy8iWWlE2Rw7dtLSRus2BgaMprl4yTeEhptmFIwfz9VXsWQxyUpFSyWZV8+8enI9rF3P2+vo7TUaphkiNFy5IowZwyWzSCbZ287edsdcMZ+Gm0glnZBkJcuu40eLeOU1PtjomPOmM+Ncsjk+/Yy+fsUoN0SoBOfP4L7bSacds6mFtev56Y+ZXWtUpZIs/wX13+cva/nJlfxgtmMyGZ56nt17xBaKacwY7ruddNq3zKtnXr2TanYts2sNk05z3+3c8yD9/WIJxXTJLNJpJ+RQL51dZHOOSiWpnkzFeCVLp7lkFi1bxRKKadw4Jen+inc30NrGvv0iTZ3CnDoWLaBqktjGjRNbKKb2DrH0HOLV13lvA4ePGNG+/ezbz5q/snABt9xIZYWitXeILRBTewd/36QoO3fxwMO88z6Hjyja4SO88z4PPMzOXYqycTPtHWILlODFP/PxdiPa8jGPPc3BjJIdzPDY02z52Ii2fcoLTUoSKMHhw3T8S0E7d/HsCwwOOmGDgzz7Ajt3KWjffo4cUZJACcrLWThfpJ5DPPcig4NGzeAgz71IzyGRLv8h5eVKEijBnFoqK0V69XUOZhQlnSKVVJSDGV59XaRUkjm1ShIqQX2dSN1f8d4GI0qnuGEp8+pJJR2VzbGphTfeIpNV0HsbuO4aqiYZpr6OD1vEFogpkeB7s0R6dwOHjyjo/BmsWsmSxaSSjkklWbKYVSs5f4aCDh/h3Q0iXXwRiYTYAjFVnUNlhUitbQpKp7j/TlJJBaWS3H8n6ZSCWttESlZSdY7YAjFVTxbpUC/79ivohqWkko4rleSGpQrat59DvSJVTxZbIKaJE0Tq7DKiefWKNq/eiDq7RJo4QWyBmMaOESmbU1AqSSqpaKkkqaSCsjmRxo4RW+C/IJFwygrE1NcvUiqpoEyWbE7RsjmyOQWlkiL19YstENOBgyJVTzaiTS2KtqnFiKoni3TgoNgCMXV2iVQxnqlTFPTGW2Rzjiub4423FDR1ChXjRersElsgpu4v6Tkk0pw6BWWyPPknsjkFZbI8+ScyWQXNqRMp10P3l2ILxJTPs32HSIsWUBYoaPcefv071q4nm3NMNsfa9fxmBbv3KKgsYNECkT77B/m82EIlaGljXr1hqiaxcAHvvK+gTJaXX+HlV0glHZXNKcrCBVRNEqmlTUkCJWjdRk+PSLfcyIS0omRzZHOKMiHNLTeKlM3Ruk1JAiUYGOC9jSJVVnDXrYShUROG3HUrlRUifbCRgQElCZSgLGDqFAXNvJC7byMMnbAw5O7bmHmhgqZ+hyBQkkAJljdSW2NEsy/lwXuZkFayCWkevJfZlxpRbQ23NSpJIKbp05g/V1FmXsgTj3DlFZQFilYWcOUVPPEIMy9UlPlzmT5NbKGYpk8TS2UFjT/numt4dwOtbezbL9LUKcypY9ECqiaJbfo02jvEEorp66+VpGoSN1/PzddzqJfOLrI5R6WSVE+mYrwT8vXXYgvF9MkOMhnSaSWrGM/5M4yqTIZPdogtEFN/P089TybjWz7awiNPsGWbk2bLNh55go+2+JZMhqeep79fbKES7N7Drx6k5mJSSfb8k73tjtq5i8vn87ObSCWNimyOV17jg42O2rmL86Yz41yyOT79jL5+JQkNN6AIff20tIn0wUZat3L1VSxZTLJSSXI9rF3P2+vo7fUte9vZ2y6uAUOEhuswCnp7Wf0mb77NnFrq65g1k1TSiLI5duykpY3WbQwMGE0dhggNtxm/NEoGBviwhQ9bSCSoOofqyUycwNgxjurr58BBOrvo/pJ83smy2RCh4dbgeYRGWT7PF9180e1/YRBrDBEYorkp0YnVzjyrm5sSnYYIRPst+pw5+vCQCGUibN+68kBN3YqvsNSZ4Y7mpsTfRChTwPatK1tr6laMw2VOb6uamxKrFFBmBNu3rlxXU7fi37gKodNLH+5obkqsMoKEIjQ05i/Ao1iG0KltEKvxUHNT4nPHkRBDQ2O+GtdiLqah3KlhAB3YjDXNTYlOZ5111llF+A8aUDCF69BprwAAAABJRU5ErkJggg==",links:{mainnet:"https://wallet.kukai.app",delphinet:"https://testnet.kukai.app",edonet:"https://edonet.kukai.app",florencenet:"https://florencenet.kukai.app",granadanet:"https://granadanet.kukai.app",hangzhounet:"https://hangzhounet.kukai.app",ithacanet:"https://ithacanet.kukai.app"}}],de=[{key:"airgap_ios",name:"AirGap Wallet",shortName:"AirGap",color:"rgb(4, 235, 204)",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAALT0lEQVR4AeXBCXiU9Z3A8e/vfd+5kskBARYIkAsCSIRyRe5AKbhQ8CqWemGpVnF1qVKPrdoSrSiW6qq0lhZXu7UrskVQSq0VpAIGwxGgHAE5RBMIgUAyk8xkMjOZ+e/zZh9cauXNTMjx7MPnI0qpRkC4PCkDEEDj8hTVuMxpXOY02om3xsfix1/jlumP4qmu48saAiHumv1TFj/2Kp7qOtqLQRsLhxp549U/8x8vvY2vth7TkUNljBwziAsdO3KCnUWl7Cwq5U+rP+KO+ddx8x3TsNtttCWDNhKNRPnjW5tZ9twqTp88xxcUIMKXiQZKKUQEf12AlxatYOVr73PPgzcyY9Z4NE2jLeiFhYULAaGVNDZGWLdqM4/8y0usXbkJf12A84J9u1Je+M/MnjSCPrqdC3Xt1okrhmRz5FA5NWdrMfnrAnz4l538Ze3HJKUkkNOvF5qm0YqUQSs5frSCdX/YxDsrN1F91ssXFARzu1L5/dFUT87FyoRvDGP85KGsX1fM8hfXcPRgGSLC58dO8eP5L/PiohVc952JzLxxAr0zu9MaDFpIKcXBfcfZvH4XG9/bzpHSMkSELyjwj8rgzK0j8YzNBEVMRISpM0czZcYoPtq4h9d/vY4dRQcQEc6eruGVF9ew/IXVDLwyi0nTRjLhG8Ppf0UGCC1iEKNoNMqxwyfYs/0TSj4uZXvRAWrO1SIimEQEUyTZSc2MQZyd9TUCmZ1AAYq4iQjjJw9l/OShfHr4BKt+/wHvrt5CrcePiHBo/2cc2v8ZL//sv+nSLZWR4/IYPmogw/IHkNm3JyJCLAya8Unp57z09Bvs3naIQH0QEeE8EcEUdTuondiXmin98Y7JQmlCE8VXqo1GiEd2bi8efvJ2Fvz4Vor+uof164rZtL4Ef10AEeFclZf31hTx3poilFIkJrkYmj+Aex+ezYC8TKwYWAjUB5k3+ym8NT5MIkITpQjmdKVubBbe8dnUDeuNEmK2xF9JgT2JBNGIh2HTKZg6nIKpw4k0RigpPsiWD3ax9cO/8enhk4gIIkK9r4GijXv4W8lh3i1eijspgYsxsFBSXIq3xocp3D0ZX34GvhG9qR2VQaiLG5SiJf4a9pF5di/9dCeCYBLAEP5BZzGY60pjhiOVC+mGTv64PPLH5fHDhXCmsprizfvYufUAO7aWcrriHD5vPTu3ljLx6hFcjIGFqsoazit7Yhq1I3rzBaW4FFXRCFVRP7FYHfSwPLkPd7q6cjHdunfmmm8XcM23C9j5cSl33fhTTGcqa7CiYcHr8XFeJMVJRyr0nSJWKalulKJJrdeHFQ0Lfl8DTaKKcKcEOtKpaJhGFLHo3CWZaDSKyVdbjxUNC746PyZRikiKk46Ub0vAQIhFUkoiIjTx+xuwomGhIRDCpOwGEYdBR+mmGSxLyiBWdrsNh9OOKRgIYcXAQsAfxKQS7CACKOI1yeZmiiOZJNFpic6aznR7KqmaTjwS3S481XUE6huwYmAhEGjA1JhoB6WIR4JovJmSxUxHKh0h0e3CU11HQ0MIKxoWQsFGTMppgFLE49dJfZjpSKWj2OwGpnAwjBUNC4H6BkzKaQNFzHJ0O7e40uhIDocdUyAQxIqGBb+/AVPEZSMeo2xuhI6V6HZiqvc3YEXDQjAQwhR12vj/xuGyYwo2hLGiYaEhEMQUddmIR3HYh6JjOZ0OTIH6IFY0LAQCQUxRp0E8jkVC/FfgHB0pIdGJKRBowIqGhXCoEZOyG8Tr7roy3gnW0FHsdgNTONSIFQMLkcYoJmVoxKteRbnO8ykFNjdTHckki855OvBdVxdcotFWdEPHFI1EsWJgQSmFKaoLLbUp7GNT2MeFbnd25p6EbrQlTdcwKYUlDQsiNNGiitY00HDR1qLRKCYRLGlY0G06JglFaE1/CnqI0rYawxFMuk3HioEFl8tBqCGMVh+iNW0J+7nec5Q7XF1wi8bFuEVnmC0BAyFefl8AU0KCEysGFpJT3XhrfOjeBlrb2qCXtUEvzemr23krNYfBRgLx8Hp8mJJTErGiYaFzWjIme5UPhA5xNBLiW55jNKKIR1VlDaa0rilY0bDQPb0LJvsJD4LQUY5GQuwO1xMrpRQV5VWYuqd3wYqGhcycHjQJNeIo99CRFLE7WX6GQH0DpozsHljRsNA/L5MmIiTuq6CjZOt2htkSiNW+kqNomoYpd1AGVjQsfG1Ef5RSmJJ2lNERsjQ7q1NyMBBitWPrAUxKKYaMyMWKgYXUzknkXpHBkYNlJG8+iqirUUJcrrYnMceZRrKmc56GIPwfAYR/lCQ6I+2J2BBiFY0qNm/YhanfwD506pyMFYNmFEwdzpGDZeg1AZI/Po53TBaxusOVxvLkTIT2U7xlL+fOeBGBgqnDaY5GM6bfMA6lFKZuK3aBEBMBFrnTEdrXG6/8GRFQSjH9hnE0R6MZmTk9GTF2ECZ30XHce08RC7do/JNmoz3tLTlM0cY9mEaMHURW33SaoxGDO+dfj1IKBHr9fCOxqFNRDjU20G4UPPfE64gISinu+sENxEIjBleNy2NUwWBMrv2n6LLuALG4p/Zz/CpKe/jjqs3s23UU0+iJgxk5dhCxMIjRQ0/MYfaUR4g0Run5/Id4x+cQTnFi5cOwj4Fn9/MtZydSRScWugiDDRffdKSgI8TCU13H80++jkk3NB4snEOsDGKU3a8Xc+6ZyWtL30H3Buiz6H2OLbkWlMJKeTTMC/VniFe+4eLdTrmkaQbNWfSjV/DW+DDddvcMsvv1IlYacZj3wCyy+/fClLzhMF3X7KWtbG8McG9tGc1Zs2IjG9Ztw5TVL515P5xFPDTiYLMbLH55PnaHDQTSn91A4qEztJXVwRrqVZSLKd37Kc8+/ltEBJvD4JmX/xW73UY8NOLUt39vHnv2TpRSSChC9v1vYT/toy2EUdSpCF+lsuIc989dQigYRinFj57+HrkDM4iXRgvMnDWB2+bNwGRU+ek3byW26npaW2/NTjfNxpdVn/Uy76anOHvag+mmO6dx3exJtIRGCz3w+C1MuXYUJntZDbnfW4HjVB2tRYBnk9IR/l5FeRVzry+k7Fglpq9PH8mDC+fQUhotJCI8/eJ9TJgyDJO9vIb+t/2O5F0niJ0CFKAAhQAacKXhZFVKNjc507jQjq0HuHXGY5Qfr8Q0umAwz/xyPpomtJTBJdANneeWL+DR+b9g/dpi9JoAOXe9SdXtV1ExbyxRm8ZXydBsrEjNZoiRgPC/BLCJAILO3wuFwvzq53/gd8vWoaIKU8HVw/nZsvux2QwuhcEl0g2dxb+cT1bfdJb/+2qUUnT97TZSNnzCyYe+jmd8DijFhZ5ypzPa5iYWWz7YzZKF/8mJz07TRGDuvddw78PfQdOES2XQCkSEeQtmkT92ED954FdUlFVhP+Eha/5q/CN6c+q+8dQN6QmKJr10O83Zt/sIv1i8ku0f7UdEMHVPT6Pw+Xnkj82jteiFhYULAaEV9OjVlRtunkxjJMKB3ceIKoX9VC2d395L8p4Kwj2SCaan8l1nGpm6g69SUnyQpx55haVPr6CivAoRQdc1bvn+NJb8ZgGZOT1pRcqglTlddn7w6M1cf9Mknn/y92x6vwQRIXH75+Rs+4zAlT2xLVsAmUlc6PSpczx89wvsLTmCiCAiKKUYN3koC35yK1l902kLBm2kT1YPXnjtIXZvP8TSZ95k9/ZDiAiu/adwVHghsxcXqjx5jn27jiIiKKUYPDyX+/5tNiPHDKItGbSxofkDeHVNIds+2s+rS9/G6/HRf1AmX9ZvQG/652XidruYe9+1jJk4hPZg0E6uGpfHVePyuJgEt4sV7z1De9O4zGlc5gxAAVEuT+p/ABopEAN9AKm/AAAAAElFTkSuQmCC",universalLink:"https://wallet.airgap.it",deepLink:"airgap-wallet://"},{key:"naan_ios",name:"Naan Wallet",shortName:"Naan",color:"rgb(129, 100, 100)",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAZfElEQVR4Ad3Be5BeZ33Y8e/veZ5zznvd+0VaaVfWfSVLtiUbY4PBBsaUy0CCE0JDadopCdBJ2iQ0w0ynSSedyaQzzaTJtJlJ/oBShoRJS2nTlNImxNg4gSBsLNuydZdWu5J2tau9vfvezznP8yuvPLJLhtYr22khn4/8yscarpnG0mitStluiBYsJndS8GUsDRmoWsltJB2vSCYikZOO74gJGVEwIlJGoiAejw9G0IjUd6XolSiyaAyZ74giCJkJmsWCxuCcqjGqKmLwqM8QzVSjrrVOjQhWYiWFPFc6BpxxKsYjJqgYi+0mGvwGIQkaJMJqot0cjeNMS5GobadstFAvJbxLteva6tsBDVZL1XGNRdWVvJWosyJ5XhdfNQwSiwYrmW8QF61keZCcTDyR5KISdz1YFQTJrGAUcagR1oYNy3uQ9Z2xWZnE1Cdy0xhT3xwRbQ4IaT/4kiU4UAMYBIPQExACSEBsRjBNpVDLKa6JGbgurrQYU5lHhufQgUtWRy8E37+ekStO9LtE8SqpR1wQsJrnuUqwGseWTrtOREIICWnS0aTVpVhflzjpx+WtZVkLHcn7DP2dWJJiJKHUFtOxmDQzrWIQkyLQhciKqhHj1ajMH4rszNuU2ftDWLgDOlsEhO+yhhuU71I2wwAGFMhjoAzpGGygLIIBw8tU8UL5qpitz2J2HAvhtsfVbzuptqPGBBUfyL2RzJlQ7AqmXNZ2pyUmcwxKzHoJ1jttKu0Wbt2komVhsB3LUB5LppkQCmKDiisUJc86YiIrGlKh2xzAPfX3nXvm70J9F98lwv8PFppTRs5PoeffZwTUVi8qd/2+Zvd8TszAauLikGapwUVK16uLihqHNqVugjhYL2Xa7Hix9x38eVeQRExuxcuGaDkRUSvWOOlKR8RYwQWH/OXHnP3i50Vm3gXpID9ghHRQmHvQmqf/HiKp2sln1IvmWYq1ESY2SEFIsxa5dwiO3Cv2wYO/FEU4CT6VXIxEhViMFfHWS+pVMCtbhD/4A+GZj4Iv8gPPF+DiO5TTDwRue8yHcoPIY50B4+mmHXwOTmJciDHGODGSSqVUoiAFcZmVXHNJQ26cub7XyGe/Clffwg8bXXiTMZ/5qomX9ucGyTQVmxlxGkmxkGBCWwTERFEqSbGAEKRbSqRl2uKDiNX6DpHP/jE0Jvmh1dpm5LP/1bCy2wcnbRckK1YkUielUh+FomBsFNGVVDpRapzPxKgTtFkVPvcFaG/lh157i+H3vwD1PpMjziOduGtatMVbFSOFSEBE8kysqFhjxPLlX4fVg/yNsbbfyh//KyQXa1UIuSCIOCNONWCMiBgkhFQMFx+Ekx/hr0EpVkZKnoFSoBwHYqv05EFopkKtbbneNDS6htednv7bmNP/KWP/o8aAESNiFae5kUxUjLOEFBeFP/k1EYTXgQDjfZ7psZSdQzlDJY8Rvq+gioiAQq1jmFmNOLMUcaXmUOV1of7Pfi3P9z1hIpMFCRJlRu3bjn4qMV6NEETsifcbOf4xXiMjcGA85T0HW9y/o0NORkeFgQRE4GrLsjZ+gOt5QjWrMev7aN/xdhZDhXh9nv4CbO3zHNqaMj2WogrXmw5VXhORzojYgbOiW05GwWO8weV0RFB8biWKjn2C12jHYM7b97YZKXsutyNmd9zHnqOHERGe+6M/QlD2PPIeqtUSqvDof/4T3vTuBymVCtRLjmfOn+N2U6cYGXqGSoGH97d5w1SXxy8UOXc94rUwfOsTWTjyJZWAulQc4kUtAkt7hWv38ipFVnloT5s7J1JCUE7LBHsfeQ+VSpGe4ANh6iBH7t6PtQZQLp+b5fCb7qZUKhDSBtUdQ+w9vI/nvvU0924H4WUDxcCPHmpyeiniq2dKdHLh1RCuHxUWDoiZOGmswbjcYiQRZ0+/FxBehb5C4MNHG9w1keK9crayjzsfeYRKpUhPSOucPD3DXUf3Ya0BFN9Zop5njG8dADJMlAEZW+67nYnJbZxd5fuaHsv4yD11hsueV0ki98J7rcQkPhIDiYRgQWce4FUYLnk+fLTBWMXjg3KmtIcj734TRjaADmiTuSvzTG4fxNk6mtdAN5idX2fXbSOEdIV0Yx4IvMiz9wMPk/dtpdYJ9NQ7Oaq8ZLAY+PCRBhN9Oa+Ghpm35sFIFgwmSzwqLWdk4Si3aKAY+Im7mlSTgA/Ko9cKTAz3I5KTNWqktUVW11a4+uwM5SgAns7qEqo5Z791Gt1oYSIHQVk9eY50owGqiEk5+uPvZXFkmp4vLTX4xMUVvrlQ56ZCpPzYnU3Gq55bJbJ0REwzyeNMDHgxcm0X5APcgsQpjxxuUkkCPV++CNsiZeJN9wOOqFImb7X56pePs3OkgisN0BOVivzZZ/6Y5PoipS3bQCqYyJHW6pz+91+ktbiM73S5fvwZ9j74VmbbCWvtjM/vGeDHGh3SPHBTwSkfONykEgdujS8Ll6eRIMZ5h2X5MLfo4X1thsuenr+4ooyXChz40feBCEiJkOV8/avPsa1TY2DvHsABRRC41nbsPbSHFyXU5xZ49rc/Q2nLKMngALY4zvgbpimVEkr3P8w+tQwuNPjHxvBfZtb4rUtrNLs5PdUk8N6DLYxwS0SvHbZeMCE4VBenuQX7xzIOjKf0zG5A3Q6w7859lCe28iJDbXmd1fWMidE+Slu2cINEXHj0W+jqOuP3voGe9tIi/bunuOuffIzb3v8wttAPdifY3YDjO8sZXyj0ccfcBt9R5R9MlvmiBkqx46apwZwj27rcCtWlg0ENJs0zUV3ewyZFVnnbnjY9rTRwKt7JgSHLtoce5KaNi6c4/vwieyqw6wM/So+GQP3SOdaLgxy8707EWsBQHBvDxIOM3fshbDIJlAADMgxmhPv27eXJkHFxaIChZsb+uQ1+I4r4zVNLzK93yHyg5807O5RjZfNWd3fTTOz9Rz5ZjM3jPy/S3sIm3DOZsm80o+d4e4i9D9zPvgfvB7Hc1LU5Fy5ucPTuaQqDgyCCiJD0x5w4s8K9D91LUh4CuwPIgYC4YcQOg+kHIkBAClTLFT75lh9heeYiP1V1/POJAlN9CXOdnN+9vM7PtboMNDPu7k9wBmZWIzYnaObv+7SLTBCR+nY2wRq4e3uXnit10Klpdu+eAATsTtAGhEVmLtTYtXs7/XumwAwDBQgLQIF2SygWE9AuEMBsgTAPYQ3MVsACyssSen7hPR8mdGb40qd/j1+sKKVWxtpIkf5mRrko5D5weCLlL2cLtDPhlYi0txqXOxO7ZgXSPjZhz3BGJQn0rAzsZmxsgBcpICD9BE24PLfC1I4xXmRBymDGaLXBZi3ai4tAgLDIDWYrkIHWAEVDG/V1NO9w0+joVsa3T/O5sTGWp/rY4ZWP1lI+UYh4uL9AElliqxwYT9mcvBhH3X4j1AeAiE2YHk/puVpX0uooleU5XqItemYudeiPQOo1btAaN0gfy6s5w31F2svL3KBNCEuAAbMNiOgJ7Q2az38NcY7vIUOsA4dfqPN7oxU+v7XML+/o4/NXa9w0PZaxSUZCbdiEkA6xCdbAjsGcno3KBGZjjUK1yku0Rk+7sUF+fZG4WuUG7YJu0NNNqxT6qnRWV3mJ1iAsARakBAimOELljr8FOP6qr3zoUzz2s7/A9Y6llXrwgScqMTdt7cspRspmCO0BY0yjj00YLXsSp/To8HY6iwv0793DS7QJ2sWnDXyzQWd5hZeE64CnUCghxrF25Ro3qW9AuARhnpvEOJAC3ysHXWN0ZIDhsWkm3/k+HrUxX1/u8pZmRlClxwhM9OVshtCpmuBDiU0Yq3p6luoZwxNbac9fRYzhe+gKPmuTtzvE/X28zENYZGxsBOscC0s11HtAERMAD2EWXz9L6Db5/jyE6+DnQOtsHR9C+7ZzZGuVT06PYkS4aazq2RwtGkQSNmGg6Omp5Y5yKaGybYK4r4+XaJvglzHGI9Zg4piXhA6EJZK4DbbIyJvfglgLuoHvNNi4OMflP30CW6hjYsv3l4CUQdtofoFkoMjOvTv59kwXVb7HYDGwGSI+MYJ1bEI5VnokijHGEPX1oSHwooD6BkKDEHJsqUxrYYGbVFtAG/x5kvIg/eUC8/MrIBVsoZ/lZ09Rn5tHyYCM/yMziu/Wqc9eIWQ1hu+4nZ2HDnJ8xaHKS0qxshkhdKxRhM2IjNIjqhgjDB85ihgBrZG3ryHWICIYA6NHj9K3axeQ4tuLiFFelLLztiK15VUW5pZQNSBltr/9rez5ifciUuL/Lka5jdn/8ThiDC6B2971TqYOHOSkjqO8KLbKZhgTYwRhU4QbXN7B+wBBAQEEV0hYfvYUs195jJC2KESOer0FCLYQUTt/idr5S8x+5TEKSZOkuoXRcsSJ5y7SEw/dRTx4F5hBkBLgQRtA4K9ypTFu//jPYhOHiRTjYOK+e7nrkQ9wymxDlU1TVYwS2Iw0F3rGyobFxVXSTsoN0oeGmOXjL9CcX8RFgdHhPi7PLQERSD/liW089Wv/lsLQAEjO9NEjXDy1QNxqcvnyEmgdZBTMJGAhrKD5BfCnQFt8D3GI2wlEgAetYZMOLhLu/JH3c9pM0M3ZpKDGSMjZhGZq6CnGhu7KIs4I7XaXnrztGZzezdg9d7D70E6uXV+n2+ygqoAFIu755X/E0OH9IP0ICW94/09y+TvPszq7wOrKMoRlXiIxIinoBvjnydYv8bIMsRakyMs8i8f+HPEph97/Pk6mQ2xOITci2mUTVluGmzonvs1wIszNLtITVScYv/8BBg/soVweotPoMlYwnDt3lR5X2Un/vjcSlctABBJRLpe448d/ho0TJ7j4/AWajQXQNW6QhKzZYO3MBdZOncHEV0HbgII/Tb5xjNXnj5Oub/DtX/0tVJXxew9j4xZxLLzjI+9GEuEVCV2jSItNWGpYbhofjLj27HN0mh1ukCLY27HFKZA+Jg+8mYXT52iuNfA+AApmF9g7wU4BBvCMb9vC9oc/TNTY4NSJGdrNqxCWgISoMsn814+R1hvYuAS6yA1mJ65UpjK1lSuPfZO+XVO0FpZ4kQGEoaEqD77/Tl6JYJoGqnU2YaVpaWdCz0S/49qZM5TjiNXVOmgbsGB2gtnO6Pg4zbzIiEk5c3oOtAHkIEUgAQL4GfBn2blvC9UDDzFYLXPy2QvUNxbAzwLC/p/6EKNHDoEUQVMISyAVcIeJ+yZoLVynvbRMeWIcpAoyCFh64sTySpS+dQNujU0ICjOrETcNlpX8haeZv3wdtA14XqItjr7vPl74b/+d0O7SaLQgrPKyAORovgr+LLt2D2GruykXi8ycnuPKlXnA44qjmHgIMNygNdAVICZrDHDwp3+SI7/0cfJ2B4i46blnZvjT//g0ryRovOqC9q0ZyAHHKzi1GHFwPKVn//YK37m6xOCWNdI0Iy7UQIZ4UUalBGMPvRF78RRng3L03hJoFaQICD6tYyMDePDnmNyym5XyEebOPU1nvcHxa2sMlSwDsWLjhOLYGLaQoH4ZsULUvw18HXQDVyzRbLZ5/vhZXjg2w6VzGzhjeQVZO+9bd3lIGrFEDcgGeAWXViNqbUN/MZBEhmrVsXWwzPlzVzh4ewK2HzCErIXQ5q4H7+Bbf/oCkwMVZmYW2LnTgp0EBBuXqJ19jrXT55l690NktROMbXmQkZGHOXPqSUJ6meXUsdCo07k2T3txger4GJVtE/Tv3kWeWzqtBldm50nnZyltLHD7WMxjswM4Y3ll8QYhaZg82KBamWcTgsKTlxNu2lFssZ4qWatLlnUhLNFjIkdr4RrNK/P0s0G706WxusHGxgb4K4CCDFCfvcrKc6cJWU5hpATawBjDgQOjHJqusGNvBRtqDO6fIh4YoO/QNL4Yc+35F8i6TbqdDrevPMU7h1Z54LaE00tF0lzYDNX+OaNGnVELDM7A2kE24bmFhLsnuwwWA30Fy5Uzx9n50MOcPjnL4TsdaAGIMUmJZ/7lv+HOX/woV+odhsuDnD15iTvv3k/ELKCMv/FuRo4cxJUGgRLoOkgfmAmSwVXikJL3C0k1x2bXOXRkKy8rgpQ4sTLLaOM8rUx46nLC5g1cEmsxzhRVZPQ8m+QDPHq2iPKiXWaZufMzJCIsL29AuA5hCVcosvuD76G8dSvTB3dzbXWDqa3DHH/qDHmeAUrUN05heAxw3KAd0DpQALsfkZi80eLb/+K3KY4N015a4WWBnsn73sxiC75+vkgnFzZNhs85Z9WI7aKMnuYWzKxGPHs1oacQGQozT1GIHbMXrpJlOaBE1WHG7z0KJgEKHLlnP3NLGZPjgxx/8gz1RhvUgvQBMS8J1wEPUgU7RfW2Sfp3TTF4YA/FsRGQEkgVpEzPwGCVk34HL1yLuTXjp6woxpucYLac4BY9dr7AwoalZ0clcP3YY2wbG+DpJ8/ifQAixA4hpkyPiHDPvXew0u6nv1zi0unLfOOLX2H+L77B2slTvCyHcJ2etJZTnhjnvl//FNWpCSABikAMCD0hKKfmuii3RsOW57zmah+8+1MFQqlm+ObHISRsUlDhwkrEnpGMYqSMRCnnLsyzbd80585fpXP6BP3bt2Gc42UpY1unCW6A9fUVqiP9rHaFuROnmf/qnxCL0rh8hcrkGIjDFkcwrgmk2DgGHEhMjyrMzi7yh595nLXLdUSEzUuWg3/Pr2sguDiLNHVJFsL400auPsQtaKaG//BMhQ/e1WS45DlcrHH+G1+hdOB+asURvv67n2PX7gmG77yD6tQU4EFrjI6OUMkmaDKLv2awt+9nbXWK2a4jSSLWTs5io6tYm5DEEDQn7bao11dYurpEtbuGWV/hiWeVTh4hItyaiackSnziRe3Db/ilAiZDdX1cmH0btyj1wumlmPGqZ6AYGIo9ZmmG9VZG9dBR1rxj7vEnMGvLiDEUBktg+okqfZRKNcbGKwwmGVP7d5CZBBPHoErIA51Wi4vPvkB44Rj+4mkGF89w0F7HbDT4sxcSmqnj1Tn6GTE7noqNUfvAG34hCT6X3JeXnHnqZwDhFuVBOLUY0zPRn1OMhDFpoAsX6KY5fmI3jdIwXZuQq6dcApEU8ECGKxVwUYmhoUFGRvsZHRtgdGwAayA5/yT7yl1GikI5thy/mvDlkyXameHVEd/17/skEm14k6nTPAf1KoxeUt3+dZErb+NVCArfmClw7nrE2/e2mRzIGSlbRlgmtJa5cs3TvjrEeSlzrGuQSh/FaoVCKSaODWkGeZoyFAcKeRvWl6g2rrGjKPRcq1seO1fkSs3xWiiTXxMduCoh16CKM7lVNV6c8Rrkgd+x/OHbeA2WGpY/PF5hx2DOvVMddgzmGIGpfgvUgBrE3NBdD3SuB1TBWaEUG4wIN2lRuFJzPHU54fxyhCqvWeCB3zE2qISA8bG6NIrUWFX1OeT7Hjdu4hvC/Jt5jWbXHLNrFfqLgf2jGTuHM7ZWPZFVbkqcIXGG/13mhaWGZWbVcXYpYqVleb0o254I+d4/x+WaR0atWHWxQ0UjNZojUeS9ffc/Jf93XwN1vA5qbcO35xK+PZfgDAwUPQPFQDlWIqv0ZF5opcJ6x7DeNmReeP1JFty7/llB4mAwmmNVrcdJJ+CjoMbEiE8Q3XYiyBv/tei3PsXrLA+w3LQsNy3/r6m86TeN3/a8CZHiRH0IaluRGu2gVq1aE2kWcjSLlPDO30B2PMrfGJNfE33Hb4pPtJvngFHrUc1EjbiCOhWVbqreoFnuFV/MNPydj8L40/yQU8aeCeGDH8VHmVev3gY13UxtEMXkatLcabPZIojRKN1QrNU8dDTvROvB//QjysQ3+CGluuWY6scf8d2+tSzLVcVolDU0F9V2u0EnL6i9f/oTzpiEPG2KjRPEe2IMkYswlLvK9JfEtEswfzdg+OEQxNzxGfUf/LjTaj0S1OBVQlutLWq3mxE01jxLsXcf/Dnri4aiTyiQgYoaY8RaIdWAaOKtmX5Mza7HNVzdJ9Lczg8w1dFnxT3yCRPe+mkJSRYQtRLUaa4iRk3mVUxJu7HXXLtq7zryD61FiSNDKY3IrRfvIRglOKcGwYqgoXI14+gXVLc/oXhrZG07hAI/EEwz6K7/qfLwr3h9169aHZ2JcBrEahBFQ1tDMEowWgixdqJMWzbTTHN1cZqDFV0vQh5HmLxA0EwrxknikW7iCZmi0kGsDSa77Zve7/qmtxpF9spRYf6NhJmjyOLtUJ8ETfjrlUH5KrrlpMrkMyKTxzK//Um8a1sXwAbNQ6oSvJpiokkH9a6krbyr3id0krbWXa5R6snzgGvHQRPvJaqjjSoUxRB1E9qdDkkxIU0NNvKI6SNkKcZ3lDiIkyS1ZvpYnh865vO2GOvF2k5RdWWb92s7nDYmRGrjSmcU1x5CW/3QrYKWoFmEPAZ13CA5uBTKHZAmxHWkVCMU1yQUl4X+axnleTGDl0WGrvhQauKtii1q5FKiONc0bWOCaG4SIh+r913NWmhANUu7hBChcVdrLle3kdOWTH3JqxsobdN6tkLa6Uo1Q9MiqDqpypCa3FPqNggVq92QiwYrVkviQ1vFBokDquolt5mKtSKm1Ay+cC5w27mcgCMT5wwSRWR5JkE9AhgDISggCKCioAbVgAgY47DGachyvCpeHCpWjaYYa9RaJZcM52ONg9GuCSBGNU1ArHoJWiBWWp48LmspGtQNU6dJW5NGpq0oI6r0acVV9X8BXChrJiNQKxUAAAAASUVORK5CYII=",universalLink:"https://naanwallet.com",deepLink:"naan://"},{key:"autonomy-app",name:"Autonomy",shortName:"Autonomy",color:"",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAIPElEQVR4AeXBe2yNdwPA8e/vdw5VdGmxJsV0SiKaLC5L3GLuySLZTObSLKOtS8XQHdritNWn+lTbHWXVRlyaoUhZOtFISJhLJAhxi6nJrOJadVDM5XC0nOd9+4dkked3ejunXu/5fITxXwQwSYCTBDhJgJMEOEmAkwQ4SYCTBDgrrejWrVtUVVVRzzAMDMPgXd26daNnz560FiutpLa2lhkzZvDq1StiY2ORUmJm1apVlJSUEBoaSmuw0kqKiopITU3lt99+48svvyQyMhIzgwcPJicnh/z8fFqDpBXcu3ePiooKxo0bh6Zp6LqOymeffUZdXR1//fUXrUHSCrKzs9E0jXrdunUjKiqKY8eOoZKRkUF2djatQeJn58+f56OPPqJXr168lZyczJo1a/B4PJjp3LkzQ4cOZe/evfibxI8Mw+Cnn34iNTWVf2vXrh3fffcdmzdvRmXu3Lls3ryZ2tpa/EniR2VlZYwfP56QkBDeNXnyZA4ePMiTJ08wY7VamT9/PoWFhfiTxE9evnxJWVkZcXFxqKSlpZGbm4vK2LFj+fPPP3E6nfiLxE/y8/NJTk5GSolKv379ePnyJX///Tcqmqah6zr+IvGD27dvc/v2bYYNG0ZDMjIyyM7ORiUqKopOnTpx9uxZ/EHiB7quo2kajfHxxx8zcOBADhw4gIrdbsfhcGAYBr4m8bETJ07Qo0cPPvnkExprwYIFbNy4kbq6Osx07NiRCRMmsGPHDnxN4kMej4eff/6ZlJQUmqJNmzYkJCSwbt06VKZNm0Z5eTkulwtfkvhQSUkJMTExBAcH01Tjx4/nzJkz1NTUYEYIwZIlS3A4HPiSxEeePn3K/v37mTJlCiqHDx+muLgYlYyMDLKzs1EZNGgQDx484Pr16/iKxEfy8vJITU1FCIGZuro65s+fT1JSElVVVZjp06cPQUFBXLx4ERVN08jKysJXJD5w9epVnj17xoABA1BZu3YtV65cweVysXTpUlTS0tLIzc1FJSIigujoaI4cOYIvSHxA13U0TUPlwYMH6LrOWzt37uTEiROYCQ0NZcyYMezevRsVm83G2rVref36NS0laaGDBw/Sr18/wsPDUcnIyOCff/7hLcMwsNlseDwezMyaNYvS0lLcbjdmgoKCiI+Pp7i4mJaStMDr169Zv349iYmJqFy4cIFffvmFd507d44tW7ZgxmKx8OOPP1JQUIDKhAkTOH78OI8ePaIlJC2wYcMGZs6cSdu2bVFZtGgRb968wUxaWhpPnjzBzMiRI6msrKS6uhqVZcuWsWLFClpC0kwPHz7k5MmTfPXVV6js2rWLo0ePonL//n10XUdF0zR0XUclOjoaKSWXLl2iuSTNtGLFCpYtW4aK2+1m8eLFeNOhQwfu3r3LlStXMPPpp58SHh7O6dOnUUlPTycnJ4fmkjTDpUuXsFgs9O3bF5XVq1dz48YNvLHb7RQVFaHrOipLly5l5cqVGIaBmbCwMEaNGkV5eTnNIWmGnJwc0tPTUblz5w55eXl4ExkZSXJyMl26dGHIkCHs27cPMx06dGDixImUlpaiMnv2bLZv347b7aapJE20Z88eRowYQVhYGCp2ux2Xy4U3DoeD4OBg6v3www9s2rSJ2tpazHz//ffs2bMHl8uFGYvFgs1mo6CggKaSNMGrV6/YunUrc+bMQeXUqVOUlpbizfDhw5k6dSpvWa1W5s2bR1FREWaEECxevBiHw4HKyJEjqayspLq6mqaQNEFhYSGJiYlYLBbMGIaBzWbDMAxUpJSsWbMGIQT/Nm7cOCoqKnA6nZgZNGgQ9+/f58aNG6hkZmaSlZVFU0gayel0cvnyZUaPHo3Ktm3bOH36NN7ExcXx+eefYyYzMxNd11HJzMwkKysLlcjISCIiIjh16hSNZaWRdF0nMzMTlefPn5OWloY3UkrGjBnDoUOHqOfxeHjL4/FQ7+bNm5SUlBAeHk49j8fDWx6Ph0ePHnHs2DG++OILzCxZsoTY2FjKysqQUtIQK41w9uxZOnXqRM+ePVHJzc2luroabxISEqjndDoRQiCEoJ4QAiEE9WJjYxFC8Pz5c4QQCCGoJ4RACEFcXBx9+vRBpX379kyePJlt27YRHx9PQ6w0wDAMHA4HW7ZsQeXatWsUFBTgTVRUFIWFhQQFBeFvMTExxMTEMGnSJEJCQvBG0oCdO3fy9ddf07FjR1RSUlJwu914k5+fT1BQEK1BCIHdbicvL4+GSLx48eIFu3fvZvr06agcOXKE8vJyvBk1ahTffvstrWngwIE8ffqUq1ev4o3Ei5UrV5KSkoIQAjNv3rxh4cKFeGOxWCgoKOB90DQNXdfxRqJw8+ZN7t69y5AhQ1ApLi6moqICb2bNmkX//v15H8LDw+nfvz+///47KlYUdF1H13VUHj9+jKZpeBMSEkJ6ejput5v3JSEhgWnTpjF69GjatGnDu6yY8Hg8OJ1Ounbtisry5cupqanBm2fPnhEZGcn7FhYWhsvlIjQ0lHdJTEgpiY+PZ+PGjZi5fPky69ev50Nht9sJDQ3FjERhypQpnDx5kqqqKt6VlJREXV0dH4Lu3buTmJiIisSLvLw8UlNT+be9e/dy4MABPhTLly8nODgYFYkXXbt2ZcSIEfz666/Uq62tJSkpiQ9FdHQ08fHxeCNpwOzZsykvL6empoaioiIqKyv5UOTm5mKxWPDGSgOEEOTk5LBgwQL279/Ph2LYsGF88803NMRKI/Tu3ZuhQ4fyxx9/EBERwf86IQSrVq2iMaw0ks1mw2az8f9GEuAkAU4S4CQBThLgJAFOEuAkAe4/IW7lge8FkmkAAAAASUVORK5CYII=",universalLink:"https://au.bitmark.com/apps/tezos",deepLink:"autonomy-tezos://"}],le=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},he=new F.a,pe=["ookjlbkiijinhpmnjffcofjonbfbgaoc","gpfndedineagiepkpinficbcbbgjoenn"];!function(e){e[e.DESKTOP=0]="DESKTOP",e[e.IOS=1]="IOS",e[e.ANDROID=2]="ANDROID"}(Z||(Z={})),function(e){e.IOS="ios",e.ANDROID="android",e.EXTENSION="extension",e.DESKTOP="desktop",e.WEB="web"}($||($={}));var be,me,ge=function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,null,[{key:"getPlatfrom",value:function(){return le(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",L(window)?Z.ANDROID:j(window)?Z.IOS:Z.DESKTOP);case 1:case"end":return e.stop()}}),e)})))}},{key:"getPairingInfo",value:function(t,r,n,a){return le(this,void 0,void 0,Object(d.a)().mark((function i(){var o,s,c,u;return Object(d.a)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(null===a||void 0===a){i.next=4;break}i.t0=a,i.next=7;break;case 4:return i.next=6,e.getPlatfrom();case 6:i.t0=i.sent;case 7:o=i.t0,s=t.p2pSyncCode,c=t.postmessageSyncCode,u=t.preferredNetwork,i.t1=o,i.next=i.t1===Z.DESKTOP?14:i.t1===Z.IOS?15:i.t1===Z.ANDROID?16:17;break;case 14:return i.abrupt("return",e.getDesktopPairingAlert(s,r,c,n,u));case 15:return i.abrupt("return",e.getIOSPairingAlert(s,r,u));case 16:return i.abrupt("return",e.getAndroidPairingAlert(s,r,u));case 17:throw new Error("platform unknown");case 18:case"end":return i.stop()}}),i)})))}},{key:"getDesktopPairingAlert",value:function(t,r,n,a,i){return le(this,void 0,void 0,Object(d.a)().mark((function o(){var s;return Object(d.a)().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,se.getAvailableExtensions();case 2:return(s=o.sent).forEach((function(e){var t=pe.indexOf(e.id);t>=0&&pe.splice(t,1)})),o.t0={title:"Browser Extensions",type:$.EXTENSION,wallets:[].concat(Object(A.a)(s.map((function(e){var t,a,i,o,s,u=ce.find((function(t){return t.id===e.id}));return{key:null!==(t=null===u||void 0===u?void 0:u.key)&&void 0!==t?t:e.id,name:null!==(a=e.name)&&void 0!==a?a:null===u||void 0===u?void 0:u.name,logo:null!==(i=e.iconUrl)&&void 0!==i?i:null===u||void 0===u?void 0:u.logo,shortName:null!==(o=e.shortName)&&void 0!==o?o:null===u||void 0===u?void 0:u.shortName,color:null!==(s=e.color)&&void 0!==s?s:null===u||void 0===u?void 0:u.color,enabled:!0,clickHandler:function(){return le(this,void 0,void 0,Object(d.a)().mark((function t(){var a,i;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=10;break}return t.t0=he,t.next=4,n();case 4:return t.t1=t.sent,t.next=7,t.t0.serialize.call(t.t0,t.t1);case 7:a=t.sent,i={target:c.EXTENSION,payload:a,targetId:e.id},O.a.postMessage(i,O.a.location.origin);case 10:r($.EXTENSION,this);case 11:case"end":return t.stop()}}),t,this)})))}}}))),Object(A.a)(ce.filter((function(e){return pe.some((function(t){return t===e.id}))})).map((function(e){return{key:e.key,name:e.name,shortName:e.shortName,color:e.color,logo:e.logo,enabled:!1,clickHandler:function(){}}})))).sort((function(e,t){return e.key.localeCompare(t.key)}))},o.t1=$.DESKTOP,o.t2=[],o.t3=Object(A.a)(ue.map((function(e){return{key:e.key,name:e.name,shortName:e.shortName,color:e.color,logo:e.logo,enabled:!0,clickHandler:function(){return le(this,void 0,void 0,Object(d.a)().mark((function n(){var a,i;return Object(d.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=he,n.next=3,t();case 3:return n.t1=n.sent,n.next=6,n.t0.serialize.call(n.t0,n.t1);case 6:a=n.sent,i=H(e.deepLink,a),window.open(i,"_blank"),r($.DESKTOP,this,!0);case 10:case"end":return n.stop()}}),n,this)})))}}}))),o.t4=A.a,o.next=11,e.getWebList(t,r,i);case 11:return o.t5=o.sent,o.t6=(0,o.t4)(o.t5),o.t7=o.t2.concat.call(o.t2,o.t3,o.t6).sort((function(e,t){return e.key.localeCompare(t.key)})),o.t8={title:"Desktop & Web Wallets",type:o.t1,wallets:o.t7},o.t9={title:"Mobile Wallets",type:$.IOS,wallets:Object(A.a)(de.map((function(e){return{key:e.key,name:e.name,shortName:e.shortName,color:e.color,logo:e.logo,enabled:!0,clickHandler:function(){return le(this,void 0,void 0,Object(d.a)().mark((function e(){var n;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=he,e.next=3,t();case 3:return e.t1=e.sent,e.next=6,e.t0.serialize.call(e.t0,e.t1);case 6:n=e.sent,a(n),r($.IOS,this,!0);case 9:case"end":return e.stop()}}),e,this)})))}}}))).sort((function(e,t){return e.key.localeCompare(t.key)}))},o.t10=[o.t0,o.t8,o.t9],o.t11=[],o.abrupt("return",{walletLists:o.t10,buttons:o.t11});case 19:case"end":return o.stop()}}),o)})))}},{key:"getIOSPairingAlert",value:function(t,r,n){return le(this,void 0,void 0,Object(d.a)().mark((function a(){return Object(d.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.t0={title:"Mobile Wallets",type:$.IOS,wallets:de.map((function(e){return{key:e.key,name:e.name,shortName:e.shortName,color:e.color,logo:e.logo,enabled:!0,clickHandler:function(){var n;return le(this,void 0,void 0,Object(d.a)().mark((function a(){var i,o,s;return Object(d.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.t0=he,a.next=3,t();case 3:return a.t1=a.sent,a.next=6,a.t0.serialize.call(a.t0,a.t1);case 6:i=a.sent,o=H(null!==(n=e.deepLink)&&void 0!==n?n:e.universalLink,i),(s=document.createElement("a")).setAttribute("href",o),s.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0})),r($.IOS,this,!0);case 12:case"end":return a.stop()}}),a,this)})))}}})).sort((function(e,t){return e.key.localeCompare(t.key)}))},a.t1=$.WEB,a.t2=A.a,a.next=5,e.getWebList(t,r,n);case 5:return a.t3=a.sent,a.t4=(0,a.t2)(a.t3).sort((function(e,t){return e.key.localeCompare(t.key)})),a.t5={title:"Web Wallets",type:a.t1,wallets:a.t4},a.t6=[a.t0,a.t5],a.t7=[],a.abrupt("return",{walletLists:a.t6,buttons:a.t7});case 11:case"end":return a.stop()}}),a)})))}},{key:"getAndroidPairingAlert",value:function(t,r,n){return le(this,void 0,void 0,Object(d.a)().mark((function a(){var i=this;return Object(d.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.t0=$.WEB,a.t1=A.a,a.next=4,e.getWebList(t,r,n);case 4:return a.t2=a.sent,a.t3=(0,a.t1)(a.t2).sort((function(e,t){return e.key.localeCompare(t.key)})),a.t4={title:"Web Wallets",type:a.t0,wallets:a.t3},a.t5=[a.t4],a.t6=[{title:"Mobile Wallets",text:"Connect Wallet",clickHandler:function(){return le(i,void 0,void 0,Object(d.a)().mark((function e(){var n,a;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=he,e.next=3,t();case 3:return e.t1=e.sent,e.next=6,e.t0.serialize.call(e.t0,e.t1);case 6:n=e.sent,a=H("tezos://",n),window.open(a,"_blank"),r($.ANDROID);case 10:case"end":return e.stop()}}),e)})))}}],a.abrupt("return",{walletLists:a.t5,buttons:a.t6});case 10:case"end":return a.stop()}}),a)})))}},{key:"getWebList",value:function(e,t,r){return le(this,void 0,void 0,Object(d.a)().mark((function n(){return Object(d.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",fe.map((function(n){return{key:n.key,name:n.name,shortName:n.shortName,color:n.color,logo:n.logo,enabled:!0,clickHandler:function(){var a=this,o=window.open("","_blank");e().then((function(e){return he.serialize(e)})).then((function(e){var s,c=H(null!==(s=n.links[r])&&void 0!==s?s:n.links[i.MAINNET],e);o?o.location.href=c:window.open(c,"_blank"),t($.WEB,a,!0)})).catch((function(e){console.error(e)}))}}})).sort((function(e,t){return e.key.localeCompare(t.key)})));case 1:case"end":return n.stop()}}),n)})))}}]),e}(),ve=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},ye=new R.a("Alert"),Ae=new F.a,we=function(e,t,r){return ve(void 0,void 0,void 0,Object(d.a)().mark((function n(){var a,i,o,s,c,u,f,l,h,p,b,m,g,v,y,_,C,B,I,S,D,T;return Object(d.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=function(){return ve(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ge.getPairingInfo(r,(function(e,t,r){return ve(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Ie();case 4:case"end":return e.stop()}}),e)})))}),(function(){return ve(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:D();case 1:case"end":return e.stop()}}),e)})))})));case 1:case"end":return e.stop()}}),e)})))},n.next=3,a();case 3:if(i=n.sent,o=t.getElementById("pairing-container")){n.next=7;break}throw new Error("container not found");case 7:s=document.createElement("span"),o.appendChild(s),i.buttons.forEach((function(e){return ve(void 0,void 0,void 0,Object(d.a)().mark((function r(){var n,a,i,o,c;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(M.a)();case 2:n=r.sent,a=w("div",["beacon-list__title"],[],e.title),i=w("button",["beacon-modal__button","connect__btn"],[],e.text),(o=document.createElement("a")).id="button_".concat(n),o.appendChild(a),o.appendChild(i),s.appendChild(o),(c=t.getElementById(o.id))&&c.addEventListener("click",(function(){return ve(void 0,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.clickHandler();case 1:case"end":return t.stop()}}),t)})))}));case 12:case"end":return r.stop()}}),r)})))})),c=function(e,r,n){var a="Open in ".concat(n.name),i=n.key,o=n.logo?w("div",[],[],[w("img",["beacon-selection__img"],[["src",n.logo]],"")]):x(["beacon-selection__img","svg-inline--fa","fa-wallet","fa-w-16"],[["aria-hidden","true"],["focusable","false"],["data-prefix","fas"],["data-icon","wallet"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 512 512"],["style","enable-background:new 0 0 512 512;"],["xml:space","preserve"]],[E([["d","M376.2,181H152.9c-5.2,0-9.4-4.2-9.4-9.4s4.2-9.4,9.4-9.4h225c5.2,0,9.4-4.2,9.4-9.4c0-15.5-12.6-28.1-28.1-28.1H143.5c-20.7,0-37.5,16.8-37.5,37.5v187.5c0,20.7,16.8,37.5,37.5,37.5h232.7c16.4,0,29.8-12.6,29.8-28.1v-150C406,193.6,392.7,181,376.2,181z M349.8,302.9c-10.4,0-18.8-8.4-18.8-18.8s8.4-18.8,18.8-18.8s18.8,8.4,18.8,18.8S360.1,302.9,349.8,302.9z"]])]),s=w("div",["beacon-selection__name"],[],[w("span",[],[],n.name),n.enabled?void 0:w("p",[],[],"Not installed")]),c=w("a",["beacon-selection__list",n.enabled?"":"disabled"],[["tabindex","0"],["id","wallet_".concat(i)],["alt",a],["target","_blank"]],[s,o]),u=document.createElement("span");u.appendChild(c),e.appendChild(u);var f=t.getElementById("wallet_".concat(i)),l=function(e){return ve(void 0,void 0,void 0,Object(d.a)().mark((function a(){var i;return Object(d.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!e||"Enter"===e.key){a.next=2;break}return a.abrupt("return");case 2:n.clickHandler(),(i=t.getElementById("beacon-modal__content"))&&r!==$.EXTENSION&&r!==$.IOS&&(k(i),i.appendChild(w("p",["beacon-alert__title"],[],"Establishing Connection..")),i.appendChild(w("div",["progress-line"],[["id","beacon-toast-loader"]],"")),i.appendChild(w("div",["beacon--selected__container"],[],Object(A.a)(n.logo?[w("img",["beacon-selection__img"],[["src",n.logo]],""),w("img",["beacon--selection__name__lg"],[],n.name)]:[]))));case 5:case"end":return a.stop()}}),a)})))};f&&(f.addEventListener("click",(function(){return l()})),f.addEventListener("keydown",l))},u=document.createElement("span"),o.appendChild(u),(f=function(e){k(u),e.forEach((function(e){var t=document.createElement("div");t.classList.add("beacon-list__wrapper"),u.appendChild(t),t.appendChild(w("div",["beacon-list__title"],[],e.title));var r=document.createElement("span");t.appendChild(r),e.wallets.forEach((function(t){return ve(void 0,void 0,void 0,Object(d.a)().mark((function n(){return Object(d.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:c(r,e.type,t);case 1:case"end":return n.stop()}}),n)})))}))}))})(i.walletLists),l=function(e){return ve(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("extensionsUpdated"!==e.data){t.next=5;break}return t.next=3,a();case 3:r=t.sent,f(r.walletLists);case 5:case"end":return t.stop()}}),t)})))},h=function(t){t.data==="closeAlert-".concat(e)&&(O.a.removeEventListener("message",l),O.a.removeEventListener("message",h))},O.a.addEventListener("message",l),O.a.addEventListener("message",h),p=t.getElementById("beacon--qr__container"),b=t.getElementById("beacon--qr__copy"),m=t.getElementById("beacon-title"),g=L(window)?"android":j(window)?"ios":"desktop",v=t.getElementById("beacon-main-text"),y=t.getElementById("pairing-container"),_=t.getElementById("beacon--switch__container"),C=function(){return ve(void 0,void 0,void 0,Object(d.a)().mark((function e(){var t;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=10;break}return e.t1=Ae,e.next=4,r.p2pSyncCode();case 4:return e.t2=e.sent,e.next=7,e.t1.serialize.call(e.t1,e.t2);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0="";case 11:t=e.t0,navigator.clipboard.writeText(t).then((function(){b&&(b.innerText="Copied"),ye.log("Copying to clipboard was successful!")}),(function(e){ye.error("Could not copy text to clipboard: ",e)}));case 13:case"end":return e.stop()}}),e)})))},B=!1,I=function(e){return ve(void 0,void 0,void 0,Object(d.a)().mark((function n(){var a,i,o,s,c;return Object(d.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((a=t.getElementById("beacon-switch"))&&(a.innerText="none"===e?"Pair wallet on same device":"Pair wallet on another device"),!(v&&y&&_&&b&&p&&m)){n.next=35;break}v.style.display="none",m.style.textAlign="center",y.style.display="none",_.style.display="initial",n.t0=e,n.next="ios"===n.t0?10:"android"===n.t0?12:"desktop"===n.t0?14:19;break;case 10:case 12:return y.style.display="initial",n.abrupt("break",35);case 14:return y.style.display="initial",m.style.textAlign="left",v.style.display="none",_.style.display="initial",n.abrupt("break",35);case 19:if(B){n.next=34;break}return n.t1=Ae,n.next=23,r.p2pSyncCode();case 23:return n.t2=n.sent,n.next=26,n.t1.serialize.call(n.t1,n.t2);case 26:i=n.sent,o=H("tezos://",i),s=G(o,"svg"),c=s.replace("0)){t.next=9;break}return n=[],r.forEach((function(e){return Ee(void 0,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n.push(e.id.split("-")[3]);case 1:case"end":return t.stop()}}),t)})))})),t.next=6,Promise.all(n.map(Be));case 6:e(),t.next=10;break;case 9:e();case 10:case"end":return t.stop()}}),t)})))})));case 1:case"end":return e.stop()}}),e)})))},Se=function(e){return Ee(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a,i,o,s,c,u,f,l,h,p,b,m,g,v,y,x,E,_,C,k,B,I,O;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.body,i=e.data,o=e.title,s=e.timer,c=e.pairingPayload,u=e.disclaimerText,f=e.closeButtonCallback,t.next=9,Ie();case 9:return t.next=11,Object(M.a)();case 11:if(l=t.sent.split("-").join(""),(h=me.createElement("div")).setAttribute("id","beacon-alert-wrapper-".concat(l)),p=h.attachShadow({mode:"open"}),(b=me.createElement("div")).setAttribute("tabindex","0"),p.appendChild(b),m=Object(A.a)(null!==(n=null===(r=e.buttons)||void 0===r?void 0:r.map((function(e){var t,r;return{text:e.text,actionCallback:null!==(t=e.actionCallback)&&void 0!==t?t:function(){return Promise.resolve()},style:null!==(r=e.style)&&void 0!==r?r:"outline"}})))&&void 0!==n?n:[]),g=c?"string"===typeof a?w("div",[],[["id","beacon--qr__container"]],[w("div",[],[["id","beacon--qr__copy__container"]],[w("button",["beacon-modal__button--outline"],[["id","beacon--qr__copy"]],"Copy")])]):w("span",[],[],""):w("span",[],[],null!==a&&void 0!==a?a:""),i&&(g=w("span",[],[],[g,w("pre",[],[["style","text-align: left"]],i)])),v=ke(l,g,o,m,!!(null===c||void 0===c?void 0:c.p2pSyncCode)),y=v.style,x=v.html,b.appendChild(x),(E=me.createElement("style")).textContent=y,p.appendChild(E),s&&(Ce[l]=window.setTimeout((function(){return Ee(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Be(l);case 2:case"end":return e.stop()}}),e)})))}),s)),me.body.prepend(h),_=p.getElementById("beacon-alert-".concat(l,"-close")),C=function(){return Ee(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f&&f(),e.next=3,Be(l);case 3:case"end":return e.stop()}}),e)})))},u&&(k=p.getElementById("beacon--disclaimer"))&&(k.innerText=u),B=S(),(I=p.getElementById("beacon-alert-modal-".concat(l)))&&(I.classList.add("theme__".concat(B)),I.addEventListener("click",C)),(O=p.querySelectorAll(".beacon-modal__wrapper")).length>0&&O[0].addEventListener("click",(function(e){e.stopPropagation()})),be=me.activeElement,b.focus(),m.forEach((function(e,t){var r=p.getElementById("beacon-alert-".concat(l,"-").concat(t));r&&r.addEventListener("click",(function(){return Ee(void 0,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Be(l);case 2:if(!e.actionCallback){t.next=5;break}return t.next=5,e.actionCallback();case 5:case"end":return t.stop()}}),t)})))}))})),_&&_.addEventListener("click",(function(){return Ee(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:case"end":return e.stop()}}),e)})))})),window.addEventListener("keydown",(function(e){return Ee(void 0,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("Escape"!==e.key){t.next=3;break}return t.next=3,C();case 3:case"end":return t.stop()}}),t)})))})),!c){t.next=44;break}return t.next=44,we(l,p,c);case 44:return t.abrupt("return",l);case 45:case"end":return t.stop()}}),t)})))},Oe={css:":host {\n --animation-duration: 300ms;\n all: initial;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n.beacon-toast__base {\n position: fixed;\n top: 16px;\n right: 16px;\n z-index: 2147483000;\n margin: 0 auto;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1);\n flex-direction: column;\n}\n@media (max-width: 576px) {\n .beacon-toast__base {\n top: 8px;\n right: 8px;\n left: 8px;\n }\n .beacon-toast__wallet__outer {\n flex-wrap: wrap;\n }\n .beacon-toast__wallet__link {\n display: flex;\n margin-left: 12px !important;\n }\n}\n\n.theme__light.beacon-toast__base {\n background: #fff;\n}\n\n.theme__dark.beacon-toast__base {\n background: #27334c;\n}\n\n.theme__dark p {\n color: #6183ff;\n}\n\na {\n text-decoration: none;\n color: #3880ff;\n}\n\na svg {\n width: 12px;\n margin-left: 2px;\n}\n\na:visited {\n color: #3880ff;\n}\n\nhr {\n height: 1px;\n color: rgba(0, 0, 0, 0.12);\n background-color: rgba(0, 0, 0, 0.12);\n border: none;\n width: 100%;\n margin: 0;\n display: none;\n}\n\n.show {\n display: block !important;\n}\n\n.hide {\n display: none !important;\n}\n\n#beacon-toast-list {\n display: none;\n}\n\n.beacon-toast__upside_down {\n transform: rotate(180deg);\n}\n\n.beacon-toast__content {\n justify-content: space-between;\n min-height: 56px;\n height: 0;\n}\n\n.beacon-toast__action__item,\n.beacon-toast__powered a,\n.beacon-toast__wallet__container,\n#beacon-text,\n.beacon-toast__action__item p,\n.beacon-toast__wallet__outer {\n align-items: center;\n}\n\n.beacon-toast__content,\n.beacon-toast__base,\n.beacon-toast__action__item,\n.beacon-toast__powered a,\n#beacon-text,\n.beacon-toast__wallet__container,\n.beacon-toast__wallet__outer {\n display: flex;\n}\n\n.beacon-toast__content,\n.beacon-toast__action__item,\n.beacon-toast__powered a {\n padding: 0 16px;\n font-family: Roboto, Helvetica, sans-serif;\n}\n\n#beacon-text strong {\n display: contents;\n}\n.beacon-toast__wallet__link {\n margin-left: 8px;\n}\n.beacon-toast__wallet__link svg {\n margin-left: 4px;\n}\n.beacon-toast__powered a {\n margin: 4px 0 12px;\n font-size: 12px;\n opacity: 0.64;\n}\n\n.beacon-toast__powered svg {\n width: 20px;\n height: 20px;\n margin: 0 2px 0 4px;\n}\n\n.beacon-toast__action__item {\n font-size: 14px;\n max-width: 40ch;\n}\n\n.beacon-toast__action__item p {\n margin-right: 8px;\n}\n\n.beacon-toast__action__item__subtitle,\n.beacon-toast__powered a {\n min-width: 88px;\n color: rgba(0, 0, 0, 0.54);\n}\n\n.theme__dark .beacon-toast__powered a {\n color: #7c99d6;\n}\n\n.beacon-toast__content__img {\n width: 24px;\n height: 24px;\n margin-right: 4px;\n image-rendering: -moz-crisp-edges; /* Firefox */\n image-rendering: -o-crisp-edges; /* Opera */\n image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming) */\n image-rendering: crisp-edges;\n -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */\n}\n\n.beacon-toast__more {\n width: 14px;\n transition: transform 0.5s;\n}\n\na,\n.beacon-toast__more {\n cursor: pointer;\n}\n\na:hover {\n opacity: 0.64;\n}\n\n.theme__dark .beacon-toast__more {\n color: #7c99d6;\n}\n\n.beacon-toast__more--action {\n margin: 8px 0;\n}\n\n#beacon-text {\n padding-right: 24px;\n}\n\n#beacon-text-content {\n display: flex;\n align-items: center;\n}\n\n.progress-line,\n.progress-line:before {\n height: 3px;\n width: 100%;\n margin: 0;\n}\n.progress-line {\n background-color: #a7c4f7;\n display: -webkit-flex;\n display: flex;\n}\n.progress-line:before {\n background-color: #3880ff;\n content: '';\n -webkit-animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n}\n@-webkit-keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n@keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n"},Me=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};"undefined"!==typeof window&&"undefined"!==typeof window.document&&(_e=window.document);var De,Te,Fe,Re,Pe,Ne=function(e){return Me(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a,i,o,s,c,u,f,l,h;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.text,n=e.isBold,a=e.actionText,i=e.actionLogo,o=e.actionCallback,t.next=3,Object(M.a)();case 3:return s=t.sent,(c=_e.createElement("div")).classList.add("beacon-toast__action__item"),je(c),u=function(e){return w("strong",[],[],e)},o?(r.length>0&&c.appendChild(w("p",[],[],r)),f=w("span",[],[],[w("span",[],[],a),i&&"external"===i?x(["svg-inline--fa","fa-external-link-alt","fa-w-16"],[["aria-hidden","true"],["focusable","false"],["data-prefix","fas"],["data-icon","external-link-alt"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 512 512"]],[E([["fill","currentColor"],["d","M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"]])]):void 0]),c.appendChild(w("p",[],[],[w("a",[],[["id",s]],[n?u([f]):f])]))):a?(r.length>0&&c.appendChild(w("p",["beacon-toast__action__item__subtitle"],[],r)),l=w("span",[],[],a),c.appendChild(w("p",[],[],[n?u([l]):l]))):(h=w("p",[],[],r),c.appendChild(n?u([h]):h)),o&&c.addEventListener("click",o),t.abrupt("return",c);case 11:case"end":return t.stop()}}),t)})))},je=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},Le=function(e){var t,r,n,a=null===(t=null===Fe||void 0===Fe?void 0:Fe.walletInfo)||void 0===t?void 0:t.icon,i=null===(r=null===Fe||void 0===Fe?void 0:Fe.walletInfo)||void 0===r?void 0:r.name,o=w("strong",[],[],null!==i&&void 0!==i?i:"Wallet");n=a?w("span",["beacon-toast__wallet__container"],[],[w("img",["beacon-toast__content__img"],[["src",a]],""),o]):o;var s=e.split("{{wallet}}");if(1===s.length)return[w("span",[],[],e)];for(var c=[],u=0;u0)){n.next=14;break}return i=a.map((function(e){return Me(void 0,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Ne(e));case 1:case"end":return t.stop()}}),t)})))})),n.next=5,Promise.all(i);case 5:n.sent.forEach((function(e){return r.appendChild(e)})),(o=_e.createElement("small")).classList.add("beacon-toast__powered"),o.appendChild(w("a",[],[["href","https://walletbeacon.io"],["target","_blank"]],[document.createTextNode("powered by"),x([],[["id","f63e95a9-fd19-4487-bc1a-09eb2f066704"],["data-name","Guides"],["xmlns","http://www.w3.org/2000/svg"],["width","65"],["height","65"],["viewBox","0 0 65 65"]],[w("title",[],[],"beacon_logo"),E([["fill","currentColor"],["d","M59.66,29.52v1.06c0,.37-.18,9.07-4.11,15.88S44.16,57.75,43.84,57.93l-.91.54-1.61-.93-9.19-5.3a14.68,14.68,0,0,1-1.63-1.06h0a14.09,14.09,0,0,1-1.29-1,17.63,17.63,0,0,1-2.56-2.7,18.58,18.58,0,0,1-2.56-4.51,21.53,21.53,0,0,1-1.5-9,6.21,6.21,0,0,1,2.93-.73c.25,0,.49,0,.74,0a18.29,18.29,0,0,0,1,7.93,15.06,15.06,0,0,0,6.67,8l8.93,5.16c.2-.13.43-.3.68-.48,2.26-1.6,6.42-4.92,8.86-9.13C55.12,39.94,55.8,34,56,31.57l-3.79-2.19a23,23,0,0,0,.6-3.83Z"]]),E([["fill","currentColor"],["d","M49.22,11.43V23.89c0,.65,0,1.3-.1,1.94v0c-.06.55-.13,1.1-.24,1.63A18,18,0,0,1,47.82,31a19.11,19.11,0,0,1-2.62,4.49,21.37,21.37,0,0,1-7.07,5.8,6.08,6.08,0,0,1-2.42-2.84A18.1,18.1,0,0,0,42,33.7h0a15.12,15.12,0,0,0,3.58-9.81V13.6c-.21-.11-.47-.21-.74-.35-2.52-1.16-7.47-3.1-12.36-3.1-5.42,0-11,2.4-13.08,3.45V18a22.54,22.54,0,0,0-3.63,1.38V11.43l.92-.52c.33-.18,8-4.38,15.79-4.38s15.48,4.2,15.8,4.38Z"]]),E([["fill","currentColor"],["d","M18,26.4,9,31.55q0,.35.06.78a31.63,31.63,0,0,0,3.49,12.28c2.71,4.71,7.55,8.3,9.53,9.64l3.79-2.19a23.33,23.33,0,0,0,3,2.44l-6.88,4-.92-.54c-.31-.18-7.75-4.69-11.68-11.5S5.36,30.92,5.35,30.56V29.49L7,28.55l9.17-5.29c.57-.32,1.14-.61,1.72-.87a13.46,13.46,0,0,1,1.55-.61A17.52,17.52,0,0,1,23,20.91a19.2,19.2,0,0,1,5.19,0,21.49,21.49,0,0,1,8.55,3.24,6.29,6.29,0,0,1-1.25,3.51,17.9,17.9,0,0,0-7.3-3.06A15.14,15.14,0,0,0,18,26.4Z"]])]),document.createTextNode("Beacon")])),r.appendChild(o),Ke(e),n.next=16;break;case 14:Ve(e),We(e);case 16:case"end":return n.stop()}}),n)})))},Ze=function(e){return Me(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a,i,o,s,c,u,f,l,h,p,b;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Fe=e,r=e.timer,(n=_e.createElement("div")).setAttribute("id","beacon-toast-wrapper"),a=n.attachShadow({mode:"open"}),i=_e.createElement("div"),o=Ue(e),s=o.style,c=o.html,i.appendChild(c),(u=_e.createElement("style")).textContent=s,a.appendChild(i),a.appendChild(u),r&&(De=window.setTimeout((function(){return Me(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qe();case 2:case"end":return e.stop()}}),e)})))}),r)),_e.body.prepend(n),f=S(),(l=a.getElementById("beacon-toast"))&&l.classList.add("theme__".concat(f)),!(h=a.getElementById("beacon-toast-list"))){t.next=21;break}return t.next=21,Xe(a,e,h);case 21:(p=a.getElementById("beacon-open-wallet"))&&(e.openWalletAction?p.addEventListener("click",(function(){e.openWalletAction&&e.openWalletAction()})):p.classList.add("hide")),"loading"===Fe.state&&(Te=window.setTimeout((function(){return Me(void 0,void 0,void 0,Object(d.a)().mark((function e(){var t;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=a.getElementById("beacon-toast-button-expand"))&&!t.classList.contains("beacon-toast__upside_down")&&Je(a);case 2:case"end":return e.stop()}}),e)})))}),5e3)),Ge(a,"beacon-toast-button-done",(function(){return Me(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qe();case 2:case"end":return e.stop()}}),e)})))})),(b=Ge(a,"beacon-toast-button-close",(function(){return Me(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qe();case 2:case"end":return e.stop()}}),e)})))})))&&"loading"===Fe.state&&b.classList.add("hide"),Ge(a,"beacon-toast-button-expand",(function(){return Me(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Je(a);case 1:case"end":return e.stop()}}),e)})))}));case 28:case"end":return t.stop()}}),t)})))},$e=function(e){return Me(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a,i,o,s,c;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Fe=Object.assign(Object.assign({},Fe),e),r=e.timer,n=_e.getElementById("beacon-toast-wrapper")){t.next=5;break}return t.abrupt("return");case 5:if(a=n.shadowRoot){t.next=8;break}return t.abrupt("return");case 8:if(!(i=a.getElementById("beacon-toast-list"))){t.next=13;break}return je(i),t.next=13,Xe(a,e,i);case 13:"loading"===Fe.state&&(Te=window.setTimeout((function(){return Me(void 0,void 0,void 0,Object(d.a)().mark((function e(){var t;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=a.getElementById("beacon-toast-button-expand"))&&!t.classList.contains("beacon-toast__upside_down")&&Je(a);case 2:case"end":return e.stop()}}),e)})))}),5e3)),(o=a.getElementById("beacon-text-content"))&&(je(o),o.appendChild(w("span",["beacon-toast__wallet__outer"],[],Le(e.body)))),(s=a.getElementById("beacon-open-wallet"))&&(e.openWalletAction?(s.classList.remove("hide"),s.addEventListener("click",(function(){e.openWalletAction&&e.openWalletAction()}))):s.classList.add("hide")),r&&(De=window.setTimeout((function(){return Me(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qe();case 2:case"end":return e.stop()}}),e)})))}),r)),(c=a.getElementById("beacon-toast-button-done"))&&c.addEventListener("click",(function(){return Me(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qe();case 2:case"end":return e.stop()}}),e)})))}));case 21:case"end":return t.stop()}}),t)})))},et=function(e){return Me(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r,n;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Te&&clearTimeout(Te),!_e.getElementById("beacon-toast-wrapper")){t.next=14;break}if(!e.forceNew){t.next=10;break}return t.next=6,Qe();case 6:return t.next=8,Ze(e);case 8:t.next=12;break;case 10:return t.next=12,$e(e);case 12:t.next=16;break;case 14:return t.next=16,Ze(e);case 16:return Fe&&"finished"===Fe.state&&(n=null===(r=_e.getElementById("beacon-toast-wrapper"))||void 0===r?void 0:r.shadowRoot)&&(qe(n),Ve(n),Ye(n)),t.abrupt("return");case 18:case"end":return t.stop()}}),t)})))},tt=function(e){return e.length>=12?"".concat(e.substr(0,5),"...").concat(e.substr(-5)):e};!function(e){e.BROADCAST_ERROR="BROADCAST_ERROR",e.NETWORK_NOT_SUPPORTED="NETWORK_NOT_SUPPORTED",e.NO_ADDRESS_ERROR="NO_ADDRESS_ERROR",e.NO_PRIVATE_KEY_FOUND_ERROR="NO_PRIVATE_KEY_FOUND_ERROR",e.NOT_GRANTED_ERROR="NOT_GRANTED_ERROR",e.PARAMETERS_INVALID_ERROR="PARAMETERS_INVALID_ERROR",e.TOO_MANY_OPERATIONS="TOO_MANY_OPERATIONS",e.TRANSACTION_INVALID_ERROR="TRANSACTION_INVALID_ERROR",e.SIGNATURE_TYPE_NOT_SUPPORTED="SIGNATURE_TYPE_NOT_SUPPORTED",e.ABORTED_ERROR="ABORTED_ERROR",e.UNKNOWN_ERROR="UNKNOWN_ERROR"}(Re||(Re={}));var rt,nt=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},at=new R.a("BeaconEvents"),it=5e3;!function(e){e.PERMISSION_REQUEST_SENT="PERMISSION_REQUEST_SENT",e.PERMISSION_REQUEST_SUCCESS="PERMISSION_REQUEST_SUCCESS",e.PERMISSION_REQUEST_ERROR="PERMISSION_REQUEST_ERROR",e.OPERATION_REQUEST_SENT="OPERATION_REQUEST_SENT",e.OPERATION_REQUEST_SUCCESS="OPERATION_REQUEST_SUCCESS",e.OPERATION_REQUEST_ERROR="OPERATION_REQUEST_ERROR",e.SIGN_REQUEST_SENT="SIGN_REQUEST_SENT",e.SIGN_REQUEST_SUCCESS="SIGN_REQUEST_SUCCESS",e.SIGN_REQUEST_ERROR="SIGN_REQUEST_ERROR",e.BROADCAST_REQUEST_SENT="BROADCAST_REQUEST_SENT",e.BROADCAST_REQUEST_SUCCESS="BROADCAST_REQUEST_SUCCESS",e.BROADCAST_REQUEST_ERROR="BROADCAST_REQUEST_ERROR",e.ACKNOWLEDGE_RECEIVED="ACKNOWLEDGE_RECEIVED",e.LOCAL_RATE_LIMIT_REACHED="LOCAL_RATE_LIMIT_REACHED",e.NO_PERMISSIONS="NO_PERMISSIONS",e.ACTIVE_ACCOUNT_SET="ACTIVE_ACCOUNT_SET",e.ACTIVE_TRANSPORT_SET="ACTIVE_TRANSPORT_SET",e.SHOW_PREPARE="SHOW_PREPARE",e.HIDE_UI="HIDE_UI",e.PAIR_INIT="PAIR_INIT",e.PAIR_SUCCESS="PAIR_SUCCESS",e.CHANNEL_CLOSED="CHANNEL_CLOSED",e.INTERNAL_ERROR="INTERNAL_ERROR",e.UNKNOWN="UNKNOWN"}(rt||(rt={}));var ot=function(e){return nt(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],e.walletInfo.deeplink&&("web"===e.walletInfo.type||"mobile"===e.walletInfo.type&&N(window)||"desktop"===e.walletInfo.type&&!N(window))&&(a=e.walletInfo.deeplink,r=function(){return nt(void 0,void 0,void 0,Object(d.a)().mark((function e(){var t;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=document.createElement("a")).setAttribute("href",a),t.setAttribute("target","_blank"),t.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}));case 4:case"end":return e.stop()}}),e)})))}),n.push({text:"No answer from your wallet received yet. Please make sure the wallet is open.",isBold:!0}),n.push({text:"Did you make a mistake?",actionText:"Cancel Request",actionCallback:function(){return nt(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qe();case 2:case"end":return e.stop()}}),e)})))}}),n.push({text:"Wallet not receiving request?",actionText:"Reset Connection",actionCallback:function(){return nt(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Qe();case 2:if(!(r=e.extraInfo.resetCallback)){t.next=7;break}return at.log("showSentToast","resetCallback invoked"),t.next=7,r();case 7:case"end":return t.stop()}}),t)})))}}),et({body:"Request sent to\xa0 {{wallet}}",walletInfo:e.walletInfo,state:"loading",actions:n,openWalletAction:r}).catch((function(e){return console.error(e)}));case 6:case"end":return t.stop()}}),t)})))},st=function(e,t){return nt(void 0,void 0,void 0,Object(d.a)().mark((function r(){var n,a;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.errorResponse.errorType?Jt.getError(e.errorResponse.errorType,e.errorResponse.errorData):new ir,a=[{text:n.title,isBold:!0},{text:n.description}],e.errorResponse.errorType===Re.TRANSACTION_INVALID_ERROR&&e.errorResponse.errorData&&a.push({text:"",actionText:"Show Details",actionCallback:function(){return nt(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qe();case 2:return e.next=4,Se({title:n.title,body:n.fullDescription.description,data:n.fullDescription.data,buttons:t});case 4:case"end":return e.stop()}}),e)})))}}),r.next=5,et({body:"{{wallet}}\xa0 has returned an error",timer:e.errorResponse.errorType===Re.ABORTED_ERROR?it:void 0,state:"finished",walletInfo:e.walletInfo,actions:a});case 5:case"end":return r.stop()}}),r)})))},ct=function(){return function(){return nt(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))}},ut=(Pe={},Object(y.a)(Pe,rt.PERMISSION_REQUEST_SENT,ot),Object(y.a)(Pe,rt.PERMISSION_REQUEST_SUCCESS,(function(e){return nt(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.output,t.next=3,et({body:"{{wallet}}\xa0 has granted permission",timer:it,walletInfo:e.walletInfo,state:"finished",actions:[{text:"Address",actionText:tt(r.address),isBold:!0},{text:"Network",actionText:"".concat(r.network.type)},{text:"Permissions",actionText:r.scopes.join(", ")}]});case 3:case"end":return t.stop()}}),t)})))})),Object(y.a)(Pe,rt.PERMISSION_REQUEST_ERROR,st),Object(y.a)(Pe,rt.OPERATION_REQUEST_SENT,ot),Object(y.a)(Pe,rt.OPERATION_REQUEST_SUCCESS,(function(e){return nt(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.account,n=e.output,a=e.blockExplorer,t.next=3,et({body:"{{wallet}}\xa0 successfully submitted operation",timer:it,state:"finished",walletInfo:e.walletInfo,actions:[{text:tt(n.transactionHash),isBold:!0,actionText:"Open Blockexplorer",actionLogo:"external",actionCallback:function(){return nt(void 0,void 0,void 0,Object(d.a)().mark((function e(){var t;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getTransactionLink(n.transactionHash,r.network);case 2:return t=e.sent,window.open(t,"_blank"),e.next=6,Qe();case 6:case"end":return e.stop()}}),e)})))}}]});case 3:case"end":return t.stop()}}),t)})))})),Object(y.a)(Pe,rt.OPERATION_REQUEST_ERROR,st),Object(y.a)(Pe,rt.SIGN_REQUEST_SENT,ot),Object(y.a)(Pe,rt.SIGN_REQUEST_SUCCESS,(function(e){return nt(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.output,t.next=3,et({body:"{{wallet}}\xa0 successfully signed payload",timer:it,state:"finished",walletInfo:e.walletInfo,actions:[{text:"Signature: ".concat(tt(r.signature)),actionText:"Copy to clipboard",actionCallback:function(){return nt(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return navigator.clipboard.writeText(r.signature).then((function(){at.log("showSignSuccessAlert","Copying to clipboard was successful!")}),(function(e){at.error("showSignSuccessAlert","Could not copy text to clipboard: ",e)})),e.next=3,Qe();case 3:case"end":return e.stop()}}),e)})))}}]});case 3:case"end":return t.stop()}}),t)})))})),Object(y.a)(Pe,rt.SIGN_REQUEST_ERROR,st),Object(y.a)(Pe,rt.BROADCAST_REQUEST_SENT,ot),Object(y.a)(Pe,rt.BROADCAST_REQUEST_SUCCESS,(function(e){return nt(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.network,n=e.output,a=e.blockExplorer,t.next=3,et({body:"{{wallet}}\xa0 successfully injected operation",timer:it,state:"finished",walletInfo:e.walletInfo,actions:[{text:tt(n.transactionHash),isBold:!0,actionText:"Open Blockexplorer",actionLogo:"external",actionCallback:function(){return nt(void 0,void 0,void 0,Object(d.a)().mark((function e(){var t;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getTransactionLink(n.transactionHash,r);case 2:return t=e.sent,window.open(t,"_blank"),e.next=6,Qe();case 6:case"end":return e.stop()}}),e)})))}}]});case 3:case"end":return t.stop()}}),t)})))})),Object(y.a)(Pe,rt.BROADCAST_REQUEST_ERROR,st),Object(y.a)(Pe,rt.ACKNOWLEDGE_RECEIVED,(function(e){return nt(void 0,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:et({body:"Awaiting confirmation in\xa0 {{wallet}}",state:"acknowledge",walletInfo:e.walletInfo}).catch((function(e){return console.error(e)}));case 1:case"end":return t.stop()}}),t)})))})),Object(y.a)(Pe,rt.LOCAL_RATE_LIMIT_REACHED,(function(){return nt(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Se({title:"Error",body:"Rate limit reached. Please slow down",buttons:[{text:"Done",style:"outline"}],timer:3e3}).catch((function(e){return console.error(e)}));case 1:case"end":return e.stop()}}),e)})))})),Object(y.a)(Pe,rt.NO_PERMISSIONS,(function(){return nt(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Se({title:"No Permission",body:"Please allow the wallet to handle this type of request."});case 2:case"end":return e.stop()}}),e)})))})),Object(y.a)(Pe,rt.ACTIVE_ACCOUNT_SET,ct()),Object(y.a)(Pe,rt.ACTIVE_TRANSPORT_SET,ct()),Object(y.a)(Pe,rt.SHOW_PREPARE,(function(e){return nt(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.walletInfo?"Preparing Request for\xa0 {{wallet}}...":"Preparing Request...",et({body:r,state:"prepare",walletInfo:e.walletInfo}).catch((function(e){return console.error(e)}));case 2:case"end":return t.stop()}}),t)})))})),Object(y.a)(Pe,rt.HIDE_UI,(function(e){return nt(void 0,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e?(e.includes("alert")&&Ie(),e.includes("toast")&&Qe()):Qe();case 1:case"end":return t.stop()}}),t)})))})),Object(y.a)(Pe,rt.PAIR_INIT,(function(e){return nt(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={title:"Choose your preferred wallet",body:"

",pairingPayload:{p2pSyncCode:e.p2pPeerInfo,postmessageSyncCode:e.postmessagePeerInfo,preferredNetwork:e.preferredNetwork},closeButtonCallback:e.abortedHandler,disclaimerText:e.disclaimerText},t.next=3,Se(r);case 3:case"end":return t.stop()}}),t)})))})),Object(y.a)(Pe,rt.PAIR_SUCCESS,(function(){return nt(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ie();case 2:case"end":return e.stop()}}),e)})))})),Object(y.a)(Pe,rt.CHANNEL_CLOSED,(function(){return nt(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Se({title:"Channel closed",body:"Your peer has closed the connection.",buttons:[{text:"Done",style:"outline"}],timer:1500});case 2:case"end":return e.stop()}}),e)})))})),Object(y.a)(Pe,rt.INTERNAL_ERROR,(function(e){return nt(void 0,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(n=Object(A.a)(null!==(r=e.buttons)&&void 0!==r?r:[])).push({text:"Done",style:"outline"}),a={title:"Internal Error",body:e.text,buttons:n},t.next=5,Se(a);case 5:case"end":return t.stop()}}),t)})))})),Object(y.a)(Pe,rt.UNKNOWN,ct()),Pe),ft=function(){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;Object(l.a)(this,e),this.callbackMap=(t={},Object(y.a)(t,rt.PERMISSION_REQUEST_SENT,[ut.PERMISSION_REQUEST_SENT]),Object(y.a)(t,rt.PERMISSION_REQUEST_SUCCESS,[ut.PERMISSION_REQUEST_SUCCESS]),Object(y.a)(t,rt.PERMISSION_REQUEST_ERROR,[ut.PERMISSION_REQUEST_ERROR]),Object(y.a)(t,rt.OPERATION_REQUEST_SENT,[ut.OPERATION_REQUEST_SENT]),Object(y.a)(t,rt.OPERATION_REQUEST_SUCCESS,[ut.OPERATION_REQUEST_SUCCESS]),Object(y.a)(t,rt.OPERATION_REQUEST_ERROR,[ut.OPERATION_REQUEST_ERROR]),Object(y.a)(t,rt.SIGN_REQUEST_SENT,[ut.SIGN_REQUEST_SENT]),Object(y.a)(t,rt.SIGN_REQUEST_SUCCESS,[ut.SIGN_REQUEST_SUCCESS]),Object(y.a)(t,rt.SIGN_REQUEST_ERROR,[ut.SIGN_REQUEST_ERROR]),Object(y.a)(t,rt.BROADCAST_REQUEST_SENT,[ut.BROADCAST_REQUEST_SENT]),Object(y.a)(t,rt.BROADCAST_REQUEST_SUCCESS,[ut.BROADCAST_REQUEST_SUCCESS]),Object(y.a)(t,rt.BROADCAST_REQUEST_ERROR,[ut.BROADCAST_REQUEST_ERROR]),Object(y.a)(t,rt.ACKNOWLEDGE_RECEIVED,[ut.ACKNOWLEDGE_RECEIVED]),Object(y.a)(t,rt.LOCAL_RATE_LIMIT_REACHED,[ut.LOCAL_RATE_LIMIT_REACHED]),Object(y.a)(t,rt.NO_PERMISSIONS,[ut.NO_PERMISSIONS]),Object(y.a)(t,rt.ACTIVE_ACCOUNT_SET,[ut.ACTIVE_ACCOUNT_SET]),Object(y.a)(t,rt.ACTIVE_TRANSPORT_SET,[ut.ACTIVE_TRANSPORT_SET]),Object(y.a)(t,rt.SHOW_PREPARE,[ut.SHOW_PREPARE]),Object(y.a)(t,rt.HIDE_UI,[ut.HIDE_UI]),Object(y.a)(t,rt.PAIR_INIT,[ut.PAIR_INIT]),Object(y.a)(t,rt.PAIR_SUCCESS,[ut.PAIR_SUCCESS]),Object(y.a)(t,rt.CHANNEL_CLOSED,[ut.CHANNEL_CLOSED]),Object(y.a)(t,rt.INTERNAL_ERROR,[ut.INTERNAL_ERROR]),Object(y.a)(t,rt.UNKNOWN,[ut.UNKNOWN]),t),n&&this.setAllHandlers(),this.overrideDefaults(r)}return Object(h.a)(e,[{key:"on",value:function(e,t){return nt(this,void 0,void 0,Object(d.a)().mark((function r(){var n;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:(n=this.callbackMap[e]||[]).push(t),this.callbackMap[e]=n;case 3:case"end":return r.stop()}}),r,this)})))}},{key:"emit",value:function(e,t,r){return nt(this,void 0,void 0,Object(d.a)().mark((function n(){var a,i=this;return Object(d.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:(a=this.callbackMap[e])&&a.length>0&&a.forEach((function(n){return nt(i,void 0,void 0,Object(d.a)().mark((function a(){return Object(d.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,n(t,r);case 3:a.next=8;break;case 5:a.prev=5,a.t0=a.catch(0),at.error("error handling event ".concat(e),a.t0);case 8:case"end":return a.stop()}}),a,null,[[0,5]])})))}));case 2:case"end":return n.stop()}}),n,this)})))}},{key:"overrideDefaults",value:function(e){var t=this;Object.keys(e).forEach((function(r){var n=r,a=e[n];a&&(t.callbackMap[n]=[a.handler])}))}},{key:"setAllHandlers",value:function(e){var t=this;Object.keys(this.callbackMap).forEach((function(r){var n=r;t.callbackMap[n]=[],e?t.callbackMap[n].push(e):t.callbackMap[n].push((function(){for(var e=arguments.length,t=new Array(e),n=0;nt})),this.requestCounter.push(t),e.abrupt("return",this.requestCounter.length>this.rateLimit);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"init",value:function(e){return wt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._transport.status!==v.b.RESOLVED){t.next=4;break}return t.next=3,this.transport;case 3:return t.abrupt("return",t.sent.type);case 4:return t.next=6,this.setTransport(e);case 6:return t.abrupt("return",e.type);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"getOwnAppMetadata",value:function(){return wt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=At.a,e.next=3,this.beaconId;case 3:return e.t1=e.sent,e.next=6,(0,e.t0)(e.t1);case 6:return e.t2=e.sent,e.t3=this.name,e.t4=this.iconUrl,e.abrupt("return",{senderId:e.t2,name:e.t3,icon:e.t4});case 10:case"end":return e.stop()}}),e,this)})))}},{key:"getPeers",value:function(){return wt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.transport;case 2:return e.abrupt("return",e.sent.getPeers());case 3:case"end":return e.stop()}}),e,this)})))}},{key:"addPeer",value:function(e){return wt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.transport;case 2:return t.abrupt("return",t.sent.addPeer(e));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"destroy",value:function(){var e=this,t=Object.create(null,{destroy:{get:function(){return Object(p.a)(Object(b.a)(r.prototype),"destroy",e)}}});return wt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._transport.status!==v.b.RESOLVED){e.next=5;break}return e.next=3,this.transport;case 3:return e.next=5,e.sent.disconnect();case 5:return e.next=7,t.destroy.call(this);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"setTransport",value:function(e){return wt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e?this._transport.isSettled()?this._transport=v.a.resolve(e):this._transport.resolve(e):this._transport.isSettled()&&(this._transport=new v.a),t.next=3,this.events.emit(rt.ACTIVE_TRANSPORT_SET,e);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"addListener",value:function(e){return wt(this,void 0,void 0,Object(d.a)().mark((function t(){var r=this;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.addListener((function(e,t){return wt(r,void 0,void 0,Object(d.a)().mark((function r(){var n;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("string"!==typeof e){r.next=5;break}return r.next=3,(new F.a).deserialize(e);case 3:n=r.sent,this.handleResponse(n,t);case 5:case"end":return r.stop()}}),r,this)})))})).catch((function(e){return xt.error("addListener",e)}));case 1:case"end":return t.stop()}}),t)})))}},{key:"sendDisconnectToPeer",value:function(e,t){return wt(this,void 0,void 0,Object(d.a)().mark((function r(){var a,i,o;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(M.a)();case 2:return r.t0=r.sent,r.t1=lt.a,r.t2=At.a,r.next=7,this.beaconId;case 7:return r.t3=r.sent,r.next=10,(0,r.t2)(r.t3);case 10:return r.t4=r.sent,r.t5=n.Disconnect,a={id:r.t0,version:r.t1,senderId:r.t4,type:r.t5},r.next=15,(new F.a).serialize(a);case 15:if(i=r.sent,null===t||void 0===t){r.next=20;break}r.t6=t,r.next=23;break;case 20:return r.next=22,this.transport;case 22:r.t6=r.sent;case 23:return o=r.t6,r.next=26,o.send(i,e);case 26:case"end":return r.stop()}}),r,this)})))}}]),r}(pt),_t=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},Ct=function(){function e(t){Object(l.a)(this,e),this.storageManager=new V(t,qt.PERMISSION_LIST)}return Object(h.a)(e,[{key:"getPermissions",value:function(){return _t(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.storageManager.getAll());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getPermission",value:function(e){return _t(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.getOne((function(t){return t.accountIdentifier===e})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"addPermission",value:function(e){return _t(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.addOne(e,(function(t){return t.accountIdentifier===e.accountIdentifier})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removePermission",value:function(e){return _t(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.remove((function(t){return t.accountIdentifier===e})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removePermissions",value:function(e){return _t(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.remove((function(t){return e.includes(t.accountIdentifier)})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAllPermissions",value:function(){return _t(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.storageManager.removeAll());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"hasPermission",value:function(e){return _t(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",gt.hasPermission(e,this.getPermission.bind(this),this.getPermissions.bind(this)));case 1:case"end":return t.stop()}}),t,this)})))}}]),e}(),kt=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},Bt=function(){function e(t){Object(l.a)(this,e),this.storageManager=new V(t,qt.APP_METADATA_LIST)}return Object(h.a)(e,[{key:"getAppMetadataList",value:function(){return kt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.storageManager.getAll());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getAppMetadata",value:function(e){return kt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.getOne((function(t){return t.senderId===e})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"addAppMetadata",value:function(e){return kt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.addOne(e,(function(t){return t.senderId===e.senderId})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAppMetadata",value:function(e){return kt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.remove((function(t){return t.senderId===e})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAppMetadatas",value:function(e){return kt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.storageManager.remove((function(t){return e.includes(t.senderId)})));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAllAppMetadata",value:function(){return kt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.storageManager.removeAll());case 1:case"end":return e.stop()}}),e,this)})))}}]),e}();var It,St,Ot=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},Mt=new R.a("IncomingRequestInterceptor"),Dt=function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,null,[{key:"intercept",value:function(t){return Ot(this,void 0,void 0,Object(d.a)().mark((function r(){var a,i,o,s,c,u,f,l,h,p;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:a=t.message,i=t.connectionInfo,o=t.appMetadataManager,s=t.interceptorCallback,a.beaconId&&!a.senderId&&(a.senderId=a.beaconId,delete a.beaconId),r.t0=a.type,r.next=r.t0===n.PermissionRequest?5:r.t0===n.OperationRequest?11:r.t0===n.SignPayloadRequest?17:r.t0===n.BroadcastRequest?23:29;break;case 5:return a.appMetadata.beaconId&&!a.appMetadata.senderId&&(a.appMetadata.senderId=a.appMetadata.beaconId,delete a.appMetadata.beaconId),r.next=8,o.addAppMetadata(a.appMetadata);case 8:return s(a,i),r.abrupt("break",31);case 11:return r.next=13,e.getAppMetadata(o,a.senderId);case 13:return c=r.sent,u=Object.assign({appMetadata:c},a),s(u,i),r.abrupt("break",31);case 17:return r.next=19,e.getAppMetadata(o,a.senderId);case 19:return f=r.sent,l=Object.assign({appMetadata:f},a),s(l,i),r.abrupt("break",31);case 23:return r.next=25,e.getAppMetadata(o,a.senderId);case 25:return h=r.sent,p=Object.assign({appMetadata:h},a),s(p,i),r.abrupt("break",31);case 29:Mt.log("intercept","Message not handled");case 31:case"end":return r.stop()}}),r)})))}},{key:"getAppMetadata",value:function(e,t){return Ot(this,void 0,void 0,Object(d.a)().mark((function r(){var n;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.getAppMetadata(t);case 2:if(n=r.sent){r.next=5;break}throw new Error("AppMetadata not found");case 5:return r.abrupt("return",n);case 6:case"end":return r.stop()}}),r)})))}}]),e}(),Tt=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},Ft=new R.a("OutgoingResponseInterceptor"),Rt=function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,null,[{key:"intercept",value:function(e){return Tt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,a,i,o,s,c,u,f,l,h,p,b,m,g,v,y,A,w,x;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.senderId,a=e.request,i=e.message,o=e.ownAppMetadata,s=e.permissionManager,c=e.appMetadataManager,u=e.interceptorCallback,f=function(e){e.beaconId=e.senderId,u(e)},t.t0=i.type,t.next=t.t0===n.Error?5:t.t0===n.Acknowledge?9:t.t0===n.PermissionResponse?12:t.t0===n.OperationResponse?36:t.t0===n.SignPayloadResponse?39:t.t0===n.BroadcastResponse?42:45;break;case 5:return l={type:i.type,version:lt.a,senderId:r,id:i.id,errorType:i.errorType},i.errorType===Re.TRANSACTION_INVALID_ERROR&&i.errorData&&(h=i.errorData,Array.isArray(h)&&h.every((function(e){return Boolean(e.kind)&&Boolean(e.id)}))?l.errorData=i.errorData:Ft.warn("ErrorData provided is not in correct format. It needs to be an array of RPC errors. It will not be included in the message sent to the dApp")),f(l),t.abrupt("break",47);case 9:return p={type:i.type,version:lt.a,senderId:r,id:i.id},f(p),t.abrupt("break",47);case 12:return b=Object.assign({senderId:r,version:lt.a,appMetadata:o},i),m=b.publicKey||b.pubkey||b.pubKey,t.next=16,Object(dt.c)(m);case 16:return g=t.sent,t.next=19,c.getAppMetadata(a.senderId);case 19:if(v=t.sent){t.next=22;break}throw new Error("AppMetadata not found");case 22:return t.next=24,Object(bt.a)(g,b.network);case 24:return t.t1=t.sent,t.t2=a.senderId,t.t3=v,t.t4=g,t.t5=m,t.t6=b.network,t.t7=b.scopes,t.t8=(new Date).getTime(),y={accountIdentifier:t.t1,senderId:t.t2,appMetadata:t.t3,website:"",address:t.t4,publicKey:t.t5,network:t.t6,scopes:t.t7,connectedAt:t.t8},s.addPermission(y).catch(console.error),f(b),t.abrupt("break",47);case 36:return A=Object.assign({senderId:r,version:lt.a},i),f(A),t.abrupt("break",47);case 39:return w=Object.assign({senderId:r,version:lt.a},i),f(w),t.abrupt("break",47);case 42:return x=Object.assign({senderId:r,version:lt.a},i),f(x),t.abrupt("break",47);case 45:Ft.log("intercept","Message not handled");case 47:case"end":return t.stop()}}),t)})))}}]),e}(),Pt=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},Nt=new R.a("WalletClient"),jt=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(e){var n;return Object(l.a)(this,r),(n=t.call(this,Object.assign({storage:new pr},e)))._isConnected=new v.a,n.pendingRequests=[],n.permissionManager=new Ct(new pr),n.appMetadataManager=new Bt(new pr),n}return Object(h.a)(r,[{key:"isConnected",get:function(){return this._isConnected.promise}},{key:"init",value:function(){var e=this,t=Object.create(null,{init:{get:function(){return Object(p.a)(Object(b.a)(r.prototype),"init",e)}}});return Pt(this,void 0,void 0,Object(d.a)().mark((function e(){var r,n;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.keyPair;case 2:return r=e.sent,n=new Br(this.name,r,this.storage,this.matrixNodes,this.iconUrl,this.appUrl),e.abrupt("return",t.init.call(this,n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"connect",value:function(e){return Pt(this,void 0,void 0,Object(d.a)().mark((function t(){var r=this;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.handleResponse=function(t,a){return Pt(r,void 0,void 0,Object(d.a)().mark((function r(){var i,o,s;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.type!==n.Disconnect){r.next=12;break}return r.next=3,this.transport;case 3:return i=r.sent,r.next=6,i.getPeers();case 6:if(o=r.sent,!(s=o.find((function(e){return e.senderId===t.senderId})))){r.next=11;break}return r.next=11,this.removePeer(s);case 11:return r.abrupt("return");case 12:if(this.pendingRequests.some((function(e){return e[0].id===t.id}))){r.next=19;break}if(this.pendingRequests.push([t,a]),"1"===t.version){r.next=17;break}return r.next=17,this.sendAcknowledgeResponse(t,a);case 17:return r.next=19,Dt.intercept({message:t,connectionInfo:a,appMetadataManager:this.appMetadataManager,interceptorCallback:e});case 19:case"end":return r.stop()}}),r,this)})))},t.abrupt("return",this._connect());case 2:case"end":return t.stop()}}),t,this)})))}},{key:"_connect",value:function(){return Pt(this,void 0,void 0,Object(d.a)().mark((function e(){var t,r=this;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.transport;case 2:if((t=e.sent).connectionStatus!==K.NOT_CONNECTED){e.next=10;break}return e.next=6,t.connect();case 6:t.addListener((function(e,t){return Pt(r,void 0,void 0,Object(d.a)().mark((function r(){var n;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("string"!==typeof e){r.next=5;break}return r.next=3,(new F.a).deserialize(e);case 3:n=r.sent,this.handleResponse(n,t);case 5:case"end":return r.stop()}}),r,this)})))})).catch((function(e){return Nt.log("_connect",e)})),this._isConnected.resolve(!0),e.next=10;break;case 10:case"end":return e.stop()}}),e,this)})))}},{key:"respond",value:function(e){return Pt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,n=this;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.pendingRequests.find((function(t){return t[0].id===e.id}))){t.next=3;break}throw new Error("No matching request found!");case 3:return this.pendingRequests=this.pendingRequests.filter((function(t){return t[0].id!==e.id})),t.t0=Rt,t.t1=At.a,t.next=8,this.beaconId;case 8:return t.t2=t.sent,t.next=11,(0,t.t1)(t.t2);case 11:return t.t3=t.sent,t.t4=r[0],t.t5=e,t.next=16,this.getOwnAppMetadata();case 16:return t.t6=t.sent,t.t7=this.permissionManager,t.t8=this.appMetadataManager,t.t9=function(e){return Pt(n,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.respondToMessage(e,r[1]);case 2:case"end":return t.stop()}}),t,this)})))},t.t10={senderId:t.t3,request:t.t4,message:t.t5,ownAppMetadata:t.t6,permissionManager:t.t7,appMetadataManager:t.t8,interceptorCallback:t.t9},t.next=23,t.t0.intercept.call(t.t0,t.t10);case 23:case"end":return t.stop()}}),t,this)})))}},{key:"getAppMetadataList",value:function(){return Pt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.appMetadataManager.getAppMetadataList());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getAppMetadata",value:function(e){return Pt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.appMetadataManager.getAppMetadata(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAppMetadata",value:function(e){return Pt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.appMetadataManager.removeAppMetadata(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAllAppMetadata",value:function(){return Pt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.appMetadataManager.removeAllAppMetadata());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getPermissions",value:function(){return Pt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.permissionManager.getPermissions());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getPermission",value:function(e){return Pt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.permissionManager.getPermission(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removePermission",value:function(e){return Pt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.permissionManager.removePermission(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeAllPermissions",value:function(){return Pt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.permissionManager.removeAllPermissions());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"addPeer",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Pt(this,void 0,void 0,Object(d.a)().mark((function r(){var n;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=Object,r.t1=Object.assign({},e),r.next=4,Object(At.a)(e.publicKey);case 4:return r.t2=r.sent,r.t3={senderId:r.t2},n=r.t0.assign.call(r.t0,r.t1,r.t3),r.next=9,this.transport;case 9:return r.abrupt("return",r.sent.addPeer(n,t));case 10:case"end":return r.stop()}}),r,this)})))}},{key:"removePeer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Pt(this,void 0,void 0,Object(d.a)().mark((function r(){var n;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.transport;case 2:return n=r.sent.removePeer(e),r.next=5,this.removePermissionsForPeers([e]);case 5:if(!t){r.next=8;break}return r.next=8,this.sendDisconnectToPeer(e);case 8:return r.abrupt("return",n);case 9:case"end":return r.stop()}}),r,this)})))}},{key:"removeAllPeers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Pt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a,i=this;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.transport;case 2:return t.next=4,t.sent.getPeers();case 4:return r=t.sent,t.next=7,this.transport;case 7:return n=t.sent.removeAllPeers(),t.next=10,this.removePermissionsForPeers(r);case 10:if(!e){t.next=14;break}return a=r.map((function(e){return i.sendDisconnectToPeer(e)})),t.next=14,Promise.all(a);case 14:return t.abrupt("return",n);case 15:case"end":return t.stop()}}),t,this)})))}},{key:"removePermissionsForPeers",value:function(e){return Pt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a,i;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.permissionManager.getPermissions();case 2:return r=t.sent,n=e.map((function(e){return e.senderId})),a=r.filter((function(e){return n.includes(e.appMetadata.senderId)})),i=a.map((function(e){return e.accountIdentifier})),t.next=8,this.permissionManager.removePermissions(i);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"sendAcknowledgeResponse",value:function(e,t){return Pt(this,void 0,void 0,Object(d.a)().mark((function r(){var a,i=this;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={id:e.id,type:n.Acknowledge},r.t0=Rt,r.t1=At.a,r.next=5,this.beaconId;case 5:return r.t2=r.sent,r.next=8,(0,r.t1)(r.t2);case 8:return r.t3=r.sent,r.t4=e,r.t5=a,r.next=13,this.getOwnAppMetadata();case 13:return r.t6=r.sent,r.t7=this.permissionManager,r.t8=this.appMetadataManager,r.t9=function(e){return Pt(i,void 0,void 0,Object(d.a)().mark((function r(){return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.respondToMessage(e,t);case 2:case"end":return r.stop()}}),r,this)})))},r.t10={senderId:r.t3,request:r.t4,message:r.t5,ownAppMetadata:r.t6,permissionManager:r.t7,appMetadataManager:r.t8,interceptorCallback:r.t9},r.next=20,r.t0.intercept.call(r.t0,r.t10);case 20:case"end":return r.stop()}}),r,this)})))}},{key:"respondToMessage",value:function(e,t){return Pt(this,void 0,void 0,Object(d.a)().mark((function r(){var n,a,i;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(new F.a).serialize(e);case 2:if(n=r.sent,!t){r.next=14;break}return r.next=6,this.getPeers();case 6:return a=r.sent,i=a.find((function(e){return e.publicKey===t.id})),r.next=10,this.transport;case 10:return r.next=12,r.sent.send(n,i);case 12:r.next=18;break;case 14:return r.next=16,this.transport;case 16:return r.next=18,r.sent.send(n);case 18:case"end":return r.stop()}}),r,this)})))}}]),r}(Et),Lt=r(23),Ut=(It={},Object(y.a)(It,n.PermissionRequest,{sent:rt.PERMISSION_REQUEST_SENT,success:rt.PERMISSION_REQUEST_SUCCESS,error:rt.PERMISSION_REQUEST_ERROR}),Object(y.a)(It,n.PermissionResponse,{sent:rt.UNKNOWN,success:rt.UNKNOWN,error:rt.UNKNOWN}),Object(y.a)(It,n.OperationRequest,{sent:rt.OPERATION_REQUEST_SENT,success:rt.OPERATION_REQUEST_SUCCESS,error:rt.OPERATION_REQUEST_ERROR}),Object(y.a)(It,n.OperationResponse,{sent:rt.UNKNOWN,success:rt.UNKNOWN,error:rt.UNKNOWN}),Object(y.a)(It,n.SignPayloadRequest,{sent:rt.SIGN_REQUEST_SENT,success:rt.SIGN_REQUEST_SUCCESS,error:rt.SIGN_REQUEST_ERROR}),Object(y.a)(It,n.SignPayloadResponse,{sent:rt.UNKNOWN,success:rt.UNKNOWN,error:rt.UNKNOWN}),Object(y.a)(It,n.BroadcastRequest,{sent:rt.BROADCAST_REQUEST_SENT,success:rt.BROADCAST_REQUEST_SUCCESS,error:rt.BROADCAST_REQUEST_ERROR}),Object(y.a)(It,n.BroadcastResponse,{sent:rt.UNKNOWN,success:rt.UNKNOWN,error:rt.UNKNOWN}),Object(y.a)(It,n.Acknowledge,{sent:rt.UNKNOWN,success:rt.UNKNOWN,error:rt.UNKNOWN}),Object(y.a)(It,n.Disconnect,{sent:rt.UNKNOWN,success:rt.UNKNOWN,error:rt.UNKNOWN}),Object(y.a)(It,n.Error,{sent:rt.UNKNOWN,success:rt.UNKNOWN,error:rt.UNKNOWN}),It),Qt=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},Gt=function(){function e(t){Object(l.a)(this,e),this.rpcUrls=t}return Object(h.a)(e,[{key:"getLinkForNetwork",value:function(e){return Qt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.rpcUrls[e.type]);case 1:case"end":return t.stop()}}),t,this)})))}}]),e}(),Ht=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},zt=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(){var e,n,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(e={},Object(y.a)(e,i.MAINNET,"https://tezblock.io"),Object(y.a)(e,i.DELPHINET,"https://delphinet.tezblock.io"),Object(y.a)(e,i.EDONET,"https://edonet.tezblock.io"),Object(y.a)(e,i.FLORENCENET,"https://florencenet.tezblock.io"),Object(y.a)(e,i.GRANADANET,"https://granadanet.tezblock.io"),Object(y.a)(e,i.HANGZHOUNET,"https://hangzhounet.tezblock.io"),Object(y.a)(e,i.ITHACANET,"https://ithacanet.tezblock.io"),Object(y.a)(e,i.CUSTOM,"https://ithacanet.tezblock.io"),e);return Object(l.a)(this,r),(n=t.call(this,a)).rpcUrls=a,n}return Object(h.a)(r,[{key:"getAddressLink",value:function(e,t){return Ht(this,void 0,void 0,Object(d.a)().mark((function r(){var n;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getLinkForNetwork(t);case 2:return n=r.sent,r.abrupt("return","".concat(n,"/account/").concat(e));case 4:case"end":return r.stop()}}),r,this)})))}},{key:"getTransactionLink",value:function(e,t){return Ht(this,void 0,void 0,Object(d.a)().mark((function r(){var n;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getLinkForNetwork(t);case 2:return n=r.sent,r.abrupt("return","".concat(n,"/transaction/").concat(e));case 4:case"end":return r.stop()}}),r,this)})))}}]),r}(Gt);!function(e){e.RAW="raw",e.OPERATION="operation",e.MICHELINE="micheline"}(St||(St={}));var qt,Kt,Vt=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},Wt=new R.a("DAppClient"),Yt=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(e){var a,o,c,u;return Object(l.a)(this,r),(a=t.call(this,Object.assign({storage:e&&e.storage?e.storage:new pr},e))).openRequests=new Map,a._activeAccount=new v.a,a._activePeer=new v.a,a.blockExplorer=null!==(o=e.blockExplorer)&&void 0!==o?o:new zt,a.preferredNetwork=null!==(c=e.preferredNetwork)&&void 0!==c?c:i.MAINNET,I(null!==(u=e.colorMode)&&void 0!==u?u:f.LIGHT),a.disclaimerText=e.disclaimerText,a.appMetadataManager=new Bt(a.storage),a.activeAccountLoaded=a.storage.get(qt.ACTIVE_ACCOUNT).then((function(e){return Vt(Object(Lt.a)(a),void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=9;break}return t.t0=this,t.next=4,this.accountManager.getAccount(e);case 4:return t.t1=t.sent,t.next=7,t.t0.setActiveAccount.call(t.t0,t.t1);case 7:t.next=11;break;case 9:return t.next=11,this.setActiveAccount(void 0);case 11:case"end":return t.stop()}}),t,this)})))})).catch((function(e){return Vt(Object(Lt.a)(a),void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setActiveAccount(void 0);case 2:console.error(e);case 3:case"end":return t.stop()}}),t,this)})))})),a.handleResponse=function(e,t){return Vt(Object(Lt.a)(a),void 0,void 0,Object(d.a)().mark((function r(){var a,i,o,c,u;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.openRequests.get(e.id),Wt.log("handleResponse","Received message",e,t),!i||e.type!==n.Acknowledge){r.next=16;break}return Wt.log("acknowledge message received for ".concat(e.id)),console.timeLog(e.id,"acknowledge"),r.t0=this.events,r.t1=rt.ACKNOWLEDGE_RECEIVED,r.t2=e,r.t3={},r.next=11,this.getWalletInfo();case 11:r.t4=r.sent,r.t5={message:r.t2,extraInfo:r.t3,walletInfo:r.t4},r.t0.emit.call(r.t0,r.t1,r.t5).catch(console.error),r.next=58;break;case 16:if(!i){r.next=26;break}if(e.type!==n.PermissionResponse||!e.appMetadata){r.next=20;break}return r.next=20,this.appMetadataManager.addAppMetadata(e.appMetadata);case 20:console.timeLog(e.id,"response"),console.timeEnd(e.id),e.type===n.Error||e.errorType?i.reject(e):i.resolve({message:e,connectionInfo:t}),this.openRequests.delete(e.id),r.next=58;break;case 26:if(e.type!==n.Disconnect){r.next=57;break}if(t.origin!==s.P2P){r.next=31;break}r.t6=this.p2pTransport,r.next=39;break;case 31:if(null===(a=this.postMessageTransport)||void 0===a){r.next=35;break}r.t7=a,r.next=38;break;case 35:return r.next=37,this.transport;case 37:r.t7=r.sent;case 38:r.t6=r.t7;case 39:if(!(o=r.t6)){r.next=55;break}return r.next=43,o.getPeers();case 43:if(c=r.sent,!(u=c.find((function(t){return t.senderId===e.senderId})))){r.next=54;break}return r.next=48,o.removePeer(u);case 48:return r.next=50,this.removeAccountsForPeers([u]);case 50:return r.next=52,this.events.emit(rt.CHANNEL_CLOSED);case 52:r.next=55;break;case 54:Wt.error("handleDisconnect","cannot find peer for sender ID",e.senderId);case 55:r.next=58;break;case 57:Wt.error("handleResponse","no request found for id ",e.id);case 58:case"end":return r.stop()}}),r,this)})))},a}return Object(h.a)(r,[{key:"initInternalTransports",value:function(){return Vt(this,void 0,void 0,Object(d.a)().mark((function e(){var t;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.keyPair;case 2:if(t=e.sent,!this.postMessageTransport&&!this.p2pTransport){e.next=5;break}return e.abrupt("return");case 5:return this.postMessageTransport=new Cr(this.name,t,this.storage),e.next=8,this.addListener(this.postMessageTransport);case 8:return this.p2pTransport=new xr(this.name,t,this.storage,this.matrixNodes,this.iconUrl,this.appUrl),e.next=11,this.addListener(this.p2pTransport);case 11:case"end":return e.stop()}}),e,this)})))}},{key:"init",value:function(e){var t=this,n=Object.create(null,{init:{get:function(){return Object(p.a)(Object(b.a)(r.prototype),"init",t)}}});return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){var r=this;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._initPromise){t.next=2;break}return t.abrupt("return",this._initPromise);case 2:return t.prev=2,t.next=5,this.activeAccountLoaded;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(2);case 9:return this._initPromise=new Promise((function(t){return Vt(r,void 0,void 0,Object(d.a)().mark((function r(){var a,i,o,c,u,f=this;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e){r.next=10;break}return r.next=3,this.addListener(e);case 3:return r.t0=t,r.next=6,n.init.call(this,e);case 6:r.t1=r.sent,(0,r.t0)(r.t1),r.next=59;break;case 10:if(!this._transport.isSettled()){r.next=27;break}return r.next=13,this.transport;case 13:return r.next=15,r.sent.connect();case 15:return r.t2=t,r.t3=n.init,r.t4=this,r.next=20,this.transport;case 20:return r.t5=r.sent,r.next=23,r.t3.call.call(r.t3,r.t4,r.t5);case 23:r.t6=r.sent,(0,r.t2)(r.t6),r.next=59;break;case 27:return r.next=29,this.getActiveAccount();case 29:return a=r.sent,i=function(){f.postMessageTransport&&f.postMessageTransport.stopListeningForNewPeers().catch(console.error),f.p2pTransport&&f.p2pTransport.stopListeningForNewPeers().catch(console.error)},r.next=33,this.initInternalTransports();case 33:if(this.postMessageTransport&&this.p2pTransport){r.next=35;break}return r.abrupt("return");case 35:if(this.postMessageTransport.connect().then().catch(console.error),!a||!a.origin){r.next=54;break}if((o=a.origin.type)!==s.EXTENSION){r.next=46;break}return r.t7=t,r.next=42,n.init.call(this,this.postMessageTransport);case 42:r.t8=r.sent,(0,r.t7)(r.t8),r.next=52;break;case 46:if(o!==s.P2P){r.next=52;break}return r.t9=t,r.next=50,n.init.call(this,this.p2pTransport);case 50:r.t10=r.sent,(0,r.t9)(r.t10);case 52:r.next=59;break;case 54:c=this.p2pTransport,(u=this.postMessageTransport).listenForNewPeer((function(e){Wt.log("init","postmessage transport peer connected",e),f.events.emit(rt.PAIR_SUCCESS,e).catch((function(e){return console.warn(e)})),f.setActivePeer(e).catch(console.error),f.setTransport(f.postMessageTransport).catch(console.error),i(),t(q.POST_MESSAGE)})).catch(console.error),c.listenForNewPeer((function(e){Wt.log("init","p2p transport peer connected",e),f.events.emit(rt.PAIR_SUCCESS,e).catch((function(e){return console.warn(e)})),f.setActivePeer(e).catch(console.error),f.setTransport(f.p2pTransport).catch(console.error),i(),t(q.P2P)})).catch(console.error),se.getAvailableExtensions().then((function(){return Vt(f,void 0,void 0,Object(d.a)().mark((function e(){var t=this;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.events.emit(rt.PAIR_INIT,{p2pPeerInfo:function(){return c.connect().then().catch(console.error),c.getPairingRequestInfo()},postmessagePeerInfo:function(){return u.getPairingRequestInfo()},preferredNetwork:this.preferredNetwork,abortedHandler:function(){t._initPromise=void 0},disclaimerText:this.disclaimerText}).catch((function(e){return console.warn(e)}));case 1:case"end":return e.stop()}}),e,this)})))})).catch((function(e){f._initPromise=void 0,console.error(e)}));case 59:case"end":return r.stop()}}),r,this)})))})),t.abrupt("return",this._initPromise);case 11:case"end":return t.stop()}}),t,this,[[2,7]])})))}},{key:"getActiveAccount",value:function(){return Vt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._activeAccount.promise);case 1:case"end":return e.stop()}}),e,this)})))}},{key:"setActiveAccount",value:function(e){return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,n;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._activeAccount.isSettled()?this._activeAccount=v.a.resolve(e):this._activeAccount.resolve(e),!e){t.next=20;break}return r=e.origin.type,t.next=5,this.initInternalTransports();case 5:if(r!==s.EXTENSION){t.next=10;break}return t.next=8,this.setTransport(this.postMessageTransport);case 8:t.next=13;break;case 10:if(r!==s.P2P){t.next=13;break}return t.next=13,this.setTransport(this.p2pTransport);case 13:return t.next=15,this.getPeer(e);case 15:return n=t.sent,t.next=18,this.setActivePeer(n);case 18:t.next=24;break;case 20:return t.next=22,this.setActivePeer(void 0);case 22:return t.next=24,this.setTransport(void 0);case 24:return t.next=26,this.storage.set(qt.ACTIVE_ACCOUNT,e?e.accountIdentifier:void 0);case 26:return t.next=28,this.events.emit(rt.ACTIVE_ACCOUNT_SET,e);case 28:return t.abrupt("return");case 29:case"end":return t.stop()}}),t,this)})))}},{key:"clearActiveAccount",value:function(){return this.setActiveAccount()}},{key:"setColorMode",value:function(e){return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",I(e));case 1:case"end":return t.stop()}}),t)})))}},{key:"getColorMode",value:function(){return Vt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",S());case 1:case"end":return e.stop()}}),e)})))}},{key:"getAppMetadata",value:function(){return Vt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getOwnAppMetadata());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"showPrepare",value:function(){return Vt(this,void 0,void 0,Object(d.a)().mark((function e(){var t,r=this;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Vt(r,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getWalletInfo();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",void 0);case 9:case"end":return e.stop()}}),e,this,[[0,6]])})));case 2:return t=e.sent,e.next=5,this.events.emit(rt.SHOW_PREPARE,{walletInfo:t});case 5:case"end":return e.stop()}}),e,this)})))}},{key:"hideUI",value:function(e){return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.events.emit(rt.HIDE_UI,e);case 2:case"end":return t.stop()}}),t,this)})))}},{key:"removeAccount",value:function(e){var t=this,n=Object.create(null,{removeAccount:{get:function(){return Object(p.a)(Object(b.a)(r.prototype),"removeAccount",t)}}});return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,a;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.removeAccount.call(this,e),t.next=3,this.getActiveAccount();case 3:if(!(a=t.sent)||a.accountIdentifier!==e){t.next=7;break}return t.next=7,this.setActiveAccount(void 0);case 7:return t.abrupt("return",r);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"removeAllAccounts",value:function(){var e=this,t=Object.create(null,{removeAllAccounts:{get:function(){return Object(p.a)(Object(b.a)(r.prototype),"removeAllAccounts",e)}}});return Vt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.removeAllAccounts.call(this);case 2:return e.next=4,this.setActiveAccount(void 0);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"removePeer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Vt(this,void 0,void 0,Object(d.a)().mark((function r(){var n,a;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.transport;case 2:return n=r.sent,a=n.removePeer(e),r.next=6,this.removeAccountsForPeers([e]);case 6:if(!t){r.next=9;break}return r.next=9,this.sendDisconnectToPeer(e,n);case 9:return r.abrupt("return",a);case 10:case"end":return r.stop()}}),r,this)})))}},{key:"removeAllPeers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a,i,o=this;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.transport;case 2:return r=t.sent,t.next=5,r.getPeers();case 5:return n=t.sent,a=r.removeAllPeers(),t.next=9,this.removeAccountsForPeers(n);case 9:if(!e){t.next=13;break}return i=n.map((function(e){return o.sendDisconnectToPeer(e,r)})),t.next=13,Promise.all(i);case 13:return t.abrupt("return",a);case 14:case"end":return t.stop()}}),t,this)})))}},{key:"subscribeToEvent",value:function(e,t){return Vt(this,void 0,void 0,Object(d.a)().mark((function r(){return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.events.on(e,t);case 2:case"end":return r.stop()}}),r,this)})))}},{key:"checkPermissions",value:function(e){return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,i;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e!==n.PermissionRequest){t.next=2;break}return t.abrupt("return",!0);case 2:return t.next=4,this.getActiveAccount();case 4:if(r=t.sent){t.next=9;break}return t.next=8,this.sendInternalError("No active account set!");case 8:throw t.sent;case 9:i=r.scopes,t.t0=e,t.next=t.t0===n.OperationRequest?13:t.t0===n.SignPayloadRequest?14:t.t0===n.BroadcastRequest?15:16;break;case 13:return t.abrupt("return",i.includes(a.OPERATION_REQUEST));case 14:return t.abrupt("return",i.includes(a.SIGN));case 15:return t.abrupt("return",!0);case 16:return t.abrupt("return",!1);case 17:case"end":return t.stop()}}),t,this)})))}},{key:"requestPermissions",value:function(e){return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,o,s,c,u,f,l,h,p=this;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getOwnAppMetadata();case 2:return t.t0=t.sent,t.t1=n.PermissionRequest,t.t2=e&&e.network?e.network:{type:i.MAINNET},t.t3=e&&e.scopes?e.scopes:[a.OPERATION_REQUEST,a.SIGN],r={appMetadata:t.t0,type:t.t1,network:t.t2,scopes:t.t3},t.next=9,this.makeRequest(r).catch((function(e){return Vt(p,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.handleRequestError(r,e);case 2:throw t.sent;case 3:case"end":return t.stop()}}),t,this)})))}));case 9:return o=t.sent,s=o.message,c=o.connectionInfo,u=s.publicKey||s.pubkey||s.pubKey,t.next=15,Object(dt.c)(u);case 15:return f=t.sent,t.next=18,Object(bt.a)(f,s.network);case 18:return t.t4=t.sent,t.t5=s.senderId,t.t6={type:c.origin,id:c.id},t.t7=f,t.t8=u,t.t9=s.network,t.t10=s.scopes,t.t11=s.threshold,t.t12=(new Date).getTime(),l={accountIdentifier:t.t4,senderId:t.t5,origin:t.t6,address:t.t7,publicKey:t.t8,network:t.t9,scopes:t.t10,threshold:t.t11,connectedAt:t.t12},t.next=30,this.accountManager.addAccount(l);case 30:return t.next=32,this.setActiveAccount(l);case 32:return h=Object.assign(Object.assign({},s),{address:f,accountInfo:l}),t.t13=this,t.t14=r,t.t15=l,t.t16=h,t.t17=this.blockExplorer,t.t18=c,t.next=41,this.getWalletInfo();case 41:return t.t19=t.sent,t.t20={account:t.t15,output:t.t16,blockExplorer:t.t17,connectionContext:t.t18,walletInfo:t.t19},t.next=45,t.t13.notifySuccess.call(t.t13,t.t14,t.t20);case 45:return t.abrupt("return",h);case 46:case"end":return t.stop()}}),t,this)})))}},{key:"requestSignPayload",value:function(e){return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,a,i,o,s,c,u,f=this;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.payload){t.next=4;break}return t.next=3,this.sendInternalError("Payload must be provided");case 3:case 10:throw t.sent;case 4:return t.next=6,this.getActiveAccount();case 6:if(r=t.sent){t.next=11;break}return t.next=10,this.sendInternalError("No active account!");case 11:if("string"===typeof(a=e.payload)){t.next=14;break}throw new Error("Payload must be a string");case 14:return i=function(){switch(e.signingType){case St.OPERATION:if(!a.startsWith("03"))throw new Error('When using signing type "OPERATION", the payload must start with prefix "03"');return St.OPERATION;case St.MICHELINE:if(!a.startsWith("05"))throw new Error('When using signing type "MICHELINE", the payload must start with prefix "05"');return St.MICHELINE;case St.RAW:default:return St.RAW}}(),o={type:n.SignPayloadRequest,signingType:i,payload:a,sourceAddress:e.sourceAddress||r.address},t.next=18,this.makeRequest(o).catch((function(e){return Vt(f,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.handleRequestError(o,e);case 2:throw t.sent;case 3:case"end":return t.stop()}}),t,this)})))}));case 18:return s=t.sent,c=s.message,u=s.connectionInfo,t.t0=this,t.t1=o,t.t2=r,t.t3=c,t.t4=u,t.next=28,this.getWalletInfo();case 28:return t.t5=t.sent,t.t6={account:t.t2,output:t.t3,connectionContext:t.t4,walletInfo:t.t5},t.next=32,t.t0.notifySuccess.call(t.t0,t.t1,t.t6);case 32:return t.abrupt("return",c);case 33:case"end":return t.stop()}}),t,this)})))}},{key:"requestOperation",value:function(e){return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,a,o,s,c,u=this;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.operationDetails){t.next=4;break}return t.next=3,this.sendInternalError("Operation details must be provided");case 3:case 10:throw t.sent;case 4:return t.next=6,this.getActiveAccount();case 6:if(r=t.sent){t.next=11;break}return t.next=10,this.sendInternalError("No active account!");case 11:return a={type:n.OperationRequest,network:r.network||{type:i.MAINNET},operationDetails:e.operationDetails,sourceAddress:r.address||""},t.next=14,this.makeRequest(a).catch((function(e){return Vt(u,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.handleRequestError(a,e);case 2:throw t.sent;case 3:case"end":return t.stop()}}),t,this)})))}));case 14:return o=t.sent,s=o.message,c=o.connectionInfo,t.t0=this,t.t1=a,t.t2=r,t.t3=s,t.t4=this.blockExplorer,t.t5=c,t.next=25,this.getWalletInfo();case 25:return t.t6=t.sent,t.t7={account:t.t2,output:t.t3,blockExplorer:t.t4,connectionContext:t.t5,walletInfo:t.t6},t.next=29,t.t0.notifySuccess.call(t.t0,t.t1,t.t7);case 29:return t.abrupt("return",s);case 30:case"end":return t.stop()}}),t,this)})))}},{key:"requestBroadcast",value:function(e){return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,a,o,s,c,u=this;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.signedTransaction){t.next=4;break}return t.next=3,this.sendInternalError("Signed transaction must be provided");case 3:throw t.sent;case 4:return r=e.network||{type:i.MAINNET},a={type:n.BroadcastRequest,network:r,signedTransaction:e.signedTransaction},t.next=8,this.makeRequest(a).catch((function(e){return Vt(u,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.handleRequestError(a,e);case 2:throw t.sent;case 3:case"end":return t.stop()}}),t,this)})))}));case 8:return o=t.sent,s=o.message,c=o.connectionInfo,t.t0=this,t.t1=a,t.t2=r,t.t3=s,t.t4=this.blockExplorer,t.t5=c,t.next=19,this.getWalletInfo();case 19:return t.t6=t.sent,t.t7={network:t.t2,output:t.t3,blockExplorer:t.t4,connectionContext:t.t5,walletInfo:t.t6},t.next=23,t.t0.notifySuccess.call(t.t0,t.t1,t.t7);case 23:return t.abrupt("return",s);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"setActivePeer",value:function(e){return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._activePeer.isSettled()?this._activePeer=v.a.resolve(e):this._activePeer.resolve(e),!e){t.next=12;break}return t.next=4,this.initInternalTransports();case 4:if("postmessage-pairing-response"!==e.type){t.next=9;break}return t.next=7,this.setTransport(this.postMessageTransport);case 7:t.next=12;break;case 9:if("p2p-pairing-response"!==e.type){t.next=12;break}return t.next=12,this.setTransport(this.p2pTransport);case 12:return t.abrupt("return");case 13:case"end":return t.stop()}}),t,this)})))}},{key:"setTransport",value:function(e){var t=this,n=Object.create(null,{setTransport:{get:function(){return Object(p.a)(Object(b.a)(r.prototype),"setTransport",t)}}});return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e||(this._initPromise=void 0),t.abrupt("return",n.setTransport.call(this,e));case 2:case"end":return t.stop()}}),t,this)})))}},{key:"sendInternalError",value:function(e){return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.events.emit(rt.INTERNAL_ERROR,{text:e});case 2:throw new Error(e);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"removeAccountsForPeers",value:function(e){return Vt(this,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a,i,o;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.accountManager.getAccounts();case 2:return r=t.sent,n=e.map((function(e){return e.senderId})),a=r.filter((function(e){return n.includes(e.senderId)})),i=a.map((function(e){return e.accountIdentifier})),t.next=8,this.accountManager.removeAccounts(i);case 8:return t.next=10,this.getActiveAccount();case 10:if(!(o=t.sent)){t.next=15;break}if(!i.includes(o.accountIdentifier)){t.next=15;break}return t.next=15,this.setActiveAccount(void 0);case 15:case"end":return t.stop()}}),t,this)})))}},{key:"handleRequestError",value:function(e,t){return Vt(this,void 0,void 0,Object(d.a)().mark((function r(){var a,i,o,s,c=this;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(Wt.error("handleRequestError","error response",t),!t.errorType){r.next=35;break}return a=[],t.errorType===Re.NO_PRIVATE_KEY_FOUND_ERROR&&(i=function(){return Vt(c,void 0,void 0,Object(d.a)().mark((function t(){var r,n,a;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e).sourceAddress||!r.network){t.next=11;break}return t.next=4,Object(bt.a)(r.sourceAddress,r.network);case 4:return a=t.sent,t.next=7,this.getAccount(a);case 7:if(!(n=t.sent)){t.next=11;break}return t.next=11,this.removeAccount(n.accountIdentifier);case 11:case"end":return t.stop()}}),t,this)})))},a.push({text:"Remove account",actionCallback:i})),r.next=6,this.getPeer();case 6:return o=r.sent,r.next=9,this.getActiveAccount();case 9:if(s=r.sent,r.t0=e.type===n.PermissionRequest,!r.t0){r.next=17;break}return r.next=14,this.getActiveAccount();case 14:r.t1=r.sent,r.t2=void 0,r.t0=r.t1===r.t2;case 17:if(!r.t0){r.next=25;break}return this._initPromise=void 0,this.postMessageTransport=void 0,this.p2pTransport=void 0,r.next=23,this.setTransport();case 23:return r.next=25,this.setActivePeer();case 25:return r.t3=this.events,r.t4=Ut[e.type].error,r.t5=t,r.next=30,this.getWalletInfo(o,s);case 30:throw r.t6=r.sent,r.t7={errorResponse:r.t5,walletInfo:r.t6},r.t8=a,r.t3.emit.call(r.t3,r.t4,r.t7,r.t8).catch((function(e){return Wt.error("handleRequestError",e)})),Jt.getError(t.errorType,t.errorData);case 35:throw t;case 36:case"end":return r.stop()}}),r,this)})))}},{key:"notifySuccess",value:function(e,t){return Vt(this,void 0,void 0,Object(d.a)().mark((function r(){return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:this.events.emit(Ut[e.type].success,t).catch((function(e){return console.warn(e)}));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"getWalletInfo",value:function(e,t){var r,n;return Vt(this,void 0,void 0,Object(d.a)().mark((function a(){var i,o,s,c,u,f,l,h;return Object(d.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!t){a.next=4;break}a.t0=t,a.next=7;break;case 4:return a.next=6,this.getActiveAccount();case 6:a.t0=a.sent;case 7:if(i=a.t0,!e){a.next=12;break}a.t1=e,a.next=15;break;case 12:return a.next=14,this.getPeer(i);case 14:a.t1=a.sent;case 15:if(o=a.t1,!i){a.next=20;break}return a.next=19,this.appMetadataManager.getAppMetadata(i.senderId);case 19:s=a.sent;case 20:if(c=o,s||(s={name:c.name,icon:c.icon}),u=function(e,t){return!(!e||!t)&&e.toLowerCase()===t.toLowerCase()},de.find((function(e){return u(e.name,null===s||void 0===s?void 0:s.name)}))?(f=de.find((function(e){return u(e.name,null===s||void 0===s?void 0:s.name)})),l="mobile"):fe.find((function(e){return u(e.name,null===s||void 0===s?void 0:s.name)}))?(f=fe.find((function(e){return u(e.name,null===s||void 0===s?void 0:s.name)})),l="web"):ue.find((function(e){return u(e.name,null===s||void 0===s?void 0:s.name)}))?(f=ue.find((function(e){return u(e.name,null===s||void 0===s?void 0:s.name)})),l="desktop"):ce.find((function(e){return u(e.name,null===s||void 0===s?void 0:s.name)}))&&(f=ce.find((function(e){return u(e.name,null===s||void 0===s?void 0:s.name)})),l="extension"),!f){a.next=27;break}return f.hasOwnProperty("links")?h=f.links[null!==(r=null===i||void 0===i?void 0:i.network.type)&&void 0!==r?r:this.preferredNetwork]:f.hasOwnProperty("deepLink")&&(h=f.deepLink),a.abrupt("return",{name:s.name,icon:null!==(n=s.icon)&&void 0!==n?n:f.logo,deeplink:h,type:l});case 27:return a.abrupt("return",s);case 28:case"end":return a.stop()}}),a,this)})))}},{key:"getPeer",value:function(e){var t,r,n,a;return Vt(this,void 0,void 0,Object(d.a)().mark((function i(){var o,s,c,u;return Object(d.a)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(!e){i.next=32;break}return Wt.log("getPeer","We have an account",e),i.next=4,null===(t=this.postMessageTransport)||void 0===t?void 0:t.getPeers();case 4:if(i.t1=r=i.sent,i.t0=null!==i.t1,!i.t0){i.next=8;break}i.t0=void 0!==r;case 8:if(!i.t0){i.next=12;break}i.t2=r,i.next=13;break;case 12:i.t2=[];case 13:return s=i.t2,i.next=16,null===(n=this.p2pTransport)||void 0===n?void 0:n.getPeers();case 16:if(i.t4=a=i.sent,i.t3=null!==i.t4,!i.t3){i.next=20;break}i.t3=void 0!==a;case 20:if(!i.t3){i.next=24;break}i.t5=a,i.next=25;break;case 24:i.t5=[];case 25:c=i.t5,u=[].concat(Object(A.a)(s),Object(A.a)(c)),Wt.log("getPeer","Found peers",u,e),(o=u.find((function(t){return t.senderId===e.senderId})))||(o=u.find((function(t){return t.extensionId===e.origin.id}))),i.next=36;break;case 32:return i.next=34,this._activePeer.promise;case 34:o=i.sent,Wt.log("getPeer","Active peer",o);case 36:if(o){i.next=38;break}throw new Error("No matching peer found.");case 38:return i.abrupt("return",o);case 39:case"end":return i.stop()}}),i,this)})))}},{key:"makeRequest",value:function(e){var t;return Vt(this,void 0,void 0,Object(d.a)().mark((function r(){var n,a,i,o,s,c,u,f=this;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(M.a)();case 2:return n=r.sent,console.time(n),Wt.log("makeRequest","starting"),r.next=7,this.init();case 7:return console.timeLog(n,"init done"),Wt.log("makeRequest","after init"),r.next=11,this.addRequestAndCheckIfRateLimited();case 11:if(!r.sent){r.next=14;break}throw this.events.emit(rt.LOCAL_RATE_LIMIT_REACHED).catch((function(e){return console.warn(e)})),new Error("rate limit reached");case 14:return r.next=16,this.checkPermissions(e.type);case 16:if(r.sent){r.next=19;break}throw this.events.emit(rt.NO_PERMISSIONS).catch((function(e){return console.warn(e)})),new Error("No permissions to send this request to wallet!");case 19:if(this.beaconId){r.next=23;break}return r.next=22,this.sendInternalError("BeaconID not defined");case 22:throw r.sent;case 23:return r.t0=Object,r.t1=n,r.t2=lt.a,r.t3=At.a,r.next=29,this.beaconId;case 29:return r.t4=r.sent,r.next=32,(0,r.t3)(r.t4);case 32:return r.t5=r.sent,r.t6={id:r.t1,version:r.t2,senderId:r.t5},r.t7=e,a=r.t0.assign.call(r.t0,r.t6,r.t7),i=new v.a,this.addOpenRequest(a.id,i),r.next=40,(new F.a).serialize(a);case 40:return o=r.sent,r.next=43,this.getActiveAccount();case 43:return s=r.sent,r.next=46,this.getPeer(s);case 46:return c=r.sent,r.next=49,this.getWalletInfo(c,s);case 49:return u=r.sent,Wt.log("makeRequest","sending message",a),console.timeLog(n,"sending"),r.prev=52,r.next=55,this.transport;case 55:return r.next=57,r.sent.send(o,c);case 57:r.next=64;break;case 59:throw r.prev=59,r.t8=r.catch(52),this.events.emit(rt.INTERNAL_ERROR,{text:"Unable to send message. If this problem persists, please reset the connection and pair your wallet again.",buttons:[{text:"Reset Connection",actionCallback:function(){return Vt(f,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qe();case 2:this.disconnect();case 3:case"end":return e.stop()}}),e,this)})))}}]}),console.timeLog(n,"send error"),r.t8;case 64:return console.timeLog(n,"sent"),this.events.emit(Ut[e.type].sent,{walletInfo:Object.assign(Object.assign({},u),{name:null!==(t=u.name)&&void 0!==t?t:"Wallet"}),extraInfo:{resetCallback:function(){return Vt(f,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.disconnect();case 1:case"end":return e.stop()}}),e,this)})))}}}).catch((function(e){return console.warn(e)})),r.abrupt("return",i.promise);case 67:case"end":return r.stop()}}),r,this,[[52,59]])})))}},{key:"disconnect",value:function(){return Vt(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.postMessageTransport=void 0,this.p2pTransport=void 0,e.t0=Promise,e.t1=this.clearActiveAccount(),e.next=6,this.transport;case 6:return e.t2=e.sent.disconnect(),e.t3=[e.t1,e.t2],e.next=10,e.t0.all.call(e.t0,e.t3);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"addOpenRequest",value:function(e,t){Wt.log("addOpenRequest",this.name,"adding request ".concat(e," and waiting for answer")),this.openRequests.set(e,t)}}]),r}(Et),Jt=function(){function e(t,r){Object(l.a)(this,e),this.name="BeaconError",this.title="Error",this.message="[".concat(t,"]:").concat(r),this.description=r}return Object(h.a)(e,[{key:"fullDescription",get:function(){return{description:this.description}}}],[{key:"getError",value:function(e,t){switch(e){case Re.BROADCAST_ERROR:return new Xt;case Re.NETWORK_NOT_SUPPORTED:return new Zt;case Re.NO_ADDRESS_ERROR:return new $t;case Re.NO_PRIVATE_KEY_FOUND_ERROR:return new er;case Re.NOT_GRANTED_ERROR:return new tr;case Re.PARAMETERS_INVALID_ERROR:return new rr;case Re.TOO_MANY_OPERATIONS:return new nr;case Re.TRANSACTION_INVALID_ERROR:return new ar(t);case Re.SIGNATURE_TYPE_NOT_SUPPORTED:return new Mr;case Re.ABORTED_ERROR:return new vr;case Re.UNKNOWN_ERROR:return new ir}}}]),e}(),Xt=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(){var e;return Object(l.a)(this,r),(e=t.call(this,Re.BROADCAST_ERROR,"The transaction could not be broadcast to the network. Please try again.")).name="BroadcastBeaconError",e.title="Broadcast Error",e}return Object(h.a)(r)}(Jt),Zt=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(){var e;return Object(l.a)(this,r),(e=t.call(this,Re.NETWORK_NOT_SUPPORTED,"The wallet does not support this network. Please select another one.")).name="NetworkNotSupportedBeaconError",e.title="Network Error",e}return Object(h.a)(r)}(Jt),$t=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(){var e;return Object(l.a)(this,r),(e=t.call(this,Re.NO_ADDRESS_ERROR,"The wallet does not have an account set up. Please make sure to set up your wallet and try again.")).name="NoAddressBeaconError",e.title="No Address",e}return Object(h.a)(r)}(Jt),er=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(){var e;return Object(l.a)(this,r),(e=t.call(this,Re.NO_PRIVATE_KEY_FOUND_ERROR,"The account you are trying to interact with is not available. Please make sure to add the account to your wallet and try again.")).name="NoPrivateKeyBeaconError",e.title="Account Not Found",e}return Object(h.a)(r)}(Jt),tr=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(){var e;return Object(l.a)(this,r),(e=t.call(this,Re.NOT_GRANTED_ERROR,"You do not have the necessary permissions to perform this action. Please initiate another permission request and give the necessary permissions.")).name="NotGrantedBeaconError",e.title="Permission Not Granted",e}return Object(h.a)(r)}(Jt),rr=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(){var e;return Object(l.a)(this,r),(e=t.call(this,Re.PARAMETERS_INVALID_ERROR,"Some of the parameters you provided are invalid and the request could not be completed. Please check your inputs and try again.")).name="ParametersInvalidBeaconError",e.title="Parameters Invalid",e}return Object(h.a)(r)}(Jt),nr=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(){var e;return Object(l.a)(this,r),(e=t.call(this,Re.TOO_MANY_OPERATIONS,"The request contains too many transactions. Please include fewer operations and try again.")).name="TooManyOperationsBeaconError",e.title="Too Many Operations",e}return Object(h.a)(r)}(Jt),ar=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(e){var n;return Object(l.a)(this,r),(n=t.call(this,Re.TRANSACTION_INVALID_ERROR,"The transaction is invalid and the node did not accept it.")).data=e,n.name="TransactionInvalidBeaconError",n.title="Transaction Invalid",n.data=e,n}return Object(h.a)(r,[{key:"fullDescription",get:function(){return{description:this.description,data:JSON.stringify(this.data,void 0,2)}}}]),r}(Jt),ir=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(){var e;return Object(l.a)(this,r),(e=t.call(this,Re.UNKNOWN_ERROR,"An unknown error occured. Please try again or report it to a developer.")).name="UnknownBeaconError",e.title="Error",e}return Object(h.a)(r)}(Jt),or=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},sr=new R.a("P2PTransport"),cr=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(e,n,a,i,o,s,c){var f;return Object(l.a)(this,r),(f=t.call(this,e,new u.a(e,n,1,a,i,s,c),new Y(a,o))).type=q.P2P,f}return Object(h.a)(r,[{key:"connect",value:function(){var e=this,t=Object.create(null,{connect:{get:function(){return Object(p.a)(Object(b.a)(r.prototype),"connect",e)}}});return or(this,void 0,void 0,Object(d.a)().mark((function e(){var r,n,a=this;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._isConnected===K.NOT_CONNECTED){e.next=2;break}return e.abrupt("return");case 2:return sr.log("connect"),this._isConnected=K.CONNECTING,e.next=6,this.client.start();case 6:return e.next=8,this.getPeers();case 8:return(r=e.sent).length>0&&(sr.log("connect","connecting to ".concat(r.length," peers")),n=r.map((function(e){return or(a,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.listen(e.publicKey));case 1:case"end":return t.stop()}}),t,this)})))})),Promise.all(n).catch((function(e){return sr.error("connect",e)}))),e.next=12,this.startOpenChannelListener();case 12:return e.abrupt("return",t.connect.call(this));case 13:case"end":return e.stop()}}),e,this)})))}},{key:"disconnect",value:function(){var e=this,t=Object.create(null,{disconnect:{get:function(){return Object(p.a)(Object(b.a)(r.prototype),"disconnect",e)}}});return or(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.stop();case 2:return e.abrupt("return",t.disconnect.call(this));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"startOpenChannelListener",value:function(){return or(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))}},{key:"getPairingRequestInfo",value:function(){return or(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.getPairingRequestInfo());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"listen",value:function(e){return or(this,void 0,void 0,Object(d.a)().mark((function t(){var r=this;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.listenForEncryptedMessage(e,(function(t){var n={origin:s.P2P,id:e};r.notifyListeners(t,n).catch((function(e){throw e}))})).catch((function(e){throw e}));case 2:case"end":return t.stop()}}),t,this)})))}}],[{key:"isAvailable",value:function(){return or(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(!0));case 1:case"end":return e.stop()}}),e)})))}}]),r}(ne),ur=function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,null,[{key:"isSupported",value:function(){return Promise.resolve(!1)}}]),e}();!function(e){e.TRANSPORT_P2P_PEERS_DAPP="beacon:communication-peers-dapp",e.TRANSPORT_P2P_PEERS_WALLET="beacon:communication-peers-wallet",e.TRANSPORT_POSTMESSAGE_PEERS_DAPP="beacon:postmessage-peers-dapp",e.TRANSPORT_POSTMESSAGE_PEERS_WALLET="beacon:postmessage-peers-wallet",e.ACCOUNTS="beacon:accounts",e.ACTIVE_ACCOUNT="beacon:active-account",e.BEACON_SDK_SECRET_SEED="beacon:sdk-secret-seed",e.APP_METADATA_LIST="beacon:app-metadata-list",e.PERMISSION_LIST="beacon:permissions",e.BEACON_SDK_VERSION="beacon:sdk_version",e.MATRIX_PRESERVED_STATE="beacon:sdk-matrix-preserved-state",e.MATRIX_PEER_ROOM_IDS="beacon:matrix-peer-rooms",e.MATRIX_SELECTED_NODE="beacon:matrix-selected-node",e.MULTI_NODE_SETUP_DONE="beacon:multi-node-setup"}(qt||(qt={}));var fr=(Kt={},Object(y.a)(Kt,qt.TRANSPORT_P2P_PEERS_DAPP,[]),Object(y.a)(Kt,qt.TRANSPORT_P2P_PEERS_WALLET,[]),Object(y.a)(Kt,qt.TRANSPORT_POSTMESSAGE_PEERS_DAPP,[]),Object(y.a)(Kt,qt.TRANSPORT_POSTMESSAGE_PEERS_WALLET,[]),Object(y.a)(Kt,qt.ACCOUNTS,[]),Object(y.a)(Kt,qt.ACTIVE_ACCOUNT,void 0),Object(y.a)(Kt,qt.BEACON_SDK_SECRET_SEED,void 0),Object(y.a)(Kt,qt.APP_METADATA_LIST,[]),Object(y.a)(Kt,qt.PERMISSION_LIST,[]),Object(y.a)(Kt,qt.BEACON_SDK_VERSION,void 0),Object(y.a)(Kt,qt.MATRIX_PRESERVED_STATE,{}),Object(y.a)(Kt,qt.MATRIX_PEER_ROOM_IDS,{}),Object(y.a)(Kt,qt.MATRIX_SELECTED_NODE,void 0),Object(y.a)(Kt,qt.MULTI_NODE_SETUP_DONE,void 0),Kt),dr=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},lr=function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,[{key:"get",value:function(e){return dr(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){chrome.storage.local.get(null,(function(r){r[e]?t(r[e]):t("object"===typeof fr[e]?JSON.parse(JSON.stringify(fr[e])):fr[e])}))})));case 1:case"end":return t.stop()}}),t)})))}},{key:"set",value:function(e,t){return dr(this,void 0,void 0,Object(d.a)().mark((function r(){return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(r){chrome.storage.local.set(Object(y.a)({},e,t),(function(){r()}))})));case 1:case"end":return r.stop()}}),r)})))}},{key:"delete",value:function(e){return dr(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){chrome.storage.local.set(Object(y.a)({},e,void 0),(function(){t()}))})));case 1:case"end":return t.stop()}}),t)})))}}],[{key:"isSupported",value:function(){return dr(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return","undefined"!==typeof window&&"undefined"!==typeof chrome&&Boolean(chrome)&&Boolean(chrome.runtime)&&Boolean(chrome.runtime.id));case 1:case"end":return e.stop()}}),e)})))}}]),e}(),hr=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},pr=function(){function e(t){Object(l.a)(this,e),this.prefix=t}return Object(h.a)(e,[{key:"get",value:function(e){return hr(this,void 0,void 0,Object(d.a)().mark((function t(){var r;return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=localStorage.getItem(this.getPrefixedKey(e))){t.next=9;break}if("object"!==typeof fr[e]){t.next=6;break}return t.abrupt("return",JSON.parse(JSON.stringify(fr[e])));case 6:return t.abrupt("return",fr[e]);case 7:t.next=16;break;case 9:return t.prev=9,t.abrupt("return",JSON.parse(r));case 13:return t.prev=13,t.t0=t.catch(9),t.abrupt("return",r);case 16:case"end":return t.stop()}}),t,this,[[9,13]])})))}},{key:"set",value:function(e,t){return hr(this,void 0,void 0,Object(d.a)().mark((function r(){return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("string"!==typeof t){r.next=4;break}return r.abrupt("return",localStorage.setItem(this.getPrefixedKey(e),t));case 4:return r.abrupt("return",localStorage.setItem(this.getPrefixedKey(e),JSON.stringify(t)));case 5:case"end":return r.stop()}}),r,this)})))}},{key:"delete",value:function(e){return hr(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.resolve(localStorage.removeItem(this.getPrefixedKey(e))));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getPrefixedKey",value:function(e){return this.prefix?"".concat(this.prefix,"-").concat(e):e}}],[{key:"isSupported",value:function(){return hr(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(Boolean("undefined"!==typeof window)&&Boolean(window.localStorage)));case 1:case"end":return e.stop()}}),e)})))}}]),e}(),br=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},mr=new R.a("STORAGE"),gr=function(){return br(void 0,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lr.isSupported();case 2:if(!e.sent){e.next=7;break}return mr.log("getStorage","USING CHROME STORAGE"),e.abrupt("return",new lr);case 7:return e.next=9,pr.isSupported();case 9:if(!e.sent){e.next=14;break}return mr.log("getStorage","USING LOCAL STORAGE"),e.abrupt("return",new pr);case 14:throw new Error("no storage type supported");case 15:case"end":return e.stop()}}),e)})))},vr=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(){var e;return Object(l.a)(this,r),(e=t.call(this,Re.ABORTED_ERROR,"The action was aborted by the user.")).name="UnknownBeaconError",e.title="Aborted",e}return Object(h.a)(r)}(Jt),yr={extension:se.isAvailable(),availableExtensions:se.getAvailableExtensions()},Ar=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},wr=new R.a("DappP2PTransport"),xr=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(e,n,a,i,o,s){return Object(l.a)(this,r),t.call(this,e,n,a,i,qt.TRANSPORT_P2P_PEERS_DAPP,o,s)}return Object(h.a)(r,[{key:"startOpenChannelListener",value:function(){return Ar(this,void 0,void 0,Object(d.a)().mark((function e(){var t=this;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.listenForChannelOpening((function(e){return Ar(t,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return wr.log("listenForNewPeer","new publicKey",e.publicKey),t.next=3,this.addPeer(e);case 3:this._isConnected=K.CONNECTED,this.newPeerListener&&(this.newPeerListener(e),this.newPeerListener=void 0);case 5:case"end":return t.stop()}}),t,this)})))})));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"listenForNewPeer",value:function(e){return Ar(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:wr.log("listenForNewPeer"),this.newPeerListener=e;case 2:case"end":return t.stop()}}),t,this)})))}},{key:"stopListeningForNewPeers",value:function(){return Ar(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:wr.log("stopListeningForNewPeers"),this.newPeerListener=void 0;case 2:case"end":return e.stop()}}),e,this)})))}}]),r}(cr),Er=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},_r=new R.a("DappPostMessageTransport"),Cr=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(e,n,a){return Object(l.a)(this,r),t.call(this,e,n,a,qt.TRANSPORT_POSTMESSAGE_PEERS_DAPP)}return Object(h.a)(r,[{key:"startOpenChannelListener",value:function(){return Er(this,void 0,void 0,Object(d.a)().mark((function e(){var t=this;return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.listenForChannelOpening((function(e){return Er(t,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return _r.log("connect","received PostMessagePairingResponse",e),t.next=3,this.addPeer(e);case 3:this._isConnected=K.CONNECTED,this.newPeerListener&&(this.newPeerListener(e),this.newPeerListener=void 0);case 5:case"end":return t.stop()}}),t,this)})))})));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"listenForNewPeer",value:function(e){return Er(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:_r.log("listenForNewPeer"),this.newPeerListener=e;case 2:case"end":return t.stop()}}),t,this)})))}},{key:"stopListeningForNewPeers",value:function(){return Er(this,void 0,void 0,Object(d.a)().mark((function e(){return Object(d.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_r.log("stopListeningForNewPeers"),this.newPeerListener=void 0;case 2:case"end":return e.stop()}}),e,this)})))}}]),r}(se),kr=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},Br=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(e,n,a,i,o,s){return Object(l.a)(this,r),t.call(this,e,n,a,i,qt.TRANSPORT_P2P_PEERS_WALLET,o,s)}return Object(h.a)(r,[{key:"addPeer",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=Object.create(null,{addPeer:{get:function(){return Object(p.a)(Object(b.a)(r.prototype),"addPeer",t)}}});return kr(this,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.addPeer.call(this,e);case 2:if(!n){t.next=5;break}return t.next=5,this.client.sendPairingResponse(e);case 5:case"end":return t.stop()}}),t,this)})))}}]),r}(cr),Ir=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(e,n,a){return Object(l.a)(this,r),t.call(this,e,n,a,qt.TRANSPORT_POSTMESSAGE_PEERS_WALLET)}return Object(h.a)(r)}(se),Sr=r(834),Or=r(668),Mr=function(e){Object(m.a)(r,e);var t=Object(g.a)(r);function r(){var e;return Object(l.a)(this,r),(e=t.call(this,Re.SIGNATURE_TYPE_NOT_SUPPORTED,"The wallet is not able to sign payloads of this type.")).name="SignatureTypeNotSupportedBeaconError",e.title="Signature Type Not Supported",e}return Object(h.a)(r)}(Jt)},function(e,t,r){"use strict";r.r(t),function(e){r.d(t,"ASSOCIATED_TOKEN_PROGRAM_ID",(function(){return at})),r.d(t,"AccountLayout",(function(){return ht})),r.d(t,"MintLayout",(function(){return lt})),r.d(t,"NATIVE_MINT",(function(){return dt})),r.d(t,"TOKEN_PROGRAM_ID",(function(){return nt})),r.d(t,"Token",(function(){return bt})),r.d(t,"u64",(function(){return ct}));for(var n=r(0),a=r(9),i=r(14),o=r(41),s=r(40),c=r(33),u=r(1),f=r(2),d=r(23),l=r(7),h=r(8),p=r(348),b=r.n(p),m=r(1598),g=r.n(m),v=r(32),y={},A={byteLength:function(e){var t=k(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=k(e),a=n[0],i=n[1],o=new E(function(e,t,r){return 3*(t+r)/4-r}(0,a,i)),s=0,c=i>0?a-4:a;for(r=0;r>16&255,o[s++]=t>>8&255,o[s++]=255&t;2===i&&(t=x[e.charCodeAt(r)]<<2|x[e.charCodeAt(r+1)]>>4,o[s++]=255&t);1===i&&(t=x[e.charCodeAt(r)]<<10|x[e.charCodeAt(r+1)]<<4|x[e.charCodeAt(r+2)]>>2,o[s++]=t>>8&255,o[s++]=255&t);return o},fromByteArray:function(e){for(var t,r=e.length,n=r%3,a=[],i=16383,o=0,s=r-n;os?s:o+i));1===n?(t=e[r-1],a.push(w[t>>2]+w[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],a.push(w[t>>10]+w[t>>4&63]+w[t<<2&63]+"="));return a.join("")}},w=[],x=[],E="undefined"!==typeof Uint8Array?Uint8Array:Array,_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C=0;C<64;++C)w[C]=_[C],x[_.charCodeAt(C)]=C;function k(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function B(e,t,r){for(var n,a,i=[],o=t;o>18&63]+w[a>>12&63]+w[a>>6&63]+w[63&a]);return i.join("")}x["-".charCodeAt(0)]=62,x["_".charCodeAt(0)]=63;var I={read:function(e,t,r,n,a){var i,o,s=8*a-n-1,c=(1<>1,f=-7,d=r?a-1:0,l=r?-1:1,h=e[t+d];for(d+=l,i=h&(1<<-f)-1,h>>=-f,f+=s;f>0;i=256*i+e[t+d],d+=l,f-=8);for(o=i&(1<<-f)-1,i>>=-f,f+=n;f>0;o=256*o+e[t+d],d+=l,f-=8);if(0===i)i=1-u;else{if(i===c)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),i-=u}return(h?-1:1)*o*Math.pow(2,i-n)},write:function(e,t,r,n,a,i){var o,s,c,u=8*i-a-1,f=(1<>1,l=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+d>=1?l/c:l*Math.pow(2,1-d))*c>=2&&(o++,c/=2),o+d>=f?(s=0,o=f):o+d>=1?(s=(t*c-1)*Math.pow(2,a),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;e[r+h]=255&s,h+=p,s/=256,a-=8);for(o=o<0;e[r+h]=255&o,h+=p,o/=256,u-=8);e[r+h-p]|=128*b}};!function(e){var t=A,r=I,n="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=function(e){+e!=e&&(e=0);return o.alloc(+e)},e.INSPECT_MAX_BYTES=50;var a=2147483647;function i(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return s(e,t,r)}function s(e,t,r){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|v(e,t),n=i(r),a=n.write(e,t);a!==r&&(n=n.slice(0,a));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(ee(e,Uint8Array)){var t=new Uint8Array(e);return m(t.buffer,t.byteOffset,t.byteLength)}return b(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ee(e,ArrayBuffer)||e&&ee(e.buffer,ArrayBuffer))return m(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(ee(e,SharedArrayBuffer)||e&&ee(e.buffer,SharedArrayBuffer)))return m(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var a=function(e){if(o.isBuffer(e)){var t=0|g(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!==typeof e.length||te(e.length)?i(0):b(e);if("Buffer"===e.type&&Array.isArray(e.data))return b(e.data)}(e);if(a)return a;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return c(e),i(e<0?0:0|g(e))}function b(e){for(var t=e.length<0?0:0|g(e.length),r=i(t),n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function v(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ee(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Z(e).length;default:if(a)return n?-1:X(e).length;t=(""+t).toLowerCase(),a=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return M(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return F(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function w(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function x(e,t,r,n,a){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),te(r=+r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"===typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:E(e,t,r,n,a);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):E(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function E(e,t,r,n,a){var i,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var f=-1;for(i=r;is&&(r=s-c),i=r;i>=0;i--){for(var d=!0,l=0;la&&(n=a):n=a;var i,o=t.length;for(n>o/2&&(n=o/2),i=0;i>8,a=r%256,i.push(a),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function M(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a239?4:i>223?3:i>191?2:1;if(a+s<=r){var c=void 0,u=void 0,f=void 0,d=void 0;switch(s){case 1:i<128&&(o=i);break;case 2:128===(192&(c=e[a+1]))&&(d=(31&i)<<6|63&c)>127&&(o=d);break;case 3:c=e[a+1],u=e[a+2],128===(192&c)&&128===(192&u)&&(d=(15&i)<<12|(63&c)<<6|63&u)>2047&&(d<55296||d>57343)&&(o=d);break;case 4:c=e[a+1],u=e[a+2],f=e[a+3],128===(192&c)&&128===(192&u)&&128===(192&f)&&(d=(15&i)<<18|(63&c)<<12|(63&u)<<6|63&f)>65535&&d<1114112&&(o=d)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),a+=s}return function(e){var t=e.length;if(t<=D)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nn.length?(o.isBuffer(i)||(i=o.from(i)),i.copy(n,a)):Uint8Array.prototype.set.call(n,i,a);else{if(!o.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,a)}a+=i.length}return n},o.byteLength=v,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(t+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,a){if(ee(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),c=Math.min(i,s),u=this.slice(n,a),f=e.slice(t,r),d=0;d>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return C(this,e,t,r);case"ascii":case"latin1":case"binary":return k(this,e,t,r);case"base64":return B(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function T(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;an)&&(r=n);for(var a="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,a,i){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function L(e,t,r,n,a){V(t,n,a,e,r,7);var i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function U(e,t,r,n,a){V(t,n,a,e,r,7);var i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function Q(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function G(e,t,n,a,i){return t=+t,n>>>=0,i||Q(e,0,n,4),r.write(e,t,n,a,23,4),n+4}function H(e,t,n,a,i){return t=+t,n>>>=0,i||Q(e,0,n,8),r.write(e,t,n,a,52,8),n+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||N(e,t,this.length);for(var n=this[e],a=1,i=0;++i>>=0,t>>>=0,r||N(e,t,this.length);for(var n=this[e+--t],a=1;t>0&&(a*=256);)n+=this[e+--t]*a;return n},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=ne((function(e){W(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);var n=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),a=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(a)<>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);var n=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],a=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+r;return(BigInt(n)<>>=0,t>>>=0,r||N(e,t,this.length);for(var n=this[e],a=1,i=0;++i=(a*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},o.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=ne((function(e){W(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);var n=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);var n=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(n)<>>=0,t||N(e,4,this.length),r.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),r.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),r.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),r.read(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[t]=255&e;++i>>=0,r>>>=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var a=r-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigUInt64LE=ne((function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeBigUInt64BE=ne((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);j(this,e,t,r,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);j(this,e,t,r,a-1,-a)}var i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigInt64LE=ne((function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeBigInt64BE=ne((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeFloatLE=function(e,t,r){return G(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return G(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return H(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return H(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(i=t;i=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)}function V(e,t,r,n,a,i){if(e>r||e3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(i+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(i+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(i+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(r).concat(s),new z.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||Y(t,e.length-(r+1))}(n,a,i)}function W(e,t){if("number"!==typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function Y(e,t,r){if(Math.floor(e)!==e)throw W(e,r),new z.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(t),e)}q("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),q("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),q("ERR_OUT_OF_RANGE",(function(e,t,r){var n='The value of "'.concat(e,'" is out of range.'),a=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?a=K(String(r)):"bigint"===typeof r&&(a=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(a=K(a)),a+="n"),n+=" It must be ".concat(t,". Received ").concat(a)}),RangeError);var J=/[^+/0-9A-Za-z-_]/g;function X(e,t){var r;t=t||1/0;for(var n=e.length,a=null,i=[],o=0;o55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Z(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function $(e,t,r,n){var a;for(a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function ee(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function te(e){return e!==e}var re=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,a=0;a<16;++a)t[n+a]=e[r]+e[a];return t}();function ne(e){return"undefined"===typeof BigInt?ae:e}function ae(){throw new Error("BigInt not supported")}}(y);var S="undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},O="function"===typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e};function M(e,t){var r={seen:[],stylize:T};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),N(t)?r.showHidden=t:t&&function(e,t){if(!t||!G(t))return e;var r=Object.keys(t),n=r.length;for(;n--;)e[r[n]]=t[r[n]]}(r,t),U(r.showHidden)&&(r.showHidden=!1),U(r.depth)&&(r.depth=2),U(r.colors)&&(r.colors=!1),U(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=D),F(r,e,r.depth)}function D(e,t){var r=M.styles[t];return r?"\x1b["+M.colors[r][0]+"m"+e+"\x1b["+M.colors[r][1]+"m":e}function T(e,t){return e}function F(e,t,r){if(e.customInspect&&t&&q(t.inspect)&&t.inspect!==M&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(r,e);return L(n)||(n=F(e,n,r)),n}var a=function(e,t){if(U(t))return e.stylize("undefined","undefined");if(L(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(n=t,"number"===typeof n)return e.stylize(""+t,"number");var n;if(N(t))return e.stylize(""+t,"boolean");if(j(t))return e.stylize("null","null")}(e,t);if(a)return a;var i=Object.keys(t),o=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),z(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return R(t);if(0===i.length){if(q(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(Q(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(H(t))return e.stylize(Date.prototype.toString.call(t),"date");if(z(t))return R(t)}var c,u,f="",d=!1,l=["{","}"];(c=t,Array.isArray(c)&&(d=!0,l=["[","]"]),q(t))&&(f=" [Function"+(t.name?": "+t.name:"")+"]");return Q(t)&&(f=" "+RegExp.prototype.toString.call(t)),H(t)&&(f=" "+Date.prototype.toUTCString.call(t)),z(t)&&(f=" "+R(t)),0!==i.length||d&&0!=t.length?r<0?Q(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=d?function(e,t,r,n,a){for(var i=[],o=0,s=t.length;o60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,f,l)):l[0]+f+l[1]}function R(e){return"["+Error.prototype.toString.call(e)+"]"}function P(e,t,r,n,a,i){var o,s,c;if((c=Object.getOwnPropertyDescriptor(t,a)||{value:t[a]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),W(n,a)||(o="["+a+"]"),s||(e.seen.indexOf(c.value)<0?(s=j(r)?F(e,c.value,null):F(e,c.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),U(o)){if(i&&a.match(/^\d+$/))return s;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function N(e){return"boolean"===typeof e}function j(e){return null===e}function L(e){return"string"===typeof e}function U(e){return void 0===e}function Q(e){return G(e)&&"[object RegExp]"===V(e)}function G(e){return"object"===typeof e&&null!==e}function H(e){return G(e)&&"[object Date]"===V(e)}function z(e){return G(e)&&("[object Error]"===V(e)||e instanceof Error)}function q(e){return"function"===typeof e}function K(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e}function V(e){return Object.prototype.toString.call(e)}function W(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Y(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a=0){var o=n.indexOf("\n",i+1);n=n.substring(o+1)}this.stack=n}}}function se(e,t){return"string"===typeof e?e.length=0;s--)if(c[s]!==u[s])return!1;for(s=c.length-1;s>=0;s--)if(!de(e[o=c[s]],t[o],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function le(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function he(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(r){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function pe(e,t,r,n){var a;if("function"!==typeof t)throw new TypeError('"block" argument must be a function');"string"===typeof r&&(n=r,r=null),a=function(e){var t;try{e()}catch(r){t=r}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!a&&ue(a,r,"Missing expected exception"+n);var i="string"===typeof n,o=!e&&a&&!r;if((!e&&z(a)&&i&&he(a,r)||o)&&ue(a,r,"Got unwanted exception"+n),e&&a&&r&&!he(a,r)||!e&&a)throw a}ne.AssertionError=oe,O(oe,Error),ne.fail=ue,ne.ok=fe,ne.equal=function e(t,r,n){t!=r&&ue(t,r,n,"==",e)},ne.notEqual=function e(t,r,n){t==r&&ue(t,r,n,"!=",e)},ne.deepEqual=function e(t,r,n){de(t,r,!1)||ue(t,r,n,"deepEqual",e)},ne.deepStrictEqual=function e(t,r,n){de(t,r,!0)||ue(t,r,n,"deepStrictEqual",e)},ne.notDeepEqual=function e(t,r,n){de(t,r,!1)&&ue(t,r,n,"notDeepEqual",e)},ne.notDeepStrictEqual=function e(t,r,n){de(t,r,!0)&&ue(t,r,n,"notDeepStrictEqual",e)},ne.strictEqual=function e(t,r,n){t!==r&&ue(t,r,n,"===",e)},ne.notStrictEqual=function e(t,r,n){t===r&&ue(t,r,n,"!==",e)},ne.throws=function(e,t,r){pe(!0,e,t,r)},ne.doesNotThrow=function(e,t,r){pe(!1,e,t,r)},ne.ifError=function(e){if(e)throw e};var be={},me=function(){function e(t,r){if(Object(u.a)(this,e),!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=r}return Object(f.a)(e,[{key:"makeDestinationObject",value:function(){return{}}},{key:"decode",value:function(e,t){throw new Error("Layout is abstract")}},{key:"encode",value:function(e,t,r){throw new Error("Layout is abstract")}},{key:"getSpan",value:function(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}},{key:"replicate",value:function(e){var t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}},{key:"fromArray",value:function(e){}}]),e}();function ge(e,t){return t.property?e+"["+t.property+"]":e}be.Layout=me,be.nameWithProperty=ge,be.bindConstructorLayout=function(e,t){if("function"!==typeof e)throw new TypeError("Class must be constructor");if(e.hasOwnProperty("layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof me))throw new TypeError("layout must be a Layout");if(t.hasOwnProperty("boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=function(){return new e},Object.defineProperty(e.prototype,"encode",{value:function(e,r){return t.encode(this,e,r)},writable:!0}),Object.defineProperty(e,"decode",{value:function(e,r){return t.decode(e,r)},writable:!0})};var ve=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(){return Object(u.a)(this,r),t.apply(this,arguments)}return Object(f.a)(r,[{key:"isCount",value:function(){throw new Error("ExternalLayout is abstract")}}]),r}(me),ye=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n){var a;if(Object(u.a)(this,r),void 0===e&&(e=1),!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");return(a=t.call(this,-1,n)).elementSpan=e,a}return Object(f.a)(r,[{key:"isCount",value:function(){return!0}},{key:"decode",value:function(e,t){void 0===t&&(t=0);var r=e.length-t;return Math.floor(r/this.elementSpan)}},{key:"encode",value:function(e,t,r){return 0}}]),r}(ve),Ae=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n,a){var i;if(Object(u.a)(this,r),!(e instanceof me))throw new TypeError("layout must be a Layout");if(void 0===n)n=0;else if(!Number.isInteger(n))throw new TypeError("offset must be integer or undefined");return(i=t.call(this,e.span,a||e.property)).layout=e,i.offset=n,i}return Object(f.a)(r,[{key:"isCount",value:function(){return this.layout instanceof we||this.layout instanceof xe}},{key:"decode",value:function(e,t){return void 0===t&&(t=0),this.layout.decode(e,t+this.offset)}},{key:"encode",value:function(e,t,r){return void 0===r&&(r=0),this.layout.encode(e,t,r+this.offset)}}]),r}(ve),we=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n){var a;if(Object(u.a)(this,r),6<(a=t.call(this,e,n)).span)throw new RangeError("span must not exceed 6 bytes");return a}return Object(f.a)(r,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readUIntLE(t,this.span)}},{key:"encode",value:function(e,t,r){return void 0===r&&(r=0),t.writeUIntLE(e,r,this.span),this.span}}]),r}(me),xe=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n){var a;if(Object(u.a)(this,r),6<(a=t.call(this,e,n)).span)throw new RangeError("span must not exceed 6 bytes");return a}return Object(f.a)(r,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readUIntBE(t,this.span)}},{key:"encode",value:function(e,t,r){return void 0===r&&(r=0),t.writeUIntBE(e,r,this.span),this.span}}]),r}(me),Ee=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n){var a;if(Object(u.a)(this,r),6<(a=t.call(this,e,n)).span)throw new RangeError("span must not exceed 6 bytes");return a}return Object(f.a)(r,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readIntLE(t,this.span)}},{key:"encode",value:function(e,t,r){return void 0===r&&(r=0),t.writeIntLE(e,r,this.span),this.span}}]),r}(me),_e=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n){var a;if(Object(u.a)(this,r),6<(a=t.call(this,e,n)).span)throw new RangeError("span must not exceed 6 bytes");return a}return Object(f.a)(r,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readIntBE(t,this.span)}},{key:"encode",value:function(e,t,r){return void 0===r&&(r=0),t.writeIntBE(e,r,this.span),this.span}}]),r}(me),Ce=Math.pow(2,32);function ke(e){var t=Math.floor(e/Ce);return{hi32:t,lo32:e-t*Ce}}function Be(e,t){return e*Ce+t}var Ie=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e){return Object(u.a)(this,r),t.call(this,8,e)}return Object(f.a)(r,[{key:"decode",value:function(e,t){void 0===t&&(t=0);var r=e.readUInt32LE(t);return Be(e.readUInt32LE(t+4),r)}},{key:"encode",value:function(e,t,r){void 0===r&&(r=0);var n=ke(e);return t.writeUInt32LE(n.lo32,r),t.writeUInt32LE(n.hi32,r+4),8}}]),r}(me),Se=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e){return Object(u.a)(this,r),t.call(this,8,e)}return Object(f.a)(r,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),Be(e.readUInt32BE(t),e.readUInt32BE(t+4))}},{key:"encode",value:function(e,t,r){void 0===r&&(r=0);var n=ke(e);return t.writeUInt32BE(n.hi32,r),t.writeUInt32BE(n.lo32,r+4),8}}]),r}(me),Oe=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e){return Object(u.a)(this,r),t.call(this,8,e)}return Object(f.a)(r,[{key:"decode",value:function(e,t){void 0===t&&(t=0);var r=e.readUInt32LE(t);return Be(e.readInt32LE(t+4),r)}},{key:"encode",value:function(e,t,r){void 0===r&&(r=0);var n=ke(e);return t.writeUInt32LE(n.lo32,r),t.writeInt32LE(n.hi32,r+4),8}}]),r}(me),Me=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e){return Object(u.a)(this,r),t.call(this,8,e)}return Object(f.a)(r,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),Be(e.readInt32BE(t),e.readUInt32BE(t+4))}},{key:"encode",value:function(e,t,r){void 0===r&&(r=0);var n=ke(e);return t.writeInt32BE(n.hi32,r),t.writeUInt32BE(n.lo32,r+4),8}}]),r}(me),De=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e){return Object(u.a)(this,r),t.call(this,4,e)}return Object(f.a)(r,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readFloatLE(t)}},{key:"encode",value:function(e,t,r){return void 0===r&&(r=0),t.writeFloatLE(e,r),4}}]),r}(me),Te=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e){return Object(u.a)(this,r),t.call(this,4,e)}return Object(f.a)(r,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readFloatBE(t)}},{key:"encode",value:function(e,t,r){return void 0===r&&(r=0),t.writeFloatBE(e,r),4}}]),r}(me),Fe=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e){return Object(u.a)(this,r),t.call(this,8,e)}return Object(f.a)(r,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readDoubleLE(t)}},{key:"encode",value:function(e,t,r){return void 0===r&&(r=0),t.writeDoubleLE(e,r),8}}]),r}(me),Re=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e){return Object(u.a)(this,r),t.call(this,8,e)}return Object(f.a)(r,[{key:"decode",value:function(e,t){return void 0===t&&(t=0),e.readDoubleBE(t)}},{key:"encode",value:function(e,t,r){return void 0===r&&(r=0),t.writeDoubleBE(e,r),8}}]),r}(me),Pe=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n,a){var i;if(Object(u.a)(this,r),!(e instanceof me))throw new TypeError("elementLayout must be a Layout");if(!(n instanceof ve&&n.isCount()||Number.isInteger(n)&&0<=n))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");var o=-1;return!(n instanceof ve)&&0f.span&&void 0===f.property)throw new Error("fields cannot contain unnamed variable-length layout")}}catch(l){s.e(l)}finally{s.f()}var d=-1;try{d=e.reduce((function(e,t){return e+t.getSpan()}),0)}catch(h){}return(i=t.call(this,d,n)).fields=e,i.decodePrefixes=!!a,i}return Object(f.a)(r,[{key:"getSpan",value:function(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);var r=0;try{r=this.fields.reduce((function(r,n){var a=n.getSpan(e,t);return t+=a,r+a}),0)}catch(n){throw new RangeError("indeterminate span")}return r}},{key:"decode",value:function(e,t){void 0===t&&(t=0);var r,n=this.makeDestinationObject(),a=Object(c.a)(this.fields);try{for(a.s();!(r=a.n()).done;){var i=r.value;if(void 0!==i.property&&(n[i.property]=i.decode(e,t)),t+=i.getSpan(e,t),this.decodePrefixes&&e.length===t)break}}catch(o){a.e(o)}finally{a.f()}return n}},{key:"encode",value:function(e,t,r){void 0===r&&(r=0);var n,a=r,i=0,o=0,s=Object(c.a)(this.fields);try{for(s.s();!(n=s.n()).done;){var u=n.value,f=u.span;if(o=0f&&(f=u.getSpan(t,r)))}i=r,r+=f}}catch(l){s.e(l)}finally{s.f()}return i+o-a}},{key:"fromArray",value:function(e){var t,r=this.makeDestinationObject(),n=Object(c.a)(this.fields);try{for(n.s();!(t=n.n()).done;){var a=t.value;void 0!==a.property&&0a.span?r=-1:0<=r&&(r+=a.span)}}catch(i){n.e(i)}finally{n.f()}}}]),r}(me),je=function(){function e(t){Object(u.a)(this,e),this.property=t}return Object(f.a)(e,[{key:"decode",value:function(){throw new Error("UnionDiscriminator is abstract")}},{key:"encode",value:function(){throw new Error("UnionDiscriminator is abstract")}}]),e}(),Le=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n){var a;if(Object(u.a)(this,r),!(e instanceof ve&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");return(a=t.call(this,n||e.property||"variant")).layout=e,a}return Object(f.a)(r,[{key:"decode",value:function(e,t){return this.layout.decode(e,t)}},{key:"encode",value:function(e,t,r){return this.layout.encode(e,t,r)}}]),r}(je),Ue=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n,a){var i;Object(u.a)(this,r);var o=e instanceof we||e instanceof xe;if(o)e=new Le(new Ae(e));else if(e instanceof ve&&e.isCount())e=new Le(e);else if(!(e instanceof je))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===n&&(n=null),!(null===n||n instanceof me))throw new TypeError("defaultLayout must be null or a Layout");if(null!==n){if(0>n.span)throw new Error("defaultLayout must have constant span");void 0===n.property&&(n=n.replicate("content"))}var s=-1;n&&0<=(s=n.span)&&o&&(s+=e.layout.span),(i=t.call(this,s,a)).discriminator=e,i.usesPrefixDiscriminator=o,i.defaultLayout=n,i.registry={};var c=i.defaultGetSourceVariant.bind(Object(d.a)(i));return i.getSourceVariant=function(e){return c(e)},i.configGetSourceVariant=function(e){c=e.bind(this)},i}return Object(f.a)(r,[{key:"getSpan",value:function(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);var r=this.getVariant(e,t);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(e,t)}},{key:"defaultGetSourceVariant",value:function(e){if(e.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&e.hasOwnProperty(this.defaultLayout.property))return;var t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||e.hasOwnProperty(t.property)))return t}else for(var r in this.registry){var n=this.registry[r];if(e.hasOwnProperty(n.property))return n}throw new Error("unable to infer src variant")}},{key:"decode",value:function(e,t){var r;void 0===t&&(t=0);var n=this.discriminator,a=n.decode(e,t),i=this.registry[a];if(void 0===i){var o=0;i=this.defaultLayout,this.usesPrefixDiscriminator&&(o=n.layout.span),(r=this.makeDestinationObject())[n.property]=a,r[i.property]=this.defaultLayout.decode(e,t+o)}else r=i.decode(e,t);return r}},{key:"encode",value:function(e,t,r){void 0===r&&(r=0);var n=this.getSourceVariant(e);if(void 0===n){var a=this.discriminator,i=this.defaultLayout,o=0;return this.usesPrefixDiscriminator&&(o=a.layout.span),a.encode(e[a.property],t,r),o+i.encode(e[i.property],t,r+o)}return n.encode(e,t,r)}},{key:"addVariant",value:function(e,t,r){var n=new Qe(this,e,t,r);return this.registry[e]=n,n}},{key:"getVariant",value:function(e,t){var r=e;return y.Buffer.isBuffer(e)&&(void 0===t&&(t=0),r=this.discriminator.decode(e,t)),this.registry[r]}}]),r}(me),Qe=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n,a,i){var o;if(Object(u.a)(this,r),!(e instanceof Ue))throw new TypeError("union must be a Union");if(!Number.isInteger(n)||0>n)throw new TypeError("variant must be a (non-negative) integer");if("string"===typeof a&&void 0===i&&(i=a,a=null),a){if(!(a instanceof me))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=a.span&&a.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!==typeof i)throw new TypeError("variant must have a String property")}var s=e.span;return 0>e.span&&0<=(s=a?a.span:0)&&e.usesPrefixDiscriminator&&(s+=e.discriminator.layout.span),(o=t.call(this,s,i)).union=e,o.variant=n,o.layout=a||null,o}return Object(f.a)(r,[{key:"getSpan",value:function(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);var r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),r+this.layout.getSpan(e,t+r)}},{key:"decode",value:function(e,t){var r=this.makeDestinationObject();if(void 0===t&&(t=0),this!==this.union.getVariant(e,t))throw new Error("variant mismatch");var n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(e,t+n):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}},{key:"encode",value:function(e,t,r){void 0===r&&(r=0);var n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!e.hasOwnProperty(this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,r);var a=n;if(this.layout&&(this.layout.encode(e[this.property],t,r+n),a+=this.layout.getSpan(t,r+n),0<=this.union.span&&a>this.union.span))throw new Error("encoded variant overruns containing union");return a}},{key:"fromArray",value:function(e){if(this.layout)return this.layout.fromArray(e)}}]),r}(me);function Ge(e){return 0>e&&(e+=4294967296),e}var He=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n,a){var i;if(Object(u.a)(this,r),!(e instanceof we||e instanceof xe))throw new TypeError("word must be a UInt or UIntBE layout");if("string"===typeof n&&void 0===a&&(a=n,n=void 0),4=r)throw new TypeError("bits must be positive integer");var a=8*t.span,i=t.fields.reduce((function(e,t){return e+t.bits}),0);if(r+i>a)throw new Error("bits too long for span remainder ("+(a-i)+" of "+a+" remain)");this.container=t,this.bits=r,this.valueMask=(1<>>this.start}},{key:"encode",value:function(e){if(!Number.isInteger(e)||e!==Ge(e&this.valueMask))throw new TypeError(ge("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);var t=this.container._packedGetValue(),r=Ge(e<r&&(r=this.length.decode(e,t)),r}},{key:"decode",value:function(e,t){void 0===t&&(t=0);var r=this.span;return 0>r&&(r=this.length.decode(e,t)),e.slice(t,t+r)}},{key:"encode",value:function(e,t,r){var n=this.length;if(this.length instanceof ve&&(n=e.length),!y.Buffer.isBuffer(e)||n!==e.length)throw new TypeError(ge("Blob.encode",this)+" requires (length "+n+") Buffer as src");if(r+n>t.length)throw new RangeError("encoding overruns Buffer");return t.write(e.toString("hex"),r,n,"hex"),this.length instanceof ve&&this.length.encode(n,t,r),n}}]),r}(me),Ve=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e){return Object(u.a)(this,r),t.call(this,-1,e)}return Object(f.a)(r,[{key:"getSpan",value:function(e,t){if(!y.Buffer.isBuffer(e))throw new TypeError("b must be a Buffer");void 0===t&&(t=0);for(var r=t;rt.length)throw new RangeError("encoding overruns Buffer");return n.copy(t,r),t[r+a]=0,a+1}}]),r}(me),We=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n){var a;if(Object(u.a)(this,r),"string"===typeof e&&void 0===n&&(n=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");return(a=t.call(this,-1,n)).maxSpan=e,a}return Object(f.a)(r,[{key:"getSpan",value:function(e,t){if(!y.Buffer.isBuffer(e))throw new TypeError("b must be a Buffer");return void 0===t&&(t=0),e.length-t}},{key:"decode",value:function(e,t,r){void 0===t&&(t=0);var n=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpant.length)throw new RangeError("encoding overruns Buffer");return n.copy(t,r),a}}]),r}(me),Ye=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n){var a;return Object(u.a)(this,r),(a=t.call(this,0,n)).value=e,a}return Object(f.a)(r,[{key:"decode",value:function(e,t,r){return this.value}},{key:"encode",value:function(e,t,r){return 0}}]),r}(me);be.ExternalLayout=ve,be.GreedyCount=ye,be.OffsetLayout=Ae,be.UInt=we,be.UIntBE=xe,be.Int=Ee,be.IntBE=_e,be.Float=De,be.FloatBE=Te,be.Double=Fe,be.DoubleBE=Re,be.Sequence=Pe,be.Structure=Ne,be.UnionDiscriminator=je,be.UnionLayoutDiscriminator=Le,be.Union=Ue,be.VariantLayout=Qe,be.BitStructure=He,be.BitField=ze,be.Boolean=qe,be.Blob=Ke,be.CString=Ve,be.UTF8=We,be.Constant=Ye,be.greedy=function(e,t){return new ye(e,t)},be.offset=function(e,t,r){return new Ae(e,t,r)};var Je=be.u8=function(e){return new we(1,e)};be.u16=function(e){return new we(2,e)},be.u24=function(e){return new we(3,e)};var Xe=be.u32=function(e){return new we(4,e)};be.u40=function(e){return new we(5,e)},be.u48=function(e){return new we(6,e)},be.nu64=function(e){return new Ie(e)},be.u16be=function(e){return new xe(2,e)},be.u24be=function(e){return new xe(3,e)},be.u32be=function(e){return new xe(4,e)},be.u40be=function(e){return new xe(5,e)},be.u48be=function(e){return new xe(6,e)},be.nu64be=function(e){return new Se(e)},be.s8=function(e){return new Ee(1,e)},be.s16=function(e){return new Ee(2,e)},be.s24=function(e){return new Ee(3,e)},be.s32=function(e){return new Ee(4,e)},be.s40=function(e){return new Ee(5,e)},be.s48=function(e){return new Ee(6,e)},be.ns64=function(e){return new Oe(e)},be.s16be=function(e){return new _e(2,e)},be.s24be=function(e){return new _e(3,e)},be.s32be=function(e){return new _e(4,e)},be.s40be=function(e){return new _e(5,e)},be.s48be=function(e){return new _e(6,e)},be.ns64be=function(e){return new Me(e)},be.f32=function(e){return new De(e)},be.f32be=function(e){return new Te(e)},be.f64=function(e){return new Fe(e)},be.f64be=function(e){return new Re(e)};var Ze=be.struct=function(e,t,r){return new Ne(e,t,r)};be.bits=function(e,t,r){return new He(e,t,r)},be.seq=function(e,t,r){return new Pe(e,t,r)},be.union=function(e,t,r){return new Ue(e,t,r)},be.unionLayoutDiscriminator=function(e,t){return new Le(e,t)};var $e=be.blob=function(e,t){return new Ke(e,t)};be.cstr=function(e){return new Ve(e)},be.utf8=function(e,t){return new We(e,t)},be.const=function(e,t){return new Ye(e,t)};var et=function(){return $e(32,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"publicKey")},tt=function(){return $e(8,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"uint64")};function rt(e,t,r){for(var n=arguments.length,a=new Array(n>3?n-3:0),i=3;i4&&void 0!==o[4]&&o[4]||v.PublicKey.isOnCurve(i.toBuffer())){e.next=3;break}throw new Error("Owner cannot sign: ".concat(i.toString()));case 3:return e.next=5,v.PublicKey.findProgramAddress([i.toBuffer(),r.toBuffer(),a.toBuffer()],t);case 5:return e.abrupt("return",e.sent[0]);case 6:case"end":return e.stop()}}),e)})));return function(t,r,n,a){return e.apply(this,arguments)}}()},{key:"createAssociatedTokenAccountInstruction",value:function(e,t,r,n,a,i){var o=y.Buffer.alloc(0),s=[{pubkey:i,isSigner:!0,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:v.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:v.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];return new v.TransactionInstruction({keys:s,programId:e,data:o})}}]),e}()}.call(this,r(55))},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n=r(344),a=new(r(339).a)(n.a),i=a},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(){return Array.isArray||function(e){return e&&"number"===typeof e.length}}()},,function(e,t){e.exports=function(e){return"function"==typeof e}},function(e,t,r){"use strict";r.r(t),r.d(t,"Observable",(function(){return n.a})),r.d(t,"ConnectableObservable",(function(){return a.a})),r.d(t,"GroupedObservable",(function(){return i.a})),r.d(t,"observable",(function(){return o.a})),r.d(t,"Subject",(function(){return s.a})),r.d(t,"BehaviorSubject",(function(){return c.a})),r.d(t,"ReplaySubject",(function(){return u.a})),r.d(t,"AsyncSubject",(function(){return f.a})),r.d(t,"asap",(function(){return d.a})),r.d(t,"asapScheduler",(function(){return d.b})),r.d(t,"async",(function(){return l.a})),r.d(t,"asyncScheduler",(function(){return l.b})),r.d(t,"queue",(function(){return h.a})),r.d(t,"queueScheduler",(function(){return h.b})),r.d(t,"animationFrame",(function(){return A})),r.d(t,"animationFrameScheduler",(function(){return y})),r.d(t,"VirtualTimeScheduler",(function(){return w})),r.d(t,"VirtualAction",(function(){return x})),r.d(t,"Scheduler",(function(){return E.a})),r.d(t,"Subscription",(function(){return _.a})),r.d(t,"Subscriber",(function(){return C.a})),r.d(t,"Notification",(function(){return k.a})),r.d(t,"NotificationKind",(function(){return k.b})),r.d(t,"pipe",(function(){return B.a})),r.d(t,"noop",(function(){return I.a})),r.d(t,"identity",(function(){return S.a})),r.d(t,"isObservable",(function(){return O})),r.d(t,"ArgumentOutOfRangeError",(function(){return M.a})),r.d(t,"EmptyError",(function(){return D.a})),r.d(t,"ObjectUnsubscribedError",(function(){return T.a})),r.d(t,"UnsubscriptionError",(function(){return F.a})),r.d(t,"TimeoutError",(function(){return R.a})),r.d(t,"bindCallback",(function(){return U})),r.d(t,"bindNodeCallback",(function(){return H})),r.d(t,"combineLatest",(function(){return V.b})),r.d(t,"concat",(function(){return W.a})),r.d(t,"defer",(function(){return Y.a})),r.d(t,"empty",(function(){return J.b})),r.d(t,"forkJoin",(function(){return $})),r.d(t,"from",(function(){return Z.a})),r.d(t,"fromEvent",(function(){return re})),r.d(t,"fromEventPattern",(function(){return ae})),r.d(t,"generate",(function(){return ie})),r.d(t,"iif",(function(){return se})),r.d(t,"interval",(function(){return ue})),r.d(t,"merge",(function(){return de.a})),r.d(t,"never",(function(){return le.b})),r.d(t,"of",(function(){return he.a})),r.d(t,"onErrorResumeNext",(function(){return pe})),r.d(t,"pairs",(function(){return be})),r.d(t,"partition",(function(){return Ae})),r.d(t,"race",(function(){return we.a})),r.d(t,"range",(function(){return xe.a})),r.d(t,"throwError",(function(){return Ee.a})),r.d(t,"timer",(function(){return _e.a})),r.d(t,"using",(function(){return Ce})),r.d(t,"zip",(function(){return ke.b})),r.d(t,"scheduled",(function(){return Be.a})),r.d(t,"EMPTY",(function(){return J.a})),r.d(t,"NEVER",(function(){return le.a})),r.d(t,"config",(function(){return Ie.a}));var n=r(67),a=r(820),i=r(712),o=r(290),s=r(126),c=r(821),u=r(559),f=r(340),d=r(488),l=r(139),h=r(673),p=r(28),b=r(344),m=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return p.a(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame((function(){return t.flush(null)}))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(cancelAnimationFrame(r),t.scheduled=void 0)},t}(b.a),g=r(339),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p.a(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,a=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++nt.index?1:-1:e.delay>t.delay?1:-1},t}(b.a),E=r(676),_=r(110),C=r(50),k=r(263),B=r(484),I=r(276),S=r(245);function O(e){return!!e&&(e instanceof n.a||"function"===typeof e.lift&&"function"===typeof e.subscribe)}var M=r(314),D=r(334),T=r(291),F=r(492),R=r(823),P=r(167),N=r(571),j=r(140),L=r(172);function U(e,t,r){if(t){if(!Object(L.a)(t))return function(){for(var n=[],a=0;a1?n.next(Array.prototype.slice.call(arguments)):n.next(e)}),n,r)}))}function ne(e,t,r,n,a){var i;if(function(e){return e&&"function"===typeof e.addEventListener&&"function"===typeof e.removeEventListener}(e)){var o=e;e.addEventListener(t,r,a),i=function(){return o.removeEventListener(t,r,a)}}else if(function(e){return e&&"function"===typeof e.on&&"function"===typeof e.off}(e)){var s=e;e.on(t,r),i=function(){return s.off(t,r)}}else if(function(e){return e&&"function"===typeof e.addListener&&"function"===typeof e.removeListener}(e)){var c=e;e.addListener(t,r),i=function(){return c.removeListener(t,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var u=0,f=e.length;us[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=h[15&t[i]];a.push(e+"=Uint8Array(0x"+r+")")}else a.push(e+"="+JSON.stringify(t))}catch(u){a.push(e+"="+JSON.stringify(n[e].toString()))}})),a.push("code=".concat(r)),a.push("version=".concat(this.version));var i=t,s="";switch(r){case d.NUMERIC_FAULT:s="NUMERIC_FAULT";var c=t;switch(c){case"overflow":case"underflow":case"division-by-zero":s+="-"+c;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case d.CALL_EXCEPTION:case d.INSUFFICIENT_FUNDS:case d.MISSING_NEW:case d.NONCE_EXPIRED:case d.REPLACEMENT_UNDERPRICED:case d.TRANSACTION_REPLACED:case d.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),a.length&&(t+=" ("+a.join(", ")+")");var u=new Error(t);return u.reason=i,u.code=r,Object.keys(n).forEach((function(e){u[e]=n[e]})),u}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),l&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:l})}},{key:"checkSafeUint53",value:function(t,r){"number"===typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return u||(u=new e("logger/5.6.0")),u}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),i){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}o=!!t,i=!!r}},{key:"setLogLevel",value:function(t){var r=s[t.toLowerCase()];null!=r?c=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();p.errors=d,p.levels=f},function(e,t){function r(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(u){return void r(u)}s.done?t(c):Promise.resolve(c).then(n,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var o=e.apply(t,n);function s(e){r(o,a,i,s,c,"next",e)}function c(e){r(o,a,i,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},,function(e,t,r){"use strict";var n,a,i,o=r(1437),s=r(128),c=r(59),u=r(142),f=r(129),d=r(154),l=r(467),h=r(539),p=r(309),b=r(197),m=r(161).f,g=r(328),v=r(312),y=r(421),A=r(130),w=r(635),x=c.Int8Array,E=x&&x.prototype,_=c.Uint8ClampedArray,C=_&&_.prototype,k=x&&v(x),B=E&&v(E),I=Object.prototype,S=c.TypeError,O=A("toStringTag"),M=w("TYPED_ARRAY_TAG"),D=w("TYPED_ARRAY_CONSTRUCTOR"),T=o&&!!y&&"Opera"!==l(c.opera),F=!1,R={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},P={BigInt64Array:8,BigUint64Array:8},N=function(e){if(!f(e))return!1;var t=l(e);return d(R,t)||d(P,t)};for(n in R)(i=(a=c[n])&&a.prototype)?p(i,D,a):T=!1;for(n in P)(i=(a=c[n])&&a.prototype)&&p(i,D,a);if((!T||!u(k)||k===Function.prototype)&&(k=function(){throw S("Incorrect invocation")},T))for(n in R)c[n]&&y(c[n],k);if((!T||!B||B===I)&&(B=k.prototype,T))for(n in R)c[n]&&y(c[n].prototype,B);if(T&&v(C)!==B&&y(C,B),s&&!d(B,O))for(n in F=!0,m(B,O,{get:function(){return f(this)?this[M]:void 0}}),R)c[n]&&p(c[n],M,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:T,TYPED_ARRAY_CONSTRUCTOR:D,TYPED_ARRAY_TAG:F&&M,aTypedArray:function(e){if(N(e))return e;throw S("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!y||g(k,e)))return e;throw S(h(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(s){if(r)for(var a in R){var i=c[a];if(i&&d(i.prototype,e))try{delete i.prototype[e]}catch(o){try{i.prototype[e]=t}catch(u){}}}B[e]&&!r||b(B,e,r?t:T&&E[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,a;if(s){if(y){if(r)for(n in R)if((a=c[n])&&d(a,e))try{delete a[e]}catch(i){}if(k[e]&&!r)return;try{return b(k,e,r?t:T&&k[e]||t)}catch(i){}}for(n in R)!(a=c[n])||a[e]&&!r||b(a,e,t)}},isView:function(e){if(!f(e))return!1;var t=l(e);return"DataView"===t||d(R,t)||d(P,t)},isTypedArray:N,TypedArray:k,TypedArrayPrototype:B}},function(e,t,r){"use strict";var n=r(185),a=r(2503);e.exports=a((function(e){var t=n("sha256").update(e).digest();return n("sha256").update(t).digest()}))},function(e,t,r){"use strict";r.r(t),r.d(t,"render",(function(){return L})),r.d(t,"hydrate",(function(){return U})),r.d(t,"createElement",(function(){return m})),r.d(t,"h",(function(){return m})),r.d(t,"Fragment",(function(){return y})),r.d(t,"createRef",(function(){return v})),r.d(t,"isValidElement",(function(){return o})),r.d(t,"Component",(function(){return A})),r.d(t,"cloneElement",(function(){return Q})),r.d(t,"createContext",(function(){return G})),r.d(t,"toChildArray",(function(){return B})),r.d(t,"options",(function(){return a}));var n,a,i,o,s,c,u,f,d={},l=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(e,t){for(var r in t)e[r]=t[r];return e}function b(e){var t=e.parentNode;t&&t.removeChild(e)}function m(e,t,r){var a,i,o,s={};for(o in t)"key"==o?a=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return g(e,s,a,i,null)}function g(e,t,r,n,o){var s={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++i:o};return null==o&&null!=a.vnode&&a.vnode(s),s}function v(){return{current:null}}function y(e){return e.children}function A(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t0?g(b.type,b.props,b.key,null,b.__v):b)){if(b.__=r,b.__b=r.__b+1,null===(p=x[f])||p&&b.key==p.key&&b.type===p.type)x[f]=void 0;else for(h=0;h2&&(s.children=arguments.length>3?n.call(arguments,2):r),g(e.type,s,a||e.key,i||e.ref,null)}function G(e,t){var r={__c:t="__cC"+f++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some(E)},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}n=l.slice,a={__e:function(e,t,r,n){for(var a,i,o;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&null!=i.getDerivedStateFromError&&(a.setState(i.getDerivedStateFromError(e)),o=a.__d),null!=a.componentDidCatch&&(a.componentDidCatch(e,n||{}),o=a.__d),o)return a.__E=a}catch(t){e=t}throw e}},i=0,o=function(e){return null!=e&&void 0===e.constructor},A.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof e&&(e=e(p({},r),this.props)),e&&p(r,e),null!=e&&this.__v&&(t&&this.__h.push(t),E(this))},A.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},A.prototype.render=y,s=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_.__r=0,f=0},function(e,t,r){!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function b(e,t,r,n,a){var i,o=0;for(i=0;i>>8)-1}function m(e,t,r,n){return b(e,t,r,n,16)}function g(e,t,r,n){return b(e,t,r,n,32)}function v(e,t,r,n){!function(e,t,r,n){for(var a,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,l=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,b=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,y=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,A=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=i,x=o,E=s,_=c,C=u,k=f,B=d,I=l,S=h,O=p,M=b,D=m,T=g,F=v,R=y,P=A,N=0;N<20;N+=2)w^=(a=(T^=(a=(S^=(a=(C^=(a=w+T|0)<<7|a>>>25)+w|0)<<9|a>>>23)+C|0)<<13|a>>>19)+S|0)<<18|a>>>14,k^=(a=(x^=(a=(F^=(a=(O^=(a=k+x|0)<<7|a>>>25)+k|0)<<9|a>>>23)+O|0)<<13|a>>>19)+F|0)<<18|a>>>14,M^=(a=(B^=(a=(E^=(a=(R^=(a=M+B|0)<<7|a>>>25)+M|0)<<9|a>>>23)+R|0)<<13|a>>>19)+E|0)<<18|a>>>14,P^=(a=(D^=(a=(I^=(a=(_^=(a=P+D|0)<<7|a>>>25)+P|0)<<9|a>>>23)+_|0)<<13|a>>>19)+I|0)<<18|a>>>14,w^=(a=(_^=(a=(E^=(a=(x^=(a=w+_|0)<<7|a>>>25)+w|0)<<9|a>>>23)+x|0)<<13|a>>>19)+E|0)<<18|a>>>14,k^=(a=(C^=(a=(I^=(a=(B^=(a=k+C|0)<<7|a>>>25)+k|0)<<9|a>>>23)+B|0)<<13|a>>>19)+I|0)<<18|a>>>14,M^=(a=(O^=(a=(S^=(a=(D^=(a=M+O|0)<<7|a>>>25)+M|0)<<9|a>>>23)+D|0)<<13|a>>>19)+S|0)<<18|a>>>14,P^=(a=(R^=(a=(F^=(a=(T^=(a=P+R|0)<<7|a>>>25)+P|0)<<9|a>>>23)+T|0)<<13|a>>>19)+F|0)<<18|a>>>14;w=w+i|0,x=x+o|0,E=E+s|0,_=_+c|0,C=C+u|0,k=k+f|0,B=B+d|0,I=I+l|0,S=S+h|0,O=O+p|0,M=M+b|0,D=D+m|0,T=T+g|0,F=F+v|0,R=R+y|0,P=P+A|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=_>>>0&255,e[13]=_>>>8&255,e[14]=_>>>16&255,e[15]=_>>>24&255,e[16]=C>>>0&255,e[17]=C>>>8&255,e[18]=C>>>16&255,e[19]=C>>>24&255,e[20]=k>>>0&255,e[21]=k>>>8&255,e[22]=k>>>16&255,e[23]=k>>>24&255,e[24]=B>>>0&255,e[25]=B>>>8&255,e[26]=B>>>16&255,e[27]=B>>>24&255,e[28]=I>>>0&255,e[29]=I>>>8&255,e[30]=I>>>16&255,e[31]=I>>>24&255,e[32]=S>>>0&255,e[33]=S>>>8&255,e[34]=S>>>16&255,e[35]=S>>>24&255,e[36]=O>>>0&255,e[37]=O>>>8&255,e[38]=O>>>16&255,e[39]=O>>>24&255,e[40]=M>>>0&255,e[41]=M>>>8&255,e[42]=M>>>16&255,e[43]=M>>>24&255,e[44]=D>>>0&255,e[45]=D>>>8&255,e[46]=D>>>16&255,e[47]=D>>>24&255,e[48]=T>>>0&255,e[49]=T>>>8&255,e[50]=T>>>16&255,e[51]=T>>>24&255,e[52]=F>>>0&255,e[53]=F>>>8&255,e[54]=F>>>16&255,e[55]=F>>>24&255,e[56]=R>>>0&255,e[57]=R>>>8&255,e[58]=R>>>16&255,e[59]=R>>>24&255,e[60]=P>>>0&255,e[61]=P>>>8&255,e[62]=P>>>16&255,e[63]=P>>>24&255}(e,t,r,n)}function y(e,t,r,n){!function(e,t,r,n){for(var a,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,l=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,b=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,y=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,A=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)i^=(a=(g^=(a=(h^=(a=(u^=(a=i+g|0)<<7|a>>>25)+i|0)<<9|a>>>23)+u|0)<<13|a>>>19)+h|0)<<18|a>>>14,f^=(a=(o^=(a=(v^=(a=(p^=(a=f+o|0)<<7|a>>>25)+f|0)<<9|a>>>23)+p|0)<<13|a>>>19)+v|0)<<18|a>>>14,b^=(a=(d^=(a=(s^=(a=(y^=(a=b+d|0)<<7|a>>>25)+b|0)<<9|a>>>23)+y|0)<<13|a>>>19)+s|0)<<18|a>>>14,A^=(a=(m^=(a=(l^=(a=(c^=(a=A+m|0)<<7|a>>>25)+A|0)<<9|a>>>23)+c|0)<<13|a>>>19)+l|0)<<18|a>>>14,i^=(a=(c^=(a=(s^=(a=(o^=(a=i+c|0)<<7|a>>>25)+i|0)<<9|a>>>23)+o|0)<<13|a>>>19)+s|0)<<18|a>>>14,f^=(a=(u^=(a=(l^=(a=(d^=(a=f+u|0)<<7|a>>>25)+f|0)<<9|a>>>23)+d|0)<<13|a>>>19)+l|0)<<18|a>>>14,b^=(a=(p^=(a=(h^=(a=(m^=(a=b+p|0)<<7|a>>>25)+b|0)<<9|a>>>23)+m|0)<<13|a>>>19)+h|0)<<18|a>>>14,A^=(a=(y^=(a=(v^=(a=(g^=(a=A+y|0)<<7|a>>>25)+A|0)<<9|a>>>23)+g|0)<<13|a>>>19)+v|0)<<18|a>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=f>>>0&255,e[5]=f>>>8&255,e[6]=f>>>16&255,e[7]=f>>>24&255,e[8]=b>>>0&255,e[9]=b>>>8&255,e[10]=b>>>16&255,e[11]=b>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=d>>>0&255,e[17]=d>>>8&255,e[18]=d>>>16&255,e[19]=d>>>24&255,e[20]=l>>>0&255,e[21]=l>>>8&255,e[22]=l>>>16&255,e[23]=l>>>24&255,e[24]=h>>>0&255,e[25]=h>>>8&255,e[26]=h>>>16&255,e[27]=h>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,n)}var A=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(e,t,r,n,a,i,o){var s,c,u=new Uint8Array(16),f=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=i[c];for(;a>=64;){for(v(f,u,o,A),c=0;c<64;c++)e[t+c]=r[n+c]^f[c];for(s=1,c=8;c<16;c++)s=s+(255&u[c])|0,u[c]=255&s,s>>>=8;a-=64,t+=64,n+=64}if(a>0)for(v(f,u,o,A),c=0;c=64;){for(v(c,s,a,A),o=0;o<64;o++)e[t+o]=c[o];for(i=1,o=8;o<16;o++)i=i+(255&s[o])|0,s[o]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(v(c,s,a,A),o=0;o>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),a=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|a<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(a>>>4|i<<12),this.r[5]=i>>>1&8190,o=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|o<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(o>>>11|s<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function k(e,t,r,n,a,i){var o=new C(i);return o.update(r,n,a),o.finish(e,t),0}function B(e,t,r,n,a,i){var o=new Uint8Array(16);return k(o,0,r,n,a,i),m(e,t,o,0)}function I(e,t,r,n,a){var i;if(r<32)return-1;for(_(e,0,t,0,r,n,a),k(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function S(e,t,r,n,a){var i,o=new Uint8Array(32);if(r<32)return-1;if(E(o,0,32,n,a),0!==B(t,16,t,32,r-32,o))return-1;for(_(e,0,t,0,r,n,a),i=0;i<32;i++)e[i]=0;return 0}function O(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function M(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function D(e,t,r){for(var n,a=~(r-1),i=0;i<16;i++)n=a&(e[i]^t[i]),e[i]^=n,t[i]^=n}function T(e,r){var n,a,i,o=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(M(s),M(s),M(s),a=0;a<2;a++){for(o[0]=s[0]-65517,n=1;n<15;n++)o[n]=s[n]-65535-(o[n-1]>>16&1),o[n-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,D(s,o,1-i)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function F(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return T(r,e),T(n,t),g(r,0,n,0)}function R(e){var t=new Uint8Array(32);return T(t,e),1&t[0]}function P(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function N(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function j(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function L(e,t,r){var n,a,i=0,o=0,s=0,c=0,u=0,f=0,d=0,l=0,h=0,p=0,b=0,m=0,g=0,v=0,y=0,A=0,w=0,x=0,E=0,_=0,C=0,k=0,B=0,I=0,S=0,O=0,M=0,D=0,T=0,F=0,R=0,P=r[0],N=r[1],j=r[2],L=r[3],U=r[4],Q=r[5],G=r[6],H=r[7],z=r[8],q=r[9],K=r[10],V=r[11],W=r[12],Y=r[13],J=r[14],X=r[15];i+=(n=t[0])*P,o+=n*N,s+=n*j,c+=n*L,u+=n*U,f+=n*Q,d+=n*G,l+=n*H,h+=n*z,p+=n*q,b+=n*K,m+=n*V,g+=n*W,v+=n*Y,y+=n*J,A+=n*X,o+=(n=t[1])*P,s+=n*N,c+=n*j,u+=n*L,f+=n*U,d+=n*Q,l+=n*G,h+=n*H,p+=n*z,b+=n*q,m+=n*K,g+=n*V,v+=n*W,y+=n*Y,A+=n*J,w+=n*X,s+=(n=t[2])*P,c+=n*N,u+=n*j,f+=n*L,d+=n*U,l+=n*Q,h+=n*G,p+=n*H,b+=n*z,m+=n*q,g+=n*K,v+=n*V,y+=n*W,A+=n*Y,w+=n*J,x+=n*X,c+=(n=t[3])*P,u+=n*N,f+=n*j,d+=n*L,l+=n*U,h+=n*Q,p+=n*G,b+=n*H,m+=n*z,g+=n*q,v+=n*K,y+=n*V,A+=n*W,w+=n*Y,x+=n*J,E+=n*X,u+=(n=t[4])*P,f+=n*N,d+=n*j,l+=n*L,h+=n*U,p+=n*Q,b+=n*G,m+=n*H,g+=n*z,v+=n*q,y+=n*K,A+=n*V,w+=n*W,x+=n*Y,E+=n*J,_+=n*X,f+=(n=t[5])*P,d+=n*N,l+=n*j,h+=n*L,p+=n*U,b+=n*Q,m+=n*G,g+=n*H,v+=n*z,y+=n*q,A+=n*K,w+=n*V,x+=n*W,E+=n*Y,_+=n*J,C+=n*X,d+=(n=t[6])*P,l+=n*N,h+=n*j,p+=n*L,b+=n*U,m+=n*Q,g+=n*G,v+=n*H,y+=n*z,A+=n*q,w+=n*K,x+=n*V,E+=n*W,_+=n*Y,C+=n*J,k+=n*X,l+=(n=t[7])*P,h+=n*N,p+=n*j,b+=n*L,m+=n*U,g+=n*Q,v+=n*G,y+=n*H,A+=n*z,w+=n*q,x+=n*K,E+=n*V,_+=n*W,C+=n*Y,k+=n*J,B+=n*X,h+=(n=t[8])*P,p+=n*N,b+=n*j,m+=n*L,g+=n*U,v+=n*Q,y+=n*G,A+=n*H,w+=n*z,x+=n*q,E+=n*K,_+=n*V,C+=n*W,k+=n*Y,B+=n*J,I+=n*X,p+=(n=t[9])*P,b+=n*N,m+=n*j,g+=n*L,v+=n*U,y+=n*Q,A+=n*G,w+=n*H,x+=n*z,E+=n*q,_+=n*K,C+=n*V,k+=n*W,B+=n*Y,I+=n*J,S+=n*X,b+=(n=t[10])*P,m+=n*N,g+=n*j,v+=n*L,y+=n*U,A+=n*Q,w+=n*G,x+=n*H,E+=n*z,_+=n*q,C+=n*K,k+=n*V,B+=n*W,I+=n*Y,S+=n*J,O+=n*X,m+=(n=t[11])*P,g+=n*N,v+=n*j,y+=n*L,A+=n*U,w+=n*Q,x+=n*G,E+=n*H,_+=n*z,C+=n*q,k+=n*K,B+=n*V,I+=n*W,S+=n*Y,O+=n*J,M+=n*X,g+=(n=t[12])*P,v+=n*N,y+=n*j,A+=n*L,w+=n*U,x+=n*Q,E+=n*G,_+=n*H,C+=n*z,k+=n*q,B+=n*K,I+=n*V,S+=n*W,O+=n*Y,M+=n*J,D+=n*X,v+=(n=t[13])*P,y+=n*N,A+=n*j,w+=n*L,x+=n*U,E+=n*Q,_+=n*G,C+=n*H,k+=n*z,B+=n*q,I+=n*K,S+=n*V,O+=n*W,M+=n*Y,D+=n*J,T+=n*X,y+=(n=t[14])*P,A+=n*N,w+=n*j,x+=n*L,E+=n*U,_+=n*Q,C+=n*G,k+=n*H,B+=n*z,I+=n*q,S+=n*K,O+=n*V,M+=n*W,D+=n*Y,T+=n*J,F+=n*X,A+=(n=t[15])*P,o+=38*(x+=n*j),s+=38*(E+=n*L),c+=38*(_+=n*U),u+=38*(C+=n*Q),f+=38*(k+=n*G),d+=38*(B+=n*H),l+=38*(I+=n*z),h+=38*(S+=n*q),p+=38*(O+=n*K),b+=38*(M+=n*V),m+=38*(D+=n*W),g+=38*(T+=n*Y),v+=38*(F+=n*J),y+=38*(R+=n*X),i=(n=(i+=38*(w+=n*N))+(a=1)+65535)-65536*(a=Math.floor(n/65536)),o=(n=o+a+65535)-65536*(a=Math.floor(n/65536)),s=(n=s+a+65535)-65536*(a=Math.floor(n/65536)),c=(n=c+a+65535)-65536*(a=Math.floor(n/65536)),u=(n=u+a+65535)-65536*(a=Math.floor(n/65536)),f=(n=f+a+65535)-65536*(a=Math.floor(n/65536)),d=(n=d+a+65535)-65536*(a=Math.floor(n/65536)),l=(n=l+a+65535)-65536*(a=Math.floor(n/65536)),h=(n=h+a+65535)-65536*(a=Math.floor(n/65536)),p=(n=p+a+65535)-65536*(a=Math.floor(n/65536)),b=(n=b+a+65535)-65536*(a=Math.floor(n/65536)),m=(n=m+a+65535)-65536*(a=Math.floor(n/65536)),g=(n=g+a+65535)-65536*(a=Math.floor(n/65536)),v=(n=v+a+65535)-65536*(a=Math.floor(n/65536)),y=(n=y+a+65535)-65536*(a=Math.floor(n/65536)),A=(n=A+a+65535)-65536*(a=Math.floor(n/65536)),i=(n=(i+=a-1+37*(a-1))+(a=1)+65535)-65536*(a=Math.floor(n/65536)),o=(n=o+a+65535)-65536*(a=Math.floor(n/65536)),s=(n=s+a+65535)-65536*(a=Math.floor(n/65536)),c=(n=c+a+65535)-65536*(a=Math.floor(n/65536)),u=(n=u+a+65535)-65536*(a=Math.floor(n/65536)),f=(n=f+a+65535)-65536*(a=Math.floor(n/65536)),d=(n=d+a+65535)-65536*(a=Math.floor(n/65536)),l=(n=l+a+65535)-65536*(a=Math.floor(n/65536)),h=(n=h+a+65535)-65536*(a=Math.floor(n/65536)),p=(n=p+a+65535)-65536*(a=Math.floor(n/65536)),b=(n=b+a+65535)-65536*(a=Math.floor(n/65536)),m=(n=m+a+65535)-65536*(a=Math.floor(n/65536)),g=(n=g+a+65535)-65536*(a=Math.floor(n/65536)),v=(n=v+a+65535)-65536*(a=Math.floor(n/65536)),y=(n=y+a+65535)-65536*(a=Math.floor(n/65536)),A=(n=A+a+65535)-65536*(a=Math.floor(n/65536)),i+=a-1+37*(a-1),e[0]=i,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=f,e[6]=d,e[7]=l,e[8]=h,e[9]=p,e[10]=b,e[11]=m,e[12]=g,e[13]=v,e[14]=y,e[15]=A}function U(e,t){L(e,t,t)}function Q(e,r){var n,a=t();for(n=0;n<16;n++)a[n]=r[n];for(n=253;n>=0;n--)U(a,a),2!==n&&4!==n&&L(a,a,r);for(n=0;n<16;n++)e[n]=a[n]}function G(e,r){var n,a=t();for(n=0;n<16;n++)a[n]=r[n];for(n=250;n>=0;n--)U(a,a),1!==n&&L(a,a,r);for(n=0;n<16;n++)e[n]=a[n]}function H(e,r,n){var a,i,o=new Uint8Array(32),s=new Float64Array(80),u=t(),f=t(),d=t(),l=t(),h=t(),p=t();for(i=0;i<31;i++)o[i]=r[i];for(o[31]=127&r[31]|64,o[0]&=248,P(s,n),i=0;i<16;i++)f[i]=s[i],l[i]=u[i]=d[i]=0;for(u[0]=l[0]=1,i=254;i>=0;--i)D(u,f,a=o[i>>>3]>>>(7&i)&1),D(d,l,a),N(h,u,d),j(u,u,d),N(d,f,l),j(f,f,l),U(l,h),U(p,u),L(u,d,u),L(d,f,h),N(h,u,d),j(u,u,d),U(f,u),j(d,l,p),L(u,d,c),N(u,u,l),L(d,d,u),L(u,l,p),L(l,f,s),U(f,h),D(u,f,a),D(d,l,a);for(i=0;i<16;i++)s[i+16]=u[i],s[i+32]=d[i],s[i+48]=f[i],s[i+64]=l[i];var b=s.subarray(32),m=s.subarray(16);return Q(b,b),L(m,m,b),T(e,m),0}function z(e,t){return H(e,t,i)}function q(e,t){return n(t,32),z(e,t)}function K(e,t,r){var n=new Uint8Array(32);return H(n,r,t),y(e,a,n,A)}C.prototype.blocks=function(e,t,r){for(var n,a,i,o,s,c,u,f,d,l,h,p,b,m,g,v,y,A,w,x=this.fin?0:2048,E=this.h[0],_=this.h[1],C=this.h[2],k=this.h[3],B=this.h[4],I=this.h[5],S=this.h[6],O=this.h[7],M=this.h[8],D=this.h[9],T=this.r[0],F=this.r[1],R=this.r[2],P=this.r[3],N=this.r[4],j=this.r[5],L=this.r[6],U=this.r[7],Q=this.r[8],G=this.r[9];r>=16;)l=d=0,l+=(E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*T,l+=(_+=8191&(n>>>13|(a=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*G),l+=(C+=8191&(a>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*Q),l+=(k+=8191&(i>>>7|(o=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*U),d=(l+=(B+=8191&(o>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*L))>>>13,l&=8191,l+=(I+=s>>>1&8191)*(5*j),l+=(S+=8191&(s>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*N),l+=(O+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*P),l+=(M+=8191&(u>>>8|(f=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*R),h=d+=(l+=(D+=f>>>5|x)*(5*F))>>>13,h+=E*F,h+=_*T,h+=C*(5*G),h+=k*(5*Q),d=(h+=B*(5*U))>>>13,h&=8191,h+=I*(5*L),h+=S*(5*j),h+=O*(5*N),h+=M*(5*P),d+=(h+=D*(5*R))>>>13,h&=8191,p=d,p+=E*R,p+=_*F,p+=C*T,p+=k*(5*G),d=(p+=B*(5*Q))>>>13,p&=8191,p+=I*(5*U),p+=S*(5*L),p+=O*(5*j),p+=M*(5*N),b=d+=(p+=D*(5*P))>>>13,b+=E*P,b+=_*R,b+=C*F,b+=k*T,d=(b+=B*(5*G))>>>13,b&=8191,b+=I*(5*Q),b+=S*(5*U),b+=O*(5*L),b+=M*(5*j),m=d+=(b+=D*(5*N))>>>13,m+=E*N,m+=_*P,m+=C*R,m+=k*F,d=(m+=B*T)>>>13,m&=8191,m+=I*(5*G),m+=S*(5*Q),m+=O*(5*U),m+=M*(5*L),g=d+=(m+=D*(5*j))>>>13,g+=E*j,g+=_*N,g+=C*P,g+=k*R,d=(g+=B*F)>>>13,g&=8191,g+=I*T,g+=S*(5*G),g+=O*(5*Q),g+=M*(5*U),v=d+=(g+=D*(5*L))>>>13,v+=E*L,v+=_*j,v+=C*N,v+=k*P,d=(v+=B*R)>>>13,v&=8191,v+=I*F,v+=S*T,v+=O*(5*G),v+=M*(5*Q),y=d+=(v+=D*(5*U))>>>13,y+=E*U,y+=_*L,y+=C*j,y+=k*N,d=(y+=B*P)>>>13,y&=8191,y+=I*R,y+=S*F,y+=O*T,y+=M*(5*G),A=d+=(y+=D*(5*Q))>>>13,A+=E*Q,A+=_*U,A+=C*L,A+=k*j,d=(A+=B*N)>>>13,A&=8191,A+=I*P,A+=S*R,A+=O*F,A+=M*T,w=d+=(A+=D*(5*G))>>>13,w+=E*G,w+=_*Q,w+=C*U,w+=k*L,d=(w+=B*j)>>>13,w&=8191,w+=I*N,w+=S*P,w+=O*R,w+=M*F,E=l=8191&(d=(d=((d+=(w+=D*T)>>>13)<<2)+d|0)+(l&=8191)|0),_=h+=d>>>=13,C=p&=8191,k=b&=8191,B=m&=8191,I=g&=8191,S=v&=8191,O=y&=8191,M=A&=8191,D=w&=8191,t+=16,r-=16;this.h[0]=E,this.h[1]=_,this.h[2]=C,this.h[3]=k,this.h[4]=B,this.h[5]=I,this.h[6]=S,this.h[7]=O,this.h[8]=M,this.h[9]=D},C.prototype.finish=function(e,t){var r,n,a,i,o=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,o[0]=this.h[0]+5,r=o[0]>>>13,o[0]&=8191,i=1;i<10;i++)o[i]=this.h[i]+r,r=o[i]>>>13,o[i]&=8191;for(o[9]-=8192,n=(1^r)-1,i=0;i<10;i++)o[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|o[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),a=this.h[0]+this.pad[0],this.h[0]=65535&a,i=1;i<8;i++)a=(this.h[i]+this.pad[i]|0)+(a>>>16)|0,this.h[i]=65535&a;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},C.prototype.update=function(e,t,r){var n,a;if(this.leftover){for((a=16-this.leftover)>r&&(a=r),n=0;n=16&&(a=r-r%16,this.blocks(e,t,a),t+=a,r-=a),r){for(n=0;n=128;){for(x=0;x<16;x++)E=8*x+W,O[x]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],M[x]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(x=0;x<80;x++)if(a=D,i=T,o=F,s=R,c=P,u=N,f=j,L,l=U,h=Q,p=G,b=H,m=z,g=q,v=K,V,k=65535&(C=V),B=C>>>16,I=65535&(_=L),S=_>>>16,k+=65535&(C=(z>>>14|P<<18)^(z>>>18|P<<14)^(P>>>9|z<<23)),B+=C>>>16,I+=65535&(_=(P>>>14|z<<18)^(P>>>18|z<<14)^(z>>>9|P<<23)),S+=_>>>16,k+=65535&(C=z&q^~z&K),B+=C>>>16,I+=65535&(_=P&N^~P&j),S+=_>>>16,_=Y[2*x],k+=65535&(C=Y[2*x+1]),B+=C>>>16,I+=65535&_,S+=_>>>16,_=O[x%16],B+=(C=M[x%16])>>>16,I+=65535&_,S+=_>>>16,I+=(B+=(k+=65535&C)>>>16)>>>16,k=65535&(C=w=65535&k|B<<16),B=C>>>16,I=65535&(_=A=65535&I|(S+=I>>>16)<<16),S=_>>>16,k+=65535&(C=(U>>>28|D<<4)^(D>>>2|U<<30)^(D>>>7|U<<25)),B+=C>>>16,I+=65535&(_=(D>>>28|U<<4)^(U>>>2|D<<30)^(U>>>7|D<<25)),S+=_>>>16,B+=(C=U&Q^U&G^Q&G)>>>16,I+=65535&(_=D&T^D&F^T&F),S+=_>>>16,d=65535&(I+=(B+=(k+=65535&C)>>>16)>>>16)|(S+=I>>>16)<<16,y=65535&k|B<<16,k=65535&(C=b),B=C>>>16,I=65535&(_=s),S=_>>>16,B+=(C=w)>>>16,I+=65535&(_=A),S+=_>>>16,T=a,F=i,R=o,P=s=65535&(I+=(B+=(k+=65535&C)>>>16)>>>16)|(S+=I>>>16)<<16,N=c,j=u,L=f,D=d,Q=l,G=h,H=p,z=b=65535&k|B<<16,q=m,K=g,V=v,U=y,x%16===15)for(E=0;E<16;E++)_=O[E],k=65535&(C=M[E]),B=C>>>16,I=65535&_,S=_>>>16,_=O[(E+9)%16],k+=65535&(C=M[(E+9)%16]),B+=C>>>16,I+=65535&_,S+=_>>>16,A=O[(E+1)%16],k+=65535&(C=((w=M[(E+1)%16])>>>1|A<<31)^(w>>>8|A<<24)^(w>>>7|A<<25)),B+=C>>>16,I+=65535&(_=(A>>>1|w<<31)^(A>>>8|w<<24)^A>>>7),S+=_>>>16,A=O[(E+14)%16],B+=(C=((w=M[(E+14)%16])>>>19|A<<13)^(A>>>29|w<<3)^(w>>>6|A<<26))>>>16,I+=65535&(_=(A>>>19|w<<13)^(w>>>29|A<<3)^A>>>6),S+=_>>>16,S+=(I+=(B+=(k+=65535&C)>>>16)>>>16)>>>16,O[E]=65535&I|S<<16,M[E]=65535&k|B<<16;k=65535&(C=U),B=C>>>16,I=65535&(_=D),S=_>>>16,_=e[0],B+=(C=t[0])>>>16,I+=65535&_,S+=_>>>16,S+=(I+=(B+=(k+=65535&C)>>>16)>>>16)>>>16,e[0]=D=65535&I|S<<16,t[0]=U=65535&k|B<<16,k=65535&(C=Q),B=C>>>16,I=65535&(_=T),S=_>>>16,_=e[1],B+=(C=t[1])>>>16,I+=65535&_,S+=_>>>16,S+=(I+=(B+=(k+=65535&C)>>>16)>>>16)>>>16,e[1]=T=65535&I|S<<16,t[1]=Q=65535&k|B<<16,k=65535&(C=G),B=C>>>16,I=65535&(_=F),S=_>>>16,_=e[2],B+=(C=t[2])>>>16,I+=65535&_,S+=_>>>16,S+=(I+=(B+=(k+=65535&C)>>>16)>>>16)>>>16,e[2]=F=65535&I|S<<16,t[2]=G=65535&k|B<<16,k=65535&(C=H),B=C>>>16,I=65535&(_=R),S=_>>>16,_=e[3],B+=(C=t[3])>>>16,I+=65535&_,S+=_>>>16,S+=(I+=(B+=(k+=65535&C)>>>16)>>>16)>>>16,e[3]=R=65535&I|S<<16,t[3]=H=65535&k|B<<16,k=65535&(C=z),B=C>>>16,I=65535&(_=P),S=_>>>16,_=e[4],B+=(C=t[4])>>>16,I+=65535&_,S+=_>>>16,S+=(I+=(B+=(k+=65535&C)>>>16)>>>16)>>>16,e[4]=P=65535&I|S<<16,t[4]=z=65535&k|B<<16,k=65535&(C=q),B=C>>>16,I=65535&(_=N),S=_>>>16,_=e[5],B+=(C=t[5])>>>16,I+=65535&_,S+=_>>>16,S+=(I+=(B+=(k+=65535&C)>>>16)>>>16)>>>16,e[5]=N=65535&I|S<<16,t[5]=q=65535&k|B<<16,k=65535&(C=K),B=C>>>16,I=65535&(_=j),S=_>>>16,_=e[6],B+=(C=t[6])>>>16,I+=65535&_,S+=_>>>16,S+=(I+=(B+=(k+=65535&C)>>>16)>>>16)>>>16,e[6]=j=65535&I|S<<16,t[6]=K=65535&k|B<<16,k=65535&(C=V),B=C>>>16,I=65535&(_=L),S=_>>>16,_=e[7],B+=(C=t[7])>>>16,I+=65535&_,S+=_>>>16,S+=(I+=(B+=(k+=65535&C)>>>16)>>>16)>>>16,e[7]=L=65535&I|S<<16,t[7]=V=65535&k|B<<16,W+=128,n-=128}return n}function X(e,t,r){var n,a=new Int32Array(8),i=new Int32Array(8),o=new Uint8Array(256),s=r;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,J(a,i,t,r),r%=128,n=0;n=0;--a)$(e,t,n=r[a/8|0]>>(7&a)&1),Z(t,e),Z(e,e),$(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];O(n[0],d),O(n[1],l),O(n[2],s),L(n[3],d,l),te(e,n,r)}function ne(e,r,a){var i,o=new Uint8Array(64),s=[t(),t(),t(),t()];for(a||n(r,32),X(o,r,32),o[0]&=248,o[31]&=127,o[31]|=64,re(s,o),ee(e,s),i=0;i<32;i++)r[i+32]=e[i];return 0}var ae=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var r,n,a,i;for(n=63;n>=32;--n){for(r=0,a=n-32,i=n-12;a>4)*ae[a],r=t[a]>>8,t[a]&=255;for(a=0;a<32;a++)t[a]-=r*ae[a];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function oe(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function se(e,r,n,a){var i,o,s=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),f=new Float64Array(64),d=[t(),t(),t(),t()];X(s,a,32),s[0]&=248,s[31]&=127,s[31]|=64;var l=n+64;for(i=0;i>7&&j(e[0],o,e[0]),L(e[3],e[0],e[1]),0)}(l,a))return-1;for(i=0;i=0},e.sign.keyPair=function(){var e=new Uint8Array(me),t=new Uint8Array(ge);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(ye(e),e.length!==ge)throw new Error("bad secret key size");for(var t=new Uint8Array(me),r=0;r0&&"0"===r.toString();)r=(e=e.slice(1))[0];return e},t.toBuffer=function(e){if(!f.isBuffer(e))if(Array.isArray(e))e=f.from(e);else if("string"===typeof e)e=t.isHexString(e)?f.from(t.padToEven(t.stripHexPrefix(e)),"hex"):f.from(e);else if("number"===typeof e)e=t.intToBuffer(e);else if(null===e||void 0===e)e=f.allocUnsafe(0);else if(c.isBN(e))e=e.toArrayLike(f);else{if(!e.toArray)throw new Error("invalid type");e=f.from(e.toArray())}return e},t.bufferToInt=function(e){return new c(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new c(e).fromTwos(256)},t.toUnsigned=function(e){return f.from(e.toTwos(256).toArray())},t.keccak=function(e,r){return e=t.toBuffer(e),r||(r=256),a("keccak"+r).update(e).digest()},t.keccak256=function(e){return t.keccak(e)},t.sha3=t.keccak,t.sha256=function(e){return e=t.toBuffer(e),u("sha256").update(e).digest()},t.ripemd160=function(e,r){e=t.toBuffer(e);var n=u("rmd160").update(e).digest();return!0===r?t.setLength(n,32):n},t.rlphash=function(e){return t.keccak(s.encode(e))},t.isValidPrivate=function(e){return i.privateKeyVerify(e)},t.isValidPublic=function(e,t){return 64===e.length?i.publicKeyVerify(f.concat([f.from([4]),e])):!!t&&i.publicKeyVerify(e)},t.pubToAddress=t.publicToAddress=function(e,r){return e=t.toBuffer(e),r&&64!==e.length&&(e=i.publicKeyConvert(e,!1).slice(1)),o(64===e.length),t.keccak(e).slice(-20)};var d=t.privateToPublic=function(e){return e=t.toBuffer(e),i.publicKeyCreate(e,!1).slice(1)};t.importPublic=function(e){return 64!==(e=t.toBuffer(e)).length&&(e=i.publicKeyConvert(e,!1).slice(1)),e},t.ecsign=function(e,t){var r=i.sign(e,t),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},t.hashPersonalMessage=function(e){var r=t.toBuffer("\x19Ethereum Signed Message:\n"+e.length.toString());return t.keccak(f.concat([r,e]))},t.ecrecover=function(e,r,n,a){var o=f.concat([t.setLength(n,32),t.setLength(a,32)],64),s=r-27;if(0!==s&&1!==s)throw new Error("Invalid signature v value");var c=i.recover(e,o,s);return i.publicKeyConvert(c,!1).slice(1)},t.toRpcSig=function(e,r,n){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(f.concat([t.setLengthLeft(r,32),t.setLengthLeft(n,32),t.toBuffer(e-27)]))},t.fromRpcSig=function(e){if(65!==(e=t.toBuffer(e)).length)throw new Error("Invalid signature length");var r=e[64];return r<27&&(r+=27),{v:r,r:e.slice(0,32),s:e.slice(32,64)}},t.privateToAddress=function(e){return t.publicToAddress(d(e))},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===t.addHexPrefix(e)},t.toChecksumAddress=function(e){e=t.stripHexPrefix(e).toLowerCase();for(var r=t.keccak(e).toString("hex"),n="0x",a=0;a=8?n+=e[a].toUpperCase():n+=e[a];return n},t.isValidChecksumAddress=function(e){return t.isValidAddress(e)&&t.toChecksumAddress(e)===e},t.generateAddress=function(e,r){return e=t.toBuffer(e),r=(r=new c(r)).isZero()?null:f.from(r.toArray()),t.rlphash([e,r]).slice(-20)},t.isPrecompiled=function(e){var r=t.unpad(e);return 1===r.length&&r[0]>=1&&r[0]<=8},t.addHexPrefix=function(e){return"string"!==typeof e||t.isHexPrefixed(e)?e:"0x"+e},t.isValidSignature=function(e,t,r,n){var a=new c("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),i=new c("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===r.length&&((27===e||28===e)&&(t=new c(t),r=new c(r),!(t.isZero()||t.gt(i)||r.isZero()||r.gt(i))&&(!1!==n||1!==new c(r).cmp(a))))},t.baToJSON=function(e){if(f.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var r=[],n=0;n=a.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===a.length||!r.length||o(r.length===a.length,"The field "+r.name+" must have byte length of "+r.length),e.raw[n]=a}e._fields.push(r.name),Object.defineProperty(e,r.name,{enumerable:!0,configurable:!0,get:a,set:i}),r.default&&(e[r.name]=r.default),r.alias&&Object.defineProperty(e,r.alias,{enumerable:!1,configurable:!0,set:i,get:a})})),a)if("string"===typeof a&&(a=f.from(t.stripHexPrefix(a),"hex")),f.isBuffer(a)&&(a=s.decode(a)),Array.isArray(a)){if(a.length>e._fields.length)throw new Error("wrong number of fields in data");a.forEach((function(r,n){e[e._fields[n]]=t.toBuffer(r)}))}else{if("object"!==("undefined"===typeof a?"undefined":n(a)))throw new Error("invalid data");var i=Object.keys(a);r.forEach((function(t){-1!==i.indexOf(t.name)&&(e[t.name]=a[t.name]),-1!==i.indexOf(t.alias)&&(e[t.alias]=a[t.alias])}))}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d}));r(33);var n=r(25),a=r(10),i=r(187),o=r(113);function s(){return s=Object.assign||function(e){for(var t=1;t=0||(a[r]=e[r]);return a}var u=["onClick","reloadDocument","replace","state","target","to"];function f(e){var t=e.basename,r=e.children,s=e.window,c=Object(a.useRef)();null==c.current&&(c.current=Object(i.b)({window:s}));var u=c.current,f=Object(a.useState)({action:u.action,location:u.location}),d=Object(n.a)(f,2),l=d[0],h=d[1];return Object(a.useLayoutEffect)((function(){return u.listen(h)}),[u]),Object(a.createElement)(o.b,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:u})}var d=Object(a.forwardRef)((function(e,t){var r=e.onClick,n=e.reloadDocument,f=e.replace,d=void 0!==f&&f,l=e.state,h=e.target,p=e.to,b=c(e,u),m=Object(o.d)(p),g=function(e,t){var r=void 0===t?{}:t,n=r.target,s=r.replace,c=r.state,u=Object(o.f)(),f=Object(o.e)(),d=Object(o.h)(e);return Object(a.useCallback)((function(t){if(0===t.button&&(!n||"_self"===n)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t)){t.preventDefault();var r=!!s||Object(i.e)(f)===Object(i.e)(d);u(e,{replace:r,state:c})}}),[f,u,d,s,c,n,e])}(p,{replace:d,state:l,target:h});return Object(a.createElement)("a",s({},b,{href:m,onClick:function(e){r&&r(e),e.defaultPrevented||n||g(e)},ref:t,target:h}))}))},function(e,t,r){"use strict";r.d(t,"d",(function(){return d})),r.d(t,"a",(function(){return l})),r.d(t,"c",(function(){return h})),r.d(t,"b",(function(){return p}));var n=r(1),a=r(2),i=r(68),o=r(699),s=r(151),c=r(96),u=r(341),f=new c.a(u.a);function d(e){var t=[];return function e(r,n){if(Array.isArray(n))for(var a in n){var i=r.slice();i.push(a);try{e(i,n[a])}catch(o){t.push({path:i,error:o})}}}([],e),t}var l=function(){function e(t,r,a,i){Object(n.a)(this,e),this.name=t,this.type=r,this.localName=a,this.dynamic=i}return Object(a.a)(e,[{key:"_throwError",value:function(e,t){f.throwArgumentError(e,this.localName,t)}}]),e}(),h=function(){function e(t){Object(n.a)(this,e),Object(s.b)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return Object(a.a)(e,[{key:"data",get:function(){return Object(i.c)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData(Object(i.b)(e._data))}},{key:"writeBytes",value:function(e){var t=Object(i.a)(e),r=t.length%this.wordSize;return r&&(t=Object(i.b)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=Object(i.a)(o.a.from(e));return t.length>this.wordSize&&f.throwError("value out-of-bounds",c.a.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(i.b)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}(),p=function(){function e(t,r,a,o){Object(n.a)(this,e),Object(s.b)(this,"_data",Object(i.a)(t)),Object(s.b)(this,"wordSize",r||32),Object(s.b)(this,"_coerceFunc",a),Object(s.b)(this,"allowLoose",o),this._offset=0}return Object(a.a)(e,[{key:"data",get:function(){return Object(i.g)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:f.throwError("data out-of-bounds",c.a.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return o.a.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}()},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(3509).Buffer}catch(I){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,a){for(var i=0,o=0,s=Math.min(e.length,r),c=t;c=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&o0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=c(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(I){i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o>>24-a&16777215)||o!==this.length-1?l[6-c.length]+c+r:c+r,(a+=2)>=26&&(a-=26,o--)}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(f).toString(e);r=(d=d.idivn(f)).isZero()?b+r:l[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function b(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(o=(a=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,a),o},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===i?(r>=0&&(e[r--]=o>>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],A=8191&y,w=y>>>13,x=0|o[4],E=8191&x,_=x>>>13,C=0|o[5],k=8191&C,B=C>>>13,I=0|o[6],S=8191&I,O=I>>>13,M=0|o[7],D=8191&M,T=M>>>13,F=0|o[8],R=8191&F,P=F>>>13,N=0|o[9],j=8191&N,L=N>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,Y=0|s[3],J=8191&Y,X=Y>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,Q))|0)+((8191&(a=(a=Math.imul(d,G))+Math.imul(l,Q)|0))<<13)|0;u=((i=Math.imul(l,G))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,Q),a=(a=Math.imul(p,G))+Math.imul(b,Q)|0,i=Math.imul(b,G);var ge=(u+(n=n+Math.imul(d,z)|0)|0)+((8191&(a=(a=a+Math.imul(d,q)|0)+Math.imul(l,z)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,Q),a=(a=Math.imul(g,G))+Math.imul(v,Q)|0,i=Math.imul(v,G),n=n+Math.imul(p,z)|0,a=(a=a+Math.imul(p,q)|0)+Math.imul(b,z)|0,i=i+Math.imul(b,q)|0;var ve=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,Q),a=(a=Math.imul(A,G))+Math.imul(w,Q)|0,i=Math.imul(w,G),n=n+Math.imul(g,z)|0,a=(a=a+Math.imul(g,q)|0)+Math.imul(v,z)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(p,V)|0,a=(a=a+Math.imul(p,W)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ye=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(a=(a=a+Math.imul(d,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((i=i+Math.imul(l,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,Q),a=(a=Math.imul(E,G))+Math.imul(_,Q)|0,i=Math.imul(_,G),n=n+Math.imul(A,z)|0,a=(a=a+Math.imul(A,q)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,q)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(p,J)|0,a=(a=a+Math.imul(p,X)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,X)|0;var Ae=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,Q),a=(a=Math.imul(k,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),n=n+Math.imul(E,z)|0,a=(a=a+Math.imul(E,q)|0)+Math.imul(_,z)|0,i=i+Math.imul(_,q)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(g,J)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,a=(a=a+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((i=i+Math.imul(l,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,Q),a=(a=Math.imul(S,G))+Math.imul(O,Q)|0,i=Math.imul(O,G),n=n+Math.imul(k,z)|0,a=(a=a+Math.imul(k,q)|0)+Math.imul(B,z)|0,i=i+Math.imul(B,q)|0,n=n+Math.imul(E,V)|0,a=(a=a+Math.imul(E,W)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(A,J)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,a=(a=a+Math.imul(p,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var xe=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,oe)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),a=(a=Math.imul(D,G))+Math.imul(T,Q)|0,i=Math.imul(T,G),n=n+Math.imul(S,z)|0,a=(a=a+Math.imul(S,q)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,q)|0,n=n+Math.imul(k,V)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(A,$)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(p,ie)|0,a=(a=a+Math.imul(p,oe)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,oe)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,Q),a=(a=Math.imul(R,G))+Math.imul(P,Q)|0,i=Math.imul(P,G),n=n+Math.imul(D,z)|0,a=(a=a+Math.imul(D,q)|0)+Math.imul(T,z)|0,i=i+Math.imul(T,q)|0,n=n+Math.imul(S,V)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,n=n+Math.imul(E,$)|0,a=(a=a+Math.imul(E,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(p,ce)|0,a=(a=a+Math.imul(p,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0;var _e=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),a=(a=Math.imul(j,G))+Math.imul(L,Q)|0,i=Math.imul(L,G),n=n+Math.imul(R,z)|0,a=(a=a+Math.imul(R,q)|0)+Math.imul(P,z)|0,i=i+Math.imul(P,q)|0,n=n+Math.imul(D,V)|0,a=(a=a+Math.imul(D,W)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,W)|0,n=n+Math.imul(S,J)|0,a=(a=a+Math.imul(S,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,a=(a=a+Math.imul(E,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(g,ce)|0,a=(a=a+Math.imul(g,ue)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,a=(a=a+Math.imul(p,le)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,le)|0;var Ce=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(a=(a=a+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((i=i+Math.imul(l,be)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,z),a=(a=Math.imul(j,q))+Math.imul(L,z)|0,i=Math.imul(L,q),n=n+Math.imul(R,V)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(S,$)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(E,ie)|0,a=(a=a+Math.imul(E,oe)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(A,ce)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,n=n+Math.imul(g,de)|0,a=(a=a+Math.imul(g,le)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0;var ke=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(a=(a=a+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),a=(a=Math.imul(j,W))+Math.imul(L,V)|0,i=Math.imul(L,W),n=n+Math.imul(R,J)|0,a=(a=a+Math.imul(R,X)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(E,ce)|0,a=(a=a+Math.imul(E,ue)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,le)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0;var Be=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(a=(a=a+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((i=i+Math.imul(v,be)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,J),a=(a=Math.imul(j,X))+Math.imul(L,J)|0,i=Math.imul(L,X),n=n+Math.imul(R,$)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(D,re)|0,a=(a=a+Math.imul(D,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(k,ce)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,n=n+Math.imul(E,de)|0,a=(a=a+Math.imul(E,le)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,le)|0;var Ie=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(a=(a=a+Math.imul(A,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,$),a=(a=Math.imul(j,ee))+Math.imul(L,$)|0,i=Math.imul(L,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(D,ie)|0,a=(a=a+Math.imul(D,oe)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,oe)|0,n=n+Math.imul(S,ce)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,le)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,le)|0;var Se=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(a=(a=a+Math.imul(E,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((i=i+Math.imul(_,be)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,re),a=(a=Math.imul(j,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(D,ce)|0,a=(a=a+Math.imul(D,ue)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,le)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(a=(a=a+Math.imul(k,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ie),a=(a=Math.imul(j,oe))+Math.imul(L,ie)|0,i=Math.imul(L,oe),n=n+Math.imul(R,ce)|0,a=(a=a+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,n=n+Math.imul(D,de)|0,a=(a=a+Math.imul(D,le)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,le)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(a=(a=a+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,ce),a=(a=Math.imul(j,ue))+Math.imul(L,ce)|0,i=Math.imul(L,ue),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,le)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,le)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(a=(a=a+Math.imul(D,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,de),a=(a=Math.imul(j,le))+Math.imul(L,de)|0,i=Math.imul(L,le);var Te=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(a=(a=a+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Fe=(u+(n=Math.imul(j,pe))|0)+((8191&(a=(a=Math.imul(j,be))+Math.imul(L,pe)|0))<<13)|0;return u=((i=Math.imul(L,be))+(a>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=Ae,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=_e,c[9]=Ce,c[10]=ke,c[11]=Be,c[12]=Ie,c[13]=Se,c[14]=Oe,c[15]=Me,c[16]=De,c[17]=Te,c[18]=Fe,0!==u&&(c[19]=u,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function v(e,t,r){return g(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(m=b),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?b(this,e,t):r<1024?g(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,r+=i/67108864|0,r+=o>>>26,this.words[a]=67108863&o}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==f||u>=a);u--){var d=0|this.words[u];this.words[u]=f<<26-i|d>>>i,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this._strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,c=n.length-a.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(a,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0===(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(f),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,l=1;0===(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function B(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},a(x,w),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=o}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(A[e])return A[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new E;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return A[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,a),l=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),p=o;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var d=u>>f&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===f)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}c=26}return a},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new B(e)},a(B,k),B.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},B.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},B.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},B.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},B.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(98)(e))},function(e,t,r){"use strict";(function(e){var n=r(20).default,a=r(21).default,i=r(22).default,o=r(37).default,s=r(38).default,c=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataProgram=void 0;var u=r(32),f=r(153),d=function(t){o(f,t);var r=s(f);function f(){return a(this,f),r.apply(this,arguments)}return i(f,null,[{key:"findEditionAccount",value:function(t,r){return c(this,void 0,void 0,n().mark((function a(){return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",u.PublicKey.findProgramAddress([e.from(f.PREFIX,"utf8"),f.PUBKEY.toBuffer(),t.toBuffer(),e.from(f.EDITION,"utf8"),e.from(r,"utf8")],f.PUBKEY));case 1:case"end":return n.stop()}}),a)})))}},{key:"findMasterEditionAccount",value:function(t){return c(this,void 0,void 0,n().mark((function r(){return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",u.PublicKey.findProgramAddress([e.from(f.PREFIX,"utf8"),f.PUBKEY.toBuffer(),t.toBuffer(),e.from(f.EDITION,"utf8")],f.PUBKEY));case 1:case"end":return r.stop()}}),r)})))}},{key:"findMetadataAccount",value:function(t){return c(this,void 0,void 0,n().mark((function r(){return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",u.PublicKey.findProgramAddress([e.from(f.PREFIX,"utf8"),f.PUBKEY.toBuffer(),t.toBuffer()],f.PUBKEY));case 1:case"end":return r.stop()}}),r)})))}},{key:"findUseAuthorityAccount",value:function(t,r){return c(this,void 0,void 0,n().mark((function a(){return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",u.PublicKey.findProgramAddress([e.from(f.PREFIX,"utf8"),f.PUBKEY.toBuffer(),t.toBuffer(),e.from(f.USER,"utf8"),r.toBuffer()],f.PUBKEY));case 1:case"end":return n.stop()}}),a)})))}},{key:"findCollectionAuthorityAccount",value:function(t,r){return c(this,void 0,void 0,n().mark((function a(){return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",u.PublicKey.findProgramAddress([e.from(f.PREFIX,"utf8"),f.PUBKEY.toBuffer(),t.toBuffer(),e.from(f.COLLECTION_AUTHORITY,"utf8"),r.toBuffer()],f.PUBKEY));case 1:case"end":return n.stop()}}),a)})))}},{key:"findProgramAsBurnerAccount",value:function(){return c(this,void 0,void 0,n().mark((function t(){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",u.PublicKey.findProgramAddress([e.from(f.PREFIX,"utf8"),f.PUBKEY.toBuffer(),e.from(f.BURN,"utf8")],f.PUBKEY));case 1:case"end":return t.stop()}}),t)})))}}]),f}(f.Program);t.MetadataProgram=d,d.PREFIX="metadata",d.EDITION="edition",d.USER="user",d.COLLECTION_AUTHORITY="collection_authority",d.BURN="burn",d.PUBKEY=new u.PublicKey(f.config.programs.metadata)}).call(this,r(15).Buffer)},function(e,t,r){var n=r(59),a=r(128),i=r(1397),o=r(1398),s=r(125),c=r(415),u=n.TypeError,f=Object.defineProperty,d=Object.getOwnPropertyDescriptor,l="enumerable",h="configurable",p="writable";t.f=a?o?function(e,t,r){if(s(e),t=c(t),s(r),"function"===typeof e&&"prototype"===t&&"value"in r&&p in r&&!r[p]){var n=d(e,t);n&&n[p]&&(e[t]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:l in r?r[l]:n[l],writable:!1})}return f(e,t,r)}:f:function(e,t,r){if(s(e),t=c(t),s(r),i)try{return f(e,t,r)}catch(n){}if("get"in r||"set"in r)throw u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){"use strict";r.r(t),r.d(t,"audit",(function(){return i})),r.d(t,"auditTime",(function(){return f})),r.d(t,"buffer",(function(){return d})),r.d(t,"bufferCount",(function(){return b})),r.d(t,"bufferTime",(function(){return A})),r.d(t,"bufferToggle",(function(){return O})),r.d(t,"bufferWhen",(function(){return T})),r.d(t,"catchError",(function(){return P.a})),r.d(t,"combineAll",(function(){return j})),r.d(t,"combineLatest",(function(){return Q})),r.d(t,"concat",(function(){return H})),r.d(t,"concatAll",(function(){return z.a})),r.d(t,"concatMap",(function(){return q.a})),r.d(t,"concatMapTo",(function(){return K})),r.d(t,"count",(function(){return V})),r.d(t,"debounce",(function(){return J})),r.d(t,"debounceTime",(function(){return $})),r.d(t,"defaultIfEmpty",(function(){return ne.a})),r.d(t,"delay",(function(){return oe})),r.d(t,"delayWhen",(function(){return de})),r.d(t,"dematerialize",(function(){return me})),r.d(t,"distinct",(function(){return ye})),r.d(t,"distinctUntilChanged",(function(){return xe.a})),r.d(t,"distinctUntilKeyChanged",(function(){return Ee.a})),r.d(t,"elementAt",(function(){return Ie})),r.d(t,"endWith",(function(){return Oe})),r.d(t,"every",(function(){return Me})),r.d(t,"exhaust",(function(){return Fe})),r.d(t,"exhaustMap",(function(){return je})),r.d(t,"expand",(function(){return Qe})),r.d(t,"filter",(function(){return Ce.a})),r.d(t,"finalize",(function(){return ze})),r.d(t,"find",(function(){return Ve})),r.d(t,"findIndex",(function(){return Je})),r.d(t,"first",(function(){return Xe.a})),r.d(t,"groupBy",(function(){return Ze.b})),r.d(t,"ignoreElements",(function(){return $e})),r.d(t,"isEmpty",(function(){return rt})),r.d(t,"last",(function(){return dt})),r.d(t,"map",(function(){return Ne.a})),r.d(t,"mapTo",(function(){return lt})),r.d(t,"materialize",(function(){return bt})),r.d(t,"max",(function(){return Et})),r.d(t,"merge",(function(){return Ct})),r.d(t,"mergeAll",(function(){return kt.a})),r.d(t,"mergeMap",(function(){return Bt.b})),r.d(t,"flatMap",(function(){return Bt.a})),r.d(t,"mergeMapTo",(function(){return It})),r.d(t,"mergeScan",(function(){return St})),r.d(t,"min",(function(){return Dt})),r.d(t,"multicast",(function(){return Tt.a})),r.d(t,"observeOn",(function(){return Ft.b})),r.d(t,"onErrorResumeNext",(function(){return Rt})),r.d(t,"pairwise",(function(){return jt})),r.d(t,"partition",(function(){return Gt})),r.d(t,"pluck",(function(){return Ht.a})),r.d(t,"publish",(function(){return zt.a})),r.d(t,"publishBehavior",(function(){return Kt})),r.d(t,"publishLast",(function(){return Wt})),r.d(t,"publishReplay",(function(){return Jt})),r.d(t,"race",(function(){return Zt})),r.d(t,"reduce",(function(){return xt})),r.d(t,"repeat",(function(){return $t})),r.d(t,"repeatWhen",(function(){return nr})),r.d(t,"retry",(function(){return or.a})),r.d(t,"retryWhen",(function(){return sr})),r.d(t,"refCount",(function(){return fr.a})),r.d(t,"sample",(function(){return dr})),r.d(t,"sampleTime",(function(){return pr})),r.d(t,"scan",(function(){return vt})),r.d(t,"sequenceEqual",(function(){return vr})),r.d(t,"share",(function(){return Er})),r.d(t,"shareReplay",(function(){return _r.a})),r.d(t,"single",(function(){return Cr})),r.d(t,"skip",(function(){return Ir})),r.d(t,"skipLast",(function(){return Mr})),r.d(t,"skipUntil",(function(){return Fr})),r.d(t,"skipWhile",(function(){return Nr})),r.d(t,"startWith",(function(){return Ur.a})),r.d(t,"subscribeOn",(function(){return zr})),r.d(t,"switchAll",(function(){return Vr})),r.d(t,"switchMap",(function(){return Kr.a})),r.d(t,"switchMapTo",(function(){return Wr})),r.d(t,"take",(function(){return Be.a})),r.d(t,"takeLast",(function(){return st})),r.d(t,"takeUntil",(function(){return Yr.a})),r.d(t,"takeWhile",(function(){return Jr.a})),r.d(t,"tap",(function(){return Xr.a})),r.d(t,"throttle",(function(){return $r})),r.d(t,"throttleTime",(function(){return rn})),r.d(t,"throwIfEmpty",(function(){return ke.a})),r.d(t,"timeInterval",(function(){return cn})),r.d(t,"timeout",(function(){return hn})),r.d(t,"timeoutWith",(function(){return dn.a})),r.d(t,"timestamp",(function(){return pn})),r.d(t,"toArray",(function(){return gn})),r.d(t,"window",(function(){return vn})),r.d(t,"windowCount",(function(){return wn})),r.d(t,"windowTime",(function(){return _n})),r.d(t,"windowToggle",(function(){return Mn})),r.d(t,"windowWhen",(function(){return Fn})),r.d(t,"withLatestFrom",(function(){return Nn})),r.d(t,"zip",(function(){return Qn})),r.d(t,"zipAll",(function(){return Gn}));var n=r(28),a=r(57);function i(e){return function(t){return t.lift(new o(e))}}var o=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return n.a(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(n){return this.destination.error(n)}var r=Object(a.c)(t,new a.a(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}},t.prototype.clearThrottle=function(){var e=this,t=e.value,r=e.hasValue,n=e.throttled;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),r&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(a.b),c=r(139),u=r(827);function f(e,t){return void 0===t&&(t=c.a),i((function(){return Object(u.a)(e,t)}))}function d(e){return function(t){return t.lift(new l(e))}}var l=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new h(e,this.closingNotifier))},e}(),h=function(e){function t(t,r){var n=e.call(this,t)||this;return n.buffer=[],n.add(Object(a.c)(r,new a.a(n))),n}return n.a(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(a.b),p=r(50);function b(e,t){return void 0===t&&(t=null),function(r){return r.lift(new m(e,t))}}var m=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,this.subscriberClass=t&&e!==t?v:g}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),g=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return n.a(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(p.a),v=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.bufferSize=r,a.startBufferEvery=n,a.buffers=[],a.count=0,a}return n.a(t,e),t.prototype._next=function(e){var t=this,r=t.bufferSize,n=t.startBufferEvery,a=t.buffers,i=t.count;this.count++,i%n===0&&a.push([]);for(var o=a.length;o--;){var s=a[o];s.push(e),s.length===r&&(a.splice(o,1),this.destination.next(s))}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},t}(p.a),y=r(172);function A(e){var t=arguments.length,r=c.a;Object(y.a)(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;t>=2&&(n=arguments[1]);var a=Number.POSITIVE_INFINITY;return t>=3&&(a=arguments[2]),function(t){return t.lift(new w(e,n,a,r))}}var w=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new E(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),x=function(){return function(){this.buffer=[]}}(),E=function(e){function t(t,r,n,a,i){var o=e.call(this,t)||this;o.bufferTimeSpan=r,o.bufferCreationInterval=n,o.maxBufferSize=a,o.scheduler=i,o.contexts=[];var s=o.openContext();if(o.timespanOnly=null==n||n<0,o.timespanOnly){var c={subscriber:o,context:s,bufferTimeSpan:r};o.add(s.closeAction=i.schedule(_,r,c))}else{var u={subscriber:o,context:s},f={bufferTimeSpan:r,bufferCreationInterval:n,subscriber:o,scheduler:i};o.add(s.closeAction=i.schedule(k,r,u)),o.add(i.schedule(C,n,f))}return o}return n.a(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,a=0;a0;){var n=t.shift();r.next(n.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(_,r,n))}},t.prototype.openContext=function(){var e=new x;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(p.a);function _(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function C(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,n=e.subscriber,a=e.scheduler,i=n.openContext();n.closed||(n.add(i.closeAction=a.schedule(k,r,{subscriber:n,context:i})),this.schedule(e,t))}function k(e){var t=e.subscriber,r=e.context;t.closeContext(r)}var B=r(110),I=r(235),S=r(258);function O(e,t){return function(r){return r.lift(new M(e,t))}}var M=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new D(e,this.openings,this.closingSelector))},e}(),D=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.closingSelector=n,a.contexts=[],a.add(Object(I.a)(a,r)),a}return n.a(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(r){this._error(r)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new B.a,n={buffer:[],subscription:r};t.push(n);var a=Object(I.a)(this,e,n);!a||a.closed?this.closeBuffer(n):(a.context=n,this.add(a),r.add(a))},t}(S.a);function T(e){return function(t){return t.lift(new F(e))}}var F=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new R(e,this.closingSelector))},e}(),R=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return n.a(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e=this.closingSubscription;e&&(this.remove(e),e.unsubscribe());var t,r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{t=(0,this.closingSelector)()}catch(n){return this.error(n)}e=new B.a,this.closingSubscription=e,this.add(e),this.subscribing=!0,e.add(Object(a.c)(t,new a.a(this))),this.subscribing=!1},t}(a.b),P=r(1156),N=r(561);function j(e){return function(t){return t.lift(new N.a(e))}}var L=r(140),U=r(179);function Q(){for(var e=[],t=0;t0&&r[0].time-n.now()<=0;)r.shift().notification.observe(a);if(r.length>0){var i=Math.max(0,r[0].time-n.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new ue(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(ie.a.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(ie.a.createComplete()),this.unsubscribe()},t}(p.a),ue=function(){return function(e,t){this.time=e,this.notification=t}}(),fe=r(67);function de(e,t){return t?function(r){return new pe(r,t).lift(new le(e))}:function(t){return t.lift(new le(e))}}var le=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new he(e,this.delayDurationSelector))},e}(),he=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return n.a(t,e),t.prototype.notifyNext=function(e,t,r,n,a){this.destination.next(e),this.removeSubscription(a),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e)}catch(n){this.destination.error(n)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return-1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var r=Object(I.a)(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(S.a),pe=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n}return n.a(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new be(e,this.source))},t}(fe.a),be=function(e){function t(t,r){var n=e.call(this)||this;return n.parent=t,n.source=r,n.sourceSubscribed=!1,n}return n.a(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(p.a);function me(){return function(e){return e.lift(new ge)}}var ge=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new ve(e))},e}(),ve=function(e){function t(t){return e.call(this,t)||this}return n.a(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(p.a);function ye(e,t){return function(r){return r.lift(new Ae(e,t))}}var Ae=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new we(e,this.keySelector,this.flushes))},e}(),we=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.keySelector=r,i.values=new Set,n&&i.add(Object(a.c)(n,new a.a(i))),i}return n.a(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,r=this.destination;try{t=this.keySelector(e)}catch(n){return void r.error(n)}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var r=this.values;r.has(e)||(r.add(e),this.destination.next(t))},t}(a.b),xe=r(829),Ee=r(1157),_e=r(314),Ce=r(259),ke=r(429),Be=r(565);function Ie(e,t){if(e<0)throw new _e.a;var r=arguments.length>=2;return function(n){return n.pipe(Object(Ce.a)((function(t,r){return r===e})),Object(Be.a)(1),r?Object(ne.a)(t):Object(ke.a)((function(){return new _e.a})))}}var Se=r(428);function Oe(){for(var e=[],t=0;t0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(a.b);function ze(e){return function(t){return t.lift(new qe(e))}}var qe=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new Ke(e,this.callback))},e}(),Ke=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new B.a(r)),n}return n.a(t,e),t}(p.a);function Ve(e,t){if("function"!==typeof e)throw new TypeError("predicate is not a function");return function(r){return r.lift(new We(e,r,!1,t))}}var We=function(){function e(e,t,r,n){this.predicate=e,this.source=t,this.yieldIndex=r,this.thisArg=n}return e.prototype.call=function(e,t){return t.subscribe(new Ye(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}(),Ye=function(e){function t(t,r,n,a,i){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.yieldIndex=a,o.thisArg=i,o.index=0,o}return n.a(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,r=this.thisArg,n=this.index++;try{t.call(r||this,e,n,this.source)&&this.notifyComplete(this.yieldIndex?n:e)}catch(a){this.destination.error(a)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(p.a);function Je(e,t){return function(r){return r.lift(new We(e,r,!0,t))}}var Xe=r(1158),Ze=r(712);function $e(){return function(e){return e.lift(new et)}}var et=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new tt(e))},e}(),tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.a(t,e),t.prototype._next=function(e){},t}(p.a);function rt(){return function(e){return e.lift(new nt)}}var nt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new at(e))},e}(),at=function(e){function t(t){return e.call(this,t)||this}return n.a(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(p.a),it=r(334),ot=r(186);function st(e){return function(t){return 0===e?Object(ot.b)():t.lift(new ct(e))}}var ct=function(){function e(e){if(this.total=e,this.total<0)throw new _e.a}return e.prototype.call=function(e,t){return t.subscribe(new ut(e,this.total))},e}(),ut=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=new Array,n.count=0,n}return n.a(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,a=0;a=2;return function(n){return n.pipe(e?Object(Ce.a)((function(t,r){return e(t,r,n)})):ft.a,st(1),r?Object(ne.a)(t):Object(ke.a)((function(){return new it.a})))}}function lt(e){return function(t){return t.lift(new ht(e))}}var ht=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new pt(e,this.value))},e}(),pt=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return n.a(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(p.a);function bt(){return function(e){return e.lift(new mt)}}var mt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new gt(e))},e}(),gt=function(e){function t(t){return e.call(this,t)||this}return n.a(t,e),t.prototype._next=function(e){this.destination.next(ie.a.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(ie.a.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(ie.a.createComplete()),e.complete()},t}(p.a);function vt(e,t){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new yt(e,t,r))}}var yt=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new At(e,this.accumulator,this.seed,this.hasSeed))},e}(),At=function(e){function t(t,r,n,a){var i=e.call(this,t)||this;return i.accumulator=r,i._seed=n,i.hasSeed=a,i.index=0,i}return n.a(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(n){this.destination.error(n)}this.seed=t,this.destination.next(t)},t}(p.a),wt=r(484);function xt(e,t){return arguments.length>=2?function(r){return Object(wt.a)(vt(e,t),st(1),Object(ne.a)(t))(r)}:function(t){return Object(wt.a)(vt((function(t,r,n){return e(t,r,n+1)})),st(1))(t)}}function Et(e){return xt("function"===typeof e?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}var _t=r(825);function Ct(){for(var e=[],t=0;t0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(a.b);function Dt(e){return xt("function"===typeof e?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(p.a),rr=r(126);function nr(e){return function(t){return t.lift(new ar(e))}}var ar=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new ir(e,this.notifier,t))},e}(),ir=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.notifier=r,a.source=n,a.sourceIsBeingSubscribedTo=!0,a}return n.a(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){var t;this.notifications=new rr.a;try{t=(0,this.notifier)(this.notifications)}catch(r){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=Object(a.c)(t,new a.a(this))},t}(a.b),or=r(1161);function sr(e){return function(t){return t.lift(new cr(e,t))}}var cr=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new ur(e,this.notifier,this.source))},e}(),ur=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.notifier=r,a.source=n,a}return n.a(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,i=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new rr.a;try{n=(0,this.notifier)(r)}catch(o){return e.prototype.error.call(this,o)}i=Object(a.c)(n,new a.a(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=i,r.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.b),fr=r(558);function dr(e){return function(t){return t.lift(new lr(e))}}var lr=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new hr(e),n=t.subscribe(r);return n.add(Object(a.c)(this.notifier,new a.a(r))),n},e}(),hr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return n.a(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(a.b);function pr(e,t){return void 0===t&&(t=c.a),function(r){return r.lift(new br(e,t))}}var br=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new mr(e,this.period,this.scheduler))},e}(),mr=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.period=r,a.scheduler=n,a.hasValue=!1,a.add(n.schedule(gr,r,{subscriber:a,period:r})),a}return n.a(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(p.a);function gr(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}function vr(e,t){return function(r){return r.lift(new yr(e,t))}}var yr=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new Ar(e,this.compareTo,this.comparator))},e}(),Ar=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.compareTo=r,a.comparator=n,a._a=[],a._b=[],a._oneComplete=!1,a.destination.add(r.subscribe(new wr(t,a))),a}return n.a(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this,t=e._a,r=e._b,n=e.comparator;t.length>0&&r.length>0;){var a=t.shift(),i=r.shift(),o=!1;try{o=n?n(a,i):a===i}catch(s){this.destination.error(s)}o||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(p.a),wr=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return n.a(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(p.a);function xr(){return new rr.a}function Er(){return function(e){return Object(fr.a)()(Object(Tt.a)(xr)(e))}}var _r=r(1162);function Cr(e){return function(t){return t.lift(new kr(e,t))}}var kr=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new Br(e,this.predicate,this.source))},e}(),Br=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.predicate=r,a.source=n,a.seenValue=!1,a.index=0,a}return n.a(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(r){this.destination.error(r)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new it.a)},t}(p.a);function Ir(e){return function(t){return t.lift(new Sr(e))}}var Sr=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new Or(e,this.total))},e}(),Or=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return n.a(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(p.a);function Mr(e){return function(t){return t.lift(new Dr(e))}}var Dr=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new _e.a}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new p.a(e)):t.subscribe(new Tr(e,this._skipCount))},e}(),Tr=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=new Array(r),n}return n.a(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,a=this.windows,i=a.length,o=0;o=0&&s%t===0&&!this.closed&&a.shift().complete(),++this.count%t===0&&!this.closed){var c=new rr.a;a.push(c),r.next(c)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(p.a);function _n(e){var t=c.a,r=null,n=Number.POSITIVE_INFINITY;return Object(y.a)(arguments[3])&&(t=arguments[3]),Object(y.a)(arguments[2])?t=arguments[2]:Object(Gr.a)(arguments[2])&&(n=Number(arguments[2])),Object(y.a)(arguments[1])?t=arguments[1]:Object(Gr.a)(arguments[1])&&(r=Number(arguments[1])),function(a){return a.lift(new Cn(e,r,n,t))}}var Cn=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new Bn(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),kn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return n.a(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(rr.a),Bn=function(e){function t(t,r,n,a,i){var o=e.call(this,t)||this;o.destination=t,o.windowTimeSpan=r,o.windowCreationInterval=n,o.maxWindowSize=a,o.scheduler=i,o.windows=[];var s=o.openWindow();if(null!==n&&n>=0){var c={subscriber:o,window:s,context:null},u={windowTimeSpan:r,windowCreationInterval:n,subscriber:o,scheduler:i};o.add(i.schedule(On,r,c)),o.add(i.schedule(Sn,n,u))}else{var f={subscriber:o,window:s,windowTimeSpan:r};o.add(i.schedule(In,r,f))}return o}return n.a(t,e),t.prototype._next=function(e){for(var t=this.windows,r=t.length,n=0;n=this.maxWindowSize&&this.closeWindow(a))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new kn;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(p.a);function In(e){var t=e.subscriber,r=e.windowTimeSpan,n=e.window;n&&t.closeWindow(n),e.window=t.openWindow(),this.schedule(e,r)}function Sn(e){var t=e.windowTimeSpan,r=e.subscriber,n=e.scheduler,a=e.windowCreationInterval,i=r.openWindow(),o=this,s={action:o,subscription:null},c={subscriber:r,window:i,context:s};s.subscription=n.schedule(On,t,c),o.add(s.subscription),o.schedule(e,a)}function On(e){var t=e.subscriber,r=e.window,n=e.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),t.closeWindow(r)}function Mn(e,t){return function(r){return r.lift(new Dn(e,t))}}var Dn=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new Tn(e,this.openings,this.closingSelector))},e}(),Tn=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.openings=r,a.closingSelector=n,a.contexts=[],a.add(a.openSubscription=Object(I.a)(a,r,r)),a}return n.a(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n0){var a=n.indexOf(r);-1!==a&&n.splice(a,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(r){return void this.destination.error(r)}this.destination.next(t)},t}(S.a),Un=r(564);function Qn(){for(var e=[],t=0;t")}}function p(e){var t=1+e.byteSize,r={write:function(t,r,n){Object(o.d)(e,"coption inner type ".concat(e.description," needs to be fixed before calling write")),Object(i.strict)(null!=n,"coptionSome cannot handle `null` values"),t[r]=f,e.write(t,r+1,n)},read:function(t,r){return Object(o.d)(e,"coption inner type ".concat(e.description," needs to be fixed before calling read")),Object(i.strict)(d(t,r),"coptionSome can only handle `SOME` data"),e.read(t,r+1)},description:"COption<".concat(e.description,">[1 + ").concat(e.byteSize,"]"),byteSize:t,inner:e};return Object(s.c)(r.description),r}function b(e){return{toFixedFromData:function(t,r){return d(t,r)?p(Object(c.a)(e,t,r+1)):(Object(i.strict)(l(t,r),"Expected ".concat(t," to hold a COption")),h(e.description))},toFixedFromValue:function(t){return null==t?h(e.description):p(Object(c.b)(e,t))},description:"COption<".concat(e.description,">")}}var m={option:{beet:"coption",isFixable:!0,sourcePack:o.a,ts:"COption",arg:o.b,pack:o.a}},g=r(188),v=r(833);function y(e,t){return t?"".concat(e):e}function A(e){var t=Object.keys(e);return{write:function(r,n,a){var o="number"===typeof a,s=y(a,o);if(t.includes(s)||i.strict.fail("".concat(a," should be a variant of the provided enum type, i.e. [ ").concat(Object.values(e).join(", ")," ], but isn't")),o)g.p.write(r,n,a);else{var c=e[s];g.p.write(r,n,c)}},read:function(r,n){var a=g.p.read(r,n),o="number"===typeof a,s=y(a,o);return t.includes(s)||i.strict.fail("".concat(a," should be a of a variant of the provided enum type, i.e. [ ").concat(Object.values(e).join(", ")," ], but isn't")),o?a:e[s]},byteSize:g.p.byteSize,description:"Enum"}}function w(e){return{write:function(t,r,n){g.p.write(t,r,n.kind),e.write(t,r+1,n.data)},read:function(t,r){return{kind:g.p.read(t,r),data:e.read(t,r+1)}},byteSize:1+e.byteSize,description:"DataEnum<".concat(e.description,">")}}var x={fixedScalarEnum:{beet:"fixedScalarEnum",isFixable:!1,sourcePack:o.a,ts:"",arg:o.b,pack:o.a},dataEnum:{beet:"dataEnum",isFixable:!1,sourcePack:o.a,ts:"DataEnum",arg:o.b,pack:o.a}},E=r(679),_=r(7),C=r(8),k=r(25),B=r(1),I=r(2),S=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.description;if(Object(B.a)(this,e),this.fields=t,this.construct=r,this.description=n,this.byteSize=this.getByteSize(),s.b.enabled){var a=t.map((function(e){var t=Object(k.a)(e,2),r=t[0],n=t[1];return"".concat(r,": ").concat(n.description," ").concat(Object(s.a)(n))})).join("\n ");Object(s.b)("struct ".concat(n," {\n ").concat(a,"\n} ").concat(Object(s.a)(this)))}}return Object(I.a)(e,[{key:"read",value:function(e,t){var r=this.deserialize(e,t);return Object(k.a)(r,1)[0]}},{key:"write",value:function(e,t,r){var n=this.serialize(r),a=Object(k.a)(n,2),i=a[0],o=a[1];i.copy(e,t,0,o)}},{key:"deserialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;s.c.enabled&&(Object(s.c)("deserializing [%s] from %d bytes buffer",this.description,e.byteLength),Object(s.c)(e),Object(s.c)(e.toJSON().data));var r=new E.a(e,t),n=r.readStruct(this.fields);return[this.construct(n),r.offset]}},{key:"serialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteSize;Object(s.c)("serializing [%s] %o to %d bytes buffer",this.description,e,t);var r=new E.b(t);return r.writeStruct(e,this.fields),[r.buffer,r.offset]}},{key:"getByteSize",value:function(){return this.fields.reduce((function(e,t){var r=Object(k.a)(t,2);r[0];return e+r[1].byteSize}),0)}}]),e}();S.description="BeetStruct";var O=function(e){Object(_.a)(r,e);var t=Object(C.a)(r);function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.description;return Object(B.a)(this,r),t.call(this,e,(function(e){return e}),n)}return Object(I.a)(r)}(S);O.description="BeetArgsStruct";var M=r(860),D=r.n(M).a.brightBlack,T=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.description;Object(B.a)(this,e),this.fields=t,this.construct=r,this.description=n;var a=0;if(s.b.enabled){var i=t.map((function(e){var t=Object(k.a)(e,2),r=t[0],n=t[1];return Object(o.g)(n)&&(a+=n.byteSize),"".concat(r,": ").concat(n.description," ").concat(Object(s.a)(n))})).join("\n "),c="> ".concat(a," B");Object(s.b)("struct ".concat(n," {\n ").concat(i,"\n} ").concat(D(c)))}}return Object(I.a)(e,[{key:"deserialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.toFixedFromData(e,t).deserialize(e,t)}},{key:"serialize",value:function(e,t){return this.toFixedFromValue(e).serialize(e,t)}},{key:"toFixedFromData",value:function(t,r){for(var n=r,a=new Array(this.fields.length),i=0;i1&&void 0!==arguments[1]?arguments[1]:r.description;return Object(B.a)(this,r),t.call(this,e,(function(e){return e}),n)}return Object(I.a)(r)}(T);F.description="FixableBeetArgsStruct";var R=Object(n.a)(Object(n.a)(Object(n.a)(Object(n.a)(Object(n.a)({},a.b),v.b),m),x),g.i)},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(67),a=r(389),i=r(841);function o(e,t){return t?Object(i.a)(e,t):e instanceof n.a?e:new n.a(Object(a.a)(e))}},function(e,t,r){"use strict";r.d(t,"d",(function(){return g})),r.d(t,"g",(function(){return y})),r.d(t,"e",(function(){return w})),r.d(t,"c",(function(){return x})),r.d(t,"a",(function(){return k})),r.d(t,"f",(function(){return B})),r.d(t,"b",(function(){return S}));var n=r(7),a=r(8),i=r(1),o=r(2),s=r(699),c=r(151),u=r(96),f=r(341),d=new u.a(f.a),l={},h={calldata:!0,memory:!0,storage:!0},p={calldata:!0,memory:!0};function b(e,t){if("bytes"===e||"string"===e){if(h[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&p[t])return!0;return(h[t]||"payable"===t)&&d.throwArgumentError("invalid modifier","name",t),!1}function m(e,t){for(var r in t)Object(c.b)(e,r,t[r])}var g=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),v=new RegExp(/^(.*)\[([0-9]*)\]$/),y=function(){function e(t,r){Object(i.a)(this,e),t!==l&&d.throwError("use fromString",u.a.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),m(this,r);var n=this.type.match(v);m(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return Object(o.a)(e,[{key:"format",value:function(e){if(e||(e=g.sighash),g[e]||d.throwArgumentError("invalid format type","format",e),e===g.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==g.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===g.full?", ":",")+")"):r+=this.type,e!==g.sighash&&(!0===this.indexed&&(r+=" indexed"),e===g.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"===typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(l,{name:t.name||null,type:O(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return n=function(e,t){var r=e;function n(t){d.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function a(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var i={type:"",name:"",state:{allowType:!0}},o=i,s=0;s2&&d.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||d.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=s.a.from(r[1]),r[0]):e}function _(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function C(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&d.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&d.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||d.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&d.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&d.throwArgumentError("unable to determine stateMutability","value",e),t}var k=function(e){Object(n.a)(r,e);var t=Object(a.a)(r);function r(){return Object(i.a)(this,r),t.apply(this,arguments)}return Object(o.a)(r,[{key:"format",value:function(e){if(e||(e=g.sighash),g[e]||d.throwArgumentError("invalid format type","format",e),e===g.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===g.sighash&&d.throwError("cannot format a constructor for sighash",u.a.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===g.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&d.throwArgumentError("invalid constructor object","value",e);var t=C(e);t.constant&&d.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(y.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?s.a.from(e.gas):null};return new r(l,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=E(e,t)).match(T);return n&&"constructor"===n[1].trim()||d.throwArgumentError("invalid constructor string","value",e),t.inputs=A(n[2].trim(),!1),_(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(w),B=function(e){Object(n.a)(r,e);var t=Object(a.a)(r);function r(){return Object(i.a)(this,r),t.apply(this,arguments)}return Object(o.a)(r,[{key:"format",value:function(e){if(e||(e=g.sighash),g[e]||d.throwArgumentError("invalid format type","format",e),e===g.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==g.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===g.full?", ":",")+") ",e!==g.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&d.throwArgumentError("invalid function object","value",e);var t=C(e),n={type:e.type,name:D(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(y.fromObject):[],outputs:e.outputs?e.outputs.map(y.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?s.a.from(e.gas):null};return new r(l,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=E(e,t)).split(" returns ");n.length>2&&d.throwArgumentError("invalid function string","value",e);var a=n[0].match(T);if(a||d.throwArgumentError("invalid function signature","value",e),t.name=a[1].trim(),t.name&&D(t.name),t.inputs=A(a[2],!1),_(a[3].trim(),t),n.length>1){var i=n[1].match(T);""==i[1].trim()&&""==i[3].trim()||d.throwArgumentError("unexpected tokens","value",e),t.outputs=A(i[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(k);function I(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||d.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}var S=function(e){Object(n.a)(r,e);var t=Object(a.a)(r);function r(){return Object(i.a)(this,r),t.apply(this,arguments)}return Object(o.a)(r,[{key:"format",value:function(e){if(e||(e=g.sighash),g[e]||d.throwArgumentError("invalid format type","format",e),e===g.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==g.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===g.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&d.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:D(e.name),inputs:e.inputs?e.inputs.map(y.fromObject):[]};return I(new r(l,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(T);return n||d.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&D(t.name),t.inputs=A(n[2],!1),I(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(w);function O(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var M=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function D(e){return e&&e.match(M)||d.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var T=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return a}));var n="2.3.13",a="2"},function(e,t,r){"use strict";r.d(t,"e",(function(){return n})),r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return c}));r(14),r(49),r(892),r(345);var n={xs:0,sm:600,md:900,lg:1200,xl:1536},a={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(n[e],"px)")}};function i(e,t,r){var i=e.theme||{};if(Array.isArray(t)){var o=i.breakpoints||a;return t.reduce((function(e,n,a){return e[o.up(o.keys[a])]=r(t[a]),e}),{})}if("object"===typeof t){var s=i.breakpoints||a;return Object.keys(t).reduce((function(e,a){if(-1!==Object.keys(s.values||n).indexOf(a)){e[s.up(a)]=r(t[a],a)}else{var i=a;e[i]=t[i]}return e}),{})}return r(t)}function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(null==t||null==(e=t.keys)?void 0:e.reduce((function(e,r){return e[t.up(r)]={},e}),{}))||{}}function s(e,t){return e.reduce((function(e,t){var r=e[t];return(!r||0===Object.keys(r).length)&&delete e[t],e}),t)}function c(e){var t,r=e.values,n=e.breakpoints,a=e.base||function(e,t){if("object"!==typeof e)return{};var r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((function(t,n){n0})).join("&")},t.parseUrl=function(e,t){t=Object.assign({decode:!0},t);var r=u(e,"#"),n=a(r,2),i=n[0],o=n[1];return Object.assign({url:i.split("?")[0]||"",query:y(g(e),t)},t&&t.parseFragmentIdentifier&&o?{fragmentIdentifier:p(o,t)}:{})},t.stringifyUrl=function(e,r){r=Object.assign(n({encode:!0,strict:!0},d,!0),r);var a=m(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),s=Object.assign(o,e.query),c=t.stringify(s,r);c&&(c="?".concat(c));var u=function(e){var t="",r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u="#".concat(r[d]?h(e.fragmentIdentifier,r):e.fragmentIdentifier)),"".concat(a).concat(c).concat(u)},t.pick=function(e,r,a){a=Object.assign(n({parseFragmentIdentifier:!0},d,!1),a);var i=t.parseUrl(e,a),o=i.url,s=i.query,c=i.fragmentIdentifier;return t.stringifyUrl({url:o,query:f(s,r),fragmentIdentifier:c},a)},t.exclude=function(e,r,n){var a=Array.isArray(r)?function(e){return!r.includes(e)}:function(e,t){return!r(e,t)};return t.pick(e,a,n)}},function(e,t,r){"use strict";var n=r(91),a=r(914),i=r(915),o=r(916),s=r(404);function c(e){s.call(this,"digest"),this._hash=e}n(c,s),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new a:"rmd160"===e||"ripemd160"===e?new i:new c(o(e))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i}));var n=r(67),a=new n.a((function(e){return e.complete()}));function i(e){return e?function(e){return new n.a((function(t){return e.schedule((function(){return t.complete()}))}))}(e):a}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return f})),r.d(t,"d",(function(){return d})),r.d(t,"e",(function(){return m})),r.d(t,"f",(function(){return g}));var n,a=r(49);!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(n||(n={}));var i=function(e){return e};var o="beforeunload",s="hashchange",c="popstate";function u(e){void 0===e&&(e={});var t=e.window,r=void 0===t?document.defaultView:t,s=r.history;function u(){var e=r.location,t=e.pathname,n=e.search,a=e.hash,o=s.state||{};return[o.idx,i({pathname:t,search:n,hash:a,state:o.usr||null,key:o.key||"default"})]}var f=null;r.addEventListener(c,(function(){if(f)w.call(f),f=null;else{var e=n.Pop,t=u(),r=t[0],a=t[1];if(w.length){if(null!=r){var i=v-r;i&&(f={action:e,location:a,retry:function(){B(-1*i)}},B(i))}}else k(e)}}));var d=n.Pop,l=u(),v=l[0],y=l[1],A=p(),w=p();function x(e){return"string"===typeof e?e:m(e)}function E(e,t){return void 0===t&&(t=null),i(Object(a.a)({pathname:y.pathname,hash:"",search:""},"string"===typeof e?g(e):e,{state:t,key:b()}))}function _(e,t){return[{usr:e.state,key:e.key,idx:t},x(e)]}function C(e,t,r){return!w.length||(w.call({action:e,location:t,retry:r}),!1)}function k(e){d=e;var t=u();v=t[0],y=t[1],A.call({action:d,location:y})}function B(e){s.go(e)}null==v&&(v=0,s.replaceState(Object(a.a)({},s.state,{idx:v}),""));var I={get action(){return d},get location(){return y},createHref:x,push:function e(t,a){var i=n.Push,o=E(t,a);if(C(i,o,(function(){e(t,a)}))){var c=_(o,v+1),u=c[0],f=c[1];try{s.pushState(u,"",f)}catch(d){r.location.assign(f)}k(i)}},replace:function e(t,r){var a=n.Replace,i=E(t,r);if(C(a,i,(function(){e(t,r)}))){var o=_(i,v),c=o[0],u=o[1];s.replaceState(c,"",u),k(a)}},go:B,back:function(){B(-1)},forward:function(){B(1)},listen:function(e){return A.push(e)},block:function(e){var t=w.push(e);return 1===w.length&&r.addEventListener(o,h),function(){t(),w.length||r.removeEventListener(o,h)}}};return I}function f(e){void 0===e&&(e={});var t=e.window,r=void 0===t?document.defaultView:t,u=r.history;function f(){var e=g(r.location.hash.substr(1)),t=e.pathname,n=void 0===t?"/":t,a=e.search,o=void 0===a?"":a,s=e.hash,c=void 0===s?"":s,f=u.state||{};return[f.idx,i({pathname:n,search:o,hash:c,state:f.usr||null,key:f.key||"default"})]}var d=null;function l(){if(d)E.call(d),d=null;else{var e=n.Pop,t=f(),r=t[0],a=t[1];if(E.length){if(null!=r){var i=A-r;i&&(d={action:e,location:a,retry:function(){S(-1*i)}},S(i))}}else I(e)}}r.addEventListener(c,l),r.addEventListener(s,(function(){m(f()[1])!==m(w)&&l()}));var v=n.Pop,y=f(),A=y[0],w=y[1],x=p(),E=p();function _(e){return function(){var e=document.querySelector("base"),t="";if(e&&e.getAttribute("href")){var n=r.location.href,a=n.indexOf("#");t=-1===a?n:n.slice(0,a)}return t}()+"#"+("string"===typeof e?e:m(e))}function C(e,t){return void 0===t&&(t=null),i(Object(a.a)({pathname:w.pathname,hash:"",search:""},"string"===typeof e?g(e):e,{state:t,key:b()}))}function k(e,t){return[{usr:e.state,key:e.key,idx:t},_(e)]}function B(e,t,r){return!E.length||(E.call({action:e,location:t,retry:r}),!1)}function I(e){v=e;var t=f();A=t[0],w=t[1],x.call({action:v,location:w})}function S(e){u.go(e)}null==A&&(A=0,u.replaceState(Object(a.a)({},u.state,{idx:A}),""));var O={get action(){return v},get location(){return w},createHref:_,push:function e(t,a){var i=n.Push,o=C(t,a);if(B(i,o,(function(){e(t,a)}))){var s=k(o,A+1),c=s[0],f=s[1];try{u.pushState(c,"",f)}catch(d){r.location.assign(f)}I(i)}},replace:function e(t,r){var a=n.Replace,i=C(t,r);if(B(a,i,(function(){e(t,r)}))){var o=k(i,A),s=o[0],c=o[1];u.replaceState(s,"",c),I(a)}},go:S,back:function(){S(-1)},forward:function(){S(1)},listen:function(e){return x.push(e)},block:function(e){var t=E.push(e);return 1===E.length&&r.addEventListener(o,h),function(){t(),E.length||r.removeEventListener(o,h)}}};return O}function d(e){void 0===e&&(e={});var t=e,r=t.initialEntries,o=void 0===r?["/"]:r,s=t.initialIndex,c=o.map((function(e){return i(Object(a.a)({pathname:"/",search:"",hash:"",state:null,key:b()},"string"===typeof e?g(e):e))})),u=l(null==s?c.length-1:s,0,c.length-1),f=n.Pop,d=c[u],h=p(),v=p();function y(e,t){return void 0===t&&(t=null),i(Object(a.a)({pathname:d.pathname,search:"",hash:""},"string"===typeof e?g(e):e,{state:t,key:b()}))}function A(e,t,r){return!v.length||(v.call({action:e,location:t,retry:r}),!1)}function w(e,t){f=e,d=t,h.call({action:f,location:d})}function x(e){var t=l(u+e,0,c.length-1),r=n.Pop,a=c[t];A(r,a,(function(){x(e)}))&&(u=t,w(r,a))}var E={get index(){return u},get action(){return f},get location(){return d},createHref:function(e){return"string"===typeof e?e:m(e)},push:function e(t,r){var a=n.Push,i=y(t,r);A(a,i,(function(){e(t,r)}))&&(u+=1,c.splice(u,c.length,i),w(a,i))},replace:function e(t,r){var a=n.Replace,i=y(t,r);A(a,i,(function(){e(t,r)}))&&(c[u]=i,w(a,i))},go:x,back:function(){x(-1)},forward:function(){x(1)},listen:function(e){return h.push(e)},block:function(e){return v.push(e)}};return E}function l(e,t,r){return Math.min(Math.max(e,t),r)}function h(e){e.preventDefault(),e.returnValue=""}function p(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function b(){return Math.random().toString(36).substr(2,8)}function m(e){var t=e.pathname,r=void 0===t?"/":t,n=e.search,a=void 0===n?"":n,i=e.hash,o=void 0===i?"":i;return a&&"?"!==a&&(r+="?"===a.charAt(0)?a:"?"+a),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}function g(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}},function(e,t,r){"use strict";(function(e){r.d(t,"p",(function(){return o})),r.d(t,"k",(function(){return s})),r.d(t,"m",(function(){return c})),r.d(t,"o",(function(){return f})),r.d(t,"j",(function(){return d})),r.d(t,"l",(function(){return l})),r.d(t,"n",(function(){return h})),r.d(t,"h",(function(){return p})),r.d(t,"c",(function(){return b})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return v})),r.d(t,"b",(function(){return y})),r.d(t,"d",(function(){return A})),r.d(t,"f",(function(){return w})),r.d(t,"a",(function(){return x})),r.d(t,"i",(function(){return E}));var n=r(505),a=r.n(n),i=r(71),o={write:function(e,t,r){e.writeUInt8(r,t)},read:function(e,t){return e.readUInt8(t)},byteSize:1,description:"u8"},s={write:function(e,t,r){e.writeUInt16LE(r,t)},read:function(e,t){return e.readUInt16LE(t)},byteSize:2,description:"u16"},c={write:function(e,t,r){e.writeUInt32LE(r,t)},read:function(e,t){return e.readUInt32LE(t)},byteSize:4,description:"u32"};function u(t,r){return{write:function(t,r,n){var i=(a.a.isBN(n)?n:new a.a(n)).toArray("le",this.byteSize);e.from(i).copy(t,r,0,this.byteSize)},read:function(e,t){var r=e.slice(t,t+this.byteSize);return new a.a(r,"le")},byteSize:t,description:r}}var f=u(8,"u64"),d=u(16,"u128"),l=u(32,"u256"),h=u(64,"u512"),p={write:function(e,t,r){e.writeInt8(r,t)},read:function(e,t){return e.readInt8(t)},byteSize:1,description:"i8"},b={write:function(e,t,r){e.writeInt16LE(r,t)},read:function(e,t){return e.readInt16LE(t)},byteSize:2,description:"i16"},m={write:function(e,t,r){e.writeInt32LE(r,t)},read:function(e,t){return e.readInt32LE(t)},byteSize:4,description:"i32"};function g(t,r){var n=8*t;return{write:function(t,r,i){var o=(a.a.isBN(i)?i:new a.a(i)).toTwos(n).toArray("le",this.byteSize);e.from(o).copy(t,r,0,this.byteSize)},read:function(e,t){var r=e.slice(t,t+this.byteSize);return new a.a(r,"le").fromTwos(n)},byteSize:t,description:r}}var v=g(8,"i64"),y=g(16,"i128"),A=g(32,"i256"),w=g(64,"i512"),x={write:function(e,t,r){var n=r?1:0;o.write(e,t,n)},read:function(e,t){return 1===o.read(e,t)},byteSize:1,description:"bool"},E={u8:{beet:"u8",isFixable:!1,sourcePack:i.a,ts:"number"},u16:{beet:"u16",isFixable:!1,sourcePack:i.a,ts:"number"},u32:{beet:"u32",isFixable:!1,sourcePack:i.a,ts:"number"},i8:{beet:"i8",isFixable:!1,sourcePack:i.a,ts:"number"},i16:{beet:"i16",isFixable:!1,sourcePack:i.a,ts:"number"},i32:{beet:"i32",isFixable:!1,sourcePack:i.a,ts:"number"},bool:{beet:"bool",isFixable:!1,sourcePack:i.a,ts:"boolean"},u64:{beet:"u64",isFixable:!1,sourcePack:i.a,ts:"bignum",pack:i.a},u128:{beet:"u128",isFixable:!1,sourcePack:i.a,ts:"bignum",pack:i.a},u256:{beet:"u256",isFixable:!1,sourcePack:i.a,ts:"bignum",pack:i.a},u512:{beet:"u512",isFixable:!1,sourcePack:i.a,ts:"bignum",pack:i.a},i64:{beet:"i64",isFixable:!1,sourcePack:i.a,ts:"bignum",pack:i.a},i128:{beet:"i128",isFixable:!1,sourcePack:i.a,ts:"bignum",pack:i.a},i256:{beet:"i256",isFixable:!1,sourcePack:i.a,ts:"bignum",pack:i.a},i512:{beet:"i512",isFixable:!1,sourcePack:i.a,ts:"bignum",pack:i.a}}}).call(this,r(15).Buffer)},function(e,t,r){"use strict";r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return f})),r.d(t,"a",(function(){return d}));var n=r(117),a=r.n(n),i=r(860),o=r.n(i),s=r(71),c=o.a.brightBlack,u=(a()("beet:error"),a()("beet:info"),a()("beet:debug")),f=a()("beet:trace");function d(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Object(s.f)(e))t="? B";else if(Object(s.e)(e)){var n=r?"length":e.length,a=e.lenPrefixByteSize;t=a>0?"".concat(a," + (").concat(e.elementByteSize," * ").concat(n,") B (").concat(e.byteSize," B)"):"(".concat(e.elementByteSize," * ").concat(n,") B (").concat(e.byteSize," B)")}else t="".concat(e.byteSize," B");return c(t)}},function(e,t,r){var n=r(3008);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(329);e.exports=function(e){return n(e.length)}},function(e,t,r){"use strict";function n(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}r.d(t,"a",(function(){return n}))},function(e,t,r){var n=r(403),a=r(902),i=r(1754),o=r(1170);function s(t){var r="function"===typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!i(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return o(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),a(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0&&void 0!==arguments[0]?arguments[0]:new b;f(this,e),this.configuration=r,this.fetchApi=function(e,r){return l(t,void 0,void 0,c().mark((function t(){var n,a,i,o,s,f,d,l;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n={url:e,init:r},a=u(this.middleware),t.prev=2,a.s();case 4:if((i=a.n()).done){t.next=15;break}if(!(o=i.value).pre){t.next=13;break}return t.next=9,o.pre(Object.assign({fetch:this.fetchApi},n));case 9:if(t.t0=t.sent,t.t0){t.next=12;break}t.t0=n;case 12:n=t.t0;case 13:t.next=4;break;case 15:t.next=20;break;case 17:t.prev=17,t.t1=t.catch(2),a.e(t.t1);case 20:return t.prev=20,a.f(),t.finish(20);case 23:return t.prev=23,t.next=26,this.configuration.fetchApi(n.url,n.init);case 26:s=t.sent,t.next=36;break;case 29:return t.prev=29,t.t2=t.catch(23),t.next=33,this.configuration.exceptionHandler(t.t2,n.url,n.init);case 33:if(void 0!==(s=t.sent)){t.next=36;break}throw t.t2;case 36:f=u(this.middleware),t.prev=37,f.s();case 39:if((d=f.n()).done){t.next=50;break}if(!(l=d.value).post){t.next=48;break}return t.next=44,l.post({fetch:this.fetchApi,url:e,init:r,response:s.clone()});case 44:if(t.t3=t.sent,t.t3){t.next=47;break}t.t3=s;case 47:s=t.t3;case 48:t.next=39;break;case 50:t.next=55;break;case 52:t.prev=52,t.t4=t.catch(37),f.e(t.t4);case 55:return t.prev=55,f.f(),t.finish(55);case 58:return t.abrupt("return",s);case 59:case"end":return t.stop()}}),t,this,[[2,17,20,23],[23,29],[37,52,55,58]])})))},this.middleware=r.middleware}return d(e,[{key:"withMiddleware",value:function(){var e,t=this.clone();return t.middleware=(e=t.middleware).concat.apply(e,arguments),t}},{key:"withPreMiddleware",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};f(this,e),this.configuration=t}return d(e,[{key:"basePath",get:function(){return null!=this.configuration.basePath?this.configuration.basePath:t.BASE_PATH}},{key:"fetchApi",get:function(){return this.configuration.fetchApi||window.fetch.bind(window)}},{key:"exceptionHandler",get:function(){var e;return null!==(e=this.configuration.exceptionHandler)&&void 0!==e?e:function(){}}},{key:"middleware",get:function(){return this.configuration.middleware||[]}},{key:"queryParamsStringify",get:function(){return this.configuration.queryParamsStringify||m}},{key:"username",get:function(){return this.configuration.username}},{key:"password",get:function(){return this.configuration.password}},{key:"apiKey",get:function(){var e=this.configuration.apiKey;if(e)return"function"===typeof e?e:function(){return e}}},{key:"accessToken",get:function(){var e=this.configuration.accessToken;if(e)return"function"===typeof e?e:function(){return e}}},{key:"headers",get:function(){return this.configuration.headers}},{key:"credentials",get:function(){return this.configuration.credentials}}]),e}();function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.keys(e).map((function(r){var n=t+(t.length?"[".concat(r,"]"):r),a=e[r];if(a instanceof Array){var i=a.map((function(e){return encodeURIComponent(String(e))})).join("&".concat(encodeURIComponent(n),"="));return"".concat(encodeURIComponent(n),"=").concat(i)}return a instanceof Object?m(a,n):"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(String(a)))})).filter((function(e){return e.length>0})).join("&")}t.Configuration=b,t.exists=function(e,t){var r=e[t];return null!==r&&void 0!==r},t.querystring=m,t.mapValues=function(e,t){return Object.keys(e).reduce((function(r,a){return Object.assign(Object.assign({},r),n({},a,t(e[a])))}),{})},t.canConsumeForm=function(e){var t,r=u(e);try{for(r.s();!(t=r.n()).done;){if("multipart/form-data"===t.value.contentType)return!0}}catch(n){r.e(n)}finally{r.f()}return!1};var g=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};f(this,e),this.raw=t,this.transformer=r}return d(e,[{key:"value",value:function(){return l(this,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=this,e.next=3,this.raw.json();case 3:return e.t1=e.sent,e.abrupt("return",e.t0.transformer.call(e.t0,e.t1));case 5:case"end":return e.stop()}}),e,this)})))}}]),e}();t.JSONApiResponse=g;var v=function(){function e(t){f(this,e),this.raw=t}return d(e,[{key:"value",value:function(){return l(this,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",void 0);case 1:case"end":return e.stop()}}),e)})))}}]),e}();t.VoidApiResponse=v;var y=function(){function e(t){f(this,e),this.raw=t}return d(e,[{key:"value",value:function(){return l(this,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.raw.blob();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}}]),e}();t.BlobApiResponse=y;var A=function(){function e(t){f(this,e),this.raw=t}return d(e,[{key:"value",value:function(){return l(this,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.raw.text();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}}]),e}();t.TextApiResponse=A},function(e,t,r){"use strict";var n=r(204).default,a=r(37).default,i=r(38).default,o=r(193).default,s=r(78).default,c=r(20).default,u=r(111).default,f=r(21).default,d=r(22).default,l=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TextApiResponse=t.BlobApiResponse=t.VoidApiResponse=t.JSONApiResponse=t.canConsumeForm=t.mapValues=t.querystring=t.exists=t.Configuration=t.COLLECTION_FORMATS=t.RequiredError=t.BaseAPI=t.BASE_PATH=void 0,t.BASE_PATH="https://testnet-ethereum-api.rarible.org".replace(/\/+$/,"");var h=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new b;f(this,e),this.configuration=r,this.fetchApi=function(e,r){return l(t,void 0,void 0,c().mark((function t(){var n,a,i,o,s,f,d,l;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n={url:e,init:r},a=u(this.middleware),t.prev=2,a.s();case 4:if((i=a.n()).done){t.next=15;break}if(!(o=i.value).pre){t.next=13;break}return t.next=9,o.pre(Object.assign({fetch:this.fetchApi},n));case 9:if(t.t0=t.sent,t.t0){t.next=12;break}t.t0=n;case 12:n=t.t0;case 13:t.next=4;break;case 15:t.next=20;break;case 17:t.prev=17,t.t1=t.catch(2),a.e(t.t1);case 20:return t.prev=20,a.f(),t.finish(20);case 23:return t.prev=23,t.next=26,this.configuration.fetchApi(n.url,n.init);case 26:s=t.sent,t.next=36;break;case 29:return t.prev=29,t.t2=t.catch(23),t.next=33,this.configuration.exceptionHandler(t.t2,n.url,n.init);case 33:if(void 0!==(s=t.sent)){t.next=36;break}throw t.t2;case 36:f=u(this.middleware),t.prev=37,f.s();case 39:if((d=f.n()).done){t.next=50;break}if(!(l=d.value).post){t.next=48;break}return t.next=44,l.post({fetch:this.fetchApi,url:e,init:r,response:s.clone()});case 44:if(t.t3=t.sent,t.t3){t.next=47;break}t.t3=s;case 47:s=t.t3;case 48:t.next=39;break;case 50:t.next=55;break;case 52:t.prev=52,t.t4=t.catch(37),f.e(t.t4);case 55:return t.prev=55,f.f(),t.finish(55);case 58:return t.abrupt("return",s);case 59:case"end":return t.stop()}}),t,this,[[2,17,20,23],[23,29],[37,52,55,58]])})))},this.middleware=r.middleware}return d(e,[{key:"withMiddleware",value:function(){var e,t=this.clone();return t.middleware=(e=t.middleware).concat.apply(e,arguments),t}},{key:"withPreMiddleware",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};f(this,e),this.configuration=t}return d(e,[{key:"basePath",get:function(){return null!=this.configuration.basePath?this.configuration.basePath:t.BASE_PATH}},{key:"fetchApi",get:function(){return this.configuration.fetchApi||window.fetch.bind(window)}},{key:"exceptionHandler",get:function(){var e;return null!==(e=this.configuration.exceptionHandler)&&void 0!==e?e:function(){}}},{key:"middleware",get:function(){return this.configuration.middleware||[]}},{key:"queryParamsStringify",get:function(){return this.configuration.queryParamsStringify||m}},{key:"username",get:function(){return this.configuration.username}},{key:"password",get:function(){return this.configuration.password}},{key:"apiKey",get:function(){var e=this.configuration.apiKey;if(e)return"function"===typeof e?e:function(){return e}}},{key:"accessToken",get:function(){var e=this.configuration.accessToken;if(e)return"function"===typeof e?e:function(){return e}}},{key:"headers",get:function(){return this.configuration.headers}},{key:"credentials",get:function(){return this.configuration.credentials}}]),e}();function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.keys(e).map((function(r){var n=t+(t.length?"[".concat(r,"]"):r),a=e[r];if(a instanceof Array){var i=a.map((function(e){return encodeURIComponent(String(e))})).join("&".concat(encodeURIComponent(n),"="));return"".concat(encodeURIComponent(n),"=").concat(i)}return a instanceof Object?m(a,n):"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(String(a)))})).filter((function(e){return e.length>0})).join("&")}t.Configuration=b,t.exists=function(e,t){var r=e[t];return null!==r&&void 0!==r},t.querystring=m,t.mapValues=function(e,t){return Object.keys(e).reduce((function(r,a){return Object.assign(Object.assign({},r),n({},a,t(e[a])))}),{})},t.canConsumeForm=function(e){var t,r=u(e);try{for(r.s();!(t=r.n()).done;){if("multipart/form-data"===t.value.contentType)return!0}}catch(n){r.e(n)}finally{r.f()}return!1};var g=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};f(this,e),this.raw=t,this.transformer=r}return d(e,[{key:"value",value:function(){return l(this,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=this,e.next=3,this.raw.json();case 3:return e.t1=e.sent,e.abrupt("return",e.t0.transformer.call(e.t0,e.t1));case 5:case"end":return e.stop()}}),e,this)})))}}]),e}();t.JSONApiResponse=g;var v=function(){function e(t){f(this,e),this.raw=t}return d(e,[{key:"value",value:function(){return l(this,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",void 0);case 1:case"end":return e.stop()}}),e)})))}}]),e}();t.VoidApiResponse=v;var y=function(){function e(t){f(this,e),this.raw=t}return d(e,[{key:"value",value:function(){return l(this,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.raw.blob();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}}]),e}();t.BlobApiResponse=y;var A=function(){function e(t){f(this,e),this.raw=t}return d(e,[{key:"value",value:function(){return l(this,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.raw.text();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}}]),e}();t.TextApiResponse=A},function(e,t,r){var n=r(59),a=r(142),i=r(154),o=r(309),s=r(995),c=r(774),u=r(255),f=r(637).CONFIGURABLE,d=u.get,l=u.enforce,h=String(String).split("String");(e.exports=function(e,t,r,c){var u,d=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,b=!!c&&!!c.noTargetGet,m=c&&void 0!==c.name?c.name:t;a(r)&&("Symbol("===String(m).slice(0,7)&&(m="["+String(m).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(r,"name")||f&&r.name!==m)&&o(r,"name",m),(u=l(r)).source||(u.source=h.join("string"==typeof m?m:""))),e!==n?(d?!b&&e[t]&&(p=!0):delete e[t],p?e[t]=r:o(e,t,r)):p?e[t]=r:s(t,r)})(Function.prototype,"toString",(function(){return a(this)&&d(this).source||c(this)}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contractAddressHex=t.subscribeForTxResult=t.waitForSeal=t.runTransaction=t.runScript=void 0;var n=r(19),a=r(480),i=r(2862);t.runScript=function(e,t,r){return(0,n.__awaiter)(void 0,void 0,void 0,(function(){var s,c,u;return(0,n.__generator)(this,(function(f){switch(f.label){case 0:return f.trys.push([0,3,,4]),s=(0,a.replaceImportAddresses)(t.cadence,r),[4,e.send([e.script(o||(o=(0,n.__makeTemplateObject)(["",""],["",""])),s),t.args])];case 1:return c=f.sent(),[4,e.decode(c)];case 2:return[2,f.sent()];case 3:throw u=f.sent(),new i.FlowRunScriptError({error:u,params:t});case 4:return[2]}}))}))};t.runTransaction=function(e,t,r,o,s){return void 0===s&&(s=999),(0,n.__awaiter)(void 0,void 0,void 0,(function(){var c,u,f;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),c=(0,a.replaceImportAddresses)(r.cadence,t),(u=[e.limit(s)]).push(e.payer(o||e.authz),e.proposer(o||e.authz),e.authorizations([o||e.authz])),r.args&&u.push(r.args),u.push(e.transaction(c)),[4,e.send(u)];case 1:return[2,n.sent().transactionId];case 2:throw f=n.sent(),new i.FlowRunTransactionError({error:f,params:r});case 3:return[2]}}))}))};t.waitForSeal=function(e,t){return(0,n.__awaiter)(void 0,void 0,void 0,(function(){var r,a;return(0,n.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e.tx(t).onceSealed()];case 1:return r=o.sent(),[2,(0,n.__assign)((0,n.__assign)({},r),{txId:t})];case 2:throw a=o.sent(),new i.FlowSealError({error:a,txId:t});case 3:return[2]}}))}))},t.subscribeForTxResult=function(e,t,r){var a=e.tx(t).subscribe((function(i){r((0,n.__assign)({txId:t},i)),e.tx.isSealed(i)&&a()}))};var o;t.contractAddressHex=function(e,t){return(0,n.__awaiter)(void 0,void 0,void 0,(function(){var r;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:return[4,e.config().get(t)];case 1:return r=n.sent(),[2,e.sansPrefix(r)]}}))}))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return g}));var n=r(1),a=r(2),i=r(278),o=r(4149),s=r(4),c=r(13),u=r(498),f=r(11),d=r(131),l=new f.b(d.a),h=function(){function e(){Object(n.a)(this,e),this.formats=this.getDefaultFormats()}return Object(a.a)(e,[{key:"getDefaultFormats",value:function(){var t=this,r={},n=this.address.bind(this),a=this.bigNumber.bind(this),i=this.blockTag.bind(this),o=this.data.bind(this),s=this.hash.bind(this),u=this.hex.bind(this),f=this.number.bind(this),d=this.type.bind(this);return r.transaction={hash:s,type:d,accessList:e.allowNull(this.accessList.bind(this),null),blockHash:e.allowNull(s,null),blockNumber:e.allowNull(f,null),transactionIndex:e.allowNull(f,null),confirmations:e.allowNull(f,null),from:n,gasPrice:e.allowNull(a),maxPriorityFeePerGas:e.allowNull(a),maxFeePerGas:e.allowNull(a),gasLimit:a,to:e.allowNull(n,null),value:a,nonce:f,data:o,r:e.allowNull(this.uint256),s:e.allowNull(this.uint256),v:e.allowNull(f),creates:e.allowNull(n,null),raw:e.allowNull(o)},r.transactionRequest={from:e.allowNull(n),nonce:e.allowNull(f),gasLimit:e.allowNull(a),gasPrice:e.allowNull(a),maxPriorityFeePerGas:e.allowNull(a),maxFeePerGas:e.allowNull(a),to:e.allowNull(n),value:e.allowNull(a),data:e.allowNull((function(e){return t.data(e,!0)})),type:e.allowNull(f),accessList:e.allowNull(this.accessList.bind(this),null)},r.receiptLog={transactionIndex:f,blockNumber:f,transactionHash:s,address:n,topics:e.arrayOf(s),data:o,logIndex:f,blockHash:s},r.receipt={to:e.allowNull(this.address,null),from:e.allowNull(this.address,null),contractAddress:e.allowNull(n,null),transactionIndex:f,root:e.allowNull(u),gasUsed:a,logsBloom:e.allowNull(o),blockHash:s,transactionHash:s,logs:e.arrayOf(this.receiptLog.bind(this)),blockNumber:f,confirmations:e.allowNull(f,null),cumulativeGasUsed:a,effectiveGasPrice:e.allowNull(a),status:e.allowNull(f),type:d},r.block={hash:e.allowNull(s),parentHash:s,number:f,timestamp:f,nonce:e.allowNull(u),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:e.allowNull(n),extraData:o,transactions:e.allowNull(e.arrayOf(s)),baseFeePerGas:e.allowNull(a)},r.blockWithTransactions=Object(c.g)(r.block),r.blockWithTransactions.transactions=e.allowNull(e.arrayOf(this.transactionResponse.bind(this))),r.filter={fromBlock:e.allowNull(i,void 0),toBlock:e.allowNull(i,void 0),blockHash:e.allowNull(s,void 0),address:e.allowNull(n,void 0),topics:e.allowNull(this.topics.bind(this),void 0)},r.filterLog={blockNumber:e.allowNull(f),blockHash:e.allowNull(s),transactionIndex:f,removed:e.allowNull(this.boolean.bind(this)),address:n,data:e.allowFalsish(o,"0x"),topics:e.arrayOf(s),transactionHash:s,logIndex:f},r}},{key:"accessList",value:function(e){return Object(u.a)(e||[])}},{key:"number",value:function(e){return"0x"===e?0:o.a.from(e).toNumber()}},{key:"type",value:function(e){return"0x"===e||null==e?0:o.a.from(e).toNumber()}},{key:"bigNumber",value:function(e){return o.a.from(e)}},{key:"boolean",value:function(e){if("boolean"===typeof e)return e;if("string"===typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}},{key:"hex",value:function(e,t){return"string"===typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),Object(s.l)(e))?e.toLowerCase():l.throwArgumentError("invalid hash","value",e)}},{key:"data",value:function(e,t){var r=this.hex(e,t);if(r.length%2!==0)throw new Error("invalid data; odd-length - "+e);return r}},{key:"address",value:function(e){return Object(i.a)(e)}},{key:"callAddress",value:function(e){if(!Object(s.l)(e,32))return null;var t=Object(i.a)(Object(s.e)(e,12));return"0x0000000000000000000000000000000000000000"===t?null:t}},{key:"contractAddress",value:function(e){return Object(i.b)(e)}},{key:"blockTag",value:function(e){if(null==e)return"latest";if("earliest"===e)return"0x0";if("latest"===e||"pending"===e)return e;if("number"===typeof e||Object(s.l)(e))return Object(s.g)(e);throw new Error("invalid blockTag")}},{key:"hash",value:function(e,t){var r=this.hex(e,t);return 32!==Object(s.d)(r)?l.throwArgumentError("invalid hash","value",e):r}},{key:"difficulty",value:function(e){if(null==e)return null;var t=o.a.from(e);try{return t.toNumber()}catch(r){}return null}},{key:"uint256",value:function(e){if(!Object(s.l)(e))throw new Error("invalid uint256");return Object(s.h)(e,32)}},{key:"_block",value:function(t,r){null!=t.author&&null==t.miner&&(t.miner=t.author);var n=null!=t._difficulty?t._difficulty:t.difficulty,a=e.check(r,t);return a._difficulty=null==n?null:o.a.from(n),a}},{key:"block",value:function(e){return this._block(e,this.formats.block)}},{key:"blockWithTransactions",value:function(e){return this._block(e,this.formats.blockWithTransactions)}},{key:"transactionRequest",value:function(t){return e.check(this.formats.transactionRequest,t)}},{key:"transactionResponse",value:function(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&o.a.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),1!==t.type&&2!==t.type||null!=t.accessList||(t.accessList=[]);var r=e.check(this.formats.transaction,t);if(null!=t.chainId){var n=t.chainId;Object(s.l)(n)&&(n=o.a.from(n).toNumber()),r.chainId=n}else{var a=t.networkId;null==a&&null==r.v&&(a=t.chainId),Object(s.l)(a)&&(a=o.a.from(a).toNumber()),"number"!==typeof a&&null!=r.v&&((a=(r.v-35)/2)<0&&(a=0),a=parseInt(a)),"number"!==typeof a&&(a=0),r.chainId=a}return r.blockHash&&"x"===r.blockHash.replace(/0/g,"")&&(r.blockHash=null),r}},{key:"transaction",value:function(e){return Object(u.b)(e)}},{key:"receiptLog",value:function(t){return e.check(this.formats.receiptLog,t)}},{key:"receipt",value:function(t){var r=e.check(this.formats.receipt,t);if(null!=r.root)if(r.root.length<=4){var n=o.a.from(r.root).toNumber();0===n||1===n?(null!=r.status&&r.status!==n&&l.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):l.throwArgumentError("invalid alt-root-status","value.root",r.root)}else 66!==r.root.length&&l.throwArgumentError("invalid root hash","value.root",r.root);return null!=r.status&&(r.byzantium=!0),r}},{key:"topics",value:function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.topics(e)})):null!=e?this.hash(e,!0):null}},{key:"filter",value:function(t){return e.check(this.formats.filter,t)}},{key:"filterLog",value:function(t){return e.check(this.formats.filterLog,t)}}],[{key:"check",value:function(e,t){var r={};for(var n in e)try{var a=e[n](t[n]);void 0!==a&&(r[n]=a)}catch(i){throw i.checkKey=n,i.checkValue=t[n],i}return r}},{key:"allowNull",value:function(e,t){return function(r){return null==r?t:e(r)}}},{key:"allowFalsish",value:function(e,t){return function(r){return r?e(r):t}}},{key:"arrayOf",value:function(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");var r=[];return t.forEach((function(t){r.push(e(t))})),r}}}]),e}();function p(e){return e&&"function"===typeof e.isCommunityResource}function b(e){return p(e)&&e.isCommunityResource()}var m=!1;function g(){m||(m=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}},function(e,t,r){"use strict";r.d(t,"b",(function(){return R})),r.d(t,"a",(function(){return P})),r.d(t,"c",(function(){return N}));var n=r(1),a=r(2),i=r(1607),o=r.n(i),s=r(4),c=r(11),u=o.a.BN,f=new c.b("bignumber/5.6.2"),d={},l=9007199254740991;var h=!1,p=function(){function e(t,r){Object(n.a)(this,e),t!==d&&f.throwError("cannot call constructor directly; use BigNumber.from",c.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return Object(a.a)(e,[{key:"fromTwos",value:function(e){return m(g(this).fromTwos(e))}},{key:"toTwos",value:function(e){return m(g(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return m(g(this).add(g(e)))}},{key:"sub",value:function(e){return m(g(this).sub(g(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&v("division-by-zero","div"),m(g(this).div(g(t)))}},{key:"mul",value:function(e){return m(g(this).mul(g(e)))}},{key:"mod",value:function(e){var t=g(e);return t.isNeg()&&v("division-by-zero","mod"),m(g(this).umod(t))}},{key:"pow",value:function(e){var t=g(e);return t.isNeg()&&v("negative-power","pow"),m(g(this).pow(t))}},{key:"and",value:function(e){var t=g(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","and"),m(g(this).and(t))}},{key:"or",value:function(e){var t=g(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","or"),m(g(this).or(t))}},{key:"xor",value:function(e){var t=g(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","xor"),m(g(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","mask"),m(g(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","shl"),m(g(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","shr"),m(g(this).shrn(e))}},{key:"eq",value:function(e){return g(this).eq(g(e))}},{key:"lt",value:function(e){return g(this).lt(g(e))}},{key:"lte",value:function(e){return g(this).lte(g(e))}},{key:"gt",value:function(e){return g(this).gt(g(e))}},{key:"gte",value:function(e){return g(this).gte(g(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return g(this).isZero()}},{key:"toNumber",value:function(){try{return g(this).toNumber()}catch(e){v("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return f.throwError("this platform does not support BigInt",c.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,f.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?f.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",c.b.errors.UNEXPECTED_ARGUMENT,{}):f.throwError("BigNumber.toString does not accept parameters",c.b.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(d,b(t)):t.match(/^-?[0-9]+$/)?new e(d,b(new u(t))):f.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&v("underflow","BigNumber.from",t),(t>=l||t<=-l)&&v("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(s.j)(r))return e.from(Object(s.i)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var a=r._hex;if(null==a&&"BigNumber"===r.type&&(a=r.hex),"string"===typeof a&&(Object(s.l)(a)||"-"===a[0]&&Object(s.l)(a.substring(1))))return e.from(a)}return f.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function b(e){if("string"!==typeof e)return b(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&f.throwArgumentError("invalid hex","value",e),"0x00"===(e=b(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function m(e){return p.from(b(e))}function g(e){var t=p.from(e).toHexString();return"-"===t[0]?new u("-"+t.substring(3),16):new u(t.substring(2),16)}function v(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),f.throwError(e,c.b.errors.NUMERIC_FAULT,n)}var y=r(136),A=r.n(y);var w,x=r(26),E=r.n(x);!function(e){e.sha256="sha256",e.sha512="sha512"}(w||(w={}));new c.b("sha2/5.6.1");var _,C,k=new c.b("strings/5.6.1");function B(e,t,r,n,a){if(e===C.BAD_PREFIX||e===C.UNEXPECTED_CONTINUE){for(var i=0,o=t+1;o>6===2;o++)i++;return i}return e===C.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(_||(_={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(C||(C={}));Object.freeze({error:function(e,t,r,n,a){return k.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:B,replace:function(e,t,r,n,a){return e===C.OVERLONG?(n.push(a),0):(n.push(65533),B(e,t,r))}});function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.current;t!=_.current&&(k.checkNormalize(),e=e.normalize(t));for(var r=[],n=0;n>6|192),r.push(63&a|128);else if(55296==(64512&a)){n++;var i=e.charCodeAt(n);if(n>=e.length||56320!==(64512&i))throw new Error("invalid utf-8 string");var o=65536+((1023&a)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return Object(s.a)(r)}var S=new RegExp("^bytes([0-9]+)$"),O=new RegExp("^(u?int)([0-9]*)$"),M=new RegExp("^(.*)\\[([0-9]*)\\]$"),D="0000000000000000000000000000000000000000000000000000000000000000",T=new c.b("solidity/5.6.1");function F(e,t,r){switch(e){case"address":return r?Object(s.p)(t,32):Object(s.a)(t);case"string":return I(t);case"bytes":return Object(s.a)(t);case"bool":return t=t?"0x01":"0x00",r?Object(s.p)(t,32):Object(s.a)(t)}var n=e.match(O);if(n){var a=parseInt(n[2]||"256");return(n[2]&&String(a)!==n[2]||a%8!==0||0===a||a>256)&&T.throwArgumentError("invalid number type","type",e),r&&(a=256),t=p.from(t).toTwos(a),Object(s.p)(t,a/8)}if(n=e.match(S)){var i=parseInt(n[1]);return(String(i)!==n[1]||0===i||i>32)&&T.throwArgumentError("invalid bytes type","type",e),Object(s.a)(t).byteLength!==i&&T.throwArgumentError("invalid value for ".concat(e),"value",t),r?Object(s.a)((t+D).substring(0,66)):t}if((n=e.match(M))&&Array.isArray(t)){var o=n[1];parseInt(n[2]||String(t.length))!=t.length&&T.throwArgumentError("invalid array length for ".concat(e),"value",t);var c=[];return t.forEach((function(e){c.push(F(o,e,!0))})),Object(s.b)(c)}return T.throwArgumentError("invalid type","type",e)}function R(e,t){e.length!=t.length&&T.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);var r=[];return e.forEach((function(e,n){r.push(F(e,t[n]))})),Object(s.i)(Object(s.b)(r))}function P(e,t){return r=R(e,t),"0x"+A.a.keccak_256(Object(s.a)(r));var r}function N(e,t){return r=R(e,t),"0x"+E.a.sha256().update(Object(s.a)(r)).digest("hex");var r}},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return _})),r.d(t,"b",(function(){return tt})),r.d(t,"c",(function(){return et})),r.d(t,"d",(function(){return nt})),r.d(t,"e",(function(){return rt}));var n,a=r(41),i=r(40),o=r(12),s=r(14),c=r(0),u=r(25),f=r(33),d=r(2),l=r(1),h=r(7),p=r(8),b=r(43),m=r(1647),g=r.n(m),v=r(53),y=r.n(v),A=r(31),w=function(e){Object(h.a)(r,e);var t=Object(p.a)(r);function r(e){var n;return Object(l.a)(this,r),(n=t.call(this,"The map type '".concat(e,"' is invalid"))).mapType=e,n.name="InvalidMapTypeError",n}return Object(d.a)(r)}(Object(b.a)(Error)),x=Symbol.for("taquito-michelson-map-type-symbol"),E=function(e){Object(h.a)(r,e);var t=Object(p.a)(r);function r(e,n,a){var i;return Object(l.a)(this,r),(i=t.call(this,"".concat(a," not compliant with underlying michelson type"))).value=e,i.type=n,i.name="MapTypecheckError",i}return Object(d.a)(r)}(Object(b.a)(Error)),_=function(){function e(t){Object(l.a)(this,e),this.valueMap=new Map,this.keyMap=new Map,this[n]=!0,t&&this.setType(t)}return Object(d.a)(e,[{key:"setType",value:function(e){if(!("args"in(t=e))||!Array.isArray(t.args)||2!==t.args.length)throw new w(e.toString());var t;this.keySchema=new et(e.args[0]),this.valueSchema=new et(e.args[1])}},{key:"removeType",value:function(){this.keySchema=void 0,this.valueSchema=void 0}},{key:"typecheckKey",value:function(e){return!this.keySchema||this.keySchema.Typecheck(e)}},{key:"typecheckValue",value:function(e){return!this.valueSchema||this.valueSchema.Typecheck(e)}},{key:"assertTypecheckValue",value:function(e){if(!this.typecheckValue(e))throw new E(e,this.valueSchema,"value")}},{key:"assertTypecheckKey",value:function(e){if(!this.typecheckKey(e))throw new E(e,this.keySchema,"key")}},{key:"serializeDeterministically",value:function(e){return g()(e)}},{key:"keys",value:Object(c.a)().mark((function e(){var t,r,n,a;return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(f.a)(this.entries()),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=Object(u.a)(r.value,1),a=n[0],e.next=7,a;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"values",value:Object(c.a)().mark((function e(){var t,r,n,a;return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(f.a)(this.entries()),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=Object(u.a)(r.value,2),a=n[1],e.next=7,a;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"entries",value:Object(c.a)().mark((function e(){var t,r,n;return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(f.a)(this.valueMap.keys()),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=r.value,e.next=7,[this.keyMap.get(n),this.valueMap.get(n)];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"get",value:function(e){this.assertTypecheckKey(e);var t=this.serializeDeterministically(e);return this.valueMap.get(t)}},{key:"set",value:function(e,t){this.assertTypecheckKey(e),this.assertTypecheckValue(t);var r=this.serializeDeterministically(e);this.keyMap.set(r,e),this.valueMap.set(r,t)}},{key:"delete",value:function(e){this.assertTypecheckKey(e),this.keyMap.delete(this.serializeDeterministically(e)),this.valueMap.delete(this.serializeDeterministically(e))}},{key:"has",value:function(e){this.assertTypecheckKey(e);var t=this.serializeDeterministically(e);return this.keyMap.has(t)&&this.valueMap.has(t)}},{key:"clear",value:function(){this.keyMap.clear(),this.valueMap.clear()}},{key:"size",get:function(){return this.keyMap.size}},{key:"forEach",value:function(e){var t,r=Object(f.a)(this.entries());try{for(r.s();!(t=r.n()).done;){var n=Object(u.a)(t.value,2),a=n[0];e(n[1],a,this)}}catch(i){r.e(i)}finally{r.f()}}}],[{key:"isMichelsonMap",value:function(e){return e&&!0===e[x]}},{key:"fromLiteral",value:function(t,r){var n=new e(r);return Object.keys(t).forEach((function(e){n.set(e,t[e])})),n}}]),e}();n=x;var C=function(e){Object(h.a)(r,e);var t=Object(p.a)(r);function r(e,n,a){var i;Object(l.a)(this,r),(i=t.call(this)).value=e,i.token=n,i.name="ValidationError";var o=i.token.annot(),s=o?"[".concat(o,"] "):"";return i.message="".concat(s).concat(a),i}return Object(d.a)(r)}(Object(b.a)(Error)),k=function(){function e(t,r,n){Object(l.a)(this,e),this.val=t,this.idx=r,this.fac=n,this.createToken=this.fac}return Object(d.a)(e,[{key:"typeWithoutAnnotations",value:function(){return function e(t){return t.args?{prim:t.prim,args:t.args.map((function(t){return e(t)}))}:{prim:t.prim}}(this.val)}},{key:"annot",value:function(){return(Array.isArray(this.val.annots)&&this.val.annots.length>0?this.val.annots[0]:String(this.idx)).replace(/(%|:)(_Liq_entry_)?/,"")}},{key:"hasAnnotations",value:function(){return Array.isArray(this.val.annots)&&this.val.annots.length}},{key:"tokenVal",get:function(){return this.val}},{key:"ExtractSignature",value:function(){return[[this.ExtractSchema()]]}}]),e}(),B=function(e){Object(h.a)(r,e);var t=Object(p.a)(r);function r(){return Object(l.a)(this,r),t.apply(this,arguments)}return Object(d.a)(r,[{key:"compare",value:function(e,t){return e===t?0:e1&&void 0!==arguments[1]?arguments[1]:R.prim;if(Array.isArray(e))return F({prim:t,args:e},t);if(void 0===e.args)throw new D("Encountered an invalid PairToken with no arguments, a pair must have two or more arguments");return e.args.length>2?[e.args[0],{prim:t,args:e.args.slice(1)}]:[e.args[0],e.args[1]]}var R=function(e){Object(h.a)(r,e);var t=Object(p.a)(r);function r(e,n,a){return Object(l.a)(this,r),t.call(this,Array.isArray(e)?{prim:r.prim,args:e}:e,n,a)}return Object(d.a)(r,[{key:"args",value:function(){return F(this.val)}},{key:"tokens",value:function(){var e=this,t=0;return this.args().map((function(n){var a=e.createToken(n,e.idx+t);return a instanceof r?t+=Object.keys(a.ExtractSchema()).length:t++,a}))}},{key:"Encode",value:function(e){return{prim:"Pair",args:this.tokens().map((function(t){return t.Encode(e)}))}}},{key:"ExtractSignature",value:function(){var e=this.args(),t=this.createToken(e[0],this.idx),r=1;t instanceof M&&(r=Object.keys(t.ExtractSchema()).length);var n,a=this.createToken(e[1],this.idx+r),i=[],o=Object(f.a)(t.ExtractSignature());try{for(o.s();!(n=o.n()).done;){var c,u=n.value,d=Object(f.a)(a.ExtractSignature());try{for(d.s();!(c=d.n()).done;){var l=c.value;i.push([].concat(Object(s.a)(u),Object(s.a)(l)))}}catch(h){d.e(h)}finally{d.f()}}}catch(h){o.e(h)}finally{o.f()}return i}},{key:"ToBigMapKey",value:function(e){return{key:this.EncodeObject(e),type:this.typeWithoutAnnotations()}}},{key:"ToKey",value:function(e){return this.Execute(e)}},{key:"EncodeObject",value:function(e){var t,n,a=this.tokens(),i=Object(u.a)(a,2),o=i[0],s=i[1];return t=o instanceof r&&!o.hasAnnotations()?e:e[o.annot()],n=s instanceof r&&!s.hasAnnotations()?e:e[s.annot()],{prim:"Pair",args:[o.EncodeObject(t),s.EncodeObject(n)]}}},{key:"traversal",value:function(e,t){var n,a=this.args(),i=this.createToken(a[0],this.idx),s=1;i instanceof r&&(s=Object.keys(i.ExtractSchema()).length),n=i instanceof r&&!i.hasAnnotations()?e(i):Object(o.a)({},i.annot(),e(i));var c,u=this.createToken(a[1],this.idx+s);return c=u instanceof r&&!u.hasAnnotations()?t(u):Object(o.a)({},u.annot(),t(u)),Object.assign(Object.assign({},n),c)}},{key:"Execute",value:function(e,t){var r=F(e,"Pair");return this.traversal((function(e){return e.Execute(r[0],t)}),(function(e){return e.Execute(r[1],t)}))}},{key:"ExtractSchema",value:function(){return this.traversal((function(e){return e.ExtractSchema()}),(function(e){return e.ExtractSchema()}))}},{key:"generateSchema",value:function(){return{__michelsonType:r.prim,schema:this.traversal((function(e){return e instanceof r&&!e.hasAnnotations()?e.generateSchema().schema:e.generateSchema()}),(function(e){return e instanceof r&&!e.hasAnnotations()?e.generateSchema().schema:e.generateSchema()}))}}},{key:"compare",value:function(e,t){var n=this.tokens(),a=Object(u.a)(n,2),i=a[0],o=a[1],s=function(e,t){return e instanceof r&&!e.hasAnnotations()?t:t[e.annot()]};if(i instanceof B&&o instanceof B){var c=i.compare(s(i,e),s(i,t));return 0===c?o.compare(s(o,e),s(o,t)):c}throw new T(e,t)}},{key:"findAndReturnTokens",value:function(e,t){return r.prim===e&&t.push(this),this.tokens().map((function(r){return r.findAndReturnTokens(e,t)})),t}}]),r}(B);R.prim="pair";var P=function(e){Object(h.a)(r,e);var t=Object(p.a)(r);function r(e,n,a){var i;return Object(l.a)(this,r),(i=t.call(this,e,n,a)).value=e,i.token=n,i.name="NatValidationError",i}return Object(d.a)(r)}(C),N=function(e){Object(h.a)(r,e);var t=Object(p.a)(r);function r(e,n,a){var i;return Object(l.a)(this,r),(i=t.call(this,e,n,a)).val=e,i.idx=n,i.fac=a,i}return Object(d.a)(r,[{key:"Execute",value:function(e){return new y.a(e[Object.keys(e)[0]])}},{key:"Encode",value:function(e){var t=e.pop(),r=this.isValid(t);if(r)throw r;return{int:new y.a(t).toFixed()}}},{key:"isValid",value:function(e){var t=new y.a(e);return t.isNaN()?new P(e,this,"Value is not a number: ".concat(e)):t.isNegative()?new P(e,this,"Value cannot be negative: ".concat(e)):null}},{key:"EncodeObject",value:function(e){var t=this.isValid(e);if(t)throw t;return{int:new y.a(e).toFixed()}}},{key:"ExtractSchema",value:function(){return r.prim}},{key:"generateSchema",value:function(){return{__michelsonType:r.prim,schema:r.prim}}},{key:"ToBigMapKey",value:function(e){return{key:{int:String(e)},type:{prim:r.prim}}}},{key:"ToKey",value:function(e){var t=e.int;return new y.a(t)}},{key:"compare",value:function(e,t){var r=Number(e),n=Number(t);return r===n?0:r1&&void 0!==arguments[1]?arguments[1]:R.prim;return Array.isArray(e)?Ze({prim:n,args:e},n):e.prim===n&&e.args&&e.args.length>2?Object.assign(Object.assign({},e),{args:[null===(t=e.args)||void 0===t?void 0:t[0],{prim:n,args:null===(r=e.args)||void 0===r?void 0:r.slice(1)}]}):e}function $e(e,t){var r=Ze(e),n=Ze(t);return r.prim===n.prim&&(void 0===r.args&&void 0===n.args||void 0!==r.args&&void 0!==n.args&&r.args.length===n.args.length&&r.args.every((function(e,t){var r;return $e(e,null===(r=n.args)||void 0===r?void 0:r[t])})))&&(void 0===r.annots&&void 0===n.annots||void 0!==r.annots&&void 0!==n.annots&&r.annots.length===n.annots.length&&r.annots.every((function(e,t){var r;return e===(null===(r=n.annots)||void 0===r?void 0:r[t])})))}var et=function(){function e(t){if(Object(l.a)(this,e),this.val=t,this[Qe]=!0,this.root=Ue(t,0),this.root instanceof S)this.bigMap=this.root;else if(this.isExpressionExtended(t)&&"pair"===t.prim){var r=t.args[0];this.isExpressionExtended(r)&&"big_map"===r.prim&&(this.bigMap=new S(r,0,Ue))}}return Object(d.a)(e,[{key:"isExpressionExtended",value:function(e){return"prim"in e&&Array.isArray(e.args)}},{key:"removeTopLevelAnnotation",value:function(e){return(this.root instanceof R||this.root instanceof M)&&this.root.hasAnnotations()&&"object"===typeof e&&1===Object.keys(e).length?e[Object.keys(e)[0]]:e}},{key:"Execute",value:function(e,t){var r=this.root.Execute(e,t);return this.removeTopLevelAnnotation(r)}},{key:"Typecheck",value:function(e){if(this.root instanceof S&&Number.isInteger(Number(e)))return!0;try{return this.root.EncodeObject(e),!0}catch(t){return!1}}},{key:"ExecuteOnBigMapDiff",value:function(e,t){if(!this.bigMap)throw new Ke("Big map schema is undefined");if(!Array.isArray(e))throw new Ve("Big map diff must be an array");var r=e.map((function(e){return{args:[e.key,e.value]}}));return this.bigMap.Execute(r,t)}},{key:"ExecuteOnBigMapValue",value:function(e,t){if(!this.bigMap)throw new Ke("No big map schema");return this.bigMap.ValueSchema.Execute(e,t)}},{key:"EncodeBigMapKey",value:function(e){if(!this.bigMap)throw new Ke("Big map schema is undefined");try{return this.bigMap.KeySchema.ToBigMapKey(e)}catch(t){throw new We("big map key",t)}}},{key:"Encode",value:function(e){try{return this.root.EncodeObject(e)}catch(t){if(t instanceof C)throw t;throw new Ye("storage object",t)}}},{key:"ExtractSchema",value:function(){return this.removeTopLevelAnnotation(this.root.ExtractSchema())}},{key:"generateSchema",value:function(){return this.removeTopLevelAnnotation(this.root.generateSchema())}},{key:"ComputeState",value:function(e,t){var r=this;if(!this.bigMap)throw new Ke("Big map schema is undefined");var n=e.reduce((function(e,t){return Object.assign(Object.assign({},e),r.ExecuteOnBigMapDiff(t.contents[0].metadata.operation_result.big_map_diff))}),{});return Object.assign(Object.assign({},this.Execute(t)),Object(o.a)({},this.bigMap.annot(),n))}},{key:"FindFirstInTopLevelPair",value:function(e,t){return this.findValue(this.root.val,e,t)}},{key:"findValue",value:function(e,t,r){if($e(r,e))return t;if(Array.isArray(e)||"pair"===e.prim){var n=Ze(e),a=Ze(t,"Pair");if(void 0===n.args||void 0===a.args)throw new Je("Tokens have no arguments");return this.findValue(n.args[0],a.args[0],r)||this.findValue(n.args[1],a.args[1],r)}}},{key:"findToken",value:function(e){return this.root.findAndReturnTokens(e,[])}}],[{key:"isSchema",value:function(e){return e&&!0===e[Xe]}},{key:"fromRPCResponse",value:function(t){var r=t&&t.script&&Array.isArray(t.script.code)&&t.script.code.find((function(e){return"storage"===e.prim}));if(!r||!Array.isArray(r.args))throw new ze(t.script);return new e(r.args[0])}}]),e}();Qe=Xe;var tt=function(){function e(t){Object(l.a)(this,e),this.root=Ue(t,0)}return Object(d.a)(e,[{key:"isMultipleEntryPoint",get:function(){return this.root instanceof M||this.root instanceof Z&&this.root.subToken()instanceof M}},{key:"hasAnnotation",get:function(){return!this.isMultipleEntryPoint||"0"!==Object.keys(this.ExtractSchema())[0]}},{key:"Execute",value:function(e,t){return this.root.Execute(e,t)}},{key:"Encode",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r1&&void 0!==s[1]?s[1]:{},a={mode:"cors",headers:{}},(s.length>2&&void 0!==s[2]?s[2]:{}).useAPIKey&&(a.headers=d(d({},a.headers),g())),i=c()(a,r,{method:"GET"}),e.next=7,fetch(t,i);case 7:if(!(o=e.sent).ok){e.next=10;break}return e.abrupt("return",o.json());case 10:throw v(o),o;case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a={mode:"cors",headers:{"Content-Type":"application/json; charset=utf-8"}};n.useAPIKey&&(a.headers=d(d({},a.headers),g()));var i=c()(a,r,{method:"POST"});return n.isUrlEncodedData?(i.body=t,"application/json; charset=utf-8"===i.headers["Content-Type"]&&delete i.headers["Content-Type"]):i.body=JSON.stringify(t),function(e,t){var r=new Promise((function(t,r){var n=setTimeout((function(){clearTimeout(n),r(new Error("Timed out in ".concat(e,"ms")))}),e)}));return Promise.race([t,r])}(n.timeout||6e4,fetch(e,i).then((function(e){if(e.ok)return e.json();throw v(e),e})))},w=function(e,t){return{jsonrpc:"2.0",method:e,id:10,params:t}}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(1145);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.r(t),r.d(t,"isBytesLike",(function(){return v})),r.d(t,"isBytes",(function(){return y})),r.d(t,"arrayify",(function(){return A})),r.d(t,"concat",(function(){return w})),r.d(t,"stripZeros",(function(){return x})),r.d(t,"zeroPad",(function(){return E})),r.d(t,"isHexString",(function(){return _})),r.d(t,"hexlify",(function(){return k})),r.d(t,"hexDataLength",(function(){return B})),r.d(t,"hexDataSlice",(function(){return I})),r.d(t,"hexConcat",(function(){return S})),r.d(t,"hexValue",(function(){return O})),r.d(t,"hexStripZeros",(function(){return M})),r.d(t,"hexZeroPad",(function(){return D})),r.d(t,"splitSignature",(function(){return T})),r.d(t,"joinSignature",(function(){return F}));var n=r(1),a=r(2),i=!1,o=!1,s={debug:1,default:2,info:2,warning:3,error:4,off:5},c=s.default,u=null;var f,d,l=function(){try{var e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(f||(f={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(d||(d={}));var h="0123456789abcdef",p=function(){function e(t){Object(n.a)(this,e),Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}return Object(a.a)(e,[{key:"_log",value:function(e,t){var r=e.toLowerCase();null==s[r]&&this.throwArgumentError("invalid log level name","logLevel",e),c>s[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=h[15&t[i]];a.push(e+"=Uint8Array(0x"+r+")")}else a.push(e+"="+JSON.stringify(t))}catch(u){a.push(e+"="+JSON.stringify(n[e].toString()))}})),a.push("code=".concat(r)),a.push("version=".concat(this.version));var i=t,s="";switch(r){case d.NUMERIC_FAULT:s="NUMERIC_FAULT";var c=t;switch(c){case"overflow":case"underflow":case"division-by-zero":s+="-"+c;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case d.CALL_EXCEPTION:case d.INSUFFICIENT_FUNDS:case d.MISSING_NEW:case d.NONCE_EXPIRED:case d.REPLACEMENT_UNDERPRICED:case d.TRANSACTION_REPLACED:case d.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),a.length&&(t+=" ("+a.join(", ")+")");var u=new Error(t);return u.reason=i,u.code=r,Object.keys(n).forEach((function(e){u[e]=n[e]})),u}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),l&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:l})}},{key:"checkSafeUint53",value:function(t,r){"number"===typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return u||(u=new e("logger/5.6.0")),u}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),i){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}o=!!t,i=!!r}},{key:"setLogLevel",value:function(t){var r=s[t.toLowerCase()];null!=r?c=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();p.errors=d,p.levels=f;var b=new p("bytes/5.4.0");function m(e){return!!e.toHexString}function g(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return g(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function v(e){return _(e)&&!(e.length%2)||y(e)}function y(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(null==e.length)return!1;for(var t=0;t=256||r%1)return!1}return!0}function A(e,t){if(t||(t={}),"number"===typeof e){b.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),g(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),m(e)&&(e=e.toHexString()),_(e)){var n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0x0"+n.substring(2):"right"===t.hexPad?n+="0":b.throwArgumentError("hex data is odd-length","value",e));for(var a=[],i=0;it&&b.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),g(r)}function _(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}var C="0123456789abcdef";function k(e,t){if(t||(t={}),"number"===typeof e){b.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r=C[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"===typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),m(e))return e.toHexString();if(_(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":b.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(y(e)){for(var n="0x",a=0;a>4]+C[15&i]}return n}return b.throwArgumentError("invalid hexlify value","value",e)}function B(e){if("string"!==typeof e)e=k(e);else if(!_(e)||e.length%2)return null;return(e.length-2)/2}function I(e,t,r){return"string"!==typeof e?e=k(e):(!_(e)||e.length%2)&&b.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function S(e){var t="0x";return e.forEach((function(e){t+=k(e).substring(2)})),t}function O(e){var t=M(k(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function M(e){"string"!==typeof e&&(e=k(e)),_(e)||b.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&b.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function T(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(v(e)){var r=A(e);65!==r.length&&b.throwArgumentError("invalid signature string; must be 65 bytes","signature",e),t.r=k(r.slice(0,32)),t.s=k(r.slice(32,64)),t.v=r[64],t.v<27&&(0===t.v||1===t.v?t.v+=27:b.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=k(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var n=E(A(t._vs),32);t._vs=k(n);var a=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=a:t.recoveryParam!==a&&b.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;var i=k(n);null==t.s?t.s=i:t.s!==i&&b.throwArgumentError("signature v mismatch _vs","signature",e)}null==t.recoveryParam?null==t.v?b.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2:null==t.v?t.v=27+t.recoveryParam:t.recoveryParam!==1-t.v%2&&b.throwArgumentError("signature recoveryParam mismatch v","signature",e),null!=t.r&&_(t.r)?t.r=D(t.r,32):b.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&_(t.s)?t.s=D(t.s,32):b.throwArgumentError("signature missing or invalid s","signature",e);var o=A(t.s);o[0]>=128&&b.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(o[0]|=128);var s=k(o);t._vs&&(_(t._vs)||b.throwArgumentError("signature invalid _vs","signature",e),t._vs=D(t._vs,32)),null==t._vs?t._vs=s:t._vs!==s&&b.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t}function F(e){return k(w([(e=T(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},function(e,t,r){var n=r(721),a=r(1465),i=r(3286),o=r(232),s=r(16),c=function e(t,r){var n=[];return r.forEach((function(r){if("object"===typeof r.components){if("tuple"!==r.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var a="",i=r.type.indexOf("[");i>=0&&(a=r.type.substring(i));var o=e(t,r.components);Array.isArray(o)&&t?n.push("tuple("+o.join(",")+")"+a):t?n.push("("+o+")"):n.push("("+o.join(",")+")"+a)}else n.push(r.type)})),n},u=function(e){if(!a.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r7?r+=e[n].toUpperCase():r+=e[n];return r},toHex:a.toHex,toBN:a.toBN,bytesToHex:a.bytesToHex,hexToBytes:a.hexToBytes,hexToNumberString:a.hexToNumberString,hexToNumber:a.hexToNumber,toDecimal:a.hexToNumber,numberToHex:a.numberToHex,fromDecimal:a.numberToHex,hexToUtf8:a.hexToUtf8,hexToString:a.hexToUtf8,toUtf8:a.hexToUtf8,stripHexPrefix:a.stripHexPrefix,utf8ToHex:a.utf8ToHex,stringToHex:a.utf8ToHex,fromUtf8:a.utf8ToHex,hexToAscii:u,toAscii:u,asciiToHex:f,fromAscii:f,unitMap:n.unitMap,toWei:function(e,t){if(t=d(t),!a.isBN(e)&&"string"!==typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return a.isBN(e)?n.toWei(e,t):n.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=d(t),!a.isBN(e)&&"string"!==typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return a.isBN(e)?n.fromWei(e,t):n.fromWei(e,t).toString(10)},padLeft:a.leftPad,leftPad:a.leftPad,padRight:a.rightPad,rightPad:a.rightPad,toTwosComplement:a.toTwosComplement,isBloom:a.isBloom,isUserEthereumAddressInBloom:a.isUserEthereumAddressInBloom,isContractAddressInBloom:a.isContractAddressInBloom,isTopic:a.isTopic,isTopicInBloom:a.isTopicInBloom,isInBloom:a.isInBloom,compareBlockNumbers:function(e,t){if(e==t)return 0;if("genesis"!=e&&"earliest"!=e&&0!=e||"genesis"!=t&&"earliest"!=t&&0!=t){if("genesis"==e||"earliest"==e)return-1;if("genesis"==t||"earliest"==t)return 1;if("latest"==e)return"pending"==t?-1:1;if("latest"===t)return"pending"==e?1:-1;if("pending"==e)return 1;if("pending"==t)return-1;var r=new s(e),n=new s(t);return r.lt(n)?-1:r.eq(n)?0:1}return 0},toNumber:a.toNumber}},function(e,t,r){"use strict";r.d(t,"a",(function(){return Ot})),r.d(t,"b",(function(){return Mt})),r.d(t,"c",(function(){return Dt}));var n=r(14),a=r(23),i=r(41),o=r(40),s=r(7),c=r(8),u=r(1),f=r(2),d=r(0),l=r(4),h=r(103),p=r.n(h),b=r(11),m=p.a.BN,g=new b.b("bignumber/5.6.2"),v={},y=9007199254740991;var A=!1,w=function(){function e(t,r){Object(u.a)(this,e),t!==v&&g.throwError("cannot call constructor directly; use BigNumber.from",b.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return Object(f.a)(e,[{key:"fromTwos",value:function(e){return E(_(this).fromTwos(e))}},{key:"toTwos",value:function(e){return E(_(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return E(_(this).add(_(e)))}},{key:"sub",value:function(e){return E(_(this).sub(_(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&C("division-by-zero","div"),E(_(this).div(_(t)))}},{key:"mul",value:function(e){return E(_(this).mul(_(e)))}},{key:"mod",value:function(e){var t=_(e);return t.isNeg()&&C("division-by-zero","mod"),E(_(this).umod(t))}},{key:"pow",value:function(e){var t=_(e);return t.isNeg()&&C("negative-power","pow"),E(_(this).pow(t))}},{key:"and",value:function(e){var t=_(e);return(this.isNegative()||t.isNeg())&&C("unbound-bitwise-result","and"),E(_(this).and(t))}},{key:"or",value:function(e){var t=_(e);return(this.isNegative()||t.isNeg())&&C("unbound-bitwise-result","or"),E(_(this).or(t))}},{key:"xor",value:function(e){var t=_(e);return(this.isNegative()||t.isNeg())&&C("unbound-bitwise-result","xor"),E(_(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&C("negative-width","mask"),E(_(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&C("negative-width","shl"),E(_(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&C("negative-width","shr"),E(_(this).shrn(e))}},{key:"eq",value:function(e){return _(this).eq(_(e))}},{key:"lt",value:function(e){return _(this).lt(_(e))}},{key:"lte",value:function(e){return _(this).lte(_(e))}},{key:"gt",value:function(e){return _(this).gt(_(e))}},{key:"gte",value:function(e){return _(this).gte(_(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return _(this).isZero()}},{key:"toNumber",value:function(){try{return _(this).toNumber()}catch(e){C("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return g.throwError("this platform does not support BigInt",b.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?A||(A=!0,g.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?g.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",b.b.errors.UNEXPECTED_ARGUMENT,{}):g.throwError("BigNumber.toString does not accept parameters",b.b.errors.UNEXPECTED_ARGUMENT,{})),_(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(v,x(t)):t.match(/^-?[0-9]+$/)?new e(v,x(new m(t))):g.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&C("underflow","BigNumber.from",t),(t>=y||t<=-y)&&C("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(l.j)(r))return e.from(Object(l.i)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var a=r._hex;if(null==a&&"BigNumber"===r.type&&(a=r.hex),"string"===typeof a&&(Object(l.l)(a)||"-"===a[0]&&Object(l.l)(a.substring(1))))return e.from(a)}return g.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function x(e){if("string"!==typeof e)return x(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&g.throwArgumentError("invalid hex","value",e),"0x00"===(e=x(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function E(e){return w.from(x(e))}function _(e){var t=w.from(e).toHexString();return"-"===t[0]?new m("-"+t.substring(3),16):new m(t.substring(2),16)}function C(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),g.throwError(e,b.b.errors.NUMERIC_FAULT,n)}var k=r(13),B="abi/5.6.4",I=new b.b(B);var S=function(){function e(t,r,n,a){Object(u.a)(this,e),this.name=t,this.type=r,this.localName=n,this.dynamic=a}return Object(f.a)(e,[{key:"_throwError",value:function(e,t){I.throwArgumentError(e,this.localName,t)}}]),e}(),O=function(){function e(t){Object(u.a)(this,e),Object(k.d)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return Object(f.a)(e,[{key:"data",get:function(){return Object(l.c)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData(Object(l.b)(e._data))}},{key:"writeBytes",value:function(e){var t=Object(l.a)(e),r=t.length%this.wordSize;return r&&(t=Object(l.b)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=Object(l.a)(w.from(e));return t.length>this.wordSize&&I.throwError("value out-of-bounds",b.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(l.b)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}(),M=function(){function e(t,r,n,a){Object(u.a)(this,e),Object(k.d)(this,"_data",Object(l.a)(t)),Object(k.d)(this,"wordSize",r||32),Object(k.d)(this,"_coerceFunc",n),Object(k.d)(this,"allowLoose",a),this._offset=0}return Object(f.a)(e,[{key:"data",get:function(){return Object(l.i)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:I.throwError("data out-of-bounds",b.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return w.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}(),D=r(136),T=r.n(D);function F(e){return"0x"+T.a.keccak_256(Object(l.a)(e))}var R=new b.b("rlp/5.6.1");function P(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function N(e){if(Array.isArray(e)){var t=[];if(e.forEach((function(e){t=t.concat(N(e))})),t.length<=55)return t.unshift(192+t.length),t;var r=P(t.length);return r.unshift(247+r.length),r.concat(t)}Object(l.k)(e)||R.throwArgumentError("RLP object must be BytesLike","object",e);var n=Array.prototype.slice.call(Object(l.a)(e));if(1===n.length&&n[0]<=127)return n;if(n.length<=55)return n.unshift(128+n.length),n;var a=P(n.length);return a.unshift(183+a.length),a.concat(n)}function j(e){return Object(l.i)(N(e))}var L=new b.b("address/5.6.1");function U(e){Object(l.l)(e,20)||L.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=t[n].charCodeAt(0);for(var a=Object(l.a)(F(r)),i=0;i<40;i+=2)a[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&a[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}for(var Q={},G=0;G<10;G++)Q[String(G)]=String(G);for(var H=0;H<26;H++)Q[String.fromCharCode(65+H)]=String(10+H);var z,q=Math.floor((z=9007199254740991,Math.log10?Math.log10(z):Math.log(z)/Math.LN10));function K(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return Q[e]})).join("");t.length>=q;){var r=t.substring(0,q);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function V(e){var t,r=null;if("string"!==typeof e&&L.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),r=U(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&r!==e&&L.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==K(e)&&L.throwArgumentError("bad icap checksum","address",e),t=e.substring(4),r=new m(t,36).toString(16);r.length<40;)r="0"+r;r=U("0x"+r)}else L.throwArgumentError("invalid address","address",e);return r}function W(e){var t=null;try{t=V(e.from)}catch(n){L.throwArgumentError("missing from address","transaction",e)}var r=Object(l.o)(Object(l.a)(w.from(e.nonce).toHexString()));return V(Object(l.e)(F(j([t,r])),12))}var Y,J,X=new b.b("strings/5.6.1");function Z(e,t,r,n,a){if(e===J.BAD_PREFIX||e===J.UNEXPECTED_CONTINUE){for(var i=0,o=t+1;o>6===2;o++)i++;return i}return e===J.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(Y||(Y={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(J||(J={}));var $=Object.freeze({error:function(e,t,r,n,a){return X.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:Z,replace:function(e,t,r,n,a){return e===J.OVERLONG?(n.push(a),0):(n.push(65533),Z(e,t,r))}});function ee(e,t){null==t&&(t=$.error),e=Object(l.a)(e);for(var r=[],n=0;n>7!==0){var i=null,o=null;if(192===(224&a))i=1,o=127;else if(224===(240&a))i=2,o=2047;else{if(240!==(248&a)){n+=t(128===(192&a)?J.UNEXPECTED_CONTINUE:J.BAD_PREFIX,n-1,e,r);continue}i=3,o=65535}if(n-1+i>=e.length)n+=t(J.OVERRUN,n-1,e,r);else{for(var s=a&(1<<8-i-1)-1,c=0;c1114111?n+=t(J.OUT_OF_RANGE,n-1-i,e,r,s):s>=55296&&s<=57343?n+=t(J.UTF16_SURROGATE,n-1-i,e,r,s):s<=o?n+=t(J.OVERLONG,n-1-i,e,r,s):r.push(s))}}else r.push(a)}return r}function te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Y.current;t!=Y.current&&(X.checkNormalize(),e=e.normalize(t));for(var r=[],n=0;n>6|192),r.push(63&a|128);else if(55296==(64512&a)){n++;var i=e.charCodeAt(n);if(n>=e.length||56320!==(64512&i))throw new Error("invalid utf-8 string");var o=65536+((1023&a)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return Object(l.a)(r)}function re(e,t){return ee(e,t).map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}function ne(e){return F(te(e))}var ae=function(e){Object(s.a)(r,e);var t=Object(c.a)(r);function r(e){return Object(u.a)(this,r),t.call(this,"address","address",e,!1)}return Object(f.a)(r,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{t=V(t)}catch(r){this._throwError(r.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return V(Object(l.h)(e.readValue().toHexString(),20))}}]),r}(S),ie=function(e){Object(s.a)(r,e);var t=Object(c.a)(r);function r(e){var n;return Object(u.a)(this,r),(n=t.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,n}return Object(f.a)(r,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(e,t){return this.coder.encode(e,t)}},{key:"decode",value:function(e){return this.coder.decode(e)}}]),r}(S),oe=new b.b(B);function se(e,t,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){var a={};n=t.map((function(e){var t=e.localName;return t||oe.throwError("cannot encode object for signature with missing names",b.b.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),a[t]&&oe.throwError("cannot encode object for signature with duplicate names",b.b.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),a[t]=!0,r[t]}))}else oe.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&oe.throwArgumentError("types/value length mismatch","tuple",r);var i=new O(e.wordSize),o=new O(e.wordSize),s=[];t.forEach((function(e,t){var r=n[t];if(e.dynamic){var a=o.length;e.encode(o,r);var c=i.writeUpdatableValue();s.push((function(e){c(e+a)}))}else e.encode(i,r)})),s.forEach((function(e){e(i.length)}));var c=e.appendWriter(i);return c+=e.appendWriter(o)}function ce(e,t){var r=[],n=e.subReader(0);t.forEach((function(t){var a=null;if(t.dynamic){var i=e.readValue(),o=n.subReader(i.toNumber());try{a=t.decode(o)}catch(s){if(s.code===b.b.errors.BUFFER_OVERRUN)throw s;(a=s).baseType=t.name,a.name=t.localName,a.type=t.type}}else try{a=t.decode(e)}catch(s){if(s.code===b.b.errors.BUFFER_OVERRUN)throw s;(a=s).baseType=t.name,a.name=t.localName,a.type=t.type}void 0!=a&&r.push(a)}));var a=t.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach((function(e,t){var n=e.localName;if(n&&1===a[n]&&("length"===n&&(n="_length"),null==r[n])){var i=r[t];i instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:function(){throw i}}):r[n]=i}}));for(var i=function(){var e=r[o];e instanceof Error&&Object.defineProperty(r,o,{enumerable:!0,get:function(){throw e}})},o=0;o=0?n:"")+"]",s=-1===n||e.dynamic;return(i=t.call(this,"array",o,a,s)).coder=e,i.length=n,i}return Object(f.a)(r,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;re._data.length&&oe.throwError("insufficient data length",b.b.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n=0||"tuple"===e)&&Ce[t])return!0;return(_e[t]||"payable"===t)&&xe.throwArgumentError("invalid modifier","name",t),!1}function Be(e,t){for(var r in t)Object(k.d)(e,r,t[r])}var Ie=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),Se=new RegExp(/^(.*)\[([0-9]*)\]$/),Oe=function(){function e(t,r){Object(u.a)(this,e),t!==Ee&&xe.throwError("use fromString",b.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Be(this,r);var n=this.type.match(Se);Be(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return Object(f.a)(e,[{key:"format",value:function(e){if(e||(e=Ie.sighash),Ie[e]||xe.throwArgumentError("invalid format type","format",e),e===Ie.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==Ie.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===Ie.full?", ":",")+")"):r+=this.type,e!==Ie.sighash&&(!0===this.indexed&&(r+=" indexed"),e===Ie.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"===typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(Ee,{name:t.name||null,type:Qe(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return n=function(e,t){var r=e;function n(t){xe.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function a(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var i={type:"",name:"",state:{allowType:!0}},o=i,s=0;s2&&xe.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||xe.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=w.from(r[1]),r[0]):e}function Re(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function Pe(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&xe.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&xe.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||xe.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&xe.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&xe.throwArgumentError("unable to determine stateMutability","value",e),t}var Ne=function(e){Object(s.a)(r,e);var t=Object(c.a)(r);function r(){return Object(u.a)(this,r),t.apply(this,arguments)}return Object(f.a)(r,[{key:"format",value:function(e){if(e||(e=Ie.sighash),Ie[e]||xe.throwArgumentError("invalid format type","format",e),e===Ie.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===Ie.sighash&&xe.throwError("cannot format a constructor for sighash",b.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===Ie.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&xe.throwArgumentError("invalid constructor object","value",e);var t=Pe(e);t.constant&&xe.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Oe.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?w.from(e.gas):null};return new r(Ee,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=Fe(e,t)).match(ze);return n&&"constructor"===n[1].trim()||xe.throwArgumentError("invalid constructor string","value",e),t.inputs=Me(n[2].trim(),!1),Re(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(De),je=function(e){Object(s.a)(r,e);var t=Object(c.a)(r);function r(){return Object(u.a)(this,r),t.apply(this,arguments)}return Object(f.a)(r,[{key:"format",value:function(e){if(e||(e=Ie.sighash),Ie[e]||xe.throwArgumentError("invalid format type","format",e),e===Ie.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==Ie.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===Ie.full?", ":",")+") ",e!==Ie.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&xe.throwArgumentError("invalid function object","value",e);var t=Pe(e),n={type:e.type,name:He(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(Oe.fromObject):[],outputs:e.outputs?e.outputs.map(Oe.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?w.from(e.gas):null};return new r(Ee,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=Fe(e,t)).split(" returns ");n.length>2&&xe.throwArgumentError("invalid function string","value",e);var a=n[0].match(ze);if(a||xe.throwArgumentError("invalid function signature","value",e),t.name=a[1].trim(),t.name&&He(t.name),t.inputs=Me(a[2],!1),Re(a[3].trim(),t),n.length>1){var i=n[1].match(ze);""==i[1].trim()&&""==i[3].trim()||xe.throwArgumentError("unexpected tokens","value",e),t.outputs=Me(i[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(Ne);function Le(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||xe.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}var Ue=function(e){Object(s.a)(r,e);var t=Object(c.a)(r);function r(){return Object(u.a)(this,r),t.apply(this,arguments)}return Object(f.a)(r,[{key:"format",value:function(e){if(e||(e=Ie.sighash),Ie[e]||xe.throwArgumentError("invalid format type","format",e),e===Ie.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==Ie.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===Ie.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&xe.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:He(e.name),inputs:e.inputs?e.inputs.map(Oe.fromObject):[]};return Le(new r(Ee,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(ze);return n||xe.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&He(t.name),t.inputs=Me(n[2],!1),Le(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(De);function Qe(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var Ge=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function He(e){return e&&e.match(Ge)||xe.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var ze=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");var qe=new b.b(B),Ke=new RegExp(/^bytes([0-9]*)$/),Ve=new RegExp(/^(u?int)([0-9]*)$/),We=new(function(){function e(t){Object(u.a)(this,e),Object(k.d)(this,"coerceFunc",t||null)}return Object(f.a)(e,[{key:"_getCoder",value:function(e){var t=this;switch(e.baseType){case"address":return new ae(e.name);case"bool":return new fe(e.name);case"string":return new Ae(e.name);case"bytes":return new le(e.name);case"array":return new ue(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new we((e.components||[]).map((function(e){return t._getCoder(e)})),e.name);case"":return new pe(e.name)}var r=e.type.match(Ve);if(r){var n=parseInt(r[2]||"256");return(0===n||n>256||n%8!==0)&&qe.throwArgumentError("invalid "+r[1]+" bit length","param",e),new ye(n/8,"int"===r[1],e.name)}if(r=e.type.match(Ke)){var a=parseInt(r[1]);return(0===a||a>32)&&qe.throwArgumentError("invalid bytes length","param",e),new he(a,e.name)}return qe.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new M(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new O(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(Oe.from(e))}));return new we(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&qe.throwError("types/values length mismatch",b.b.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var n=e.map((function(e){return r._getCoder(Oe.from(e))})),a=new we(n,"_"),i=this._getWriter();return a.encode(i,t),i.data}},{key:"decode",value:function(e,t,r){var n=this,a=e.map((function(e){return n._getCoder(Oe.from(e))}));return new we(a,"_").decode(this._getReader(Object(l.a)(t),r))}}]),e}()),Ye=new b.b(B),Je=function(e){Object(s.a)(r,e);var t=Object(c.a)(r);function r(){return Object(u.a)(this,r),t.apply(this,arguments)}return Object(f.a)(r)}(k.a),Xe=function(e){Object(s.a)(r,e);var t=Object(c.a)(r);function r(){return Object(u.a)(this,r),t.apply(this,arguments)}return Object(f.a)(r)}(k.a),Ze=function(e){Object(s.a)(r,e);var t=Object(c.a)(r);function r(){return Object(u.a)(this,r),t.apply(this,arguments)}return Object(f.a)(r)}(k.a),$e=function(e){Object(s.a)(r,e);var t=Object(c.a)(r);function r(){return Object(u.a)(this,r),t.apply(this,arguments)}return Object(f.a)(r,null,[{key:"isIndexed",value:function(e){return!(!e||!e._isIndexed)}}]),r}(k.a),et={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function tt(e,t){var r=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return r.error=t,r}var rt=function(){function e(t){var r=this;Object(u.a)(this,e);var n=[];n="string"===typeof t?JSON.parse(t):t,Object(k.d)(this,"fragments",n.map((function(e){return De.from(e)})).filter((function(e){return null!=e}))),Object(k.d)(this,"_abiCoder",Object(k.e)(this instanceof e?this.constructor:void 0,"getAbiCoder")()),Object(k.d)(this,"functions",{}),Object(k.d)(this,"errors",{}),Object(k.d)(this,"events",{}),Object(k.d)(this,"structs",{}),this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":return r.deploy?void Ye.warn("duplicate definition - constructor"):void Object(k.d)(r,"deploy",e);case"function":t=r.functions;break;case"event":t=r.events;break;case"error":t=r.errors;break;default:return}var n=e.format();t[n]?Ye.warn("duplicate definition - "+n):t[n]=e})),this.deploy||Object(k.d)(this,"deploy",Ne.from({payable:!1,type:"constructor"})),Object(k.d)(this,"_isInterface",!0)}return Object(f.a)(e,[{key:"format",value:function(e){e||(e=Ie.full),e===Ie.sighash&&Ye.throwArgumentError("interface does not support formatting sighash","format",e);var t=this.fragments.map((function(t){return t.format(e)}));return e===Ie.json?JSON.stringify(t.map((function(e){return JSON.parse(e)}))):t}},{key:"getFunction",value:function(e){if(Object(l.l)(e)){for(var t in this.functions)if(e===this.getSighash(t))return this.functions[t];Ye.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){var r=e.trim(),n=Object.keys(this.functions).filter((function(e){return e.split("(")[0]===r}));return 0===n.length?Ye.throwArgumentError("no matching function","name",r):n.length>1&&Ye.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var a=this.functions[je.fromString(e).format()];return a||Ye.throwArgumentError("no matching function","signature",e),a}},{key:"getEvent",value:function(e){if(Object(l.l)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];Ye.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var n=e.trim(),a=Object.keys(this.events).filter((function(e){return e.split("(")[0]===n}));return 0===a.length?Ye.throwArgumentError("no matching event","name",n):a.length>1&&Ye.throwArgumentError("multiple matching events","name",n),this.events[a[0]]}var i=this.events[Te.fromString(e).format()];return i||Ye.throwArgumentError("no matching event","signature",e),i}},{key:"getError",value:function(e){if(Object(l.l)(e)){var t=Object(k.e)(this.constructor,"getSighash");for(var r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}Ye.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),a=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));return 0===a.length?Ye.throwArgumentError("no matching error","name",n):a.length>1&&Ye.throwArgumentError("multiple matching errors","name",n),this.errors[a[0]]}var i=this.errors[je.fromString(e).format()];return i||Ye.throwArgumentError("no matching error","signature",e),i}},{key:"getSighash",value:function(e){if("string"===typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(r){throw t}}return Object(k.e)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"===typeof e&&(e=this.getEvent(e)),Object(k.e)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeErrorResult",value:function(e,t){"string"===typeof e&&(e=this.getError(e));var r=Object(l.a)(t);return Object(l.i)(r.slice(0,4))!==this.getSighash(e)&&Ye.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",Object(l.i)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"===typeof e&&(e=this.getError(e)),Object(l.i)(Object(l.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var r=Object(l.a)(t);return Object(l.i)(r.slice(0,4))!==this.getSighash(e)&&Ye.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",Object(l.i)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),Object(l.i)(Object(l.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var r=Object(l.a)(t),n=null,a="",i=null,o=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(f){}break;case 4:var c=Object(l.i)(r.slice(0,4)),u=et[c];if(u)i=this._abiCoder.decode(u.inputs,r.slice(4)),o=u.name,s=u.signature,u.reason&&(n=i[0]),"Error"===o?a="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(i[0])):"Panic"===o&&(a="; VM Exception while processing transaction: reverted with panic code ".concat(i[0]));else try{var f=this.getError(c);i=this._abiCoder.decode(f.inputs,r.slice(4)),o=f.name,s=f.format()}catch(f){}}return Ye.throwError("call revert exception"+a,b.b.errors.CALL_EXCEPTION,{method:e.format(),data:Object(l.i)(t),errorArgs:i,errorName:o,errorSignature:s,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),Object(l.i)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var r=this;"string"===typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&Ye.throwError("too many arguments for "+e.format(),b.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var n=[];e.anonymous||n.push(this.getEventTopic(e));var a=function(e,t){return"string"===e.type?ne(t):"bytes"===e.type?F(Object(l.i)(t)):("bool"===e.type&&"boolean"===typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=w.from(t).toHexString()),"address"===e.type&&r._abiCoder.encode(["address"],[t]),Object(l.h)(Object(l.i)(t),32))};for(t.forEach((function(t,r){var i=e.inputs[r];i.indexed?null==t?n.push(null):"array"===i.baseType||"tuple"===i.baseType?Ye.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?n.push(t.map((function(e){return a(i,e)}))):n.push(a(i,t)):null!=t&&Ye.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(e,t){var r=this;"string"===typeof e&&(e=this.getEvent(e));var n=[],a=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Ye.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,o){var s=t[o];if(e.indexed)if("string"===e.type)n.push(ne(s));else if("bytes"===e.type)n.push(F(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[s]))}else a.push(e),i.push(s)})),{data:this._abiCoder.encode(a,i),topics:n}}},{key:"decodeEventLog",value:function(e,t,r){if("string"===typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){var n=this.getEventTopic(e);Object(l.l)(r[0],32)&&r[0].toLowerCase()===n||Ye.throwError("fragment/topic mismatch",b.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var a=[],i=[],o=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(a.push(Oe.fromObject({type:"bytes32",name:e.name})),o.push(!0)):(a.push(e),o.push(!1)):(i.push(e),o.push(!1))}));var s=null!=r?this._abiCoder.decode(a,Object(l.b)(r)):null,c=this._abiCoder.decode(i,t,!0),u=[],f=0,d=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)u[t]=new $e({_isIndexed:!0,hash:null});else if(o[t])u[t]=new $e({_isIndexed:!0,hash:s[d++]});else try{u[t]=s[d++]}catch(n){u[t]=n}else try{u[t]=c[f++]}catch(n){u[t]=n}if(e.name&&null==u[e.name]){var r=u[t];r instanceof Error?Object.defineProperty(u,e.name,{enumerable:!0,get:function(){throw tt("property ".concat(JSON.stringify(e.name)),r)}}):u[e.name]=r}}));for(var h=function(e){var t=u[e];t instanceof Error&&Object.defineProperty(u,e,{enumerable:!0,get:function(){throw tt("index ".concat(e),t)}})},p=0;p=0)throw e;return st.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:r})}))),null==r.chainId?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then((function(t){return 0!==t[1]&&t[0]!==t[1]&&st.throwArgumentError("chainId address mismatch","transaction",e),t[0]})),t.next=23,Object(k.f)(r);case 23:return t.abrupt("return",t.sent);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"_checkProvider",value:function(e){this.provider||st.throwError("missing provider",b.b.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}}],[{key:"isSigner",value:function(e){return!(!e||!e._isSigner)}}]),e}(),dt=function(e){Object(s.a)(r,e);var t=Object(c.a)(r);function r(e,n){var i;return Object(u.a)(this,r),i=t.call(this),Object(k.d)(Object(a.a)(i),"address",e),Object(k.d)(Object(a.a)(i),"provider",n||null),i}return Object(f.a)(r,[{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"_fail",value:function(e,t){return Promise.resolve().then((function(){st.throwError(e,b.b.errors.UNSUPPORTED_OPERATION,{operation:t})}))}},{key:"signMessage",value:function(e){return this._fail("VoidSigner cannot sign messages","signMessage")}},{key:"signTransaction",value:function(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}},{key:"_signTypedData",value:function(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}},{key:"connect",value:function(e){return new r(this.address,e)}}]),r}(ft);r(1606),new b.b("signing-key/5.6.2");var lt,ht=new b.b("transactions/5.6.2");!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(lt||(lt={}));function pt(e,t){return{address:V(e),storageKeys:(t||[]).map((function(t,r){return 32!==Object(l.d)(t)&&ht.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase()}))}}function bt(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&ht.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),pt(e[0],e[1])):pt(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var r=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return pt(t,Object.keys(r).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}var mt=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},gt=new b.b("contracts/5.6.2"),vt={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function yt(e,t){return mt(this,void 0,void 0,Object(d.a)().mark((function r(){var n,a;return Object(d.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return"string"!==typeof(n=r.sent)&>.throwArgumentError("invalid address or ENS name","name",n),r.prev=4,r.abrupt("return",V(n));case 8:r.prev=8,r.t0=r.catch(4);case 10:return e||gt.throwError("a provider or signer is needed to resolve ENS names",b.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"}),r.next=13,e.resolveName(n);case 13:return null==(a=r.sent)&>.throwArgumentError("resolver or addr is not configured for ENS name","name",n),r.abrupt("return",a);case 16:case"end":return r.stop()}}),r,null,[[4,8]])})))}function At(e,t,r){return mt(this,void 0,void 0,Object(d.a)().mark((function n(){return Object(d.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!Array.isArray(r)){n.next=4;break}return n.next=3,Promise.all(r.map((function(r,n){return At(e,Array.isArray(t)?t[n]:t[r.name],r)})));case 3:case 7:case 11:case 17:return n.abrupt("return",n.sent);case 4:if("address"!==r.type){n.next=8;break}return n.next=7,yt(e,t);case 8:if("tuple"!==r.type){n.next=12;break}return n.next=11,At(e,t,r.components);case 12:if("array"!==r.baseType){n.next=18;break}if(Array.isArray(t)){n.next=15;break}return n.abrupt("return",Promise.reject(gt.makeError("invalid value for array",b.b.errors.INVALID_ARGUMENT,{argument:"value",value:t})));case 15:return n.next=17,Promise.all(t.map((function(t){return At(e,t,r.arrayChildren)})));case 18:return n.abrupt("return",t);case 19:case"end":return n.stop()}}),n)})))}function wt(e,t,r){return mt(this,void 0,void 0,Object(d.a)().mark((function n(){var a,i,o,s,c,u,f,h,p,m,g=this;return Object(d.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a={},r.length===t.inputs.length+1&&"object"===typeof r[r.length-1]&&(a=Object(k.g)(r.pop())),gt.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?a.from?a.from=Object(k.f)({override:yt(e.signer,a.from),signer:e.signer.getAddress()}).then((function(e){return mt(g,void 0,void 0,Object(d.a)().mark((function t(){return Object(d.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return V(e.signer)!==e.override&>.throwError("Contract with a Signer cannot override from",b.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.abrupt("return",e.override);case 2:case"end":return t.stop()}}),t)})))})):a.from=e.signer.getAddress():a.from&&(a.from=yt(e.provider,a.from)),n.next=6,Object(k.f)({args:At(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:Object(k.f)(a)||{}});case 6:if(i=n.sent,o=e.interface.encodeFunctionData(t,i.args),s={data:o,to:i.address},null!=(c=i.overrides).nonce&&(s.nonce=w.from(c.nonce).toNumber()),null!=c.gasLimit&&(s.gasLimit=w.from(c.gasLimit)),null!=c.gasPrice&&(s.gasPrice=w.from(c.gasPrice)),null!=c.maxFeePerGas&&(s.maxFeePerGas=w.from(c.maxFeePerGas)),null!=c.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=w.from(c.maxPriorityFeePerGas)),null!=c.from&&(s.from=c.from),null!=c.type&&(s.type=c.type),null!=c.accessList&&(s.accessList=bt(c.accessList)),null==s.gasLimit&&null!=t.gas){for(u=21e3,f=Object(l.a)(o),h=0;h1)){e=e.substring(1);var r=t[0];try{null==a[e]&&Object(k.d)(a,e,a[r])}catch(n){}null==a.functions[e]&&Object(k.d)(a.functions,e,a.functions[r]),null==a.callStatic[e]&&Object(k.d)(a.callStatic,e,a.callStatic[r]),null==a.populateTransaction[e]&&Object(k.d)(a.populateTransaction,e,a.populateTransaction[r]),null==a.estimateGas[e]&&Object(k.d)(a.estimateGas,e,a.estimateGas[r])}}))}return Object(f.a)(e,[{key:"deployed",value:function(){return this._deployed()}},{key:"_deployed",value:function(e){var t=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return t})):this._deployedPromise=this.provider.getCode(this.address,e).then((function(e){return"0x"===e&>.throwError("contract not deployed",b.b.errors.UNSUPPORTED_OPERATION,{contractAddress:t.address,operation:"getDeployed"}),t}))),this._deployedPromise}},{key:"fallback",value:function(e){var t=this;this.signer||gt.throwError("sending a transactions require a signer",b.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var r=Object(k.g)(e||{});return["from","to"].forEach((function(e){null!=r[e]&>.throwError("cannot override "+e,b.b.errors.UNSUPPORTED_OPERATION,{operation:e})})),r.to=this.resolvedAddress,this.deployed().then((function(){return t.signer.sendTransaction(r)}))}},{key:"connect",value:function(e){"string"===typeof e&&(e=new dt(e,this.provider));var t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&Object(k.d)(t,"deployTransaction",this.deployTransaction),t}},{key:"attach",value:function(e){return new this.constructor(e,this.interface,this.signer||this.provider)}},{key:"_normalizeRunningEvent",value:function(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}},{key:"_getRunningEvent",value:function(e){if("string"===typeof e){if("error"===e)return this._normalizeRunningEvent(new Bt);if("event"===e)return this._normalizeRunningEvent(new kt("event",null));if("*"===e)return this._normalizeRunningEvent(new St(this.address,this.interface));var t=this.interface.getEvent(e);return this._normalizeRunningEvent(new It(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{var r=e.topics[0];if("string"!==typeof r)throw new Error("invalid topic");var n=this.interface.getEvent(r);return this._normalizeRunningEvent(new It(this.address,this.interface,n,e.topics))}catch(i){}var a={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new kt(Ct(a),a))}return this._normalizeRunningEvent(new St(this.address,this.interface))}},{key:"_checkRunningEvents",value:function(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];var t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}},{key:"_wrapEvent",value:function(e,t,r){var n=this,a=Object(k.c)(t);return a.removeListener=function(){r&&(e.removeListener(r),n._checkRunningEvents(e))},a.getBlock=function(){return n.provider.getBlock(t.blockHash)},a.getTransaction=function(){return n.provider.getTransaction(t.transactionHash)},a.getTransactionReceipt=function(){return n.provider.getTransactionReceipt(t.transactionHash)},e.prepareEvent(a),a}},{key:"_addEventListener",value:function(e,t,r){var a=this;if(this.provider||gt.throwError("events require a provider or a signer with a provider",b.b.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){var i=function(r){var i=a._wrapEvent(e,r,t);if(null==i.decodeError)try{var o=e.getEmit(i);a.emit.apply(a,[e.filter].concat(Object(n.a)(o)))}catch(s){i.decodeError=s.error}null!=e.filter&&a.emit("event",i),null!=i.decodeError&&a.emit("error",i.decodeError,i)};this._wrappedEmits[e.tag]=i,null!=e.filter&&this.provider.on(e.filter,i)}}},{key:"queryFilter",value:function(e,t,r){var n=this,a=this._getRunningEvent(e),i=Object(k.g)(a.filter);return"string"===typeof t&&Object(l.l)(t,32)?(null!=r&>.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=t):(i.fromBlock=null!=t?t:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((function(e){return e.map((function(e){return n._wrapEvent(a,e,null)}))}))}},{key:"on",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}},{key:"once",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}},{key:"emit",value:function(e){if(!this.provider)return!1;for(var t=this._getRunningEvent(e),r=arguments.length,n=new Array(r>1?r-1:0),a=1;a0;return this._checkRunningEvents(t),i}},{key:"listenerCount",value:function(e){var t=this;return this.provider?null==e?Object.keys(this._runningEvents).reduce((function(e,r){return e+t._runningEvents[r].listenerCount()}),0):this._getRunningEvent(e).listenerCount():0}},{key:"listeners",value:function(e){if(!this.provider)return[];if(null==e){var t=[];for(var r in this._runningEvents)this._runningEvents[r].listeners().forEach((function(e){t.push(e)}));return t}return this._getRunningEvent(e).listeners()}},{key:"removeAllListeners",value:function(e){if(!this.provider)return this;if(null==e){for(var t in this._runningEvents){var r=this._runningEvents[t];r.removeAllListeners(),this._checkRunningEvents(r)}return this}var n=this._getRunningEvent(e);return n.removeAllListeners(),this._checkRunningEvents(n),this}},{key:"off",value:function(e,t){if(!this.provider)return this;var r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"getContractAddress",value:function(e){return W(e)}},{key:"getInterface",value:function(e){return rt.isInterface(e)?e:new rt(e)}},{key:"isIndexed",value:function(e){return $e.isIndexed(e)}}]),e}(),Mt=function(e){Object(s.a)(r,e);var t=Object(c.a)(r);function r(){return Object(u.a)(this,r),t.apply(this,arguments)}return Object(f.a)(r)}(Ot),Dt=function(){function e(t,r,n){Object(u.a)(this,e);var a=null;"0x"!==(a="string"===typeof r?r:Object(l.j)(r)?Object(l.i)(r):r&&"string"===typeof r.object?r.object:"!").substring(0,2)&&(a="0x"+a),(!Object(l.l)(a)||a.length%2)&>.throwArgumentError("invalid bytecode","bytecode",r),n&&!ft.isSigner(n)&>.throwArgumentError("invalid signer","signer",n),Object(k.d)(this,"bytecode",a),Object(k.d)(this,"interface",Object(k.e)(this instanceof e?this.constructor:void 0,"getInterface")(t)),Object(k.d)(this,"signer",n||null)}return Object(f.a)(e,[{key:"getDeployTransaction",value:function(){for(var e={},t=arguments.length,r=new Array(t),n=0;n>1]>>4>=8&&(t[c]=t[c].toUpperCase()),(15&s[c>>1])>=8&&(t[c+1]=t[c+1].toUpperCase());return"0x"+t.join("")}for(var c={},u=0;u<10;u++)c[String(u)]=String(u);for(var f=0;f<26;f++)c[String.fromCharCode(65+f)]=String(10+f);var d,l=Math.floor((d=9007199254740991,Math.log10?Math.log10(d):Math.log(d)/Math.LN10));function h(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return c[e]})).join("");t.length>=l;){var r=t.substring(0,l);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function p(e){var t=null;if("string"!==typeof e&&o.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=s(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&o.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==h(e)&&o.throwArgumentError("bad icap checksum","address",e),t=Object(a.c)(e.substring(4));t.length<40;)t="0"+t;t=s("0x"+t)}else o.throwArgumentError("invalid address","address",e);return t}function b(e){try{return p(e),!0}catch(t){}return!1}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1586),a=r.n(n),i=r(90);function o(e){return"0x"+a.a.keccak_256(Object(i.a)(e))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1593),a=r.n(n),i=r(34);function o(e){return"0x"+a.a.keccak_256(Object(i.a)(e))}},function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return s})),r.d(t,"e",(function(){return c})),r.d(t,"f",(function(){return u})),r.d(t,"a",(function(){return f}));var n,a=r(12),i="INTERNAL_ERROR",o="SERVER_ERROR",s=[-32700,-32600,-32601,-32602,-32603],c=[-32e3,-32099],u=(n={},Object(a.a)(n,"PARSE_ERROR",{code:-32700,message:"Parse error"}),Object(a.a)(n,"INVALID_REQUEST",{code:-32600,message:"Invalid Request"}),Object(a.a)(n,"METHOD_NOT_FOUND",{code:-32601,message:"Method not found"}),Object(a.a)(n,"INVALID_PARAMS",{code:-32602,message:"Invalid params"}),Object(a.a)(n,i,{code:-32603,message:"Internal error"}),Object(a.a)(n,o,{code:-32e3,message:"Server error"}),n),f=o},function(e,t,r){"use strict";var n=function(e,t){if("string"!==typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);var r;return e=Array.isArray(e)?e.map((function(e){return e.trim()})).filter((function(e){return e.length})).join("-"):e.trim(),0===e.length?"":1===e.length?t.pascalCase?e.toUpperCase():e.toLowerCase():(e!==e.toLowerCase()&&(e=function(e){for(var t=!1,r=!1,n=!1,a=0;a0&&(10===arguments[0]?h||(h=!0,f.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?f.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",c.b.errors.UNEXPECTED_ARGUMENT,{}):f.throwError("BigNumber.toString does not accept parameters",c.b.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(d,b(t)):t.match(/^-?[0-9]+$/)?new e(d,b(new u(t))):f.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&v("underflow","BigNumber.from",t),(t>=l||t<=-l)&&v("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(s.j)(r))return e.from(Object(s.i)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var a=r._hex;if(null==a&&"BigNumber"===r.type&&(a=r.hex),"string"===typeof a&&(Object(s.l)(a)||"-"===a[0]&&Object(s.l)(a.substring(1))))return e.from(a)}return f.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function b(e){if("string"!==typeof e)return b(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&f.throwArgumentError("invalid hex","value",e),"0x00"===(e=b(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function m(e){return p.from(b(e))}function g(e){var t=p.from(e).toHexString();return"-"===t[0]?new u("-"+t.substring(3),16):new u(t.substring(2),16)}function v(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),f.throwError(e,c.b.errors.NUMERIC_FAULT,n)}function y(e){return new u(e,36).toString(16)}function A(e){return new u(e,16).toString(36)}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){!function(t,n,a){var i;e.exports=(i=r(123),r(459),void(i.lib.Cipher||function(e){var t=i,r=t.lib,n=r.Base,a=r.WordArray,o=r.BufferedBlockAlgorithm,s=t.enc,c=(s.Utf8,s.Base64),u=t.algo.EvpKDF,f=r.Cipher=o.extend({cfg:n.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?y:g}return function(t){return{encrypt:function(r,n,a){return e(n).encrypt(t,r,n,a)},decrypt:function(r,n,a){return e(n).decrypt(t,r,n,a)}}}}()}),d=(r.StreamCipher=f.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),t.mode={}),l=r.BlockCipherMode=n.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=d.CBC=function(){var t=l.extend();function r(t,r,n){var a=this._iv;if(a){var i=a;this._iv=e}else i=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},b=(r.BlockCipher=f.extend({cfg:f.cfg.extend({mode:h,padding:p}),reset:function(){f.reset.call(this);var e=this.cfg,t=e.iv,r=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else n=r.createDecryptor,this._minBufferSize=1;this._mode&&this._mode.__creator==n?this._mode.init(this,t&&t.words):(this._mode=n.call(r,this,t&&t.words),this._mode.__creator=n)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4}),r.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),m=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;if(r)var n=a.create([1398893684,1701076831]).concat(r).concat(t);else n=t;return n.toString(c)},parse:function(e){var t=c.parse(e),r=t.words;if(1398893684==r[0]&&1701076831==r[1]){var n=a.create(r.slice(2,4));r.splice(0,4),t.sigBytes-=16}return b.create({ciphertext:t,salt:n})}},g=r.SerializableCipher=n.extend({cfg:n.extend({format:m}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var a=e.createEncryptor(r,n),i=a.finalize(t),o=a.cfg;return b.create({ciphertext:i,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),v=(t.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=a.random(8));var i=u.create({keySize:t+r}).compute(e,n),o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,b.create({key:i,iv:o,salt:n})}},y=r.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:v}),encrypt:function(e,t,r,n){var a=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=a.iv;var i=g.encrypt.call(this,e,t,a.key,n);return i.mixIn(a),i},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var a=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);return n.iv=a.iv,g.decrypt.call(this,e,t,a.key,n)}})}()))}()},,function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return rr})),r.d(t,"b",(function(){return or})),r.d(t,"c",(function(){return Ye})),r.d(t,"d",(function(){return We})),r.d(t,"e",(function(){return Qe})),r.d(t,"f",(function(){return Bt}));var n,a,i=r(41),o=r(40),s=r(25),c=r(14),u=r(12),f=r(0),d=r(23),l=r(7),h=r(8),p=r(43),b=r(1),m=r(2),g=r(33),v=r(54),y=Object(f.a)().mark(Xe),A=Object.create,w=Object.defineProperty,x=Object.defineProperties,E=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyDescriptors,C=Object.getOwnPropertyNames,k=Object.getOwnPropertySymbols,B=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,O=function(e,t,r){return t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},M=function(e,t){for(var r in t||(t={}))I.call(t,r)&&O(e,r,t[r]);if(k){var n,a=Object(g.a)(k(t));try{for(a.s();!(n=a.n()).done;){r=n.value;S.call(t,r)&&O(e,r,t[r])}}catch(i){a.e(i)}finally{a.f()}}return e},D=function(e,t){return x(e,_(t))},T=function(e,t,r){return new Promise((function(n,a){var i=function(e){try{s(r.next(e))}catch(t){a(t)}},o=function(e){try{s(r.throw(e))}catch(t){a(t)}},s=function(e){return e.done?n(e.value):Promise.resolve(e.value).then(i,o)};s((r=r.apply(e,t)).next())}))},F=(n=function(e,t){var r=Object.prototype.hasOwnProperty,n="~";function a(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,r,a,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,a||e,o),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new a:delete e._events[t]}function c(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(n=!1)),c.prototype.eventNames=function(){var e,t,a=[];if(0===this._eventsCount)return a;for(t in e=this._events)r.call(e,t)&&a.push(n?t.slice(1):t);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},c.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,o=new Array(i);a)?=?)"),s("XRANGEIDENTIFIERLOOSE","".concat(a[i.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),s("XRANGEIDENTIFIER","".concat(a[i.NUMERICIDENTIFIER],"|x|X|\\*")),s("XRANGEPLAIN","[v=\\s]*(".concat(a[i.XRANGEIDENTIFIER],")(?:\\.(").concat(a[i.XRANGEIDENTIFIER],")(?:\\.(").concat(a[i.XRANGEIDENTIFIER],")(?:").concat(a[i.PRERELEASE],")?").concat(a[i.BUILD],"?)?)?")),s("XRANGEPLAINLOOSE","[v=\\s]*(".concat(a[i.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(a[i.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(a[i.XRANGEIDENTIFIERLOOSE],")(?:").concat(a[i.PRERELEASELOOSE],")?").concat(a[i.BUILD],"?)?)?")),s("XRANGE","^".concat(a[i.GTLT],"\\s*").concat(a[i.XRANGEPLAIN],"$")),s("XRANGELOOSE","^".concat(a[i.GTLT],"\\s*").concat(a[i.XRANGEPLAINLOOSE],"$")),s("COERCE","(^|[^\\d])(\\d{1,".concat(r,"})(?:\\.(\\d{1,").concat(r,"}))?(?:\\.(\\d{1,").concat(r,"}))?(?:$|[^\\d])")),s("COERCERTL",a[i.COERCE],!0),s("LONETILDE","(?:~>?)"),s("TILDETRIM","(\\s*)".concat(a[i.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",s("TILDE","^".concat(a[i.LONETILDE]).concat(a[i.XRANGEPLAIN],"$")),s("TILDELOOSE","^".concat(a[i.LONETILDE]).concat(a[i.XRANGEPLAINLOOSE],"$")),s("LONECARET","(?:\\^)"),s("CARETTRIM","(\\s*)".concat(a[i.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",s("CARET","^".concat(a[i.LONECARET]).concat(a[i.XRANGEPLAIN],"$")),s("CARETLOOSE","^".concat(a[i.LONECARET]).concat(a[i.XRANGEPLAINLOOSE],"$")),s("COMPARATORLOOSE","^".concat(a[i.GTLT],"\\s*(").concat(a[i.LOOSEPLAIN],")$|^$")),s("COMPARATOR","^".concat(a[i.GTLT],"\\s*(").concat(a[i.FULLPLAIN],")$|^$")),s("COMPARATORTRIM","(\\s*)".concat(a[i.GTLT],"\\s*(").concat(a[i.LOOSEPLAIN],"|").concat(a[i.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",s("HYPHENRANGE","^\\s*(".concat(a[i.XRANGEPLAIN],")\\s+-\\s+(").concat(a[i.XRANGEPLAIN],")\\s*$")),s("HYPHENRANGELOOSE","^\\s*(".concat(a[i.XRANGEPLAINLOOSE],")\\s+-\\s+(").concat(a[i.XRANGEPLAINLOOSE],")\\s*$")),s("STAR","(<|>)?=?\\s*\\*"),s("GTE0","^\\s*>=\\s*0.0.0\\s*$"),s("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")})),L=/^[0-9]+$/,U=function(e,t){var r=L.test(e),n=L.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:eG)throw new TypeError("version is longer than ".concat(G," characters"));N("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;var n=t.trim().match(r.loose?z[q.LOOSE]:z[q.FULL]);if(!n)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>H||this.major<0)throw new TypeError("Invalid major version");if(this.minor>H||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>H||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}(),W=function(e,t,r){return new V(e,r).compare(new V(t,r))},Y=function(e,t,r){return 0===W(e,t,r)},J=function(e,t,r){return 0!==W(e,t,r)},X=function(e,t,r){return W(e,t,r)>0},Z=function(e,t,r){return W(e,t,r)>=0},$=function(e,t,r){return W(e,t,r)<0},ee=function(e,t,r){return W(e,t,r)<=0},te=function(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return Y(e,r,n);case"!=":return J(e,r,n);case">":return X(e,r,n);case">=":return Z(e,r,n);case"<":return $(e,r,n);case"<=":return ee(e,r,n);default:throw new TypeError("Invalid operator: ".concat(t))}},re=Symbol("SemVer ANY"),ne=function(){function e(t,r){if(Object(b.a)(this,e),r&&"object"==typeof r||(r={loose:!!r,includePrerelease:!1}),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}N("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===re?this.value="":this.value=this.operator+this.semver.version,N("comp",this)}return Object(m.a)(e,[{key:"parse",value:function(e){var t=this.options.loose?ae[ie.COMPARATORLOOSE]:ae[ie.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new V(r[2],this.options.loose):this.semver=re}},{key:"toString",value:function(){return this.value}},{key:"test",value:function(e){if(N("Comparator.test",e,this.options.loose),this.semver===re||e===re)return!0;if("string"==typeof e)try{e=new V(e,this.options)}catch(t){return!1}return te(e,this.operator,this.semver,this.options)}},{key:"intersects",value:function(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");if(r&&"object"==typeof r||(r={loose:!!r,includePrerelease:!1}),""===this.operator)return""===this.value||new oe(t.value,r).test(this.value);if(""===t.operator)return""===t.value||new oe(this.value,r).test(t.semver);var n=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),a=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),i=this.semver.version===t.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),s=te(this.semver,"<",t.semver,r)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),c=te(this.semver,">",t.semver,r)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return n||a||i&&o||s||c}}],[{key:"ANY",get:function(){return re}}]),e}(),ae=j.re,ie=j.t,oe=function(){function e(t,r){var n=this;if(Object(b.a)(this,e),r&&"object"==typeof r||(r={loose:!!r,includePrerelease:!1}),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof ne)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((function(e){return n.parseRange(e.trim())})).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(t));this.format()}return Object(m.a)(e,[{key:"format",value:function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(e){var t=this,r=this.options.loose;e=e.trim();var n=r?se[ce.HYPHENRANGELOOSE]:se[ce.HYPHENRANGE];e=e.replace(n,Ee(this.options.includePrerelease)),N("hyphen replace",e),e=e.replace(se[ce.COMPARATORTRIM],ue),N("comparator trim",e,se[ce.COMPARATORTRIM]),e=(e=(e=e.replace(se[ce.TILDETRIM],fe)).replace(se[ce.CARETTRIM],de)).split(/\s+/).join(" ");var a=r?se[ce.COMPARATORLOOSE]:se[ce.COMPARATOR];return e.split(" ").map((function(e){return he(e,t.options)})).join(" ").split(/\s+/).map((function(e){return xe(e,t.options)})).filter(this.options.loose?function(e){return!!e.match(a)}:function(){return!0}).map((function(e){return new ne(e,t.options)}))}},{key:"intersects",value:function(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((function(e){return le(e,r)&&t.set.some((function(t){return le(t,r)&&e.every((function(e){return t.every((function(t){return e.intersects(t,r)}))}))}))}))}},{key:"test",value:function(e){if(!e)return!1;if("string"==typeof e)try{e=new V(e,this.options)}catch(t){return!1}for(var t=0;t=".concat(r,".").concat(a,".0").concat(n," <").concat(r,".").concat(+a+1,".0-0"):">=".concat(r,".").concat(a,".0").concat(n," <").concat(+r+1,".0.0-0"):o?(N("replaceCaret pr",o),s="0"===r?"0"===a?">=".concat(r,".").concat(a,".").concat(i,"-").concat(o," <").concat(r,".").concat(a,".").concat(+i+1,"-0"):">=".concat(r,".").concat(a,".").concat(i,"-").concat(o," <").concat(r,".").concat(+a+1,".0-0"):">=".concat(r,".").concat(a,".").concat(i,"-").concat(o," <").concat(+r+1,".0.0-0")):(N("no pr"),s="0"===r?"0"===a?">=".concat(r,".").concat(a,".").concat(i).concat(n," <").concat(r,".").concat(a,".").concat(+i+1,"-0"):">=".concat(r,".").concat(a,".").concat(i).concat(n," <").concat(r,".").concat(+a+1,".0-0"):">=".concat(r,".").concat(a,".").concat(i," <").concat(+r+1,".0.0-0")),N("caret return",s),s}))},ye=function(e,t){return N("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return Ae(e,t)})).join(" ")},Ae=function(e,t){e=e.trim();var r=t.loose?se[ce.XRANGELOOSE]:se[ce.XRANGE];return e.replace(r,(function(r,n,a,i,o,s){N("xRange",e,r,n,a,i,o,s);var c=pe(a),u=c||pe(i),f=u||pe(o),d=f;return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(i=0),o=0,">"===n?(n=">=",u?(a=+a+1,i=0,o=0):(i=+i+1,o=0)):"<="===n&&(n="<",u?a=+a+1:i=+i+1),"<"===n&&(s="-0"),r="".concat(n+a,".").concat(i,".").concat(o).concat(s)):u?r=">=".concat(a,".0.0").concat(s," <").concat(+a+1,".0.0-0"):f&&(r=">=".concat(a,".").concat(i,".0").concat(s," <").concat(a,".").concat(+i+1,".0-0")),N("xRange return",r),r}))},we=function(e,t){return N("replaceStars",e,t),e.trim().replace(se[ce.STAR],"")},xe=function(e,t){return N("replaceGTE0",e,t),e.trim().replace(se[t.includePrerelease?ce.GTE0PRE:ce.GTE0],"")},Ee=function(e){return function(t,r,n,a,i,o,s,c,u,f,d,l,h){return"".concat(r=pe(n)?"":pe(a)?">=".concat(n,".0.0").concat(e?"-0":""):pe(i)?">=".concat(n,".").concat(a,".0").concat(e?"-0":""):o?">=".concat(r):">=".concat(r).concat(e?"-0":"")," ").concat(c=pe(u)?"":pe(f)?"<".concat(+u+1,".0.0-0"):pe(d)?"<".concat(u,".").concat(+f+1,".0-0"):l?"<=".concat(u,".").concat(f,".").concat(d,"-").concat(l):e?"<".concat(u,".").concat(f,".").concat(+d+1,"-0"):"<=".concat(c)).trim()}},_e=function(e,t,r){for(var n=0;n0){var i=e[a].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0},Ce=function(e,t,r){try{t=new oe(t,r)}catch(n){return!1}return t.test(e)},ke=R.MAX_LENGTH,Be=j.re,Ie=j.t,Se=function(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof V)return e;if("string"!=typeof e||e.length>ke||!(t.loose?Be[Ie.LOOSE]:Be[Ie.FULL]).test(e))return null;try{return new V(e,t)}catch(r){return null}},Oe=j.re,Me=j.t,De=function(e,t){if(e instanceof V)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=Oe[Me.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),Oe[Me.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Oe[Me.COERCERTL].lastIndex=-1}else r=e.match(Oe[Me.COERCE]);return null===r?null:Se("".concat(r[2],".").concat(r[3]||"0",".").concat(r[4]||"0"),t)};function Te(e){return String.fromCharCode(parseInt(e.slice(1),16))}function Fe(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))}function Re(e){return function(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,Te))}(JSON.stringify(e))}function Pe(e){return JSON.parse(function(e){return decodeURIComponent(Array.from(atob(e),Fe).join(""))}(e))}function Ne(e){return"undefined"==typeof e}function je(e){return function(e){return null===e}(e)||Ne(e)}function Le(e){if(!e)return!0;for(var t in e)if(Object.hasOwnProperty.call(e,t))return!1;return!0}var Ue={};function Qe(e,t){return Object.assign(Ue,t),e}var Ge={"magic-sdk":"magic-sdk","@magic-sdk/react-native":"magic-sdk-rn","@magic-sdk/react-native-bare":"magic-sdk-rn-bare","@magic-sdk/react-native-expo":"magic-sdk-rn-expo"},He=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n){var a;return Object(b.a)(this,r),(a=t.call(this,"Magic SDK Error: [".concat(e,"] ").concat(n))).code=e,a.rawMessage=n,a.__proto__=Error,Object.setPrototypeOf(Object(d.a)(a),r.prototype),a}return Object(m.a)(r)}(Object(p.a)(Error)),ze=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e){var n;Object(b.a)(this,r),(n=t.call(this)).__proto__=Error;var a=Number(null==e?void 0:e.code);return n.rawMessage=(null==e?void 0:e.message)||"Internal error",n.code=function(e){return!je(e)&&"number"==typeof e&&Object.values(v.e).includes(e)}(a)?a:v.e.InternalError,n.message="Magic RPC Error: [".concat(n.code,"] ").concat(n.rawMessage),n.data=(null==e?void 0:e.data)||void 0,Object.setPrototypeOf(Object(d.a)(n),r.prototype),n}return Object(m.a)(r)}(Object(p.a)(Error)),qe=function(){function e(t,r){Object(b.a)(this,e),this.code=t,this.rawMessage=r,this.message="Magic SDK Warning: [".concat(t,"] ").concat(r)}return Object(m.a)(e,[{key:"log",value:function(){console.warn(this.message)}}]),e}(),Ke=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n,a,i){var o;return Object(b.a)(this,r),(o=t.call(this,"Magic Extension Error (".concat(e.name,"): [").concat(n,"] ").concat(a))).code=n,o.rawMessage=a,o.data=i,o.__proto__=Error,Object.setPrototypeOf(Object(d.a)(o),r.prototype),o}return Object(m.a)(r)}(Object(p.a)(Error)),Ve=function(){function e(t,r,n){Object(b.a)(this,e),this.code=r,this.rawMessage=n,this.message="Magic Extension Warning (".concat(t.name,"): [").concat(r,"] ").concat(n)}return Object(m.a)(e,[{key:"log",value:function(){console.warn(this.message)}}]),e}();function We(){return new He(v.f.ModalNotReady,"Modal is not ready.")}function Ye(){return new qe(v.g.DuplicateIframe,"Duplicate iframes found.")}function Je(e){var t=e.method,r=e.removalVersions,n=e.useInstead,a=r[Ue.sdkName],i=n?" Use `".concat(n,"` instead."):"",o="`".concat(t,"` will be removed from `").concat(Ue.sdkName,"` in version `").concat(a,"`.").concat(i);return new qe(v.g.DeprecationNotice,o)}function Xe(){var e;return Object(f.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=0;case 1:if(!(e1&&void 0!==arguments[1]?arguments[1]:[],method:e,jsonrpc:"2.0",id:$e()})}var at=function(){function e(t){Object(b.a)(this,e),t instanceof e?(this._jsonrpc=t.payload.jsonrpc,this._id=t.payload.id,this._result=t.payload.result,this._error=t.payload.error):function(e){return!je(e)&&!Ne(e.jsonrpc)&&!Ne(e.id)&&(!Ne(e.result)||!Ne(e.error))}(t)?(this._jsonrpc=t.jsonrpc,this._id=t.id,this._result=t.result,this._error=t.error):(this._jsonrpc=t.jsonrpc,this._id=t.id,this._result=void 0,this._error=void 0)}return Object(m.a)(e,[{key:"applyError",value:function(e){return this._error=e,this}},{key:"applyResult",value:function(e){return this._result=e,this}},{key:"hasError",get:function(){return"undefined"!=typeof this._error&&null!==this._error}},{key:"hasResult",get:function(){return"undefined"!=typeof this._result}},{key:"payload",get:function(){return{jsonrpc:this._jsonrpc,id:this._id,result:this._result,error:this._error}}}]),e}(),it=function(e,t,r){return r=null!=e?A(B(e)):{},function(e,t,r,n){if(t&&"object"==typeof t||"function"==typeof t){var a,i=Object(g.a)(C(t));try{var o=function(){var i=a.value;!I.call(e,i)&&i!==r&&w(e,i,{get:function(){return t[i]},enumerable:!(n=E(t,i))||n.enumerable})};for(i.s();!(a=i.n()).done;)o()}catch(s){i.e(s)}finally{i.f()}}return e}(!t&&e&&e.__esModule?r:w(r,"default",{value:e,enumerable:!0}),e)}(F()),ot=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(){return Object(b.a)(this,r),t.apply(this,arguments)}return Object(m.a)(r)}(it.default);function st(){var e=new ot;return{emitter:e,createChainingEmitterMethod:function(t,r){return function(){for(var n=arguments.length,a=new Array(n),i=0;i=t}(Ue.version,19))throw new Error("loginWithMagicLink() is deprecated for this package, please utlize a passcode method like loginWithSMS or loginWithEmailOTP instead.");Je({method:"auth.loginWithMagicLink()",removalVersions:pt,useInstead:t?"@magic-ext/auth auth.loginWithEmailOTP()":"@magic-ext/auth auth.loginWithMagicLink()"}).log();var r=e.email,n=e.showUI,a=void 0===n||n,i=e.redirectURI,o=nt(this.sdk.testMode?v.d.LoginWithMagicLinkTestMode:v.d.LoginWithMagicLink,[{email:r,showUI:a,redirectURI:i}]);return this.request(o)}},{key:"loginWithSMS",value:function(e){Je({method:"auth.loginWithSMS()",removalVersions:pt,useInstead:"@magic-ext/auth auth.loginWithSMS()"}).log();var t=e.phoneNumber,r=nt(this.sdk.testMode?v.d.LoginWithSmsTestMode:v.d.LoginWithSms,[{phoneNumber:t,showUI:!0}]);return this.request(r)}},{key:"loginWithEmailOTP",value:function(e){var t=this;Je({method:"auth.loginWithEmailOTP()",removalVersions:pt,useInstead:"@magic-ext/auth auth.loginWithEmailOTP()"}).log();var r=e.email,n=e.showUI,a=nt(this.sdk.testMode?v.d.LoginWithEmailOTPTestMode:v.d.LoginWithEmailOTP,[{email:r,showUI:n}]);if(!n){var i=this.request(a);return i&&(i.on("verify-email-otp",(function(e){t.createIntermediaryEvent("verify-email-otp",a.id)(e)})),i.on("cancel",(function(){t.createIntermediaryEvent("cancel",a.id)()}))),i}return this.request(a)}},{key:"loginWithCredential",value:function(e){Je({method:"auth.loginWithCredential()",removalVersions:pt,useInstead:"@magic-ext/auth auth.loginWithCredential()"}).log();var t=null!=e?e:"";if(!e&&"web"===Ue.platform){t=window.location.search;var r=window.location.origin+window.location.pathname;window.history.replaceState(null,"",r)}var n=nt(this.sdk.testMode?v.d.LoginWithCredentialTestMode:v.d.LoginWithCredential,[t]);return this.request(n)}},{key:"setAuthorizationToken",value:function(e){Je({method:"auth.setAuthorizationToken()",removalVersions:pt,useInstead:"@magic-ext/auth auth.setAuthorizationToken()"}).log();var t=nt(v.d.SetAuthorizationToken,[{jwt:e}]);return this.request(t)}},{key:"updateEmailWithUI",value:function(e){Je({method:"auth.updateEmailWithUI()",removalVersions:pt,useInstead:"@magic-ext/auth auth.updateEmailWithUI()"}).log();var t=e.email,r=e.showUI,n=void 0===r||r,a=nt(this.sdk.testMode?v.d.UpdateEmailTestMode:v.d.UpdateEmail,[{email:t,showUI:n}]);return this.request(a)}},{key:"updatePhoneNumberWithUI",value:function(){Je({method:"auth.updatePhoneNumberWithUI()",removalVersions:pt,useInstead:"@magic-ext/auth auth.updatePhoneNumberWithUI()"}).log();var e=nt(this.sdk.testMode?v.d.UpdatePhoneNumberTestMode:v.d.UpdatePhoneNumber);return this.request(e)}}]),r}(lt),mt={};function gt(e){var t=this;return function(){for(var r=arguments.length,n=new Array(r),a=0;a 1.0 and are not supported by the Magic web3 provider. Please use an async method instead.");return n.log(),new at(e).applyError({code:-32603,message:n.rawMessage}).payload}this.sendAsync(e,t)}},{key:"enable",value:function(){var e=nt(v.d.Login);return this.request(e)}},{key:"request",value:function(e){return this.prefixPayloadMethodForTestMode(e),Object(i.a)(Object(o.a)(r.prototype),"request",this).call(this,e)}},{key:"prefixPayloadMethodForTestMode",value:function(e){this.sdk.testMode&&(e.method="".concat("testMode/eth/").concat(e.method))}}]),r}(lt),Wt=["request","overlay","sdk"];var Yt=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(){var e;Object(b.a)(this,r),(e=t.call(this,void 0)).__sdk_access_field_descriptors__=new Map,e.__is_initialized__=!1,e.utils={createPromiEvent:ft,isPromiEvent:ut,encodeJSON:Re,decodeJSON:Pe,createJsonRpcRequestPayload:nt,standardizeJsonRpcRequestPayload:rt,storage:mt};var n=[Object(d.a)(e)].concat(Object(c.a)(function(e){for(var t=Object.getPrototypeOf(e),r=[t];t!==lt.prototype;)t=Object.getPrototypeOf(t),r.push(t);return r}(Object(d.a)(e))));return Wt.forEach((function(t){var r=n.map((function(e){return Object.getOwnPropertyDescriptor(e,t)})),a=r.findIndex((function(e){return!!e})),i=a>0,o=r[a];o&&(e.__sdk_access_field_descriptors__.set(t,{descriptor:o,isPrototypeField:i}),Object.defineProperty(Object(d.a)(e),t,{configurable:!0,get:function(){throw function(e){return new He(v.f.ExtensionNotInitialized,"Extensions must be initialized with a Magic SDK instance before `Extension.".concat(e,"` can be accessed. Do not invoke `Extension.").concat(e,"` inside an extension constructor."))}(t)}}))})),e}return Object(m.a)(r,[{key:"init",value:function(e){var t=this;this.__is_initialized__||(Wt.forEach((function(e){if(t.__sdk_access_field_descriptors__.has(e)){var r=t.__sdk_access_field_descriptors__.get(e),n=r.descriptor;r.isPrototypeField?delete t[e]:Object.defineProperty(t,e,n)}})),this.sdk=e,this.__is_initialized__=!0)}},{key:"createDeprecationWarning",value:function(e){var t=e.method,r=e.removalVersion,n=e.useInstead,a=n?" Use `".concat(n,"` instead."):"",i="`".concat(t,"` will be removed from this Extension in version `").concat(r,"`.").concat(a);return new Ve(this,"DEPRECATION_NOTICE",i)}},{key:"createWarning",value:function(e,t){return new Ve(this,e,t)}},{key:"createError",value:function(e,t,r){return new Ke(this,e,t,r)}}]),r}(lt),Jt=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(){return Object(b.a)(this,r),t.apply(this,arguments)}return Object(m.a)(r)}(Yt),Xt=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(){return Object(b.a)(this,r),t.apply(this,arguments)}return Object(m.a)(r)}(Yt);Xt.Internal=Jt,Xt.Anonymous="anonymous extension";var Zt=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(){return Object(b.a)(this,r),t.apply(this,arguments)}return Object(m.a)(r,[{key:"purchase",value:function(e){var t=nt(v.d.NFTPurchase,[e]);return this.request(t)}},{key:"checkout",value:function(e){return T(this,null,Object(f.a)().mark((function t(){var r;return Object(f.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=nt(v.d.NFTCheckout,[e]),t.abrupt("return",this.request(r));case 2:case"end":return t.stop()}}),t,this)})))}}]),r}(lt);function $t(e){return!e.compat||null==e.compat[Ue.sdkName]||("string"==typeof e.compat[Ue.sdkName]?Ce(De(Ue.version),e.compat[Ue.sdkName]):!!e.compat[Ue.sdkName])}function er(e){var t,r=this,n=null!=(t=null==e?void 0:e.extensions)?t:[],a={},i=[];if(Array.isArray(n)?n.forEach((function(e){$t(e)?(e.init(r),(e.name||e.name!==Xt.Anonymous)&&(r[e.name]=e),e instanceof Xt.Internal&&(Le(e.config)||(a[e.name]=e.config))):i.push(e)})):Object.keys(n).forEach((function(e){if($t(n[e])){n[e].init(r);var t=n[e];r[e]=t,t instanceof Xt.Internal&&(Le(t.config)||(a[n[e].name]=t.config))}else i.push(n[e])})),i.length)throw function(e){var t="Some extensions are incompatible with `".concat(Ue.sdkName,"@").concat(Ue.version,"`:");return e.filter((function(e){return"undefined"!=typeof e.compat&&null!==e.compat})).forEach((function(e){var r=e.compat[Ue.sdkName];"string"==typeof r?t+="\n - Extension `".concat(e.name,"` supports version(s) `").concat(r,"`"):r||(t+="\n - Extension `".concat(e.name,"` does not support ").concat(Ue.platform," environments."))})),new He(v.f.IncompatibleExtensions,t)}(i);return a}var tr=function(){function e(t,r){var n,a;if(Object(b.a)(this,e),this.apiKey=t,!t)throw new He(v.f.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.");"react-native"===Ue.platform&&(null==r?void 0:r.endpoint)&&new qe(v.g.ReactNativeEndpointConfiguration,"CUSTOM DOMAINS ARE NOT SUPPORTED WHEN USING MAGIC SDK WITH REACT NATIVE! The `endpoint` parameter SHOULD NOT be provided. The Magic `')),this.torusAlertContainer=V('
'),this.torusAlertContainer.style.display="none",this.torusAlertContainer.style.setProperty("z-index",this.alertZIndex.toString()),(F=window.document.createElement("link")).setAttribute("rel","stylesheet"),F.setAttribute("type","text/css"),F.setAttribute("href","".concat(B,"/css/widget.css")),this.styleLink=F,R=this.whiteLabel||{},P=R.defaultLanguage,N=void 0===P?ae():P,j=R.customTranslations,L=void 0===j?{}:j,U=k()(q.translations,L),Q=U[N]||q.translations[ae()],this.embedTranslations=Q.embed,H=function(){var e=Object(b.a)(Object(p.a)().mark((function e(){return Object(p.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,J();case 2:return e.abrupt("return",new Promise((function(e,t){X.torusIframe.onload=Object(b.a)(Object(p.a)().mark((function r(){var n;return Object(p.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:X._setupWeb3(),(n=X.communicationMux.getStream("init_stream")).on("data",(function(r){var n=r.name,a=r.data,i=r.error;"init_complete"===n&&a.success?(X.isInitialized=!0,X._displayIframe(X.isIframeFullScreen),e(void 0)):i&&t(new Error(i))})),n.write({name:"init_stream",data:{enabledVerifiers:s,loginConfig:d,whiteLabel:X.whiteLabel,buttonPosition:X.buttonPosition,torusWidgetVisibility:X.torusWidgetVisibility,apiKey:X.apiKey,skipTKey:A,network:u}});case 4:case"end":return r.stop()}}),r)}))),window.document.head.appendChild(X.styleLink),window.document.body.appendChild(X.torusIframe),window.document.body.appendChild(X.torusAlertContainer)})));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),"production"!==n||!g.check){e.next=56;break}return z="".concat(B,"/popup"),e.next=39,fetch(z,{cache:"reload"});case 39:if("max-age=3600"===(K=e.sent).headers.get("Cache-Control")){e.next=42;break}throw new Error("Unexpected Cache-Control headers, got ".concat(K.headers.get("Cache-Control")));case 42:return e.next=44,K.text();case 44:if(W=e.sent,Y=he({algorithms:["sha384"]},W),Z.info(Y,"integrity"),Y!==g.hash){e.next=52;break}return e.next=50,H();case 50:e.next=54;break;case 52:throw this.clearInit(),new Error("Integrity check failed");case 54:e.next=58;break;case 56:return e.next=58,H();case 58:return e.abrupt("return",void 0);case 59:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"login",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.verifier,r=void 0===t?"":t,n=e.login_hint,a=void 0===n?"":n;if(!this.isInitialized)throw new Error("Call init() first");return this.requestedVerifier=r,this.loginHint=a,this.ethereum.enable()}},{key:"logout",value:function(){var e=this;return new Promise((function(t,r){if(e.isLoggedIn){e.communicationMux.getStream("logout").write({name:"logOut"});var n=e.communicationMux.getStream("status");Y(n,"data",(function(n){n.loggedIn?r(new Error("Some Error Occured")):(e.isLoggedIn=!1,e.currentVerifier="",e.requestedVerifier="",t())}))}else r(new Error("User has not logged in yet"))}))}},{key:"cleanUp",value:function(){var e=Object(b.a)(Object(p.a)().mark((function e(){return Object(p.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isLoggedIn){e.next=3;break}return e.next=3,this.logout();case 3:this.clearInit();case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"clearInit",value:function(){function e(e){return e instanceof Element||e instanceof HTMLDocument}e(this.styleLink)&&window.document.body.contains(this.styleLink)&&(this.styleLink.remove(),this.styleLink=void 0),e(this.torusIframe)&&window.document.body.contains(this.torusIframe)&&(this.torusIframe.remove(),this.torusIframe=void 0),e(this.torusAlertContainer)&&window.document.body.contains(this.torusAlertContainer)&&(this.torusAlert=void 0,this.torusAlertContainer.remove(),this.torusAlertContainer=void 0),this.isInitialized=!1}},{key:"hideTorusButton",value:function(){this.torusWidgetVisibility=!1,this._sendWidgetVisibilityStatus(!1),this._displayIframe()}},{key:"showTorusButton",value:function(){this.torusWidgetVisibility=!0,this._sendWidgetVisibilityStatus(!0),this._displayIframe()}},{key:"setProvider",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.host,n=void 0===r?"mainnet":r,a=t.chainId,i=void 0===a?null:a,o=t.networkName,s=void 0===o?"":o,c=v()(t,we);return new Promise((function(t,r){var a=e.communicationMux.getStream("provider_change");Y(a,"data",(function(e){var n=e.data,a=n.err,i=n.success;Z.info(e),a?r(a):i?t():r(new Error("some error occured"))}));var o=re();e._handleWindow(o,{target:"_blank",features:se}),a.write({name:"show_provider_change",data:{network:Ee({host:n,chainId:i,networkName:s},c),preopenInstanceId:o,override:!1}})}))}},{key:"showWallet",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.communicationMux.getStream("show_wallet"),a=e?"/".concat(e):"";n.write({name:"show_wallet",data:{path:a}});Y(n,"data",(function(e){if("show_wallet_instance"===e.name){var n=e.data.instanceId,i=new URL("".concat(t.torusUrl,"/wallet").concat(a));i.searchParams.append("integrity","true"),i.searchParams.append("instanceId",n),Object.keys(r).forEach((function(e){i.searchParams.append(e,r[e])})),t.dappStorageKey&&(i.hash="#dappStorageKey=".concat(t.dappStorageKey)),new pe({url:i,features:"directories=0,titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=740,width=1315"}).open()}}))}},{key:"getPublicAddress",value:function(){var e=Object(b.a)(Object(p.a)().mark((function e(t){var r,n,a,i,o,s,c,u,f,d,l,h;return Object(p.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.verifier,n=t.verifierId,a=t.isExtended,i=void 0!==a&&a,q.supportedVerifierList.includes(r)&&U[r]){e.next=3;break}throw new Error("Unsupported verifier");case 3:return e.next=5,this.nodeDetailManager.getNodeDetails({verifier:r,verifierId:n});case 5:return o=e.sent,s=o.torusNodeEndpoints,c=o.torusNodePub,u=r,f=U[r],e.prev=10,e.next=13,this.torusJs.getUserTypeAndAddress(s,c,{verifier:u,verifierId:n});case 13:if("v1"!==(d=e.sent).typeOfUser){e.next=18;break}if(i){e.next=17;break}return e.abrupt("return",d.address);case 17:return e.abrupt("return",d);case 18:return e.next=20,this.torusJs.getUserTypeAndAddress(s,c,{verifier:f,verifierId:n},!0);case 20:if(l=e.sent,i){e.next=23;break}return e.abrupt("return",l.address);case 23:return e.abrupt("return",l);case 26:if(e.prev=26,e.t0=e.catch(10),null===e.t0||void 0===e.t0||!e.t0.message.includes("Verifier + VerifierID has not yet been assigned")){e.next=35;break}return e.next=31,this.torusJs.getUserTypeAndAddress(s,c,{verifier:f,verifierId:n},!0);case 31:if(h=e.sent,i){e.next=34;break}return e.abrupt("return",h.address);case 34:return e.abrupt("return",h);case 35:throw e.t0;case 36:case"end":return e.stop()}}),e,this,[[10,26]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getUserInfo",value:function(e){var t=this;return new Promise((function(r,n){if(t.isLoggedIn){var a=t.communicationMux.getStream("user_info_access");a.write({name:"user_info_access_request"});Y(a,"data",(function(a){var i=a.name,o=a.data,s=o.approved,c=o.payload,u=o.rejected,f=o.newRequest;if("user_info_access_response"===i)if(s)r(c);else if(u)n(new Error("User rejected the request"));else if(f){var d=t.communicationMux.getStream("user_info");Y(d,"data",(function(e){"user_info_response"===e.name&&(e.data.approved?r(e.data.payload):n(new Error("User rejected the request")))}));var l=re();t._handleWindow(l,{target:"_blank",features:se}),d.write({name:"user_info_request",data:{message:e,preopenInstanceId:l}})}}))}else n(new Error("User has not logged in yet"))}))}},{key:"initiateTopup",value:function(e,t){var r=this;return new Promise((function(n,a){if(r.isInitialized){var i=function(e,t){var r={};if(!e)return{errors:r,isValid:!0};if(e&&!ee[e])return r.provider="Invalid Provider",{errors:r,isValid:0===Object.keys(r).length};var n=ee[e],a=t||{};if(a.fiatValue){var i=+parseFloat(a.fiatValue.toString())||0;in.maxOrderValue&&n.enforceMax&&(r.fiatValue="Requested amount is higher than supported")}return a.selectedCurrency&&!n.validCurrencies.includes(a.selectedCurrency)&&(r.selectedCurrency="Unsupported currency"),a.selectedCryptoCurrency&&!n.validCryptoCurrencies.includes(a.selectedCryptoCurrency)&&(r.selectedCryptoCurrency="Unsupported cryptoCurrency"),{errors:r,isValid:0===Object.keys(r).length}}(e,t),o=i.errors;if(!i.isValid)return void a(new Error(JSON.stringify(o)));var s=r.communicationMux.getStream("topup");Y(s,"data",(function(e){"topup_response"===e.name&&(e.data.success?n(e.data.success):a(new Error(e.data.error)))}));var c=re();r._handleWindow(c),s.write({name:"topup_request",data:{provider:e,params:t,preopenInstanceId:c}})}else a(new Error("Torus is not initialized yet"))}))}},{key:"loginWithPrivateKey",value:function(){var t=Object(b.a)(Object(p.a)().mark((function t(r){var n,a,i=this;return Object(p.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.privateKey,a=r.userInfo,t.abrupt("return",new Promise((function(t,r){if(i.isInitialized){if(32!==e.from(n,"hex").length)return void r(new Error("Invalid private key, Please provide a 32 byte valid secp25k1 private key"));var o=i.communicationMux.getStream("login_with_private_key");Y(o,"data",(function(e){"login_with_private_key_response"===e.name&&(e.data.success?t(e.data.success):r(new Error(e.data.error)))})),o.write({name:"login_with_private_key_request",data:{privateKey:n,userInfo:a}})}else r(new Error("Torus is not initialized yet"))})));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"showWalletConnectScanner",value:function(){var e=Object(b.a)(Object(p.a)().mark((function e(){var t=this;return Object(p.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.useWalletConnect){e.next=2;break}throw new Error("Set `useWalletConnect` as true in init function options to use wallet connect scanner");case 2:return e.abrupt("return",new Promise((function(e,r){if(t.isLoggedIn){var n=t.communicationMux.getStream("wallet_connect_stream");Y(n,"data",(function(n){"wallet_connect_stream_res"===n.name&&(n.data.success?e(n.data.success):r(new Error(n.data.error)),t._displayIframe())})),n.write({name:"wallet_connect_stream_req"}),t._displayIframe(!0)}else r(new Error("User has not logged in yet"))})));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_handleWindow",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.url,n=t.target,a=t.features;if(e){var i=this.communicationMux.getStream("window"),o=new URL(r||"".concat(this.torusUrl,"/redirect?preopenInstanceId=").concat(e));this.dappStorageKey&&(o.hash?o.hash+="&dappStorageKey=".concat(this.dappStorageKey):o.hash="#dappStorageKey=".concat(this.dappStorageKey));var s=new pe({url:o,target:n,features:a});if(s.open(),!s.window)return void this._createPopupBlockAlert(e,o.href);i.write({name:"opened_window",data:{preopenInstanceId:e}});var c=function t(r){var n=r.preopenInstanceId,a=r.close;n===e&&a&&(s.close(),i.removeListener("data",t))};i.on("data",c),s.once("close",(function(){i.write({data:{preopenInstanceId:e,closed:!0}}),i.removeListener("data",c)}))}}},{key:"_setEmbedWhiteLabel",value:function(e){var t=(this.whiteLabel||{}).theme;if(t){var r=t.isDark,n=void 0!==r&&r,a=t.colors,i=void 0===a?{}:a;n&&e.classList.add("torus-dark"),i.torusBrand1&&e.style.setProperty("--torus-brand-1",i.torusBrand1),i.torusGray2&&e.style.setProperty("--torus-gray-2",i.torusGray2)}}},{key:"_getLogoUrl",value:function(){var e,t,r,n,a="".concat(this.torusUrl,"/images/torus_icon-blue.svg");null!==(e=this.whiteLabel)&&void 0!==e&&null!==(t=e.theme)&&void 0!==t&&t.isDark?a=(null===(r=this.whiteLabel)||void 0===r?void 0:r.logoLight)||a:a=(null===(n=this.whiteLabel)||void 0===n?void 0:n.logoDark)||a;return a}},{key:"_sendWidgetVisibilityStatus",value:function(e){this.communicationMux.getStream("torus-widget-visibility").write({data:e})}},{key:"_displayIframe",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={};if(e)t.display="block",t.width="100%",t.height="100%",t.top="0px",t.right="0px",t.left="0px",t.bottom="0px";else switch(t.display=this.torusWidgetVisibility?"block":"none",t.height="70px",t.width="70px",this.buttonPosition){case H.TOP_LEFT:t.top="0px",t.left="0px",t.right="auto",t.bottom="auto";break;case H.TOP_RIGHT:t.top="0px",t.right="0px",t.left="auto",t.bottom="auto";break;case H.BOTTOM_RIGHT:t.bottom="0px",t.right="0px",t.top="auto",t.left="auto";break;case H.BOTTOM_LEFT:default:t.bottom="0px",t.left="0px",t.top="auto",t.right="auto"}Object.assign(this.torusIframe.style,t),this.isIframeFullScreen=e}},{key:"_setupWeb3",value:function(){var e=this;Z.info("setupWeb3 running");var t=new E.a({name:"embed_metamask",target:"iframe_metamask",targetWindow:this.torusIframe.contentWindow,targetOrigin:new URL(this.torusUrl).origin}),r=new E.a({name:"embed_comm",target:"iframe_comm",targetWindow:this.torusIframe.contentWindow,targetOrigin:new URL(this.torusUrl).origin}),n=new de(t),a=function(e){var t=n[e];n[e]=function(e){if(e&&"eth_requestAccounts"===e)return n.enable();for(var r=arguments.length,a=new Array(r>1?r-1:0),i=1;i0){var o=function(){if(""!==e.requestedVerifier&&e.currentVerifier!==e.requestedVerifier){var n=e.requestedVerifier;e.logout().then((function(a){e.requestedVerifier=n,e._showLoginPopup(!0,t,r)})).catch((function(e){return r(e)}))}else t(i)};e.isLoggedIn?o():e.isLoginCallback=o}else e._showLoginPopup(!0,t,r)}))}))},n.tryPreopenHandle=function(t,r){var a=t;if(!Array.isArray(a)&&ke.includes(a.method)){var i=re();e._handleWindow(i,{target:"_blank",features:ce}),a.preopenInstanceId=i}n._rpcEngine.handle(a,r)};var i=new Proxy(n,{deleteProperty:function(){return!0}});this.ethereum=i;var o=Object(E.g)(r);this.communicationMux=o,o.getStream("window").on("data",(function(t){"create_window"===t.name&&e._createPopupBlockAlert(t.data.preopenInstanceId,t.data.url)})),o.getStream("widget").on("data",(function(t){var r=t.data;e._displayIframe(r)})),o.getStream("status").on("data",(function(t){t.loggedIn?(e.isLoggedIn=t.loggedIn,e.currentVerifier=t.verifier):e._displayIframe(),e.isLoginCallback&&(e.isLoginCallback(),delete e.isLoginCallback)})),this.provider=i,this.provider.shouldSendMetadata&&function(e){Ae.apply(this,arguments)}(this.provider._rpcEngine),n._initializeState(),Z.debug("Torus - injected provider")}},{key:"_showLoginPopup",value:function(e,t,r){var n=this,a=function(e){var a=e.err,i=e.selectedAddress;a?(Z.error(a),r&&r(a)):t&&t([i]),n.isIframeFullScreen&&n._displayIframe()},i=this.communicationMux.getStream("oauth");if(this.requestedVerifier){Y(i,"data",a);var o=re();this._handleWindow(o),i.write({name:"oauth",data:{calledFromEmbed:e,verifier:this.requestedVerifier,preopenInstanceId:o,login_hint:this.loginHint}})}else this._displayIframe(!0),Y(i,"data",a),i.write({name:"oauth_modal",data:{calledFromEmbed:e}})}},{key:"_createPopupBlockAlert",value:function(e,t){var r=this,n=this._getLogoUrl(),a=V('
'+'')+"
"+'

'.concat(this.embedTranslations.actionRequired,"

")+'

'.concat(this.embedTranslations.pendingAction,"

")+"
"),i=V('")),o=V('
');o.appendChild(i),a.appendChild(o);this._setEmbedWhiteLabel(a);K((function(){r.torusAlertContainer.style.display="block",r.torusAlertContainer.appendChild(a)})),K((function(){i.addEventListener("click",(function(){r._handleWindow(e,{url:t,target:"_blank",features:ce}),a.remove(),0===r.torusAlertContainer.children.length&&(r.torusAlertContainer.style.display="none")}))}))}}]),t}()}.call(this,r(15).Buffer)},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n=0||(a[r]=e[r]);return a},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(3504),a=r(3523);e.exports={packageInit:function(e,t){if(t=Array.prototype.slice.call(t),!e)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(e,"currentProvider",{get:function(){return e._provider},set:function(t){return e.setProvider(t)},enumerable:!0,configurable:!0}),t[0]&&t[0]._requestManager?e._requestManager=t[0]._requestManager:e._requestManager=new n.Manager(t[0],t[1]),e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers,e._provider=e._requestManager.provider,e.setProvider||(e.setProvider=function(t,r){return e._requestManager.setProvider(t,r),e._provider=e._requestManager.provider,!0}),e.setRequestManager=function(t){e._requestManager=t,e._provider=t.provider},e.BatchRequest=n.BatchManager.bind(null,e._requestManager),e.extend=a(e)},addProviders:function(e){e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers}}},function(e,t,r){"use strict";var n=r(609).callbackify,a=r(288).errors,i=r(1503),o=r(3517),s=r(3518),c=function e(t,r){this.provider=null,this.providers=e.providers,this.setProvider(t,r),this.subscriptions=new Map};c.givenProvider=s,c.providers={WebsocketProvider:r(3519),HttpProvider:r(3521),IpcProvider:r(3522)},c.prototype.setProvider=function(e,t){var r=this;if(e&&"string"===typeof e&&this.providers)if(/^http(s)?:\/\//i.test(e))e=new this.providers.HttpProvider(e);else if(/^ws(s)?:\/\//i.test(e))e=new this.providers.WebsocketProvider(e);else if(e&&"object"===typeof t&&"function"===typeof t.connect)e=new this.providers.IpcProvider(e,t);else if(e)throw new Error("Can't autodetect provider for \""+e+'"');if(this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=e||null,this.provider&&this.provider.on){"function"===typeof e.request?this.provider.on("message",(function(e){if(e&&"eth_subscription"===e.type&&e.data){var t=e.data;t.subscription&&r.subscriptions.has(t.subscription)&&r.subscriptions.get(t.subscription).callback(null,t.result)}})):this.provider.on("data",(function(e,t){(e=e||t).method&&e.params&&e.params.subscription&&r.subscriptions.has(e.params.subscription)&&r.subscriptions.get(e.params.subscription).callback(null,e.params.result)})),this.provider.on("connect",(function(){r.subscriptions.forEach((function(e){e.subscription.resubscribe()}))})),this.provider.on("error",(function(e){r.subscriptions.forEach((function(t){t.callback(e)}))}));this.provider.on("disconnect",(function(e){r._isCleanCloseEvent(e)&&!r._isIpcCloseError(e)||(r.subscriptions.forEach((function(t){t.callback(a.ConnectionCloseError(e)),r.subscriptions.delete(t.subscription.id)})),r.provider&&r.provider.emit&&r.provider.emit("error",a.ConnectionCloseError(e))),r.provider&&r.provider.emit&&r.provider.emit("end",e)}))}},c.prototype.send=function(e,t){if(t=t||function(){},!this.provider)return t(a.InvalidProvider());var r=e.method,o=e.params,s=i.toPayload(r,o),c=this._jsonrpcResultCallback(t,s);if(this.provider.request)n(this.provider.request.bind(this.provider))({method:r,params:o},t);else if(this.provider.sendAsync)this.provider.sendAsync(s,c);else{if(!this.provider.send)throw new Error("Provider does not have a request or send method to use.");this.provider.send(s,c)}},c.prototype.sendBatch=function(e,t){if(!this.provider)return t(a.InvalidProvider());var r=i.toBatchPayload(e);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,(function(e,r){return e?t(e):Array.isArray(r)?void t(null,r):t(a.InvalidResponse(r))}))},c.prototype.addSubscription=function(e,t){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions.set(e.id,{callback:t,subscription:e})},c.prototype.removeSubscription=function(e,t){if(this.subscriptions.has(e)){var r=this.subscriptions.get(e).subscription.options.type;return this.subscriptions.delete(e),void this.send({method:r+"_unsubscribe",params:[e]},t)}"function"===typeof t&&t(null)},c.prototype.clearSubscriptions=function(e){try{var t=this;return this.subscriptions.size>0&&this.subscriptions.forEach((function(r,n){e&&"syncing"===r.name||t.removeSubscription(n)})),this.provider.reset&&this.provider.reset(),!0}catch(r){throw new Error("Error while clearing subscriptions: ".concat(r))}},c.prototype._isCleanCloseEvent=function(e){return"object"===typeof e&&([1e3].includes(e.code)||!0===e.wasClean)},c.prototype._isIpcCloseError=function(e){return"boolean"===typeof e&&e},c.prototype._jsonrpcResultCallback=function(e,t){return function(r,n){return n&&n.id&&t.id!==n.id?e(new Error("Wrong response id ".concat(n.id," (expected: ").concat(t.id,") in ").concat(JSON.stringify(t)))):r?e(r):n&&n.error?e(a.ErrorResponse(n)):i.isValidResponse(n)?void e(null,n.result):e(a.InvalidResponse(n))}},e.exports={Manager:c,BatchManager:o}},function(e,t,r){"use strict";e.exports={ErrorResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:JSON.stringify(e),r=e.error&&e.error.data?e.error.data:null,n=new Error("Returned error: "+t);return n.data=r,n},InvalidNumberOfParams:function(e,t,r){return new Error('Invalid number of parameters for "'+r+'". Got '+e+" expected "+t+"!")},InvalidConnection:function(e,t){return this.ConnectionError("CONNECTION ERROR: Couldn't connect to node "+e+".",t)},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:"Invalid JSON RPC response: "+JSON.stringify(e);return new Error(t)},ConnectionTimeout:function(e){return new Error("CONNECTION TIMEOUT: timeout of "+e+" ms achived")},ConnectionNotOpenError:function(e){return this.ConnectionError("connection not open on send()",e)},ConnectionCloseError:function(e){return"object"===typeof e&&e.code&&e.reason?this.ConnectionError("CONNECTION ERROR: The connection got closed with the close code `"+e.code+"` and the following reason string `"+e.reason+"`",e):new Error("CONNECTION ERROR: The connection closed unexpectedly")},MaxAttemptsReachedOnReconnectingError:function(){return new Error("Maximum number of reconnect attempts reached!")},PendingRequestsOnReconnectingError:function(){return new Error("CONNECTION ERROR: Provider started to reconnect before the response got received!")},ConnectionError:function(e,t){var r=new Error(e);return t&&(r.code=t.code,r.reason=t.reason),r},RevertInstructionError:function(e,t){var r=new Error("Your request got reverted with the following reason string: "+e);return r.reason=e,r.signature=t,r},TransactionRevertInstructionError:function(e,t,r){var n=new Error("Transaction has been reverted by the EVM:\n"+JSON.stringify(r,null,2));return n.reason=e,n.signature=t,n.receipt=r,n},TransactionError:function(e,t){var r=new Error(e);return r.receipt=t,r},NoContractAddressFoundError:function(e){return this.TransactionError("The transaction receipt didn't contain a contract address.",e)},ContractCodeNotStoredError:function(e){return this.TransactionError("The contract code couldn't be stored, please check your gas limit.",e)},TransactionRevertedWithoutReasonError:function(e){return this.TransactionError("Transaction has been reverted by the EVM:\n"+JSON.stringify(e,null,2),e)},TransactionOutOfGasError:function(e){return this.TransactionError("Transaction ran out of gas. Please provide more gas:\n"+JSON.stringify(e,null,2),e)},ResolverMethodMissingError:function(e,t){return new Error("The resolver at "+e+'does not implement requested method: "'+t+'".')},ContractMissingABIError:function(){return new Error("You must provide the json interface of the contract when instantiating a contract object.")},ContractOnceRequiresCallbackError:function(){return new Error("Once requires a callback as the second parameter.")},ContractEventDoesNotExistError:function(e){return new Error('Event "'+e+"\" doesn't exist in this contract.")},ContractReservedEventError:function(e){return new Error('The event "'+e+"\" is a reserved event name, you can't use it.")},ContractMissingDeployDataError:function(){return new Error('No "data" specified in neither the given options, nor the default options.')},ContractNoAddressDefinedError:function(){return new Error("This contract object doesn't have address set yet, please set an address first.")},ContractNoFromAddressDefinedError:function(){return new Error('No "from" address specified in neither the given options, nor the default options.')}}},function(e,t,r){"use strict";var n=r(127).default,a=r(221),i=r(3514),o=function(e){return a.toBN(e).toString(10)},s=function(e){if(void 0!==e)return function(e){return"latest"===e||"pending"===e||"earliest"===e}(e)?e:"genesis"===e?"0x0":a.isHexStrict(e)?"string"===typeof e?e.toLowerCase():e:a.numberToHex(e)},c=function(e){if(e.to&&(e.to=d(e.to)),e.data&&e.input)throw new Error('You can\'t have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.');if(!e.data&&e.input&&(e.data=e.input,delete e.input),e.data&&!e.data.startsWith("0x")&&(e.data="0x"+e.data),e.data&&!a.isHex(e.data))throw new Error("The data field must be HEX encoded data.");return(e.gas||e.gasLimit)&&(e.gas=e.gas||e.gasLimit),(e.maxPriorityFeePerGas||e.maxFeePerGas)&&delete e.gasPrice,["gasPrice","gas","value","maxPriorityFeePerGas","maxFeePerGas","nonce"].filter((function(t){return void 0!==e[t]})).forEach((function(t){e[t]=a.numberToHex(e[t])})),e},u=function(e){return null!==e.blockNumber&&(e.blockNumber=a.hexToNumber(e.blockNumber)),null!==e.transactionIndex&&(e.transactionIndex=a.hexToNumber(e.transactionIndex)),e.nonce=a.hexToNumber(e.nonce),e.gas=a.hexToNumber(e.gas),e.gasPrice&&(e.gasPrice=o(e.gasPrice)),e.maxFeePerGas&&(e.maxFeePerGas=o(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=o(e.maxPriorityFeePerGas)),e.type&&(e.type=a.hexToNumber(e.type)),e.value=o(e.value),e.to&&a.isAddress(e.to)?e.to=a.toChecksumAddress(e.to):e.to=null,e.from&&(e.from=a.toChecksumAddress(e.from)),e},f=function(e){if("string"===typeof e.blockHash&&"string"===typeof e.transactionHash&&"string"===typeof e.logIndex){var t=a.sha3(e.blockHash.replace("0x","")+e.transactionHash.replace("0x","")+e.logIndex.replace("0x",""));e.id="log_"+t.replace("0x","").substr(0,8)}else e.id||(e.id=null);return null!==e.blockNumber&&(e.blockNumber=a.hexToNumber(e.blockNumber)),null!==e.transactionIndex&&(e.transactionIndex=a.hexToNumber(e.transactionIndex)),null!==e.logIndex&&(e.logIndex=a.hexToNumber(e.logIndex)),e.address&&(e.address=a.toChecksumAddress(e.address)),e},d=function(e){var t=new i(e);if(t.isValid()&&t.isDirect())return t.toAddress().toLowerCase();if(a.isAddress(e))return"0x"+e.toLowerCase().replace("0x","");throw new Error("Provided address ".concat(e," is invalid, the capitalization checksum test failed, or it's an indirect IBAN address which can't be converted."))};e.exports={inputDefaultBlockNumberFormatter:function(e){return s(!this||void 0!==e&&null!==e?e:this.defaultBlock)},inputBlockNumberFormatter:s,inputCallFormatter:function(e){var t=(e=c(e)).from||(this?this.defaultAccount:null);return t&&(e.from=d(t)),e},inputTransactionFormatter:function(e){if("number"!==typeof(e=c(e)).from&&(!e.from||"object"!==typeof e.from)){if(e.from=e.from||(this?this.defaultAccount:null),!e.from&&"number"!==typeof e.from)throw new Error('The send transactions "from" field must be defined!');e.from=d(e.from)}return e},inputAddressFormatter:d,inputPostFormatter:function(e){return e.ttl&&(e.ttl=a.numberToHex(e.ttl)),e.workToProve&&(e.workToProve=a.numberToHex(e.workToProve)),e.priority&&(e.priority=a.numberToHex(e.priority)),Array.isArray(e.topics)||(e.topics=e.topics?[e.topics]:[]),e.topics=e.topics.map((function(e){return 0===e.indexOf("0x")?e:a.fromUtf8(e)})),e},inputLogFormatter:function(e){var t=function(e){return null===e||"undefined"===typeof e?null:0===(e=String(e)).indexOf("0x")?e:a.fromUtf8(e)};return void 0===e&&(e={}),void 0===e.fromBlock&&(e=n(n({},e),{},{fromBlock:"latest"})),(e.fromBlock||0===e.fromBlock)&&(e.fromBlock=s(e.fromBlock)),(e.toBlock||0===e.toBlock)&&(e.toBlock=s(e.toBlock)),e.topics=e.topics||[],e.topics=e.topics.map((function(e){return Array.isArray(e)?e.map(t):t(e)})),t=null,e.address&&(e.address=Array.isArray(e.address)?e.address.map((function(e){return d(e)})):d(e.address)),e},inputSignFormatter:function(e){return a.isHexStrict(e)?e:a.utf8ToHex(e)},inputStorageKeysFormatter:function(e){return e.map(a.numberToHex)},outputProofFormatter:function(e){return e.address=a.toChecksumAddress(e.address),e.nonce=a.hexToNumberString(e.nonce),e.balance=a.hexToNumberString(e.balance),e},outputBigNumberFormatter:o,outputTransactionFormatter:u,outputTransactionReceiptFormatter:function(e){if("object"!==typeof e)throw new Error("Received receipt is invalid: "+e);return null!==e.blockNumber&&(e.blockNumber=a.hexToNumber(e.blockNumber)),null!==e.transactionIndex&&(e.transactionIndex=a.hexToNumber(e.transactionIndex)),e.cumulativeGasUsed=a.hexToNumber(e.cumulativeGasUsed),e.gasUsed=a.hexToNumber(e.gasUsed),Array.isArray(e.logs)&&(e.logs=e.logs.map(f)),e.effectiveGasPrice&&(e.effectiveGasPrice=a.hexToNumber(e.effectiveGasPrice)),e.contractAddress&&(e.contractAddress=a.toChecksumAddress(e.contractAddress)),"undefined"!==typeof e.status&&null!==e.status&&(e.status=Boolean(parseInt(e.status))),e},outputBlockFormatter:function(e){return e.gasLimit=a.hexToNumber(e.gasLimit),e.gasUsed=a.hexToNumber(e.gasUsed),e.size=a.hexToNumber(e.size),e.timestamp=a.hexToNumber(e.timestamp),null!==e.number&&(e.number=a.hexToNumber(e.number)),e.difficulty&&(e.difficulty=o(e.difficulty)),e.totalDifficulty&&(e.totalDifficulty=o(e.totalDifficulty)),Array.isArray(e.transactions)&&e.transactions.forEach((function(e){if("string"!==typeof e)return u(e)})),e.miner&&(e.miner=a.toChecksumAddress(e.miner)),e.baseFeePerGas&&(e.baseFeePerGas=a.hexToNumber(e.baseFeePerGas)),e},outputLogFormatter:f,outputPostFormatter:function(e){return e.expiry=a.hexToNumber(e.expiry),e.sent=a.hexToNumber(e.sent),e.ttl=a.hexToNumber(e.ttl),e.workProved=a.hexToNumber(e.workProved),e.topics||(e.topics=[]),e.topics=e.topics.map((function(e){return a.toUtf8(e)})),e},outputSyncingFormatter:function(e){return e.startingBlock=a.hexToNumber(e.startingBlock),e.currentBlock=a.hexToNumber(e.currentBlock),e.highestBlock=a.hexToNumber(e.highestBlock),e.knownStates&&(e.knownStates=a.hexToNumber(e.knownStates),e.pulledStates=a.hexToNumber(e.pulledStates)),e}}},,function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,a(r(1501),t),a(r(1502),t),a(r(3510),t),a(r(1039),t),a(r(3511),t),a(r(474),t),a(r(3512),t),a(r(380),t),a(r(1040),t);var i=r(554);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return i.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return i.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return i.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return i.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return i.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return i.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return i.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return i.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return i.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return i.isHexString}})},,function(e,t,r){"use strict";(function(e){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var a=n(r(69)),i=r(380),o=r(474),s=r(1502),c=function(){function t(e){(0,a.default)(20===e.length,"Invalid address length"),this.buf=e}return t.zero=function(){return new t((0,o.zeros)(20))},t.fromString=function(e){return(0,a.default)((0,s.isValidAddress)(e),"Invalid address"),new t((0,o.toBuffer)(e))},t.fromPublicKey=function(r){return(0,a.default)(e.isBuffer(r),"Public key should be Buffer"),new t((0,s.pubToAddress)(r))},t.fromPrivateKey=function(r){return(0,a.default)(e.isBuffer(r),"Private key should be Buffer"),new t((0,s.privateToAddress)(r))},t.generate=function(r,n){return(0,a.default)(i.BN.isBN(n)),new t((0,s.generateAddress)(r.buf,n.toArrayLike(e)))},t.generate2=function(r,n,i){return(0,a.default)(e.isBuffer(n)),(0,a.default)(e.isBuffer(i)),new t((0,s.generateAddress2)(r.buf,n,i))},t.prototype.equals=function(e){return this.buf.equals(e.buf)},t.prototype.isZero=function(){return this.equals(t.zero())},t.prototype.isPrecompileOrSystemAddress=function(){var e=new i.BN(this.buf),t=new i.BN(0),r=new i.BN("ffff","hex");return e.gte(t)&&e.lte(r)},t.prototype.toString=function(){return"0x"+this.buf.toString("hex")},t.prototype.toBuffer=function(){return e.from(this.buf)},t}();t.Address=c}).call(this,r(15).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var n=r(194),a=r(380),i=r(474),o=r(1039),s=r(805),c=r(1040);function u(e,t){var r=(0,c.toType)(e,c.TypeOutput.BN);if(!t)return r.subn(27);var n=(0,c.toType)(t,c.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function f(e){var t=new a.BN(e);return t.eqn(0)||t.eqn(1)}t.ecsign=function(t,r,a){var i=(0,n.ecdsaSign)(t,r),o=i.signature,s=i.recid,u=e.from(o.slice(0,32)),f=e.from(o.slice(32,64));if(!a||"number"===typeof a){if(a&&!Number.isSafeInteger(a))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:u,s:f,v:a?s+(2*a+35):s+27}}return{r:u,s:f,v:(0,c.toType)(a,c.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(e)}};t.ecrecover=function(t,r,a,o,s){var c=e.concat([(0,i.setLengthLeft)(a,32),(0,i.setLengthLeft)(o,32)],64),d=u(r,s);if(!f(d))throw new Error("Invalid signature v value");var l=(0,n.ecdsaRecover)(c,d.toNumber(),t);return e.from((0,n.publicKeyConvert)(l,!1).slice(1))};t.toRpcSig=function(t,r,n,a){if(!f(u(t,a)))throw new Error("Invalid signature v value");return(0,i.bufferToHex)(e.concat([(0,i.setLengthLeft)(r,32),(0,i.setLengthLeft)(n,32),(0,i.toBuffer)(t)]))};t.toCompactSig=function(t,r,n,a){if(!f(u(t,a)))throw new Error("Invalid signature v value");var o=(0,c.toType)(t,c.TypeOutput.Number),s=n;return(o>28&&o%2===1||1===o||28===o)&&((s=e.from(n))[0]|=128),(0,i.bufferToHex)(e.concat([(0,i.setLengthLeft)(r,32),(0,i.setLengthLeft)(s,32)]))};t.fromRpcSig=function(e){var t,r,n,a=(0,i.toBuffer)(e);if(a.length>=65)t=a.slice(0,32),r=a.slice(32,64),n=(0,i.bufferToInt)(a.slice(64));else{if(64!==a.length)throw new Error("Invalid signature length");t=a.slice(0,32),r=a.slice(32,64),n=(0,i.bufferToInt)(a.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}};t.isValidSignature=function(e,t,r,n,i){void 0===n&&(n=!0);var o=new a.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new a.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!f(u(e,i)))return!1;var c=new a.BN(t),d=new a.BN(r);return!(c.isZero()||c.gt(s)||d.isZero()||d.gt(s))&&(!n||1!==d.cmp(o))};t.hashPersonalMessage=function(t){(0,s.assertIsBuffer)(t);var r=e.from("\x19Ethereum Signed Message:\n".concat(t.length),"utf-8");return(0,o.keccak)(e.concat([r,t]))}}).call(this,r(15).Buffer)},function(e,t,r){"use strict";(function(e){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var a=n(r(69)),i=r(554),o=r(380),s=r(474);t.defineProperties=function(t,r,n){if(t.raw=[],t._fields=[],t.toJSON=function(e){if(void 0===e&&(e=!1),e){var r={};return t._fields.forEach((function(e){r[e]="0x".concat(t[e].toString("hex"))})),r}return(0,s.baToJSON)(t.raw)},t.serialize=function(){return o.rlp.encode(t.raw)},r.forEach((function(r,n){function i(){return t.raw[n]}function o(i){"00"!==(i=(0,s.toBuffer)(i)).toString("hex")||r.allowZero||(i=e.allocUnsafe(0)),r.allowLess&&r.length?(i=(0,s.unpadBuffer)(i),(0,a.default)(r.length>=i.length,"The field ".concat(r.name," must not have more ").concat(r.length," bytes"))):r.allowZero&&0===i.length||!r.length||(0,a.default)(r.length===i.length,"The field ".concat(r.name," must have byte length of ").concat(r.length)),t.raw[n]=i}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:i,set:o}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),n)if("string"===typeof n&&(n=e.from((0,i.stripHexPrefix)(n),"hex")),e.isBuffer(n)&&(n=o.rlp.decode(n)),Array.isArray(n)){if(n.length>t._fields.length)throw new Error("wrong number of fields in data");n.forEach((function(e,r){t[t._fields[r]]=(0,s.toBuffer)(e)}))}else{if("object"!==typeof n)throw new Error("invalid data");var c=Object.keys(n);r.forEach((function(e){-1!==c.indexOf(e.name)&&(t[e.name]=n[e.name]),-1!==c.indexOf(e.alias)&&(t[e.alias]=n[e.alias])}))}}}).call(this,r(15).Buffer)},function(e,t,r){var n=r(1038),a=r(1500),i=function(e){var t=typeof e;if("string"===t)return a.isHexStrict(e)?new n(e.replace(/0x/i,""),16):new n(e,10);if("number"===t)return new n(e);if(a.isBigNumber(e))return new n(e.toString(10));if(a.isBN(e))return e;throw new Error(e+" is not a number")},o=function(e,t,r){var o,s;if("bytes"===(e=function(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}(e))){if(t.replace(/^0x/i,"").length%2!==0)throw new Error("Invalid bytes characters "+t.length);return t}if("string"===e)return a.utf8ToHex(t);if("bool"===e)return t?"01":"00";if(e.startsWith("address")){if(o=r?64:40,!a.isAddress(t))throw new Error(t+" is not a valid address, or the checksum is invalid.");return a.leftPad(t.toLowerCase(),o)}if(o=function(e){var t=/^\D+(\d+).*$/.exec(e);return t?parseInt(t[1],10):null}(e),e.startsWith("bytes")){if(!o)throw new Error("bytes[] not yet supported in solidity");if(r&&(o=32),o<1||o>32||o256)throw new Error("Invalid uint"+o+" size");if((s=i(t)).bitLength()>o)throw new Error("Supplied uint exceeds width: "+o+" vs "+s.bitLength());if(s.lt(new n(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return o?a.leftPad(s.toString("hex"),o/8*2):s}if(e.startsWith("int")){if(o%8||o<8||o>256)throw new Error("Invalid int"+o+" size");if((s=i(t)).bitLength()>o)throw new Error("Supplied int exceeds width: "+o+" vs "+s.bitLength());return s.lt(new n(0))?s.toTwos(o).toString("hex"):o?a.leftPad(s.toString("hex"),o/8*2):s}throw new Error("Unsupported or invalid type: "+e)},s=function(e){if(Array.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,r,i="";if(e&&"object"===typeof e&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,i=e.hasOwnProperty("v")?e.v:e.value):(t=a.toHex(e,!0),i=a.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!==typeof i||/^(-)?0x/i.test(i)||(i=new n(i)),Array.isArray(i)){if(r=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e);return t?parseInt(t[1],10):null}(t),r&&i.length!==r)throw new Error(t+" is not matching the given array "+JSON.stringify(i));r=i.length}return Array.isArray(i)?i.map((function(e){return o(t,e,r).toString("hex").replace("0x","")})).join(""):o(t,i,r).toString("hex").replace("0x","")};e.exports={soliditySha3:function(){var e=Array.prototype.slice.call(arguments).map(s);return a.sha3("0x"+e.join(""))},soliditySha3Raw:function(){return a.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(s).join(""))},encodePacked:function(){return"0x"+Array.prototype.slice.call(arguments).map(s).join("").toLowerCase()}}},function(e,t,r){"use strict";var n=r(21).default,a=r(22).default,i=r(221),o=r(3515),s=function(e){var t="A".charCodeAt(0),r="Z".charCodeAt(0);return(e=(e=e.toUpperCase()).substr(4)+e.substr(0,4)).split("").map((function(e){var n=e.charCodeAt(0);return n>=t&&n<=r?n-t+10:e})).join("")},c=function(e){for(var t,r=e;r.length>2;)t=r.slice(0,9),r=parseInt(t,10)%97+r.slice(t.length);return parseInt(r,10)%97},u=function(){function e(t){n(this,e),this._iban=t}return a(e,[{key:"isValid",value:function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===c(s(this._iban))}},{key:"isDirect",value:function(){return 34===this._iban.length||35===this._iban.length}},{key:"isIndirect",value:function(){return 20===this._iban.length}},{key:"checksum",value:function(){return this._iban.substr(2,2)}},{key:"institution",value:function(){return this.isIndirect()?this._iban.substr(7,4):""}},{key:"client",value:function(){return this.isIndirect()?this._iban.substr(11):""}},{key:"toAddress",value:function(){if(this.isDirect()){var e=this._iban.substr(4),t=new o(e,36);return i.toChecksumAddress(t.toString(16,20))}return""}},{key:"toString",value:function(){return this._iban}}],[{key:"toAddress",value:function(t){if(!(t=new e(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()}},{key:"toIban",value:function(t){return e.fromAddress(t).toString()}},{key:"fromAddress",value:function(t){if(!i.isAddress(t))throw new Error("Provided address is not a valid address: "+t);t=t.replace("0x","").replace("0X","");var r=function(e,t){for(var r=e;r.length<2*t;)r="0"+r;return r}(new o(t,16).toString(36),15);return e.fromBban(r.toUpperCase())}},{key:"fromBban",value:function(t){return new e("XE"+("0"+(98-c(s("XE00"+t)))).slice(-2)+t)}},{key:"createIndirect",value:function(t){return e.fromBban("ETH"+t.institution+t.identifier)}},{key:"isValid",value:function(t){return new e(t).isValid()}}]),e}();e.exports=u},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(3516).Buffer}catch(C){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,n){for(var a=0,i=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return a}i.isBN=function(e){return e instanceof i||null!==e&&"object"===typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=c(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(o=(a=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o>>24-a&16777215)||o!==this.length-1?f[6-c.length]+c+r:c+r,(a+=2)>=26&&(a-=26,o--)}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=d[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:f[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n("undefined"!==typeof o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,s,c="le"===t,u=new e(i),f=this.clone();if(c){for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],A=8191&y,w=y>>>13,x=0|o[4],E=8191&x,_=x>>>13,C=0|o[5],k=8191&C,B=C>>>13,I=0|o[6],S=8191&I,O=I>>>13,M=0|o[7],D=8191&M,T=M>>>13,F=0|o[8],R=8191&F,P=F>>>13,N=0|o[9],j=8191&N,L=N>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,Y=0|s[3],J=8191&Y,X=Y>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,Q))|0)+((8191&(a=(a=Math.imul(d,G))+Math.imul(l,Q)|0))<<13)|0;u=((i=Math.imul(l,G))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,Q),a=(a=Math.imul(p,G))+Math.imul(b,Q)|0,i=Math.imul(b,G);var ge=(u+(n=n+Math.imul(d,z)|0)|0)+((8191&(a=(a=a+Math.imul(d,q)|0)+Math.imul(l,z)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,Q),a=(a=Math.imul(g,G))+Math.imul(v,Q)|0,i=Math.imul(v,G),n=n+Math.imul(p,z)|0,a=(a=a+Math.imul(p,q)|0)+Math.imul(b,z)|0,i=i+Math.imul(b,q)|0;var ve=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,Q),a=(a=Math.imul(A,G))+Math.imul(w,Q)|0,i=Math.imul(w,G),n=n+Math.imul(g,z)|0,a=(a=a+Math.imul(g,q)|0)+Math.imul(v,z)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(p,V)|0,a=(a=a+Math.imul(p,W)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ye=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(a=(a=a+Math.imul(d,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((i=i+Math.imul(l,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,Q),a=(a=Math.imul(E,G))+Math.imul(_,Q)|0,i=Math.imul(_,G),n=n+Math.imul(A,z)|0,a=(a=a+Math.imul(A,q)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,q)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(p,J)|0,a=(a=a+Math.imul(p,X)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,X)|0;var Ae=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,Q),a=(a=Math.imul(k,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),n=n+Math.imul(E,z)|0,a=(a=a+Math.imul(E,q)|0)+Math.imul(_,z)|0,i=i+Math.imul(_,q)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(g,J)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,a=(a=a+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((i=i+Math.imul(l,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,Q),a=(a=Math.imul(S,G))+Math.imul(O,Q)|0,i=Math.imul(O,G),n=n+Math.imul(k,z)|0,a=(a=a+Math.imul(k,q)|0)+Math.imul(B,z)|0,i=i+Math.imul(B,q)|0,n=n+Math.imul(E,V)|0,a=(a=a+Math.imul(E,W)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(A,J)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,a=(a=a+Math.imul(p,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var xe=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,oe)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),a=(a=Math.imul(D,G))+Math.imul(T,Q)|0,i=Math.imul(T,G),n=n+Math.imul(S,z)|0,a=(a=a+Math.imul(S,q)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,q)|0,n=n+Math.imul(k,V)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(A,$)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(p,ie)|0,a=(a=a+Math.imul(p,oe)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,oe)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,Q),a=(a=Math.imul(R,G))+Math.imul(P,Q)|0,i=Math.imul(P,G),n=n+Math.imul(D,z)|0,a=(a=a+Math.imul(D,q)|0)+Math.imul(T,z)|0,i=i+Math.imul(T,q)|0,n=n+Math.imul(S,V)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,n=n+Math.imul(E,$)|0,a=(a=a+Math.imul(E,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(p,ce)|0,a=(a=a+Math.imul(p,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0;var _e=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),a=(a=Math.imul(j,G))+Math.imul(L,Q)|0,i=Math.imul(L,G),n=n+Math.imul(R,z)|0,a=(a=a+Math.imul(R,q)|0)+Math.imul(P,z)|0,i=i+Math.imul(P,q)|0,n=n+Math.imul(D,V)|0,a=(a=a+Math.imul(D,W)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,W)|0,n=n+Math.imul(S,J)|0,a=(a=a+Math.imul(S,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,a=(a=a+Math.imul(E,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(g,ce)|0,a=(a=a+Math.imul(g,ue)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,a=(a=a+Math.imul(p,le)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,le)|0;var Ce=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(a=(a=a+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((i=i+Math.imul(l,be)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,z),a=(a=Math.imul(j,q))+Math.imul(L,z)|0,i=Math.imul(L,q),n=n+Math.imul(R,V)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(S,$)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(E,ie)|0,a=(a=a+Math.imul(E,oe)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(A,ce)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,n=n+Math.imul(g,de)|0,a=(a=a+Math.imul(g,le)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0;var ke=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(a=(a=a+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),a=(a=Math.imul(j,W))+Math.imul(L,V)|0,i=Math.imul(L,W),n=n+Math.imul(R,J)|0,a=(a=a+Math.imul(R,X)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(E,ce)|0,a=(a=a+Math.imul(E,ue)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,le)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0;var Be=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(a=(a=a+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((i=i+Math.imul(v,be)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,J),a=(a=Math.imul(j,X))+Math.imul(L,J)|0,i=Math.imul(L,X),n=n+Math.imul(R,$)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(D,re)|0,a=(a=a+Math.imul(D,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(k,ce)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,n=n+Math.imul(E,de)|0,a=(a=a+Math.imul(E,le)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,le)|0;var Ie=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(a=(a=a+Math.imul(A,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,$),a=(a=Math.imul(j,ee))+Math.imul(L,$)|0,i=Math.imul(L,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(D,ie)|0,a=(a=a+Math.imul(D,oe)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,oe)|0,n=n+Math.imul(S,ce)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,le)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,le)|0;var Se=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(a=(a=a+Math.imul(E,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((i=i+Math.imul(_,be)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,re),a=(a=Math.imul(j,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(D,ce)|0,a=(a=a+Math.imul(D,ue)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,le)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(a=(a=a+Math.imul(k,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ie),a=(a=Math.imul(j,oe))+Math.imul(L,ie)|0,i=Math.imul(L,oe),n=n+Math.imul(R,ce)|0,a=(a=a+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,n=n+Math.imul(D,de)|0,a=(a=a+Math.imul(D,le)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,le)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(a=(a=a+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,ce),a=(a=Math.imul(j,ue))+Math.imul(L,ce)|0,i=Math.imul(L,ue),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,le)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,le)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(a=(a=a+Math.imul(D,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,de),a=(a=Math.imul(j,le))+Math.imul(L,de)|0,i=Math.imul(L,le);var Te=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(a=(a=a+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Fe=(u+(n=Math.imul(j,pe))|0)+((8191&(a=(a=Math.imul(j,be))+Math.imul(L,pe)|0))<<13)|0;return u=((i=Math.imul(L,be))+(a>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=Ae,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=_e,c[9]=Ce,c[10]=ke,c[11]=Be,c[12]=Ie,c[13]=Se,c[14]=Oe,c[15]=Me,c[16]=De,c[17]=Te,c[18]=Fe,0!==u&&(c[19]=u,r.length++),r};function b(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=h),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r.strip()}(this,e,t):b(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=a/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==f||u>=a);u--){var d=0|this.words[u];this.words[u]=f<<26-i|d>>>i,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this.strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,c=n.length-a.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(a,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,a=this.length-1;a>=0;a--)r=(t*r+(0|this.words[a]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*t;this.words[r]=a/e|0,t=a%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0===(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(f),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,l=1;0===(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new E(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function _(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},a(y,v),y.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=o}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new A;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return g[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,a),l=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),p=o;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var d=u>>f&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===f)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}c=26}return a},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new _(e)},a(_,E),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},_.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},_.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(98)(e))},,function(e,t,r){"use strict";var n=r(1503),a=r(288).errors,i=function(e){this.requestManager=e,this.requests=[]};i.prototype.add=function(e){this.requests.push(e)},i.prototype.execute=function(){var e=this.requests,t=this._sortResponses.bind(this);this.requestManager.sendBatch(e,(function(r,i){i=t(i),e.map((function(e,t){return i[t]||{}})).forEach((function(t,i){if(e[i].callback){if(t&&t.error)return e[i].callback(a.ErrorResponse(t));if(!n.isValidResponse(t))return e[i].callback(a.InvalidResponse(t));try{e[i].callback(null,e[i].format?e[i].format(t.result):t.result)}catch(r){e[i].callback(r)}}}))}))},i.prototype._sortResponses=function(e){return(e||[]).sort((function(e,t){return e.id-t.id}))},e.exports=i},function(e,t,r){"use strict";var n=null,a="object"===typeof globalThis?globalThis:void 0;if(!a)try{a=Function("return this")()}catch(i){a=self}"undefined"!==typeof a.ethereum?n=a.ethereum:"undefined"!==typeof a.web3&&a.web3.currentProvider&&(a.web3.currentProvider.sendAsync&&(a.web3.currentProvider.send=a.web3.currentProvider.sendAsync,delete a.web3.currentProvider.sendAsync),!a.web3.currentProvider.on&&a.web3.currentProvider.connection&&"ipcProviderWrapper"===a.web3.currentProvider.connection.constructor.name&&(a.web3.currentProvider.on=function(e,t){if("function"!==typeof t)throw new Error("The second parameter callback must be a function.");if("data"===e)this.connection.on("data",(function(e){var r="";e=e.toString();try{r=JSON.parse(e)}catch(i){return t(new Error("Couldn't parse response data"+e))}r.id||-1===r.method.indexOf("_subscription")||t(null,r)}));else this.connection.on(e,t)}),n=a.web3.currentProvider),e.exports=n},function(e,t,r){"use strict";var n=r(550),a=r(3520),i=r(288).errors,o=r(1468).w3cwebsocket,s=function(e,t){n.call(this),t=t||{},this.url=e,this._customTimeout=t.timeout||15e3,this.headers=t.headers||{},this.protocol=t.protocol||void 0,this.reconnectOptions=Object.assign({auto:!1,delay:5e3,maxAttempts:!1,onTimeout:!1},t.reconnect),this.clientConfig=t.clientConfig||void 0,this.requestOptions=t.requestOptions||void 0,this.DATA="data",this.CLOSE="close",this.ERROR="error",this.CONNECT="connect",this.RECONNECT="reconnect",this.connection=null,this.requestQueue=new Map,this.responseQueue=new Map,this.reconnectAttempts=0,this.reconnecting=!1;var r=a.parseURL(e);r.username&&r.password&&(this.headers.authorization="Basic "+a.btoa(r.username+":"+r.password)),r.auth&&(this.headers.authorization="Basic "+a.btoa(r.auth)),Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0}),this.connect()};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype.connect=function(){this.connection=new o(this.url,this.protocol,void 0,this.headers,this.requestOptions,this.clientConfig),this._addSocketListeners()},s.prototype._onMessage=function(e){var t=this;this._parseResponse("string"===typeof e.data?e.data:"").forEach((function(e){if(e.method&&-1!==e.method.indexOf("_subscription"))t.emit(t.DATA,e);else{var r=e.id;Array.isArray(e)&&(r=e[0].id),t.responseQueue.has(r)&&(void 0!==t.responseQueue.get(r).callback&&t.responseQueue.get(r).callback(!1,e),t.responseQueue.delete(r))}}))},s.prototype._onConnect=function(){if(this.emit(this.CONNECT),this.reconnectAttempts=0,this.reconnecting=!1,this.requestQueue.size>0){var e=this;this.requestQueue.forEach((function(t,r){e.send(t.payload,t.callback),e.requestQueue.delete(r)}))}},s.prototype._onClose=function(e){var t=this;!this.reconnectOptions.auto||[1e3,1001].includes(e.code)&&!1!==e.wasClean?(this.emit(this.CLOSE,e),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(i.ConnectionNotOpenError(e)),t.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(i.InvalidConnection("on WS",e)),t.responseQueue.delete(n)})),this._removeSocketListeners(),this.removeAllListeners()):this.reconnect()},s.prototype._addSocketListeners=function(){this.connection.addEventListener("message",this._onMessage.bind(this)),this.connection.addEventListener("open",this._onConnect.bind(this)),this.connection.addEventListener("close",this._onClose.bind(this))},s.prototype._removeSocketListeners=function(){this.connection.removeEventListener("message",this._onMessage),this.connection.removeEventListener("open",this._onConnect),this.connection.removeEventListener("close",this._onClose)},s.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var n=null;try{n=JSON.parse(e)}catch(a){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){t.reconnectOptions.auto&&t.reconnectOptions.onTimeout?t.reconnect():(t.emit(t.ERROR,i.ConnectionTimeout(t._customTimeout)),t.requestQueue.size>0&&t.requestQueue.forEach((function(e,r){e.callback(i.ConnectionTimeout(t._customTimeout)),t.requestQueue.delete(r)})))}),t._customTimeout))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,n&&r.push(n)})),r},s.prototype.send=function(e,t){var r=e.id,n={payload:e,callback:t};if(Array.isArray(e)&&(r=e[0].id),this.connection.readyState===this.connection.CONNECTING||this.reconnecting)this.requestQueue.set(r,n);else{if(this.connection.readyState!==this.connection.OPEN)return this.requestQueue.delete(r),this.emit(this.ERROR,i.ConnectionNotOpenError()),void n.callback(i.ConnectionNotOpenError());this.responseQueue.set(r,n),this.requestQueue.delete(r);try{this.connection.send(JSON.stringify(n.payload))}catch(a){n.callback(a),this.responseQueue.delete(r)}}},s.prototype.reset=function(){this.responseQueue.clear(),this.requestQueue.clear(),this.removeAllListeners(),this._removeSocketListeners(),this._addSocketListeners()},s.prototype.disconnect=function(e,t){this._removeSocketListeners(),this.connection.close(e||1e3,t)},s.prototype.supportsSubscriptions=function(){return!0},s.prototype.reconnect=function(){var e=this;this.reconnecting=!0,this.responseQueue.size>0&&this.responseQueue.forEach((function(t,r){t.callback(i.PendingRequestsOnReconnectingError()),e.responseQueue.delete(r)})),!this.reconnectOptions.maxAttempts||this.reconnectAttempts0&&this.requestQueue.forEach((function(t,r){t.callback(i.MaxAttemptsReachedOnReconnectingError()),e.requestQueue.delete(r)})))},e.exports=s},function(e,t,r){(function(t,n){var a="[object process]"===Object.prototype.toString.call("undefined"!==typeof t?t:0),i="undefined"!==typeof navigator&&"ReactNative"===navigator.product,o=null,s=null;if(a||i){o=function(e){return n.from(e).toString("base64")};var c=r(289);if(c.URL){var u=c.URL;s=function(e){return new u(e)}}else s=r(289).parse}else o=btoa.bind("object"===typeof globalThis?globalThis:self),s=function(e){return new URL(e)};e.exports={parseURL:s,btoa:o}}).call(this,r(80),r(15).Buffer)},function(e,t,r){var n=r(288).errors,a=r(1469).XMLHttpRequest,i=r(627),o=r(431),s=function(e,t){t=t||{},this.withCredentials=t.withCredentials||!1,this.timeout=t.timeout||0,this.headers=t.headers,this.agent=t.agent,this.connected=!1;var r=!1!==t.keepAlive;this.host=e||"http://localhost:8545",this.agent||("https"===this.host.substring(0,5)?this.httpsAgent=new o.Agent({keepAlive:r}):this.httpAgent=new i.Agent({keepAlive:r}))};s.prototype._prepareRequest=function(){var e;if("undefined"!==typeof XMLHttpRequest)e=new XMLHttpRequest;else{e=new a;var t={httpsAgent:this.httpsAgent,httpAgent:this.httpAgent,baseUrl:this.baseUrl};this.agent&&(t.httpsAgent=this.agent.https,t.httpAgent=this.agent.http,t.baseUrl=this.agent.baseUrl),e.nodejsSet(t)}return e.open("POST",this.host,!0),e.setRequestHeader("Content-Type","application/json"),e.timeout=this.timeout,e.withCredentials=this.withCredentials,this.headers&&this.headers.forEach((function(t){e.setRequestHeader(t.name,t.value)})),e},s.prototype.send=function(e,t){var r=this,a=this._prepareRequest();a.onreadystatechange=function(){if(4===a.readyState&&1!==a.timeout){var e=a.responseText,i=null;try{e=JSON.parse(e)}catch(o){i=n.InvalidResponse(a.responseText)}r.connected=!0,t(i,e)}},a.ontimeout=function(){r.connected=!1,t(n.ConnectionTimeout(this.timeout))};try{a.send(JSON.stringify(e))}catch(i){this.connected=!1,t(n.InvalidConnection(this.host))}},s.prototype.disconnect=function(){},s.prototype.supportsSubscriptions=function(){return!1},e.exports=s},function(e,t,r){"use strict";var n=r(288).errors,a=r(1470),i=function(e,t){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=e,this.connected=!1,this.connection=t.connect({path:this.path}),this.addDefaultEvents();var n=function(e){var t=null;Array.isArray(e)?e.forEach((function(e){r.responseCallbacks[e.id]&&(t=e.id)})):t=e.id,t||-1===e.method.indexOf("_subscription")?r.responseCallbacks[t]&&(r.responseCallbacks[t](null,e),delete r.responseCallbacks[t]):r.notificationCallbacks.forEach((function(t){"function"===typeof t&&t(e)}))};"Socket"===t.constructor.name?a(this.connection).done(n):this.connection.on("data",(function(e){r._parseResponse(e.toString()).forEach(n)}))};i.prototype.addDefaultEvents=function(){var e=this;this.connection.on("connect",(function(){e.connected=!0})),this.connection.on("close",(function(){e.connected=!1})),this.connection.on("error",(function(){e._timeout()})),this.connection.on("end",(function(){e._timeout()})),this.connection.on("timeout",(function(){e._timeout()}))},i.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var a=null;try{a=JSON.parse(e)}catch(i){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){throw t._timeout(),n.InvalidResponse(e)}),15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,a&&r.push(a)})),r},i.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,n=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=n},i.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](n.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},i.prototype.reconnect=function(){this.connection.connect({path:this.path})},i.prototype.send=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},i.prototype.on=function(e,t){if("function"!==typeof t)throw new Error("The second parameter callback must be a function.");if("data"===e)this.notificationCallbacks.push(t);else this.connection.on(e,t)},i.prototype.once=function(e,t){if("function"!==typeof t)throw new Error("The second parameter callback must be a function.");this.connection.once(e,t)},i.prototype.removeListener=function(e,t){var r=this;if("data"===e)this.notificationCallbacks.forEach((function(e,n){e===t&&r.notificationCallbacks.splice(n,1)}));else this.connection.removeListener(e,t)},i.prototype.removeAllListeners=function(e){if("data"===e)this.notificationCallbacks=[];else this.connection.removeAllListeners(e)},i.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},i.prototype.supportsSubscriptions=function(){return!0},e.exports=i},function(e,t,r){"use strict";var n=r(288).formatters,a=r(1504),i=r(221);e.exports=function(e){var t=function(t){var r;return t.property?(e[t.property]||(e[t.property]={}),r=e[t.property]):r=e,t.methods&&t.methods.forEach((function(t){t instanceof a||(t=new a(t)),t.attachToObject(r),t.setRequestManager(e._requestManager)})),e};return t.formatters=n,t.utils=i,t.Method=a,t}},function(e,t,r){"use strict";var n=r(288).errors,a=r(550),i=r(288).formatters;function o(e){return e}function s(e){a.call(this),this.id=null,this.callback=o,this.arguments=null,this.lastBlock=null,this.options={subscription:e.subscription,type:e.type,requestManager:e.requestManager}}s.prototype=Object.create(a.prototype),s.prototype.constructor=s,s.prototype._extractCallback=function(e){if("function"===typeof e[e.length-1])return e.pop()},s.prototype._validateArgs=function(e){var t=this.options.subscription;if(t||(t={}),t.params||(t.params=0),e.length!==t.params)throw n.InvalidNumberOfParams(e.length,t.params,t.subscriptionName)},s.prototype._formatInput=function(e){var t=this.options.subscription;return t&&t.inputFormatter?t.inputFormatter.map((function(t,r){return t?t(e[r]):e[r]})):e},s.prototype._formatOutput=function(e){var t=this.options.subscription;return t&&t.outputFormatter&&e?t.outputFormatter(e):e},s.prototype._toPayload=function(e){var t=[];if(this.callback=this._extractCallback(e)||o,this.subscriptionMethod||(this.subscriptionMethod=e.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(e),this._validateArgs(this.arguments),e=[]),t.push(this.subscriptionMethod),t=t.concat(this.arguments),e.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:t}},s.prototype.unsubscribe=function(e){this.options.requestManager.removeSubscription(this.id,e),this.id=null,this.lastBlock=null,this.removeAllListeners()},s.prototype.subscribe=function(){var e=this,t=Array.prototype.slice.call(arguments),r=this._toPayload(t);if(!r)return this;if(!this.options.requestManager.provider)return setTimeout((function(){var t=new Error("No provider set.");e.callback(t,null,e),e.emit("error",t)}),0),this;if(!this.options.requestManager.provider.on)return setTimeout((function(){var t=new Error("The current provider doesn't support subscriptions: "+e.options.requestManager.provider.constructor.name);e.callback(t,null,e),e.emit("error",t)}),0),this;if(this.lastBlock&&this.options.params&&"object"===typeof this.options.params&&(r.params[1]=this.options.params,r.params[1].fromBlock=i.inputBlockNumberFormatter(this.lastBlock+1)),this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&r.params[1]&&"object"===typeof r.params[1]&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)){var n=Object.assign({},r.params[1]);this.options.requestManager.send({method:"eth_getLogs",params:[n]},(function(t,r){t?setTimeout((function(){e.callback(t,null,e),e.emit("error",t)}),0):r.forEach((function(t){var r=e._formatOutput(t);e.callback(null,r,e),e.emit("data",r)}))}))}return"object"===typeof r.params[1]&&delete r.params[1].fromBlock,this.options.requestManager.send(r,(function(t,n){!t&&n?(e.id=n,e.method=r.params[0],e.options.requestManager.addSubscription(e,(function(t,r){t?(e.callback(t,!1,e),e.emit("error",t)):(Array.isArray(r)||(r=[r]),r.forEach((function(t){var r=e._formatOutput(t);if(e.lastBlock=r&&"object"===typeof r?r.blockNumber:null,"function"===typeof e.options.subscription.subscriptionHandler)return e.options.subscription.subscriptionHandler.call(e,r);e.emit("data",r),e.callback(null,r,e)})))})),e.emit("connected",n)):setTimeout((function(){e.callback(t,!1,e),e.emit("error",t)}),0)})),this},s.prototype.resubscribe=function(){this.options.requestManager.removeSubscription(this.id),this.id=null,this.subscribe(this.callback)},e.exports=s},function(e,t,r){var n=r(15).Buffer,a=r(221),i=r(1567).AbiCoder,o=r(1567).ParamType,s=new i((function(e,t){return!e.match(/^u?int/)||Array.isArray(t)||t&&"object"===typeof t&&"BN"===t.constructor.name?t:t.toString()}));function c(){}var u=function(){};u.prototype.encodeFunctionSignature=function(e){return("function"===typeof e||"object"===typeof e&&e)&&(e=a._jsonInterfaceMethodToString(e)),a.sha3(e).slice(0,10)},u.prototype.encodeEventSignature=function(e){return("function"===typeof e||"object"===typeof e&&e)&&(e=a._jsonInterfaceMethodToString(e)),a.sha3(e)},u.prototype.encodeParameter=function(e,t){return this.encodeParameters([e],[t])},u.prototype.encodeParameters=function(e,t){var r=this;return e=r.mapTypes(e),t=t.map((function(t,n){var a=e[n];if("object"===typeof a&&a.type&&(a=a.type),t=r.formatParam(a,t),"string"===typeof a&&a.includes("tuple")){!function e(t,n){if("array"===t.name)return n.map((function(r){return e(s._getCoder(o.from(t.type.replace("[]",""))),r)}));t.coders.forEach((function(t,a){"tuple"===t.name?e(t,n[a]):n[a]=r.formatParam(t.name,n[a])}))}(s._getCoder(o.from(a)),t)}return t})),s.encode(e,t)},u.prototype.mapTypes=function(e){var t=this,r=[];return e.forEach((function(e){if("object"===typeof e&&"function"===e.type&&(e=Object.assign({},e,{type:"bytes24"})),t.isSimplifiedStructFormat(e)){var n=Object.keys(e)[0];r.push(Object.assign(t.mapStructNameAndType(n),{components:t.mapStructToCoderFormat(e[n])}))}else r.push(e)})),r},u.prototype.isSimplifiedStructFormat=function(e){return"object"===typeof e&&"undefined"===typeof e.components&&"undefined"===typeof e.name},u.prototype.mapStructNameAndType=function(e){var t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}},u.prototype.mapStructToCoderFormat=function(e){var t=this,r=[];return Object.keys(e).forEach((function(n){"object"!==typeof e[n]?r.push({name:n,type:e[n]}):r.push(Object.assign(t.mapStructNameAndType(n),{components:t.mapStructToCoderFormat(e[n])}))})),r},u.prototype.formatParam=function(e,t){var r=this,i=new RegExp(/^bytes([0-9]*)$/),o=new RegExp(/^bytes([0-9]*)\[\]$/),s=new RegExp(/^(u?int)([0-9]*)$/),c=new RegExp(/^(u?int)([0-9]*)\[\]$/);if(a.isBN(t)||a.isBigNumber(t))return t.toString(10);if(e.match(o)||e.match(c))return t.map((function(t){return r.formatParam(e.replace("[]",""),t)}));var u=e.match(s);if(u){var f=parseInt(u[2]||"256");f/80&&(!t||"0x"===t||"0X"===t))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var n=s.decode(this.mapTypes(e),"0x"+t.replace(/0x/i,""),r),a=new c;return a.__length__=0,e.forEach((function(e,t){var r=n[a.__length__],i="object"===typeof e&&e.type&&"string"===e.type;r="0x"!==r||i||"string"===typeof e&&"string"===e?r:null,a[t]=r,("function"===typeof e||e&&"object"===typeof e)&&e.name&&(a[e.name]=r),a.__length__++})),a},u.prototype.decodeLog=function(e,t,r){var n=this;r=Array.isArray(r)?r:[r],t=t||"";var a=[],i=[],o=0;e.forEach((function(e,t){e.indexed?(i[t]=["bool","int","uint","address","fixed","ufixed"].find((function(t){return-1!==e.type.indexOf(t)}))?n.decodeParameter(e.type,r[o]):r[o],o++):a[t]=e}));var s=t,u=s?this.decodeParametersWith(a,s,!0):[],f=new c;return f.__length__=0,e.forEach((function(e,t){f[t]="string"===e.type?"":null,"undefined"!==typeof u[t]&&(f[t]=u[t]),"undefined"!==typeof i[t]&&(f[t]=i[t]),e.name&&(f[e.name]=f[t]),f.__length__++})),f};var f=new u;e.exports=f},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r(3527);function a(t,r){return void 0===r&&(r="utf8"),e.isBuffer(t)?o(t.toString("base64")):o(e.from(t,r).toString("base64"))}function i(e){return e=e.toString(),n.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function o(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var s=a;s.encode=a,s.decode=function(t,r){return void 0===r&&(r="utf8"),e.from(i(t),"base64").toString(r)},s.toBase64=i,s.fromBase64=o,s.toBuffer=function(t){return e.from(i(t),"base64")},t.default=s}).call(this,r(15).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var r=t.length,n=r%4;if(!n)return t;var a=r,i=4-n,o=r+i,s=e.alloc(o);for(s.write(t);i--;)s.write("=",a++);return s.toString()}}).call(this,r(15).Buffer)},function(e,t,r){"use strict";var n=r(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;var a=r(1041),i=r(1507),o=r(1042);function s(e,t){var r=u(t),o=n(r,2),s=o[0],c=o[1];return new a.EthereumRpcError(e,s||i.getMessageFromCode(e),c)}function c(e,t){var r=u(t),o=n(r,2),s=o[0],c=o[1];return new a.EthereumProviderError(e,s||i.getMessageFromCode(e),c)}function u(e){if(e){if("string"===typeof e)return[e];if("object"===typeof e&&!Array.isArray(e)){var t=e.message,r=e.data;if(t&&"string"!==typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}t.ethErrors={rpc:{parse:function(e){return s(o.errorCodes.rpc.parse,e)},invalidRequest:function(e){return s(o.errorCodes.rpc.invalidRequest,e)},invalidParams:function(e){return s(o.errorCodes.rpc.invalidParams,e)},methodNotFound:function(e){return s(o.errorCodes.rpc.methodNotFound,e)},internal:function(e){return s(o.errorCodes.rpc.internal,e)},server:function(e){if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");var t=e.code;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:function(e){return s(o.errorCodes.rpc.invalidInput,e)},resourceNotFound:function(e){return s(o.errorCodes.rpc.resourceNotFound,e)},resourceUnavailable:function(e){return s(o.errorCodes.rpc.resourceUnavailable,e)},transactionRejected:function(e){return s(o.errorCodes.rpc.transactionRejected,e)},methodNotSupported:function(e){return s(o.errorCodes.rpc.methodNotSupported,e)},limitExceeded:function(e){return s(o.errorCodes.rpc.limitExceeded,e)}},provider:{userRejectedRequest:function(e){return c(o.errorCodes.provider.userRejectedRequest,e)},unauthorized:function(e){return c(o.errorCodes.provider.unauthorized,e)},unsupportedMethod:function(e){return c(o.errorCodes.provider.unsupportedMethod,e)},disconnected:function(e){return c(o.errorCodes.provider.disconnected,e)},chainDisconnected:function(e){return c(o.errorCodes.provider.chainDisconnected,e)},custom:function(e){if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");var t=e.code,r=e.message,n=e.data;if(!r||"string"!==typeof r)throw new Error('"message" must be a nonempty string');return new a.EthereumProviderError(t,r,n)}}}},function(e,t){e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!==typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r=0;--n){var a=this.tryEntries[n],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:B(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){t.parse=r(3533),t.stringify=r(3534)},function(e,t){var r,n,a,i,o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},s=function(e){throw{name:"SyntaxError",message:e,at:r,text:a}},c=function(e){return e&&e!==n&&s("Expected '"+e+"' instead of '"+n+"'"),n=a.charAt(r),r+=1,n},u=function(){var e,t="";for("-"===n&&(t="-",c("-"));n>="0"&&n<="9";)t+=n,c();if("."===n)for(t+=".";c()&&n>="0"&&n<="9";)t+=n;if("e"===n||"E"===n)for(t+=n,c(),"-"!==n&&"+"!==n||(t+=n,c());n>="0"&&n<="9";)t+=n,c();if(e=+t,isFinite(e))return e;s("Bad number")},f=function(){var e,t,r,a="";if('"'===n)for(;c();){if('"'===n)return c(),a;if("\\"===n)if(c(),"u"===n){for(r=0,t=0;t<4&&(e=parseInt(c(),16),isFinite(e));t+=1)r=16*r+e;a+=String.fromCharCode(r)}else{if("string"!==typeof o[n])break;a+=o[n]}else a+=n}s("Bad string")},d=function(){for(;n&&n<=" ";)c()},l=function(){var e=[];if("["===n){if(c("["),d(),"]"===n)return c("]"),e;for(;n;){if(e.push(i()),d(),"]"===n)return c("]"),e;c(","),d()}}s("Bad array")},h=function(){var e,t={};if("{"===n){if(c("{"),d(),"}"===n)return c("}"),t;for(;n;){if(e=f(),d(),c(":"),Object.hasOwnProperty.call(t,e)&&s('Duplicate key "'+e+'"'),t[e]=i(),d(),"}"===n)return c("}"),t;c(","),d()}}s("Bad object")};i=function(){switch(d(),n){case"{":return h();case"[":return l();case'"':return f();case"-":return u();default:return n>="0"&&n<="9"?u():function(){switch(n){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null}s("Unexpected '"+n+"'")}()}},e.exports=function(e,t){var o;return a=e,r=0,n=" ",o=i(),d(),n&&s("Syntax error"),"function"===typeof t?function e(r,n){var a,i,o=r[n];if(o&&"object"===typeof o)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&(void 0!==(i=e(o,a))?o[a]=i:delete o[a]);return t.call(r,n,o)}({"":o},""):o}},function(e,t){var r,n,a,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=o[e];return"string"===typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(e,t){var i,o,u,f,d,l=r,h=t[e];switch(h&&"object"===typeof h&&"function"===typeof h.toJSON&&(h=h.toJSON(e)),"function"===typeof a&&(h=a.call(t,e,h)),typeof h){case"string":return s(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(r+=n,d=[],"[object Array]"===Object.prototype.toString.apply(h)){for(f=h.length,i=0;i0&&void 0!==arguments[0]?arguments[0]:[];return a(this,r),(e=t.call(this,{}))._children=n,n.forEach((function(t){return e._addChild(t)})),e._updateWholeState(),e}return i(r,[{key:"_addChild",value:function(e){var t=this;e.subscribe((function(){return t._updateWholeState()}))}},{key:"_updateWholeState",value:function(){var e=this._children.map((function(e){return e.getState()})),t=Object.assign.apply(Object,[{}].concat(n(e)));this.putState(t)}}]),r}(r(1044).ObservableStore);t.MergedStore=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storeTransformStream=void 0;var n=r(3547);t.storeTransformStream=function(e){return n.obj((function(t,r,n){try{return void n(null,e(t))}catch(a){return void n(a)}}))}},function(e,t,r){(function(t){var n=r(3548).Transform,a=r(609).inherits,i=r(628);function o(e){n.call(this,e),this._destroyed=!1}function s(e,t,r){r(null,e)}function c(e){return function(t,r,n){return"function"==typeof t&&(n=r,r=t,t={}),"function"!=typeof r&&(r=s),"function"!=typeof n&&(n=null),e(t,r,n)}}a(o,n),o.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var r=this;t.nextTick((function(){e&&r.emit("error",e),r.emit("close")}))}},e.exports=c((function(e,t,r){var n=new o(e);return n._transform=t,r&&(n._flush=r),n})),e.exports.ctor=c((function(e,t,r){function n(t){if(!(this instanceof n))return new n(t);this.options=i(e,t),o.call(this,this.options)}return a(n,o),n.prototype._transform=t,r&&(n.prototype._flush=r),n})),e.exports.obj=c((function(e,t,r){var n=new o(i({objectMode:!0,highWaterMark:16},e));return n._transform=t,r&&(n._flush=r),n}))}).call(this,r(80))},function(e,t,r){(t=e.exports=r(1509)).Stream=t,t.Readable=t,t.Writable=r(1512),t.Duplex=r(555),t.Transform=r(1513),t.PassThrough=r(3552)},,function(e,t,r){"use strict";var n=r(1045).Buffer,a=r(3551);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,a,i=n.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,a=s,t.copy(r,a),s+=o.data.length,o=o.next;return i},e}(),a&&a.inspect&&a.inspect.custom&&(e.exports.prototype[a.inspect.custom]=function(){var e=a.inspect({length:this.length});return this.constructor.name+" "+e})},,function(e,t,r){"use strict";e.exports=i;var n=r(1513),a=Object.create(r(240));function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}a.inherits=r(91),a.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLink=t.WalletLinkProvider=void 0;var n=r(1046),a=r(1523),i=r(1046);Object.defineProperty(t,"WalletLinkProvider",{enumerable:!0,get:function(){return i.WalletLinkProvider}});var o=r(1523);Object.defineProperty(t,"WalletLink",{enumerable:!0,get:function(){return o.WalletLink}}),t.default=a.WalletLink,"undefined"!==typeof window&&(window.WalletLink=a.WalletLink,window.WalletLinkProvider=n.WalletLinkProvider)},,function(e,t,r){"use strict";var n=r(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;var a=r(1048),i=r(1514),o=r(1049);function s(e,t){var r=u(t),o=n(r,2),s=o[0],c=o[1];return new a.EthereumRpcError(e,s||i.getMessageFromCode(e),c)}function c(e,t){var r=u(t),o=n(r,2),s=o[0],c=o[1];return new a.EthereumProviderError(e,s||i.getMessageFromCode(e),c)}function u(e){if(e){if("string"===typeof e)return[e];if("object"===typeof e&&!Array.isArray(e)){var t=e.message,r=e.data;if(t&&"string"!==typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}t.ethErrors={rpc:{parse:function(e){return s(o.errorCodes.rpc.parse,e)},invalidRequest:function(e){return s(o.errorCodes.rpc.invalidRequest,e)},invalidParams:function(e){return s(o.errorCodes.rpc.invalidParams,e)},methodNotFound:function(e){return s(o.errorCodes.rpc.methodNotFound,e)},internal:function(e){return s(o.errorCodes.rpc.internal,e)},server:function(e){if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");var t=e.code;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:function(e){return s(o.errorCodes.rpc.invalidInput,e)},resourceNotFound:function(e){return s(o.errorCodes.rpc.resourceNotFound,e)},resourceUnavailable:function(e){return s(o.errorCodes.rpc.resourceUnavailable,e)},transactionRejected:function(e){return s(o.errorCodes.rpc.transactionRejected,e)},methodNotSupported:function(e){return s(o.errorCodes.rpc.methodNotSupported,e)},limitExceeded:function(e){return s(o.errorCodes.rpc.limitExceeded,e)}},provider:{userRejectedRequest:function(e){return c(o.errorCodes.provider.userRejectedRequest,e)},unauthorized:function(e){return c(o.errorCodes.provider.unauthorized,e)},unsupportedMethod:function(e){return c(o.errorCodes.provider.unsupportedMethod,e)},disconnected:function(e){return c(o.errorCodes.provider.disconnected,e)},chainDisconnected:function(e){return c(o.errorCodes.provider.chainDisconnected,e)},custom:function(e){if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");var t=e.code,r=e.message,n=e.data;if(!r||"string"!==typeof r)throw new Error('"message" must be a nonempty string');return new a.EthereumProviderError(t,r,n)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EVENTS=void 0,t.EVENTS={REQUEST_CHILD_ETHEREUM_ACCOUNTS_START:"walletlink_sdk.request_child_ethereum_accounts.start",REQUEST_CHILD_ETHEREUM_ACCOUNTS_RESPONSE:"walletlink_sdk.request_child_ethereum_accounts.response",STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}},function(e,t,r){"use strict";var n=r(22).default,a=r(21).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkAnalyticsAbstract=void 0;var i=n((function e(){a(this,e)}));t.WalletLinkAnalyticsAbstract=i},function(e,t,r){(function(t){var n=r(111).default,a=r(48).default,i=r(1516),o=r(3559),s={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},c={encodeData:function(e,r,s){var c=this,u=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],f=["bytes32"],d=[this.hashType(e,s)];if(u){var l,h=function e(r,n,f){if(void 0!==s[n])return["bytes32",null==f?"0x0000000000000000000000000000000000000000000000000000000000000000":i.keccak(c.encodeData(n,f,s,u))];if(void 0===f)throw new Error("missing value for field ".concat(r," of type ").concat(n));if("bytes"===n)return["bytes32",i.keccak(f)];if("string"===n)return"string"===typeof f&&(f=t.from(f,"utf8")),["bytes32",i.keccak(f)];if(n.lastIndexOf("]")===n.length-1){var d=n.slice(0,n.lastIndexOf("[")),l=f.map((function(t){return e(r,d,t)}));return["bytes32",i.keccak(o.rawEncode(l.map((function(e){return a(e,1)[0]})),l.map((function(e){return a(e,2)[1]}))))]}return[n,f]},p=n(s[e]);try{for(p.s();!(l=p.n()).done;){var b=l.value,m=h(b.name,b.type,r[b.name]),g=a(m,2),v=g[0],y=g[1];f.push(v),d.push(y)}}catch(_){p.e(_)}finally{p.f()}}else{var A,w=n(s[e]);try{for(w.s();!(A=w.n()).done;){var x=A.value,E=r[x.name];if(void 0!==E)if("bytes"===x.type)f.push("bytes32"),E=i.keccak(E),d.push(E);else if("string"===x.type)f.push("bytes32"),"string"===typeof E&&(E=t.from(E,"utf8")),E=i.keccak(E),d.push(E);else if(void 0!==s[x.type])f.push("bytes32"),E=i.keccak(this.encodeData(x.type,E,s,u)),d.push(E);else{if(x.type.lastIndexOf("]")===x.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");f.push(x.type),d.push(E)}}}catch(_){w.e(_)}finally{w.f()}}return o.rawEncode(f,d)},encodeType:function(e,t){var r="",a=this.findTypeDependencies(e,t).filter((function(t){return t!==e}));a=[e].concat(a.sort());var i,o=n(a);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!t[s])throw new Error("No type definition specified: "+s);r+=s+"("+t[s].map((function(e){var t=e.name;return e.type+" "+t})).join(",")+")"}}catch(c){o.e(c)}finally{o.f()}return r},findTypeDependencies:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e=e.match(/^\w*/)[0],r.includes(e)||void 0===t[e])return r;r.push(e);var a,i=n(t[e]);try{for(i.s();!(a=i.n()).done;){var o,s=a.value,c=n(this.findTypeDependencies(s.type,t,r));try{for(c.s();!(o=c.n()).done;){var u=o.value;!r.includes(u)&&r.push(u)}}catch(f){c.e(f)}finally{c.f()}}}catch(f){i.e(f)}finally{i.f()}return r},hashStruct:function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return i.keccak(this.encodeData(e,t,r,n))},hashType:function(e,t){return i.keccak(this.encodeType(e,t))},sanitizeData:function(e){var t={};for(var r in s.properties)e[r]&&(t[r]=e[r]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash:function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.sanitizeData(e),a=[t.from("1901","hex")];return a.push(this.hashStruct("EIP712Domain",n.domain,n.types,r)),"EIP712Domain"!==n.primaryType&&a.push(this.hashStruct(n.primaryType,n.message,n.types,r)),i.keccak(t.concat(a))}};e.exports={TYPED_MESSAGE_SCHEMA:s,TypedDataUtils:c,hashForSignTypedDataLegacy:function(e){return function(e){var t=new Error("Expect argument to be non-empty array");if("object"!==typeof e||!e.length)throw t;var r=e.map((function(e){return"bytes"===e.type?i.toBuffer(e.value):e.value})),n=e.map((function(e){return e.type})),a=e.map((function(e){if(!e.name)throw t;return e.type+" "+e.name}));return o.soliditySHA3(["bytes32","bytes32"],[o.soliditySHA3(new Array(e.length).fill("string"),a),o.soliditySHA3(n,r)])}(e.data)},hashForSignTypedData_v3:function(e){return c.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return c.hash(e.data)}}}).call(this,r(15).Buffer)},function(e,t,r){(function(t){var n=r(1516),a=r(806);function i(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}function o(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function s(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function c(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function u(e){var t=typeof e;if("string"===t)return n.isHexString(e)?new a(n.stripHexPrefix(e),16):new a(e,10);if("number"===t)return new a(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function f(e,r){var i,d,l,h;if("address"===e)return f("uint160",u(r));if("bool"===e)return f("uint8",r?1:0);if("string"===e)return f("bytes",new t(r,"utf8"));if(function(e){return e.lastIndexOf("]")===e.length-1}(e)){if("undefined"===typeof r.length)throw new Error("Not an array?");if("dynamic"!==(i=c(e))&&0!==i&&r.length>i)throw new Error("Elements exceed array size: "+i);for(h in l=[],e=e.slice(0,e.lastIndexOf("[")),"string"===typeof r&&(r=JSON.parse(r)),r)l.push(f(e,r[h]));if("dynamic"===i){var p=f("uint256",r.length);l.unshift(p)}return t.concat(l)}if("bytes"===e)return r=new t(r),l=t.concat([f("uint256",r.length),r]),r.length%32!==0&&(l=t.concat([l,n.zeros(32-r.length%32)])),l;if(e.startsWith("bytes")){if((i=o(e))<1||i>32)throw new Error("Invalid bytes width: "+i);return n.setLengthRight(r,32)}if(e.startsWith("uint")){if((i=o(e))%8||i<8||i>256)throw new Error("Invalid uint width: "+i);if((d=u(r)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+d.bitLength());if(d<0)throw new Error("Supplied uint is negative");return d.toArrayLike(t,"be",32)}if(e.startsWith("int")){if((i=o(e))%8||i<8||i>256)throw new Error("Invalid int width: "+i);if((d=u(r)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+d.bitLength());return d.toTwos(256).toArrayLike(t,"be",32)}if(e.startsWith("ufixed")){if(i=s(e),(d=u(r))<0)throw new Error("Supplied ufixed is negative");return f("uint256",d.mul(new a(2).pow(new a(i[1]))))}if(e.startsWith("fixed"))return i=s(e),f("int256",u(r).mul(new a(2).pow(new a(i[1]))));throw new Error("Unsupported or invalid type: "+e)}function d(e){return"string"===e||"bytes"===e||"dynamic"===c(e)}function l(e,r){if(e.length!==r.length)throw new Error("Number of types are not matching the values");for(var a,s,c=[],f=0;f32)throw new Error("Invalid bytes width: "+a);c.push(n.setLengthRight(l,a))}else if(d.startsWith("uint")){if((a=o(d))%8||a<8||a>256)throw new Error("Invalid uint width: "+a);if((s=u(l)).bitLength()>a)throw new Error("Supplied uint exceeds width: "+a+" vs "+s.bitLength());c.push(s.toArrayLike(t,"be",a/8))}else{if(!d.startsWith("int"))throw new Error("Unsupported or invalid type: "+d);if((a=o(d))%8||a<8||a>256)throw new Error("Invalid int width: "+a);if((s=u(l)).bitLength()>a)throw new Error("Supplied int exceeds width: "+a+" vs "+s.bitLength());c.push(s.toTwos(a).toArrayLike(t,"be",a/8))}}return t.concat(c)}e.exports={rawEncode:function(e,r){var n=[],a=[],o=32*e.length;for(var s in e){var c=i(e[s]),u=f(c,r[s]);d(c)?(n.push(f("uint256",o)),a.push(u),o+=u.length):n.push(u)}return t.concat(n.concat(a))},solidityPack:l,soliditySHA3:function(e,t){return n.keccak(l(e,t))}}}).call(this,r(15).Buffer)},function(e,t,r){"use strict";var n=r(78).default,a=r(20).default,i=r(124).default,o=r(21).default,s=r(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.filterFromParam=t.FilterPolyfill=void 0;var c=r(1053),u=r(475),f={jsonrpc:"2.0",id:0},d=function(){function e(t){o(this,e),this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,c.IntNumber)(1),this.provider=t}return s(e,[{key:"newFilter",value:function(){var e=i(a().mark((function e(t){var r,n,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=l(t),n=this.makeFilterId(),e.next=4,this.setInitialCursorPosition(n,r.fromBlock);case 4:return i=e.sent,console.log("Installing new log filter(".concat(n,"):"),r,"initial cursor position:",i),this.logFilters.set(n,r),this.setFilterTimeout(n),e.abrupt("return",(0,u.hexStringFromIntNumber)(n));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"newBlockFilter",value:function(){var e=i(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.makeFilterId(),e.next=3,this.setInitialCursorPosition(t,"latest");case 3:return r=e.sent,console.log("Installing new block filter (".concat(t,") with initial cursor position:"),r),this.blockFilters.add(t),this.setFilterTimeout(t),e.abrupt("return",(0,u.hexStringFromIntNumber)(t));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"newPendingTransactionFilter",value:function(){var e=i(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.makeFilterId(),e.next=3,this.setInitialCursorPosition(t,"latest");case 3:return r=e.sent,console.log("Installing new block filter (".concat(t,") with initial cursor position:"),r),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),e.abrupt("return",(0,u.hexStringFromIntNumber)(t));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"uninstallFilter",value:function(e){var t=(0,u.intNumberFromHexString)(e);return console.log("Uninstalling filter (".concat(t,")")),this.deleteFilter(t),!0}},{key:"getFilterChanges",value:function(e){var t=(0,u.intNumberFromHexString)(e);return this.timeouts.has(t)&&this.setFilterTimeout(t),this.logFilters.has(t)?this.getLogFilterChanges(t):this.blockFilters.has(t)?this.getBlockFilterChanges(t):this.pendingTransactionFilters.has(t)?this.getPendingTransactionFilterChanges(t):Promise.resolve(m())}},{key:"getFilterLogs",value:function(){var e=i(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,u.intNumberFromHexString)(t),n=this.logFilters.get(r)){e.next=4;break}return e.abrupt("return",m());case 4:return e.abrupt("return",this.sendAsyncPromise(Object.assign(Object.assign({},f),{method:"eth_getLogs",params:[h(n)]})));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"makeFilterId",value:function(){return(0,c.IntNumber)(++this.nextFilterId)}},{key:"sendAsyncPromise",value:function(e){var t=this;return new Promise((function(r,n){t.provider.sendAsync(e,(function(e,t){return e?n(e):Array.isArray(t)||null==t?n(new Error("unexpected response received: ".concat(JSON.stringify(t)))):void r(t)}))}))}},{key:"deleteFilter",value:function(e){console.log("Deleting filter (".concat(e,")")),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}},{key:"getLogFilterChanges",value:function(){var e=i(a().mark((function e(t){var r,i,o,s,d,l,p,b;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.logFilters.get(t),(i=this.cursors.get(t))&&r){e.next=4;break}return e.abrupt("return",m());case 4:return e.next=6,this.getCurrentBlockHeight();case 6:if(o=e.sent,s="latest"===r.toBlock?o:r.toBlock,!(i>o)){e.next=10;break}return e.abrupt("return",g());case 10:if(!(i>r.toBlock)){e.next=12;break}return e.abrupt("return",g());case 12:return console.log("Fetching logs from ".concat(i," to ").concat(s," for filter ").concat(t)),e.next=15,this.sendAsyncPromise(Object.assign(Object.assign({},f),{method:"eth_getLogs",params:[h(Object.assign(Object.assign({},r),{fromBlock:i,toBlock:s}))]}));case 15:return d=e.sent,Array.isArray(d.result)&&(l=d.result.map((function(e){return(0,u.intNumberFromHexString)(e.blockNumber||"0x0")})),(p=Math.max.apply(Math,n(l)))&&p>i&&(b=(0,c.IntNumber)(p+1),console.log("Moving cursor position for filter (".concat(t,") from ").concat(i," to ").concat(b)),this.cursors.set(t,b))),e.abrupt("return",d);case 18:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getBlockFilterChanges",value:function(){var e=i(a().mark((function e(t){var r,n,i,o,s=this;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.cursors.get(t)){e.next=3;break}return e.abrupt("return",m());case 3:return e.next=5,this.getCurrentBlockHeight();case 5:if(n=e.sent,!(r>n)){e.next=8;break}return e.abrupt("return",g());case 8:return console.log("Fetching blocks from ".concat(r," to ").concat(n," for filter (").concat(t,")")),e.next=11,Promise.all((0,u.range)(r,n+1).map((function(e){return s.getBlockHashByNumber((0,c.IntNumber)(e))})));case 11:return i=e.sent.filter((function(e){return!!e})),o=(0,c.IntNumber)(r+i.length),console.log("Moving cursor position for filter (".concat(t,") from ").concat(r," to ").concat(o)),this.cursors.set(t,o),e.abrupt("return",Object.assign(Object.assign({},f),{result:i}));case 16:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getPendingTransactionFilterChanges",value:function(){var e=i(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(g()));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"setInitialCursorPosition",value:function(){var e=i(a().mark((function e(t,r){var n,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCurrentBlockHeight();case 2:return n=e.sent,i="number"===typeof r&&r>n?r:n,this.cursors.set(t,i),e.abrupt("return",i);case 6:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"setFilterTimeout",value:function(e){var t=this,r=this.timeouts.get(e);r&&window.clearTimeout(r);var n=window.setTimeout((function(){console.log("Filter (".concat(e,") timed out")),t.deleteFilter(e)}),3e5);this.timeouts.set(e,n)}},{key:"getCurrentBlockHeight",value:function(){var e=i(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sendAsyncPromise(Object.assign(Object.assign({},f),{method:"eth_blockNumber",params:[]}));case 2:return t=e.sent,r=t.result,e.abrupt("return",(0,u.intNumberFromHexString)((0,u.ensureHexString)(r)));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getBlockHashByNumber",value:function(){var e=i(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sendAsyncPromise(Object.assign(Object.assign({},f),{method:"eth_getBlockByNumber",params:[(0,u.hexStringFromIntNumber)(t),!1]}));case 2:if(!(r=e.sent).result||"string"!==typeof r.result.hash){e.next=5;break}return e.abrupt("return",(0,u.ensureHexString)(r.result.hash));case 5:return e.abrupt("return",null);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function l(e){return{fromBlock:p(e.fromBlock),toBlock:p(e.toBlock),addresses:void 0===e.address?null:Array.isArray(e.address)?e.address:[e.address],topics:e.topics||[]}}function h(e){var t={fromBlock:b(e.fromBlock),toBlock:b(e.toBlock),topics:e.topics};return null!==e.addresses&&(t.address=e.addresses),t}function p(e){if(void 0===e||"latest"===e||"pending"===e)return"latest";if("earliest"===e)return(0,c.IntNumber)(0);if((0,u.isHexString)(e))return(0,u.intNumberFromHexString)(e);throw new Error("Invalid block option: ".concat(String(e)))}function b(e){return"latest"===e?e:(0,u.hexStringFromIntNumber)(e)}function m(){return Object.assign(Object.assign({},f),{error:{code:-32e3,message:"filter not found"}})}function g(){return Object.assign(Object.assign({},f),{result:[]})}t.FilterPolyfill=d,t.filterFromParam=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONRPCMethod=void 0,function(e){e.eth_accounts="eth_accounts",e.eth_coinbase="eth_coinbase",e.net_version="net_version",e.eth_chainId="eth_chainId",e.eth_uninstallFilter="eth_uninstallFilter",e.eth_requestAccounts="eth_requestAccounts",e.eth_sign="eth_sign",e.eth_ecRecover="eth_ecRecover",e.personal_sign="personal_sign",e.personal_ecRecover="personal_ecRecover",e.eth_signTransaction="eth_signTransaction",e.eth_sendRawTransaction="eth_sendRawTransaction",e.eth_sendTransaction="eth_sendTransaction",e.eth_signTypedData_v1="eth_signTypedData_v1",e.eth_signTypedData_v2="eth_signTypedData_v2",e.eth_signTypedData_v3="eth_signTypedData_v3",e.eth_signTypedData_v4="eth_signTypedData_v4",e.eth_signTypedData="eth_signTypedData",e.walletlink_arbitrary="walletlink_arbitrary",e.wallet_addEthereumChain="wallet_addEthereumChain",e.wallet_switchEthereumChain="wallet_switchEthereumChain",e.wallet_watchAsset="wallet_watchAsset",e.eth_subscribe="eth_subscribe",e.eth_unsubscribe="eth_unsubscribe",e.eth_newFilter="eth_newFilter",e.eth_newBlockFilter="eth_newBlockFilter",e.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",e.eth_getFilterChanges="eth_getFilterChanges",e.eth_getFilterLogs="eth_getFilterLogs"}(t.JSONRPCMethod||(t.JSONRPCMethod={}))},function(e,t,r){"use strict";var n=r(20).default,a=r(124).default,i=r(21).default,o=r(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionManager=void 0;var s=r(3563),c=r(3567),u=function(){},f=function(){function e(t){i(this,e);var r=new s({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),n=c({blockTracker:r,provider:t}),a=n.events,o=n.middleware;this.events=a,this.subscriptionMiddleware=o}return o(e,[{key:"handleRequest",value:function(){var e=a(n().mark((function e(t){var r;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,this.subscriptionMiddleware(t,r,u,u);case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"destroy",value:function(){this.subscriptionMiddleware.destroy()}}]),e}();t.SubscriptionManager=f},function(e,t,r){var n=r(20).default,a=r(124).default,i=r(21).default,o=r(22).default,s=r(37).default,c=r(38).default,u=r(1037),f=r(3564),d=function(e){"use strict";s(r,e);var t=c(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,r),!n.provider)throw new Error("PollingBlockTracker - no provider specified.");var a=n.pollingInterval||2e4,o=n.retryTimeout||a/10,s=void 0===n.keepEventLoopActive||n.keepEventLoopActive,c=n.setSkipCacheFlag||!1;return(e=t.call(this,Object.assign({blockResetDuration:a},n)))._provider=n.provider,e._pollingInterval=a,e._retryTimeout=o,e._keepEventLoopActive=s,e._setSkipCacheFlag=c,e}return o(r,[{key:"checkForLatestBlock",value:function(){var e=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._updateLatestBlock();case 2:return e.next=4,this.getLatestBlock();case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_start",value:function(){var e=this;this._performSync().catch((function(t){return e.emit("error",t)}))}},{key:"_performSync",value:function(){var e=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isRunning){e.next=16;break}return e.prev=1,e.next=4,this._updateLatestBlock();case 4:return e.next=6,l(this._pollingInterval,!this._keepEventLoopActive);case 6:e.next=14;break;case 8:e.prev=8,e.t0=e.catch(1),t=new Error("PollingBlockTracker - encountered an error while attempting to update latest block:\n".concat(e.t0.stack));try{this.emit("error",t)}catch(r){console.error(t)}return e.next=14,l(this._retryTimeout,!this._keepEventLoopActive);case 14:e.next=0;break;case 16:case"end":return e.stop()}}),e,this,[[1,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"_updateLatestBlock",value:function(){var e=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._fetchLatestBlock();case 2:t=e.sent,this._newPotentialLatest(t);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_fetchLatestBlock",value:function(){var e=a(n().mark((function e(){var t,r,a=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]},this._setSkipCacheFlag&&(t.skipCache=!0),e.next=4,u((function(e){return a._provider.sendAsync(t,e)}))();case 4:if(!(r=e.sent).error){e.next=7;break}throw new Error("PollingBlockTracker - encountered error fetching block:\n".concat(r.error));case 7:return e.abrupt("return",r.result);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),r}(f);function l(e,t){return new Promise((function(r){var n=setTimeout(r,e);n.unref&&t&&n.unref()}))}e.exports=d},function(e,t,r){var n=r(20).default,a=r(124).default,i=r(21).default,o=r(22).default,s=r(203).default,c=r(624).default,u=r(403).default,f=r(37).default,d=r(38).default,l=(r(1517),r(1037),r(3566)),h=function(e,t){return e+t},p=["sync","latest"],b=function(e){"use strict";f(r,e);var t=d(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,r),(e=t.call(this))._blockResetDuration=n.blockResetDuration||2e4,e._blockResetTimeout,e._currentBlock=null,e._isRunning=!1,e._onNewListener=e._onNewListener.bind(s(e)),e._onRemoveListener=e._onRemoveListener.bind(s(e)),e._resetCurrentBlock=e._resetCurrentBlock.bind(s(e)),e._setupInternalEvents(),e}return o(r,[{key:"isRunning",value:function(){return this._isRunning}},{key:"getCurrentBlock",value:function(){return this._currentBlock}},{key:"getLatestBlock",value:function(){var e=a(n().mark((function e(){var t,r=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._currentBlock){e.next=2;break}return e.abrupt("return",this._currentBlock);case 2:return e.next=4,new Promise((function(e){return r.once("latest",e)}));case 4:return t=e.sent,e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"removeAllListeners",value:function(e){e?c(u(r.prototype),"removeAllListeners",this).call(this,e):c(u(r.prototype),"removeAllListeners",this).call(this),this._setupInternalEvents(),this._onRemoveListener()}},{key:"_start",value:function(){}},{key:"_end",value:function(){}},{key:"_setupInternalEvents",value:function(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}},{key:"_onNewListener",value:function(e,t){p.includes(e)&&this._maybeStart()}},{key:"_onRemoveListener",value:function(e,t){this._getBlockTrackerEventCount()>0||this._maybeEnd()}},{key:"_maybeStart",value:function(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}},{key:"_maybeEnd",value:function(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}},{key:"_getBlockTrackerEventCount",value:function(){var e=this;return p.map((function(t){return e.listenerCount(t)})).reduce(h)}},{key:"_newPotentialLatest",value:function(e){var t=this._currentBlock;t&&m(e)<=m(t)||this._setCurrentBlock(e)}},{key:"_setCurrentBlock",value:function(e){var t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}},{key:"_setupBlockResetTimeout",value:function(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}},{key:"_cancelBlockResetTimeout",value:function(){clearTimeout(this._blockResetTimeout)}},{key:"_resetCurrentBlock",value:function(){this._currentBlock=null}}]),r}(l);function m(e){return Number.parseInt(e,16)}e.exports=b},function(e,t){e.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,r="undefined"!==typeof e.start?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}},function(e,t,r){var n=r(609),a=r(95),i="object"===typeof Reflect?Reflect:null,o=i&&"function"===typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};function s(){a.call(this)}function c(e,t,r){try{o(e,t,r)}catch(n){setTimeout((function(){throw n}))}}e.exports=s,n.inherits(s,a),s.prototype.emit=function(e){for(var t=[],r=1;r0&&(i=t[0]),i instanceof Error)throw i;var o=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw o.context=i,o}var s=a[e];if(void 0===s)return!1;if("function"===typeof s)c(s,this,t);else{var u=s.length,f=function(e,t){for(var r=new Array(t),n=0;n-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:function(e){return s(o.errorCodes.rpc.invalidInput,e)},resourceNotFound:function(e){return s(o.errorCodes.rpc.resourceNotFound,e)},resourceUnavailable:function(e){return s(o.errorCodes.rpc.resourceUnavailable,e)},transactionRejected:function(e){return s(o.errorCodes.rpc.transactionRejected,e)},methodNotSupported:function(e){return s(o.errorCodes.rpc.methodNotSupported,e)},limitExceeded:function(e){return s(o.errorCodes.rpc.limitExceeded,e)}},provider:{userRejectedRequest:function(e){return c(o.errorCodes.provider.userRejectedRequest,e)},unauthorized:function(e){return c(o.errorCodes.provider.unauthorized,e)},unsupportedMethod:function(e){return c(o.errorCodes.provider.unsupportedMethod,e)},disconnected:function(e){return c(o.errorCodes.provider.disconnected,e)},chainDisconnected:function(e){return c(o.errorCodes.provider.chainDisconnected,e)},custom:function(e){if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");var t=e.code,r=e.message,n=e.data;if(!r||"string"!==typeof r)throw new Error('"message" must be a nonempty string');return new a.EthereumProviderError(t,r,n)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMiddleware=void 0;var n=r(1521);t.mergeMiddleware=function(e){var t=new n.JsonRpcEngine;return e.forEach((function(e){return t.push(e)})),t.asMiddleware()}},function(e,t,r){var n=r(20).default,a=r(124).default,i=r(3982).Mutex,o=r(1519).createAsyncMiddleware,s=r(1518),c=r(3576),u=r(3579),f=r(3580),d=r(657),l=d.intToHex,h=d.hexToInt;function p(e){return b(a(n().mark((function t(){var r,a,i=arguments;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.apply(void 0,i);case 2:return r=t.sent,a=l(r.id),t.abrupt("return",a);case 5:case"end":return t.stop()}}),t)}))))}function b(e){return o(function(){var t=a(n().mark((function t(r,a){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.apply(null,r.params);case 2:i=t.sent,a.result=i;case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}())}function m(e,t){var r=[];for(var n in e)r.push(e[n]);return r}e.exports=function(e){var t=e.blockTracker,r=e.provider,o=0,d={},g=new i,v=function(e){var t=e.mutex;return function(e){return function(){var r=a(n().mark((function r(a,i,o,s){return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.acquire();case 2:(0,r.sent)(),e(a,i,o,s);case 5:case"end":return r.stop()}}),r)})));return function(e,t,n,a){return r.apply(this,arguments)}}()}}({mutex:g}),y=s({eth_newFilter:v(p(w)),eth_newBlockFilter:v(p(E)),eth_newPendingTransactionFilter:v(p(C)),eth_uninstallFilter:v(b(M)),eth_getFilterChanges:v(b(B)),eth_getFilterLogs:v(b(S))}),A=function(){var e=a(n().mark((function e(t){var r,i,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.oldBlock,i=t.newBlock,0!==d.length){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,g.acquire();case 5:return o=e.sent,e.prev=6,e.next=9,Promise.all(m(d).map(function(){var e=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.update({oldBlock:r,newBlock:i});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error(e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()));case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),console.error(e.t0);case 14:o();case 15:case"end":return e.stop()}}),e,null,[[6,11]])})));return function(t){return e.apply(this,arguments)}}();return y.newLogFilter=w,y.newBlockFilter=E,y.newPendingTransactionFilter=C,y.uninstallFilter=M,y.getFilterChanges=B,y.getFilterLogs=S,y.destroy=function(){!function(){N.apply(this,arguments)}()},y;function w(e){return x.apply(this,arguments)}function x(){return(x=a(n().mark((function e(t){var a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new c({provider:r,params:t}),e.next=3,T(a);case 3:return e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(){return _.apply(this,arguments)}function _(){return(_=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new u({provider:r}),e.next=3,T(t);case 3:return e.sent,e.abrupt("return",t);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(){return k.apply(this,arguments)}function k(){return(k=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new f({provider:r}),e.next=3,T(t);case 3:return e.sent,e.abrupt("return",t);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(e){return I.apply(this,arguments)}function I(){return I=a(n().mark((function e(t){var r,a,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h(t),a=d[r]){e.next=4;break}throw new Error('No filter for index "'.concat(r,'"'));case 4:return i=a.getChangesAndClear(),e.abrupt("return",i);case 6:case"end":return e.stop()}}),e)}))),I.apply(this,arguments)}function S(e){return O.apply(this,arguments)}function O(){return O=a(n().mark((function e(t){var r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h(t),a=d[r]){e.next=4;break}throw new Error('No filter for index "'.concat(r,'"'));case 4:return"log"===a.type?results=a.getAllResults():results=[],e.abrupt("return",results);case 6:case"end":return e.stop()}}),e)}))),O.apply(this,arguments)}function M(e){return D.apply(this,arguments)}function D(){return D=a(n().mark((function e(t){var r,a,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h(t),a=d[r],!(i=Boolean(a))){e.next=6;break}return e.next=6,R(r);case 6:return e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)}))),D.apply(this,arguments)}function T(e){return F.apply(this,arguments)}function F(){return(F=a(n().mark((function e(r){var a,i,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=m(d).length,e.next=3,t.getLatestBlock();case 3:return i=e.sent,e.next=6,r.initialize({currentBlock:i});case 6:return o++,d[o]=r,r.id=o,r.idHex=l(o),s=m(d).length,j({prevFilterCount:a,newFilterCount:s}),e.abrupt("return",o);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){return P.apply(this,arguments)}function P(){return P=a(n().mark((function e(t){var r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=m(d).length,delete d[t],a=m(d).length,j({prevFilterCount:r,newFilterCount:a});case 4:case"end":return e.stop()}}),e)}))),P.apply(this,arguments)}function N(){return(N=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=m(d).length,d={},j({prevFilterCount:t,newFilterCount:0});case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(e){var r=e.prevFilterCount,n=e.newFilterCount;0===r&&n>0?t.on("sync",A):r>0&&0===n&&t.removeListener("sync",A)}}},function(e,t,r){var n=r(20).default,a=r(124).default,i=r(21).default,o=r(22).default,s=r(37).default,c=r(38).default,u=r(1517),f=r(3577),d=r(3578),l=r(657),h=(l.bnToHex,l.hexToInt),p=l.incrementHexInt,b=l.minBlockRef,m=l.blockRefIsNumber,g=function(e){"use strict";s(r,e);var t=c(r);function r(e){var n,a=e.provider,o=e.params;return i(this,r),(n=t.call(this)).type="log",n.ethQuery=new u(a),n.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},o),n.params.address&&(Array.isArray(n.params.address)||(n.params.address=[n.params.address]),n.params.address=n.params.address.map((function(e){return e.toLowerCase()}))),n}return o(r,[{key:"initialize",value:function(){var e=a(n().mark((function e(t){var r,a,i,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.currentBlock,a=this.params.fromBlock,["latest","pending"].includes(a)&&(a=r),"earliest"===a&&(a="0x0"),this.params.fromBlock=a,i=b(this.params.toBlock,r),o=Object.assign({},this.params,{toBlock:i}),e.next=9,this._fetchLogs(o);case 9:s=e.sent,this.addInitialResults(s);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"update",value:function(){var e=a(n().mark((function e(t){var r,a,i,o,s,c,u,f=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.oldBlock,a=t.newBlock,i=a,o=r?p(r):a,s=Object.assign({},this.params,{fromBlock:o,toBlock:i}),e.next=6,this._fetchLogs(s);case 6:c=e.sent,u=c.filter((function(e){return f.matchLog(e)})),this.addResults(u);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_fetchLogs",value:function(){var e=a(n().mark((function e(t){var r,a=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f((function(e){return a.ethQuery.getLogs(t,e)}))();case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"matchLog",value:function(e){if(h(this.params.fromBlock)>=h(e.blockNumber))return!1;if(m(this.params.toBlock)&&h(this.params.toBlock)<=h(e.blockNumber))return!1;var t=e.address&&e.address.toLowerCase();return!(this.params.address&&t&&!this.params.address.includes(t))&&this.params.topics.every((function(t,r){var n=e.topics[r];if(!n)return!1;n=n.toLowerCase();var a=Array.isArray(t)?t:[t];return!!a.includes(null)||(a=a.map((function(e){return e.toLowerCase()}))).includes(n)}))}}]),r}(d);e.exports=g},function(e,t,r){"use strict";var n=r(127).default,a=function(e,t,r,n){return function(){for(var a=this,i=arguments.length,o=new Array(i),s=0;s65536?(n[0]=240|(1835008&i)>>>18,n[1]=128|(258048&i)>>>12,n[2]=128|(4032&i)>>>6,n[3]=128|63&i):i>2048?(n[0]=224|(61440&i)>>>12,n[1]=128|(4032&i)>>>6,n[2]=128|63&i):i>128?(n[0]=192|(1984&i)>>>6,n[1]=128|63&i):n[0]=i,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function n(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}r.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,r=this.parsedData.length;t=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=n.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(this.modules[e+r][t+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},getBestMaskPattern:function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=g.getLostPoint(this);(0==r||e>n)&&(e=n,t=r)}return t},createMovieClip:function(e,t,r){var n=e.createEmptyMovieClip(t,r);this.make();for(var a=0;a>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(r=0;r<18;r++){n=!e&&1==(t>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=g.getBCHTypeInfo(r),a=0;a<15;a++){var i=!e&&1==(n>>a&1);a<6?this.modules[a][8]=i:a<8?this.modules[a+1][8]=i:this.modules[this.moduleCount-15+a][8]=i}for(a=0;a<15;a++){i=!e&&1==(n>>a&1);a<8?this.modules[8][this.moduleCount-a-1]=i:a<9?this.modules[8][15-a-1+1]=i:this.modules[8][15-a-1]=i}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var r=-1,n=this.moduleCount-1,a=7,i=0,o=this.moduleCount-1;o>0;o-=2)for(6==o&&o--;;){for(var s=0;s<2;s++)if(null==this.modules[n][o-s]){var c=!1;i>>a&1)),g.getMask(t,n,o-s)&&(c=!c),this.modules[n][o-s]=c,-1==--a&&(i++,a=7)}if((n+=r)<0||this.moduleCount<=n){n-=r,r=-r;break}}}},n.PAD0=236,n.PAD1=17,n.createData=function(e,t,r){for(var a=w.getRSBlocks(e,t),i=new x,o=0;o8*c)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+8*c+")");for(i.getLengthInBits()+4<=8*c&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=8*c)&&(i.put(n.PAD0,8),!(i.getLengthInBits()>=8*c));)i.put(n.PAD1,8);return n.createBytes(i,a)},n.createBytes=function(e,t){for(var r=0,n=0,a=0,i=new Array(t.length),o=new Array(t.length),s=0;s=0?l.get(h):0}}var p=0;for(f=0;f=0;)t^=g.G15<=0;)t^=g.G18<>>=1;return t},getPatternPosition:function(e){return g.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case u:return(t+r)%2==0;case f:return t%2==0;case d:return r%3==0;case l:return(t+r)%3==0;case h:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case p:return t*r%2+t*r%3==0;case b:return(t*r%2+t*r%3)%2==0;case m:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new A([1],0),r=0;r5&&(r+=3+i-5)}for(n=0;n=256;)e-=255;return v.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},y=0;y<8;y++)v.EXP_TABLE[y]=1<>>7-e%8&1)},put:function(e,t){for(var r=0;r>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var E=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function _(e){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},"string"===typeof e&&(e={content:e}),e)for(var t in e)this.options[t]=e[t];if("string"!==typeof this.options.content)throw new Error("Expected 'content' as string!");if(0===this.options.content.length)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");var r=this.options.content,a=function(e,t){for(var r=function(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=e?3:0)}(e),n=1,a=0,i=0,o=E.length;i<=o;i++){var s=E[i];if(!s)throw new Error("Content too long: expected "+a+" but got "+r);switch(t){case"L":a=s[0];break;case"M":a=s[1];break;case"Q":a=s[2];break;case"H":a=s[3];break;default:throw new Error("Unknwon error correction level: "+t)}if(r<=a)break;n++}if(n>E.length)throw new Error("Content too long");return n}(r,this.options.ecl),u=function(e){switch(e){case"L":return i;case"M":return o;case"Q":return s;case"H":return c;default:throw new Error("Unknwon error correction level: "+e)}}(this.options.ecl);this.qrcode=new n(a,u),this.qrcode.addData(r),this.qrcode.make()}_.prototype.svg=function(e){var t=this.options||{},r=this.qrcode.modules;"undefined"==typeof e&&(e={container:t.container||"svg"});for(var n="undefined"==typeof t.pretty||!!t.pretty,a=n?" ":"",i=n?"\r\n":"",o=t.width,s=t.height,c=r.length,u=o/(c+2*t.padding),f=s/(c+2*t.padding),d="undefined"!=typeof t.join&&!!t.join,l="undefined"!=typeof t.swap&&!!t.swap,h="undefined"==typeof t.xmlDeclaration||!!t.xmlDeclaration,p="undefined"!=typeof t.predefined&&!!t.predefined,b=p?a+''+i:"",m=a+''+i,g="",v="",y=0;y'+i:a+''+i}}d&&(g=a+'');var k="";if(void 0!==this.options.image&&this.options.image.svg){var B=o*this.options.image.width/100,I=s*this.options.image.height/100,S=s/2-I/2;k+=''),k+=this.options.image.svg+i,k+=""}var O="";switch(e.container){case"svg":h&&(O+=''+i),O+=''+i,O+=b+m+g,O+=k,O+="";break;case"svg-viewbox":h&&(O+=''+i),O+=''+i,O+=b+m+g,O+=k,O+="";break;case"g":O+=''+i,O+=b+m+g,O+=k,O+="";break;default:O+=(b+m+g+k).replace(/^\s+/,"")}return O},e.exports=_},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-walletlink-css-reset .-walletlink-spinner{display:inline-block}.-walletlink-css-reset .-walletlink-spinner svg{display:inline-block;animation:2s linear infinite -walletlink-spinner-svg}.-walletlink-css-reset .-walletlink-spinner svg circle{animation:1.9s ease-in-out infinite both -walletlink-spinner-circle;display:block;fill:transparent;stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -walletlink-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -walletlink-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"},function(e,t,r){"use strict";var n=r(48).default,a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TryExtensionLinkDialog=void 0;var i=a(r(39)),o=r(149),s=r(807),c=a(r(3589)),u=a(r(3590)),f=a(r(3591)),d=a(r(3592)),l=r(1524),h=r(1525),p=a(r(3593)),b=r(1526);t.TryExtensionLinkDialog=function(e){var t=(0,s.useState)(!e.isOpen),r=n(t,2),a=r[0],c=r[1],u=(0,s.useState)(!e.isOpen),f=n(u,2),d=f[0],l=f[1];return(0,s.useEffect)((function(){var t=e.isOpen,r=[window.setTimeout((function(){l(!t)}),10)];return t?c(!1):r.push(window.setTimeout((function(){c(!0)}),360)),function(){r.forEach(window.clearTimeout)}}),[e.isOpen]),(0,o.h)("div",{class:(0,i.default)("-walletlink-extension-dialog-container",a&&"-walletlink-extension-dialog-container-hidden")},(0,o.h)("style",null,p.default),(0,o.h)("div",{class:(0,i.default)("-walletlink-extension-dialog-backdrop",d&&"-walletlink-extension-dialog-backdrop-hidden")}),(0,o.h)("div",{class:"-walletlink-extension-dialog"},(0,o.h)("div",{class:(0,i.default)("-walletlink-extension-dialog-box",d&&"-walletlink-extension-dialog-box-hidden")},(0,o.h)(m,{onInstallClick:function(){window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),e.connectDisabled?null:(0,o.h)(g,{darkMode:e.darkMode,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,walletLinkUrl:e.walletLinkUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection}),e.onCancel&&(0,o.h)(y,{onClick:e.onCancel}))))};var m=function(e){return(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top"},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top-install-region"},(0,o.h)("h2",null,"Try the Coinbase Wallet extension"),(0,o.h)("button",{onClick:e.onInstallClick},"Install")),(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top-info-region"},(0,o.h)(v,{icon:u.default,text:"Connect to crypto apps with one click"}),(0,o.h)(v,{icon:f.default,text:"Your private key is stored securely"}),(0,o.h)(v,{icon:c.default,text:"Works with Ethereum, Polygon, and more"})))},g=function(e){var t=window.encodeURIComponent(e.walletLinkUrl),r=e.isParentConnection?"parent-id":"id",n="".concat(e.walletLinkUrl,"/#/link?").concat(r,"=").concat(e.sessionId,"&secret=").concat(e.sessionSecret,"&server=").concat(t,"&v=1");return(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom"},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom-description-region"},(0,o.h)("h2",null,"Or scan to connect"),(0,o.h)("body",{class:"-walletlink-extension-dialog-box-bottom-description"},"Open ",(0,o.h)("a",{href:"https://wallet.coinbase.com/"},"Coinbase Wallet")," on your mobile phone and scan")),(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom-qr-region"},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom-qr-wrapper"},(0,o.h)(l.QRCode,{content:n,width:150,height:150,fgColor:"#000",bgColor:"transparent",image:{svg:d.default,width:34,height:34}})),(0,o.h)("input",{type:"hidden",name:"walletlink-version",value:b.LIB_VERSION}),(0,o.h)("input",{type:"hidden",value:n}),!e.isConnected&&(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom-qr-connecting"},(0,o.h)(h.Spinner,{size:36,color:"#000"}),(0,o.h)("p",null,"Connecting..."))))},v=function(e){return(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top-description"},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top-description-icon-wrapper"},(0,o.h)("img",{src:e.icon})),(0,o.h)("body",{class:"-walletlink-extension-dialog-box-top-description-text"},e.text))},y=function(e){return(0,o.h)("button",{class:"-walletlink-extension-dialog-box-cancel",onClick:e.onClick},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-cancel-x"}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLTEuNSA1LTEuOTUgNVpNNi4wNSA3QzYuMjggMy43NyA3LjU1IDIgOCAyYy40NSAwIDEuNzIgMS43NyAxLjk1IDVoLTMuOVpNNC45NCAyLjg1QzQuNDYgNCA0LjEzIDUuNDMgNC4wMyA3SDIuMDljLjMtMS43NyAxLjM3LTMuMjcgMi44NS00LjE1Wk0yLjA5IDloMS45NGMuMSAxLjU3LjQyIDMgLjkxIDQuMTVBNS45OTggNS45OTggMCAwIDEgMi4wOSA5Wm04Ljk3IDQuMTVjLjQ4LTEuMTUuODEtMi41OC45MS00LjE1aDEuOTRhNS45OTggNS45OTggMCAwIDEtMi44NSA0LjE1WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1LjYzNSAyLjExN2EzLjg4OSAzLjg4OSAwIDAgMC01LjUyMSAwTDYuODkgNS4zMzVBMy44OTQgMy44OTQgMCAwIDAgNS44IDguNzM5Yy4wODMuNTA2LjI2OCAxLjAxMS41NTMgMS40NjYuMTUxLjI1My4zMzYuNDcyLjUzNy42OTFsLjYyMS42MjQgMS4xNDEtMS4xNDYtLjYyLS42MjRhMi4xMDUgMi4xMDUgMCAwIDEtLjQ4Ny0uNzQxIDIuMzQgMi4zNCAwIDAgMSAuNTAzLTIuNTFsMy4yMDYtMy4yMmEyLjI5MyAyLjI5MyAwIDAgMSAzLjIzOSAwYy44OS44OTQuODkgMi4zNDMgMCAzLjI1M2wtMS41MjcgMS41MzNjLjIzNC42NC4zMzUgMS4zMzEuMzAyIDIuMDA1bDIuMzgzLTIuMzkyYzEuNTEtMS41MzQgMS40OTMtNC4wMjgtLjAxNy01LjU2MVoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBkPSJNMTEuMjcxIDcuNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='\n\n\n\n\n\n\n'},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='.-walletlink-css-reset .-walletlink-extension-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-walletlink-css-reset .-walletlink-extension-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);transition:opacity .25s}.-walletlink-css-reset .-walletlink-extension-dialog-backdrop-hidden{opacity:0}.-walletlink-css-reset .-walletlink-extension-dialog-box{display:flex;position:relative;max-width:500px;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-walletlink-css-reset .-walletlink-extension-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-walletlink-css-reset .-walletlink-extension-dialog-box-top{display:flex;flex-direction:row;background-color:#fff;border-radius:8px;overflow:hidden;min-height:300px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-install-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;padding:32px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-install-region button{display:block;border-radius:8px;background-color:#1652f0;color:#fff;width:90%;min-width:fit-content;height:44px;margin-top:16px;font-size:16px;padding-left:16px;padding-right:16px;cursor:pointer;font-weight:500;text-align:center}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;background-color:#fafbfc}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description{display:flex;flex-direction:row;align-items:center;padding-top:14px;padding-bottom:14px;padding-left:24px;padding-right:32px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-icon-wrapper{display:block;position:relative;width:40px;height:40px;flex-shrink:0;flex-grow:0;border-radius:20px;background-color:#fff;box-shadow:0px 0px 8px rgba(0,0,0,.04),0px 16px 24px rgba(0,0,0,.06)}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-icon-wrapper img{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-text{margin-left:16px;flex-grow:1;font-size:13px;line-height:19px;color:#000;align-self:center}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;background-color:#fff;margin-top:8px}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description-region{display:flex;flex-direction:column;justify-content:center;padding:32px;flex-grow:1}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description{font-size:13px;line-height:19px;margin-top:12px;color:#aaa}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description a{font-size:inherit;line-height:inherit;color:#1652f0;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-region{position:relative;flex-shrink:0;display:flex;flex-direction:column;justify-content:center;padding-left:24px;padding-right:24px;padding-top:16px;padding-bottom:16px}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-wrapper{position:relative;display:block;padding:8px;border-radius:8px;box-shadow:0px 4px 12px rgba(0,0,0,.1)}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-wrapper img{display:block}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background-color:rgba(255,255,255,.95)}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;color:#000;margin-top:16px}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel{position:absolute;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;top:16px;right:16px;width:24px;height:24px;border-radius:12px;background-color:#fafbfc;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::after{content:"";position:absolute;display:block;top:-1px;left:-7px;width:14px;height:1px;background-color:#000;transition:background-color .2s}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::before{transform:rotate(45deg)}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::after{transform:rotate(135deg)}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-a,.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-b{background-color:#000}.-walletlink-css-reset .-walletlink-extension-dialog-container{display:block}.-walletlink-css-reset .-walletlink-extension-dialog-container-hidden{display:none}.-walletlink-css-reset .-walletlink-extension-dialog h2{display:block;text-align:left;font-size:22px;font-weight:600;line-height:28px;color:#000}'},function(e,t,r){"use strict";var n=r(48).default,a=r(21).default,i=r(22).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Snackbar=void 0;var s=o(r(39)),c=r(149),u=r(807),f=o(r(3595)),d=function(){function e(t){a(this,e),this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=t.darkMode}return i(e,[{key:"attach",value:function(e){this.root=document.createElement("div"),this.root.className="-walletlink-snackbar-root",e.appendChild(this.root),this.render()}},{key:"presentItem",value:function(e){var t=this,r=this.nextItemKey++;return this.items.set(r,e),this.render(),function(){t.items.delete(r),t.render()}}},{key:"clear",value:function(){this.items.clear(),this.render()}},{key:"render",value:function(){this.root&&(0,c.render)((0,c.h)("div",null,(0,c.h)(l,{darkMode:this.darkMode},Array.from(this.items.entries()).map((function(e){var t=n(e,2),r=t[0],a=t[1];return(0,c.h)(h,Object.assign({},a,{key:r}))})))),this.root)}}]),e}();t.Snackbar=d;var l=function(e){return(0,c.h)("div",{class:(0,s.default)("-walletlink-snackbar-container")},(0,c.h)("style",null,f.default),(0,c.h)("div",{class:"-walletlink-snackbar"},e.children))},h=function(e){var t=e.autoExpand,r=e.message,a=e.menuItems,i=(0,u.useState)(!0),o=n(i,2),f=o[0],d=o[1],l=(0,u.useState)(null!==t&&void 0!==t&&t),h=n(l,2),p=h[0],b=h[1];(0,u.useEffect)((function(){var e=[window.setTimeout((function(){d(!1)}),1),window.setTimeout((function(){b(!0)}),1e4)];return function(){e.forEach(window.clearTimeout)}}));return(0,c.h)("div",{class:(0,s.default)("-walletlink-snackbar-instance",f&&"-walletlink-snackbar-instance-hidden",p&&"-walletlink-snackbar-instance-expanded")},(0,c.h)("div",{class:"-walletlink-snackbar-instance-header",onClick:function(){b(!p)}},(0,c.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-walletlink-snackbar-instance-header-cblogo"}),(0,c.h)("div",{class:"-walletlink-snackbar-instance-header-message"},r),(0,c.h)("div",{class:"-gear-container"},!p&&(0,c.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,c.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,c.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),a&&a.length>0&&(0,c.h)("div",{class:"-walletlink-snackbar-instance-menu"},a.map((function(e,t){return(0,c.h)("div",{class:(0,s.default)("-walletlink-snackbar-instance-menu-item",e.isRed&&"-walletlink-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},(0,c.h)("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,c.h)("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),(0,c.h)("span",{class:(0,s.default)("-walletlink-snackbar-instance-menu-item-info",e.isRed&&"-walletlink-snackbar-instance-menu-item-info-is-red")},e.info))}))))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-walletlink-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-walletlink-css-reset .-gear-container *{user-select:none}.-walletlink-css-reset .-gear-container svg{opacity:0;position:absolute}.-walletlink-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-walletlink-css-reset .-walletlink-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-walletlink-css-reset .-walletlink-snackbar *{user-select:none}.-walletlink-css-reset .-walletlink-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-walletlink-css-reset .-walletlink-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-walletlink-css-reset .-walletlink-snackbar-instance-header *{cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-walletlink-css-reset .-walletlink-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-walletlink-css-reset .-walletlink-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-walletlink-css-reset .-walletlink-snackbar-instance-expanded .-walletlink-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.injectCssReset=void 0;var a=n(r(3597));t.injectCssReset=function(){var e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(a.default)),document.documentElement.appendChild(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='@namespace svg "http://www.w3.org/2000/svg";.-walletlink-css-reset,.-walletlink-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:transparent;background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;bottom:auto;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:block;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;left:auto;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";right:auto;tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;width:auto;word-spacing:normal;z-index:auto}.-walletlink-css-reset *{box-sizing:border-box;display:initial;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-walletlink-css-reset [class*=container]{margin:0;padding:0}.-walletlink-css-reset style{display:none}'},function(e,t,r){"use strict";var n=r(21).default,a=r(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkUI=void 0;var i=function(){function e(t){n(this,e)}return a(e,[{key:"setConnectDisabled",value:function(e){}}]),e}();t.WalletLinkUI=i},function(e,t,r){"use strict";var n=r(48).default,a=r(21).default,i=r(22).default,o=r(37).default,s=r(38).default,c=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),u=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),f=this&&this.__decorate||function(e,t,r,n){var a,i=arguments.length,o=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&c(t,e,r);return u(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelay=void 0;var h=l(r(3600)),p=r(1047),b=r(143),m=r(162),g=r(1050),v=r(3601),y=r(1051),A=r(475),w=d(r(3605)),x=r(1052),E=r(1515),_=r(1527),C=r(3606),k=r(3607),B=r(3608),I=r(3609),S=function(e){o(r,e);var t=s(r);function r(e){var i;return a(this,r),(i=t.call(this)).accountsCallback=null,i.chainCallback=null,i.appName="",i.appLogoUrl=null,i.subscriptions=new b.Subscription,i.walletLinkUrl=e.walletLinkUrl,i.storage=e.storage,i._session=x.Session.load(e.storage)||new x.Session(e.storage).save(),i.relayEventManager=e.relayEventManager,i.walletLinkAnalytics=e.walletLinkAnalytics?e.walletLinkAnalytics:new g.WalletLinkAnalytics,i.connection=new v.WalletLinkConnection(i._session.id,i._session.key,i.walletLinkUrl,i.walletLinkAnalytics),i.subscriptions.add(i.connection.incomingEvent$.pipe((0,m.filter)((function(e){return"Web3Response"===e.event}))).subscribe({next:i.handleIncomingEvent})),i.subscriptions.add(i.connection.linked$.pipe((0,m.skip)(1),(0,m.tap)((function(e){var t;i.isLinked=e;var r=i.storage.getItem(E.LOCAL_STORAGE_ADDRESSES_KEY);if(e&&(i.session.linked=e),i.isUnlinkedErrorState=!1,r){var n=r.split(" "),a="true"===i.storage.getItem("IsStandaloneSigning");if(""!==n[0]&&!e&&i.session.linked&&!a){i.isUnlinkedErrorState=!0;var o=i.getSessionIdHash();null===(t=i.walletLinkAnalytics)||void 0===t||t.sendEvent(y.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:o,origin:location.origin})}}}))).subscribe()),i.subscriptions.add(i.connection.sessionConfig$.pipe((0,m.filter)((function(e){return!!e.metadata&&"1"===e.metadata.__destroyed}))).subscribe((function(){var e,t=i.connection.isDestroyed;return null===(e=i.walletLinkAnalytics)||void 0===e||e.sendEvent(y.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:t,sessionIdHash:i.getSessionIdHash(),origin:location.origin}),i.resetAndReload()}))),i.subscriptions.add(i.connection.sessionConfig$.pipe((0,m.filter)((function(e){return e.metadata&&void 0!==e.metadata.WalletUsername}))).pipe((0,m.mergeMap)((function(e){return w.decrypt(e.metadata.WalletUsername,i._session.secret)}))).subscribe({next:function(e){i.storage.setItem(E.WALLET_USER_NAME_KEY,e)},error:function(){var e;null===(e=i.walletLinkAnalytics)||void 0===e||e.sendEvent(y.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),i.subscriptions.add(i.connection.sessionConfig$.pipe((0,m.filter)((function(e){return e.metadata&&void 0!==e.metadata.AppVersion}))).pipe((0,m.mergeMap)((function(e){return w.decrypt(e.metadata.AppVersion,i._session.secret)}))).subscribe({next:function(e){i.storage.setItem(E.APP_VERSION_KEY,e)},error:function(){var e;null===(e=i.walletLinkAnalytics)||void 0===e||e.sendEvent(y.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),i.subscriptions.add(i.connection.sessionConfig$.pipe((0,m.filter)((function(e){return e.metadata&&void 0!==e.metadata.ChainId&&void 0!==e.metadata.JsonRpcUrl}))).pipe((0,m.mergeMap)((function(e){return(0,b.zip)(w.decrypt(e.metadata.ChainId,i._session.secret),w.decrypt(e.metadata.JsonRpcUrl,i._session.secret))}))).pipe((0,m.distinctUntilChanged)()).subscribe({next:function(e){var t=n(e,2),r=t[0],a=t[1];i.chainCallback&&i.chainCallback(r,a)},error:function(){var e;null===(e=i.walletLinkAnalytics)||void 0===e||e.sendEvent(y.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),i.subscriptions.add(i.connection.sessionConfig$.pipe((0,m.filter)((function(e){return e.metadata&&void 0!==e.metadata.EthereumAddress}))).pipe((0,m.mergeMap)((function(e){return w.decrypt(e.metadata.EthereumAddress,i._session.secret)}))).subscribe({next:function(e){i.accountsCallback&&i.accountsCallback([e]),r.accountRequestCallbackIds.size>0&&(Array.from(r.accountRequestCallbackIds.values()).forEach((function(t){var r=(0,I.Web3ResponseMessage)({id:t,response:(0,B.RequestEthereumAccountsResponse)([e])});i.invokeCallback(Object.assign(Object.assign({},r),{id:t}))})),r.accountRequestCallbackIds.clear())},error:function(){var e;null===(e=i.walletLinkAnalytics)||void 0===e||e.sendEvent(y.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),i.ui=e.walletLinkUIConstructor({walletLinkUrl:e.walletLinkUrl,version:e.version,darkMode:e.darkMode,session:i._session,connected$:i.connection.connected$}),i.connection.connect(),i}return i(r,[{key:"attachUI",value:function(){this.ui.attach()}},{key:"resetAndReload",value:function(){var e=this;this.connection.setSessionMetadata("__destroyed","1").pipe((0,m.timeout)(1e3),(0,m.catchError)((function(e){return(0,b.of)(null)}))).subscribe((function(t){var r,n,a;try{e.subscriptions.unsubscribe()}catch(o){null===(r=e.walletLinkAnalytics)||void 0===r||r.sendEvent(y.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(n=e.walletLinkAnalytics)||void 0===n||n.sendEvent(y.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:e.getSessionIdHash(),origin:location.origin}),e.connection.destroy();var i=x.Session.load(e.storage);(null===i||void 0===i?void 0:i.id)===e._session.id?e.storage.clear():i&&(null===(a=e.walletLinkAnalytics)||void 0===a||a.sendEvent(y.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:e.getSessionIdHash(),storedSessionIdHash:x.Session.hash(i.id),origin:location.origin})),e.ui.reloadUI()}),(function(t){var r;null===(r=e.walletLinkAnalytics)||void 0===r||r.sendEvent(y.EVENTS.FAILURE,{method:"relay::resetAndReload",message:"failed to reset and reload with ".concat(t),sessionIdHash:e.getSessionIdHash()})}))}},{key:"setAppInfo",value:function(e,t){this.appName=e,this.appLogoUrl=t}},{key:"getStorageItem",value:function(e){return this.storage.getItem(e)}},{key:"session",get:function(){return this._session}},{key:"setStorageItem",value:function(e,t){this.storage.setItem(e,t)}},{key:"signEthereumMessage",value:function(e,t,r,n){return this.sendRequest({method:_.Web3Method.signEthereumMessage,params:{message:(0,A.hexStringFromBuffer)(e,!0),address:t,addPrefix:r,typedDataJson:n||null}})}},{key:"ethereumAddressFromSignedMessage",value:function(e,t,r){return this.sendRequest({method:_.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,A.hexStringFromBuffer)(e,!0),signature:(0,A.hexStringFromBuffer)(t,!0),addPrefix:r}})}},{key:"signEthereumTransaction",value:function(e){return this.sendRequest({method:_.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,A.bigIntStringFromBN)(e.weiValue),data:(0,A.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,A.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,A.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,A.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,A.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}},{key:"signAndSubmitEthereumTransaction",value:function(e){return this.sendRequest({method:_.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,A.bigIntStringFromBN)(e.weiValue),data:(0,A.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,A.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,A.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,A.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,A.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}},{key:"submitEthereumTransaction",value:function(e,t){return this.sendRequest({method:_.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,A.hexStringFromBuffer)(e,!0),chainId:t}})}},{key:"scanQRCode",value:function(e){return this.sendRequest({method:_.Web3Method.scanQRCode,params:{regExp:e}})}},{key:"genericRequest",value:function(e,t){return this.sendRequest({method:_.Web3Method.generic,params:{action:t,data:e}})}},{key:"sendGenericMessage",value:function(e){return this.sendRequest(e)}},{key:"sendRequest",value:function(e){var t=this,r=null,n=(0,A.randomBytesHex)(8),a=function(){t.publishWeb3RequestCanceledEvent(n),t.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:n,response:(0,B.ErrorResponse)(e.method,"User rejected request")})),null===r||void 0===r||r()};return{promise:new Promise((function(i,o){t.ui.isStandalone()||(r=t.ui.showConnecting({isUnlinkedErrorState:t.isUnlinkedErrorState,onCancel:a,onResetConnection:t.resetAndReload})),t.relayEventManager.callbacks.set(n,(function(e){if(null===r||void 0===r||r(),e.errorMessage)return o(new Error(e.errorMessage));i(e)})),t.ui.isStandalone()?t.sendRequestStandalone(n,e):t.publishWeb3RequestEvent(n,e)})),cancel:a}}},{key:"setConnectDisabled",value:function(e){this.ui.setConnectDisabled(e)}},{key:"setAccountsCallback",value:function(e){this.accountsCallback=e}},{key:"setChainCallback",value:function(e){this.chainCallback=e}},{key:"publishWeb3RequestEvent",value:function(e,t){var r,n=this,a=(0,k.Web3RequestMessage)({id:e,request:t}),i=x.Session.load(this.storage);null===(r=this.walletLinkAnalytics)||void 0===r||r.sendEvent(y.EVENTS.WEB3_REQUEST,{eventId:a.id,method:"relay::".concat(a.request.method),sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?x.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString(),origin:location.origin}),this.subscriptions.add(this.publishEvent("Web3Request",a,!0).subscribe({next:function(e){var t;null===(t=n.walletLinkAnalytics)||void 0===t||t.sendEvent(y.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:a.id,method:"relay::".concat(a.request.method),sessionIdHash:n.getSessionIdHash(),storedSessionIdHash:i?x.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==n._session.id).toString(),origin:location.origin})},error:function(e){n.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:a.id,response:{method:a.request.method,errorMessage:e.message}}))}}))}},{key:"publishWeb3RequestCanceledEvent",value:function(e){var t=(0,C.Web3RequestCanceledMessage)(e);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",t,!1).subscribe())}},{key:"publishEvent",value:function(e,t,r){var n=this,a=this.session.secret;return new b.Observable((function(e){w.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin})),a).then((function(t){e.next(t),e.complete()}))})).pipe((0,m.mergeMap)((function(t){return n.connection.publishEvent(e,t,r)})))}},{key:"handleIncomingEvent",value:function(e){var t=this;try{this.subscriptions.add(w.decrypt(e.data,this.session.secret).pipe((0,m.map)((function(e){return JSON.parse(e)}))).subscribe({next:function(e){var r=(0,I.isWeb3ResponseMessage)(e)?e:null;r&&t.handleWeb3ResponseMessage(r)},error:function(){var e;null===(e=t.walletLinkAnalytics)||void 0===e||e.sendEvent(y.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(r){return}}},{key:"handleWeb3ResponseMessage",value:function(e){var t,n=this,a=e.response;if(null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(y.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:"relay::".concat(a.method),sessionIdHash:this.getSessionIdHash(),origin:location.origin}),(0,B.isRequestEthereumAccountsResponse)(a))return Array.from(r.accountRequestCallbackIds.values()).forEach((function(t){return n.invokeCallback(Object.assign(Object.assign({},e),{id:t}))})),void r.accountRequestCallbackIds.clear();this.invokeCallback(e)}},{key:"invokeCallback",value:function(e){var t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}},{key:"requestEthereumAccounts",value:function(){var e=this,t={method:_.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},n=(0,A.randomBytesHex)(8),a=function(){e.publishWeb3RequestCanceledEvent(n),e.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:n,response:(0,B.ErrorResponse)(t.method,"User rejected request")}))};return{promise:new Promise((function(i,o){var s;e.relayEventManager.callbacks.set(n,(function(t){if(e.ui.hideRequestEthereumAccounts(),t.errorMessage)return o(new Error(t.errorMessage));i(t)}));var c=(null===(s=null===window||void 0===window?void 0:window.navigator)||void 0===s?void 0:s.userAgent)||null;if(c&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(c))window.location.href="https://go.cb-w.com/xoXnYwQimhb?cb_url=".concat(encodeURIComponent(window.location.href));else{if(e.ui.inlineAccountsResponse()){e.ui.requestEthereumAccounts({onCancel:a,onAccounts:function(t){e.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:n,response:(0,B.RequestEthereumAccountsResponse)(t)}))}})}else e.ui.requestEthereumAccounts({onCancel:a});r.accountRequestCallbackIds.add(n),e.ui.inlineAccountsResponse()||e.ui.isStandalone()||e.publishWeb3RequestEvent(n,t)}})),cancel:a}}},{key:"watchAsset",value:function(e,t,r,n,a){var i=this,o={method:_.Web3Method.watchAsset,params:{type:e,options:{address:t,symbol:r,decimals:n,image:a}}},s=null,c=(0,A.randomBytesHex)(8),u=function(){i.publishWeb3RequestCanceledEvent(c),i.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:c,response:(0,B.ErrorResponse)(o.method,"User rejected request")})),null===s||void 0===s||s()};return this.ui.inlineWatchAsset()||(s=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload})),{cancel:u,promise:new Promise((function(u,f){i.relayEventManager.callbacks.set(c,(function(e){if(null===s||void 0===s||s(),e.errorMessage)return f(new Error(e.errorMessage));u(e)}));i.ui.inlineWatchAsset()&&i.ui.watchAsset({onApprove:function(){i.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:c,response:(0,B.WatchAssetReponse)(!0)}))},onCancel:function(){i.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:c,response:(0,B.WatchAssetReponse)(!1)}))},type:e,address:t,symbol:r,decimals:n,image:a}),i.ui.inlineWatchAsset()||i.ui.isStandalone()||i.publishWeb3RequestEvent(c,o)}))}}},{key:"addEthereumChain",value:function(e,t,r,n,a,i){var o=this,s={method:_.Web3Method.addEthereumChain,params:{chainId:e,rpcUrls:t,blockExplorerUrls:n,chainName:a,iconUrls:r,nativeCurrency:i}},c=null,u=(0,A.randomBytesHex)(8),f=function(){o.publishWeb3RequestCanceledEvent(u),o.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:u,response:(0,B.ErrorResponse)(s.method,"User rejected request")})),null===c||void 0===c||c()};return this.ui.inlineAddEthereumChain(e)||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:f,onResetConnection:this.resetAndReload})),{promise:new Promise((function(t,r){o.relayEventManager.callbacks.set(u,(function(e){if(null===c||void 0===c||c(),e.errorMessage)return r(new Error(e.errorMessage));t(e)}));o.ui.inlineAddEthereumChain(e)&&o.ui.addEthereumChain({onCancel:function(){o.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:u,response:(0,B.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:function(e){o.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:u,response:(0,B.AddEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))},chainId:s.params.chainId,rpcUrls:s.params.rpcUrls,blockExplorerUrls:s.params.blockExplorerUrls,chainName:s.params.chainName,iconUrls:s.params.iconUrls,nativeCurrency:s.params.nativeCurrency}),o.ui.inlineAddEthereumChain(e)||o.ui.isStandalone()||o.publishWeb3RequestEvent(u,s)})),cancel:f}}},{key:"switchEthereumChain",value:function(e){var t=this,r={method:_.Web3Method.switchEthereumChain,params:{chainId:e}},n=null,a=(0,A.randomBytesHex)(8),i=function(){t.publishWeb3RequestCanceledEvent(a),t.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:a,response:(0,B.ErrorResponse)(r.method,"User rejected request")})),null===n||void 0===n||n()};return this.ui.inlineSwitchEthereumChain()||(n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),{promise:new Promise((function(e,i){t.relayEventManager.callbacks.set(a,(function(t){return null===n||void 0===n||n(),t.errorMessage&&t.errorCode?i(p.ethErrors.provider.custom({code:t.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):t.errorMessage?i(new Error(t.errorMessage)):void e(t)}));t.ui.switchEthereumChain({onCancel:function(e){e?t.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:a,response:(0,B.ErrorResponse)(_.Web3Method.switchEthereumChain,"unsupported chainId",e)})):t.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:a,response:(0,B.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:function(e){t.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:a,response:(0,B.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))},chainId:r.params.chainId}),t.ui.inlineSwitchEthereumChain()||t.ui.isStandalone()||t.publishWeb3RequestEvent(a,r)})),cancel:i}}},{key:"getSessionIdHash",value:function(){return x.Session.hash(this._session.id)}},{key:"sendRequestStandalone",value:function(e,t){var r=this,n=function(){r.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:e,response:(0,B.ErrorResponse)(t.method,"User rejected request")}))},a=function(t){r.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:e,response:t}))};switch(t.method){case _.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:t,onSuccess:a,onCancel:n});break;case _.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:t,onSuccess:a,onCancel:n});break;case _.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:t,onSuccess:a,onCancel:n});break;case _.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:t,onSuccess:a});break;default:n()}}}]),r}(E.WalletLinkRelayAbstract);S.accountRequestCallbackIds=new Set,f([h.default],S.prototype,"resetAndReload",null),f([h.default],S.prototype,"handleIncomingEvent",null),t.WalletLinkRelay=S},function(e,t,r){"use strict";var n;function a(e,t,r){if(!r||typeof r.value!==n.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+t+"> is not a method!");return{configurable:n.boolTrue,get:function(){var e=r.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:n.boolTrue,writable:n.boolTrue}),e}}}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.typeOfFunction="function",e.boolTrue=!0}(n||(n={})),t.bind=a,t.default=a},function(e,t,r){"use strict";var n=r(204).default,a=r(21).default,i=r(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkConnection=void 0;var o=r(143),s=r(162),c=r(1051),u=r(1052),f=r(1053),d=r(3602),l=r(3603),h=r(3604),p=function(){function e(t,r,n,i){var d=this,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:WebSocket;a(this,e),this.sessionId=t,this.sessionKey=r,this.subscriptions=new o.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,f.IntNumber)(1),this.connectedSubject=new o.BehaviorSubject(!1),this.linkedSubject=new o.BehaviorSubject(!1),this.sessionConfigSubject=new o.ReplaySubject(1);var p=new l.RxWebSocket(n+"/rpc",h);this.ws=p,this.walletLinkAnalytics=i,this.subscriptions.add(p.connectionState$.pipe((0,s.tap)((function(e){return d.walletLinkAnalytics.sendEvent(c.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:u.Session.hash(t)})})),(0,s.skip)(1),(0,s.filter)((function(e){return e===l.ConnectionState.DISCONNECTED&&!d.destroyed})),(0,s.delay)(5e3),(0,s.filter)((function(e){return!d.destroyed})),(0,s.flatMap)((function(e){return p.connect()})),(0,s.retry)()).subscribe()),this.subscriptions.add(p.connectionState$.pipe((0,s.skip)(2),(0,s.switchMap)((function(e){return(0,o.iif)((function(){return e===l.ConnectionState.CONNECTED}),d.authenticate().pipe((0,s.tap)((function(e){return d.sendIsLinked()})),(0,s.tap)((function(e){return d.sendGetSessionConfig()})),(0,s.map)((function(e){return!0}))),(0,o.of)(!1))})),(0,s.distinctUntilChanged)(),(0,s.catchError)((function(e){return(0,o.of)(!1)}))).subscribe((function(e){return d.connectedSubject.next(e)}))),this.subscriptions.add(p.connectionState$.pipe((0,s.skip)(1),(0,s.switchMap)((function(e){return(0,o.iif)((function(){return e===l.ConnectionState.CONNECTED}),(0,o.timer)(0,1e4))}))).subscribe((function(e){return 0===e?d.updateLastHeartbeat():d.heartbeat()}))),this.subscriptions.add(p.incomingData$.pipe((0,s.filter)((function(e){return"h"===e}))).subscribe((function(e){return d.updateLastHeartbeat()}))),this.subscriptions.add(p.incomingJSONData$.pipe((0,s.filter)((function(e){return["IsLinkedOK","Linked"].includes(e.type)}))).subscribe((function(e){var r=e;d.walletLinkAnalytics.sendEvent(c.EVENTS.LINKED,{sessionIdHash:u.Session.hash(t),linked:r.linked,type:e.type,onlineGuests:r.onlineGuests}),d.linkedSubject.next(r.linked||r.onlineGuests>0)}))),this.subscriptions.add(p.incomingJSONData$.pipe((0,s.filter)((function(e){return["GetSessionConfigOK","SessionConfigUpdated"].includes(e.type)}))).subscribe((function(e){var r=e;d.walletLinkAnalytics.sendEvent(c.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:u.Session.hash(t),metadata_keys:r&&r.metadata?Object.keys(r.metadata):void 0}),d.sessionConfigSubject.next({webhookId:r.webhookId,webhookUrl:r.webhookUrl,metadata:r.metadata})})))}return i(e,[{key:"connect",value:function(){if(this.destroyed)throw new Error("instance is destroyed");this.walletLinkAnalytics.sendEvent(c.EVENTS.STARTED_CONNECTING,{sessionIdHash:u.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}},{key:"destroy",value:function(){this.subscriptions.unsubscribe(),this.ws.disconnect(),this.walletLinkAnalytics.sendEvent(c.EVENTS.DISCONNECTED,{sessionIdHash:u.Session.hash(this.sessionId)}),this.destroyed=!0}},{key:"isDestroyed",get:function(){return this.destroyed}},{key:"connected$",get:function(){return this.connectedSubject.asObservable()}},{key:"onceConnected$",get:function(){return this.connected$.pipe((0,s.filter)((function(e){return e})),(0,s.take)(1),(0,s.map)((function(){})))}},{key:"linked$",get:function(){return this.linkedSubject.asObservable()}},{key:"onceLinked$",get:function(){return this.linked$.pipe((0,s.filter)((function(e){return e})),(0,s.take)(1),(0,s.map)((function(){})))}},{key:"sessionConfig$",get:function(){return this.sessionConfigSubject.asObservable()}},{key:"incomingEvent$",get:function(){return this.ws.incomingJSONData$.pipe((0,s.filter)((function(e){if("Event"!==e.type)return!1;var t=e;return"string"===typeof t.sessionId&&"string"===typeof t.eventId&&"string"===typeof t.event&&"string"===typeof t.data})),(0,s.map)((function(e){return e})))}},{key:"setSessionMetadata",value:function(e,t){var r=this,a=(0,d.ClientMessageSetSessionConfig)({id:(0,f.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:n({},e,t)});return this.onceConnected$.pipe((0,s.flatMap)((function(e){return r.makeRequest(a)})),(0,s.map)((function(e){if((0,h.isServerMessageFail)(e))throw new Error(e.error||"failed to set session metadata")})))}},{key:"publishEvent",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=(0,d.ClientMessagePublishEvent)({id:(0,f.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:e,data:t,callWebhook:n});return this.onceLinked$.pipe((0,s.flatMap)((function(e){return r.makeRequest(a)})),(0,s.map)((function(e){if((0,h.isServerMessageFail)(e))throw new Error(e.error||"failed to publish event");return e.eventId})))}},{key:"sendData",value:function(e){this.ws.sendData(JSON.stringify(e))}},{key:"updateLastHeartbeat",value:function(){this.lastHeartbeatResponse=Date.now()}},{key:"heartbeat",value:function(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(e){}}},{key:"makeRequest",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=e.id;try{this.sendData(e)}catch(n){return(0,o.throwError)(n)}return this.ws.incomingJSONData$.pipe((0,s.timeoutWith)(t,(0,o.throwError)(new Error("request ".concat(r," timed out")))),(0,s.filter)((function(e){return e.id===r})),(0,s.take)(1))}},{key:"authenticate",value:function(){var e=(0,d.ClientMessageHostSession)({id:(0,f.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(e).pipe((0,s.map)((function(e){if((0,h.isServerMessageFail)(e))throw new Error(e.error||"failed to authentcate")})))}},{key:"sendIsLinked",value:function(){var e=(0,d.ClientMessageIsLinked)({id:(0,f.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}},{key:"sendGetSessionConfig",value:function(){var e=(0,d.ClientMessageGetSessionConfig)({id:(0,f.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}}]),e}();t.WalletLinkConnection=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientMessagePublishEvent=t.ClientMessageSetSessionConfig=t.ClientMessageGetSessionConfig=t.ClientMessageIsLinked=t.ClientMessageHostSession=void 0,t.ClientMessageHostSession=function(e){return Object.assign({type:"HostSession"},e)},t.ClientMessageIsLinked=function(e){return Object.assign({type:"IsLinked"},e)},t.ClientMessageGetSessionConfig=function(e){return Object.assign({type:"GetSessionConfig"},e)},t.ClientMessageSetSessionConfig=function(e){return Object.assign({type:"SetSessionConfig"},e)},t.ClientMessagePublishEvent=function(e){return Object.assign({type:"PublishEvent"},e)}},function(e,t,r){"use strict";var n=r(21).default,a=r(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.RxWebSocket=t.ConnectionState=void 0;var i,o=r(143),s=r(162);!function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"}(i=t.ConnectionState||(t.ConnectionState={}));var c=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WebSocket;n(this,e),this.WebSocketClass=r,this.webSocket=null,this.connectionStateSubject=new o.BehaviorSubject(i.DISCONNECTED),this.incomingDataSubject=new o.Subject,this.url=t.replace(/^http/,"ws")}return a(e,[{key:"connect",value:function(){var e=this;return this.webSocket?(0,o.throwError)(new Error("webSocket object is not null")):new o.Observable((function(t){var r;try{e.webSocket=r=new e.WebSocketClass(e.url)}catch(n){return void t.error(n)}e.connectionStateSubject.next(i.CONNECTING),r.onclose=function(r){e.clearWebSocket(),t.error(new Error("websocket error ".concat(r.code,": ").concat(r.reason))),e.connectionStateSubject.next(i.DISCONNECTED)},r.onopen=function(r){t.next(),t.complete(),e.connectionStateSubject.next(i.CONNECTED)},r.onmessage=function(t){e.incomingDataSubject.next(t.data)}})).pipe((0,s.take)(1))}},{key:"disconnect",value:function(){var e=this.webSocket;if(e){this.clearWebSocket(),this.connectionStateSubject.next(i.DISCONNECTED);try{e.close()}catch(t){}}}},{key:"connectionState$",get:function(){return this.connectionStateSubject.asObservable()}},{key:"incomingData$",get:function(){return this.incomingDataSubject.asObservable()}},{key:"incomingJSONData$",get:function(){return this.incomingData$.pipe((0,s.flatMap)((function(e){var t;try{t=JSON.parse(e)}catch(r){return(0,o.empty)()}return(0,o.of)(t)})))}},{key:"sendData",value:function(e){var t=this.webSocket;if(!t)throw new Error("websocket is not connected");t.send(e)}},{key:"clearWebSocket",value:function(){var e=this.webSocket;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}]),e}();t.RxWebSocket=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isServerMessageFail=void 0,t.isServerMessageFail=function(e){return e&&"Fail"===e.type&&"number"===typeof e.id&&"string"===typeof e.sessionId&&"string"===typeof e.error}},function(e,t,r){"use strict";var n=r(20).default,a=r(78).default,i=r(124).default;Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=void 0;var o=r(143),s=r(475);function c(){return(c=i(n().mark((function e(t,r){var i,o,c,u,f,d,l,h,p;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(64===r.length){e.next=2;break}throw Error("secret must be 256 bits");case 2:return i=crypto.getRandomValues(new Uint8Array(12)),e.next=5,crypto.subtle.importKey("raw",(0,s.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]);case 5:return o=e.sent,c=new TextEncoder,e.next=9,window.crypto.subtle.encrypt({name:"AES-GCM",iv:i},o,c.encode(t));case 9:return u=e.sent,16,f=u.slice(u.byteLength-16),d=u.slice(0,u.byteLength-16),l=new Uint8Array(f),h=new Uint8Array(d),p=new Uint8Array([].concat(a(i),a(l),a(h))),e.abrupt("return",(0,s.uint8ArrayToHex)(p));case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.encrypt=function(e,t){return c.apply(this,arguments)},t.decrypt=function(e,t){if(64!==t.length)throw Error("secret must be 256 bits");return new o.Observable((function(r){i(n().mark((function i(){var o,c,u,f,d,l,h,p,b;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,crypto.subtle.importKey("raw",(0,s.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]);case 2:return o=n.sent,c=(0,s.hexStringToUint8Array)(e),u=c.slice(0,12),f=c.slice(12,28),d=c.slice(28),l=new Uint8Array([].concat(a(d),a(f))),h={name:"AES-GCM",iv:new Uint8Array(u)},n.prev=9,n.next=12,window.crypto.subtle.decrypt(h,o,l);case 12:p=n.sent,b=new TextDecoder,r.next(b.decode(p)),r.complete(),n.next=21;break;case 18:n.prev=18,n.t0=n.catch(9),r.error(n.t0);case 21:case"end":return n.stop()}}),i,null,[[9,18]])})))()}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestCanceledMessage=void 0;var n=r(1058);t.Web3RequestCanceledMessage=function(e){return{type:n.RelayMessageType.WEB3_REQUEST_CANCELED,id:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestMessage=void 0;var n=r(1058);t.Web3RequestMessage=function(e){return Object.assign({type:n.RelayMessageType.WEB3_REQUEST},e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumAddressFromSignedMessageResponse=t.SubmitEthereumTransactionResponse=t.SignEthereumTransactionResponse=t.SignEthereumMessageResponse=t.isRequestEthereumAccountsResponse=t.WatchAssetReponse=t.RequestEthereumAccountsResponse=t.SwitchEthereumChainResponse=t.AddEthereumChainResponse=t.ErrorResponse=void 0;var n=r(1527);t.ErrorResponse=function(e,t,r){return{method:e,errorMessage:t,errorCode:r}},t.AddEthereumChainResponse=function(e){return{method:n.Web3Method.addEthereumChain,result:e}},t.SwitchEthereumChainResponse=function(e){return{method:n.Web3Method.switchEthereumChain,result:e}},t.RequestEthereumAccountsResponse=function(e){return{method:n.Web3Method.requestEthereumAccounts,result:e}},t.WatchAssetReponse=function(e){return{method:n.Web3Method.watchAsset,result:e}},t.isRequestEthereumAccountsResponse=function(e){return e&&e.method===n.Web3Method.requestEthereumAccounts},t.SignEthereumMessageResponse=function(e){return{method:n.Web3Method.signEthereumMessage,result:e}},t.SignEthereumTransactionResponse=function(e){return{method:n.Web3Method.signEthereumTransaction,result:e}},t.SubmitEthereumTransactionResponse=function(e){return{method:n.Web3Method.submitEthereumTransaction,result:e}},t.EthereumAddressFromSignedMessageResponse=function(e){return{method:n.Web3Method.ethereumAddressFromSignedMessage,result:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWeb3ResponseMessage=t.Web3ResponseMessage=void 0;var n=r(1058);t.Web3ResponseMessage=function(e){return Object.assign({type:n.RelayMessageType.WEB3_RESPONSE},e)},t.isWeb3ResponseMessage=function(e){return e&&e.type===n.RelayMessageType.WEB3_RESPONSE}},function(e,t,r){"use strict";var n=r(21).default,a=r(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelayEventManager=void 0;var i=r(475),o=function(){function e(){n(this,e),this._nextRequestId=0,this.callbacks=new Map}return a(e,[{key:"makeRequestId",value:function(){this._nextRequestId=(this._nextRequestId+1)%2147483647;var e=this._nextRequestId,t=(0,i.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}]),e}();t.WalletLinkRelayEventManager=o},function(e){e.exports=JSON.parse('{"name":"walletlink","version":"2.5.0","description":"WalletLink JavaScript SDK","keywords":["cipher","cipherbrowser","coinbase","coinbasewallet","eth","ether","ethereum","etherium","injection","toshi","wallet","walletlink","web3"],"main":"dist/index.js","types":"dist/index.d.ts","repository":"https://github.com/walletlink/walletlink.git","author":"Coinbase, Inc.","license":"Apache-2.0","scripts":{"tsc":"tsc --noEmit --pretty","test":"yarn build-npm && karma start","prebuild":"node -p \\"\'export const LIB_VERSION = \' + JSON.stringify(require(\'./package.json\').version) + \';\'\\" > src/version.ts","build":"node compile-assets.js && webpack --config webpack.config.js","build-chrome":"webpack --config webpack.config.chrome.js","build-npm":"tsc -p ./tsconfig.build.json","build:dev":"export WALLETLINK_URL=\'http://localhost:3000\'; yarn build && yarn build-chrome","build:dev:watch":"nodemon -e \'ts,tsx,js,json,css,scss,svg\' --ignore \'src/**/*-css.ts\' --ignore \'src/**/*-svg.ts\' --watch src/ --watch chrome/ --exec \'yarn build:dev\'","build:prod":"yarn prebuild && yarn build && yarn build-chrome && yarn build-npm && cp ./package.json ./README.md ./LICENSE build/npm && cp -a src/vendor-js build/npm/dist && sed -i.bak \'s| \\"private\\": true,||g\' build/npm/package.json && rm -f build/npm/package.json.bak","lint":"eslint ./src --ext .ts,.tsx","lint:watch":"nodemon -e ts,tsx,js,json,css,scss,svg --watch src/ --exec \'yarn tsc && yarn lint\'"},"dependencies":{"@metamask/safe-event-emitter":"2.0.0","bind-decorator":"^1.0.11","bn.js":"^5.1.1","clsx":"^1.1.0","eth-block-tracker":"4.4.3","eth-json-rpc-filters":"4.2.2","eth-rpc-errors":"4.0.2","js-sha256":"0.9.0","json-rpc-engine":"6.1.0","keccak":"^3.0.1","preact":"^10.5.9","rxjs":"^6.6.3","stream-browserify":"^3.0.0"},"devDependencies":{"@types/bn.js":"^4.11.6","@types/node":"^14.14.20","@typescript-eslint/eslint-plugin":"^5.7.0","@typescript-eslint/eslint-plugin-tslint":"^5.7.0","@typescript-eslint/parser":"^5.7.0","browserify":"17.0.0","copy-webpack-plugin":"^6.4.1","core-js":"^3.8.2","eslint":"^8.4.1","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.25.3","eslint-plugin-preact":"^0.1.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-simple-import-sort":"^7.0.0","jasmine":"3.8.0","karma":"^6.3.15","karma-browserify":"8.1.0","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","nodemon":"^2.0.6","prettier":"^2.5.1","raw-loader":"^4.0.2","regenerator-runtime":"^0.13.7","sass":"^1.32.0","svgo":"^2.8.0","ts-jest":"^26.4.4","ts-loader":"^8.0.13","tslib":"^2.0.3","typescript":"^4.1.3","watchify":"4.0.0","webpack":"^5.49.0","webpack-cli":"^3.3.12","whatwg-fetch":"^3.5.0"},"engines":{"node":">= 10.0.0"},"jest":{"transform":{"^.+\\\\.tsx?$":"ts-jest"},"testEnvironment":"node","testPathIgnorePatterns":["/dist/","/node_modules/"],"testRegex":"(/__tests__/.*|\\\\.(test|spec))\\\\.(ts|tsx|js)$","moduleFileExtensions":["ts","js","json"]}}')},,,,function(e,t,r){"use strict";var n=r(326);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return new f(e,t)};var a=n(r(527)),i=n(r(526)),o=n(r(528)),s=n(r(529)),c=n(r(530));function u(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,c.default)(e);if(t){var a=(0,c.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var f=function(e){(0,o.default)(r,e);var t=u(r);function r(e,n,i){var o;return(0,a.default)(this,r),(o=t.call(this)).socket=new window.WebSocket(e,i),o.socket.onopen=function(){return o.emit("open")},o.socket.onmessage=function(e){return o.emit("message",e.data)},o.socket.onerror=function(e){return o.emit("error",e)},o.socket.onclose=function(e){o.emit("close",e.code,e.reason)},o}return(0,i.default)(r,[{key:"send",value:function(e,t,r){var n=r||t;try{this.socket.send(e),n()}catch(a){n(a)}}},{key:"close",value:function(e,t){this.socket.close(e,t)}},{key:"addEventListener",value:function(e,t,r){this.socket.addEventListener(e,t,r)}}]),r}(r(432).EventEmitter)},function(e,t,r){"use strict";(function(e){var n=r(326);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(1294)),i=n(r(1295)),o=n(r(955)),s=n(r(527)),c=n(r(526)),u=n(r(528)),f=n(r(529)),d=n(r(530)),l=r(432);function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,d.default)(e);if(t){var a=(0,d.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,f.default)(this,r)}}var p=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a1&&void 0!==arguments[1]?arguments[1]:"ws://localhost:8080",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;(0,s.default)(this,n);var c=i.autoconnect,u=void 0===c||c,f=i.reconnect,d=void 0===f||f,l=i.reconnect_interval,h=void 0===l?1e3:l,b=i.max_reconnects,m=void 0===b?5:b,g=p(i,["autoconnect","reconnect","reconnect_interval","max_reconnects"]);return(t=r.call(this)).webSocketFactory=e,t.queue={},t.rpc_id=0,t.address=a,t.autoconnect=u,t.ready=!1,t.reconnect=d,t.reconnect_interval=h,t.max_reconnects=m,t.rest_options=g,t.current_reconnects=0,t.generate_request_id=o||function(){return++t.rpc_id},t.autoconnect&&t._connect(t.address,Object.assign({autoconnect:t.autoconnect,reconnect:t.reconnect,reconnect_interval:t.reconnect_interval,max_reconnects:t.max_reconnects},t.rest_options)),t}return(0,c.default)(n,[{key:"connect",value:function(){this.socket||this._connect(this.address,Object.assign({autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects},this.rest_options))}},{key:"call",value:function(e,t,r,n){var a=this;return n||"object"!==(0,o.default)(r)||(n=r,r=null),new Promise((function(i,o){if(!a.ready)return o(new Error("socket not ready"));var s=a.generate_request_id(e,t),c={jsonrpc:"2.0",method:e,params:t||null,id:s};a.socket.send(JSON.stringify(c),n,(function(e){if(e)return o(e);a.queue[s]={promise:[i,o]},r&&(a.queue[s].timeout=setTimeout((function(){delete a.queue[s],o(new Error("reply timeout"))}),r))}))}))}},{key:"login",value:function(){var e=(0,i.default)(a.default.mark((function e(t){var r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.call("rpc.login",t);case 2:if(r=e.sent){e.next=5;break}throw new Error("authentication failed");case 5:return e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"listMethods",value:function(){var e=(0,i.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.call("__listMethods");case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"notify",value:function(e,t){var r=this;return new Promise((function(n,a){if(!r.ready)return a(new Error("socket not ready"));var i={jsonrpc:"2.0",method:e,params:t||null};r.socket.send(JSON.stringify(i),(function(e){if(e)return a(e);n()}))}))}},{key:"subscribe",value:function(){var e=(0,i.default)(a.default.mark((function e(t){var r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"string"===typeof t&&(t=[t]),e.next=3,this.call("rpc.on",t);case 3:if(r=e.sent,"string"!==typeof t||"ok"===r[t]){e.next=6;break}throw new Error("Failed subscribing to an event '"+t+"' with: "+r[t]);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"unsubscribe",value:function(){var e=(0,i.default)(a.default.mark((function e(t){var r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"string"===typeof t&&(t=[t]),e.next=3,this.call("rpc.off",t);case 3:if(r=e.sent,"string"!==typeof t||"ok"===r[t]){e.next=6;break}throw new Error("Failed unsubscribing from an event with: "+r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"close",value:function(e,t){this.socket.close(e||1e3,t)}},{key:"_connect",value:function(t,r){var n=this;this.socket=this.webSocketFactory(t,r),this.socket.addEventListener("open",(function(){n.ready=!0,n.emit("open"),n.current_reconnects=0})),this.socket.addEventListener("message",(function(t){var r=t.data;r instanceof ArrayBuffer&&(r=e.from(r).toString());try{r=JSON.parse(r)}catch(o){return}if(r.notification&&n.listeners(r.notification).length){if(!Object.keys(r.params).length)return n.emit(r.notification);var a=[r.notification];if(r.params.constructor===Object)a.push(r.params);else for(var i=0;in.current_reconnects||0===n.max_reconnects)&&setTimeout((function(){return n._connect(t,r)}),n.reconnect_interval))}))}}]),n}(l.EventEmitter);t.default=b}).call(this,r(15).Buffer)},function(e,t,r){var n=r(111).default,a="Impossible case. Please create issue.",i="The tweak was out of range or the resulted private key is invalid",o="The tweak was out of range or equal to zero",s="Unknow error on context randomization",c="Private Key is invalid",u="Public Key could not be parsed",f="Public Key serialization error",d="The sum of the public keys is not valid",l="Signature could not be parsed",h="The nonce generation function failed, or the private key was invalid",p="Public key could not be recover",b="Scalar was invalid (zero or overflow)";function m(e,t){if(!e)throw new Error(t)}function g(e,t,r){if(m(t instanceof Uint8Array,"Expected ".concat(e," to be an Uint8Array")),void 0!==r)if(Array.isArray(r)){var n=r.join(", "),a="Expected ".concat(e," to be an Uint8Array with length [").concat(n,"]");m(r.includes(t.length),a)}else{var i="Expected ".concat(e," to be an Uint8Array with length ").concat(r);m(t.length===r,i)}}function v(e){m("Boolean"===A(e),"Expected compressed to be a Boolean")}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"===typeof e&&(e=e(t)),g("output",e,t),e}function A(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){if(m(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&g("seed",t,32),1===e.contextRandomize(t))throw new Error(s)},privateKeyVerify:function(t){return g("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(g("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(a)}},privateKeyTweakAdd:function(t,r){switch(g("private key",t,32),g("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(i)}},privateKeyTweakMul:function(t,r){switch(g("private key",t,32),g("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(o)}},publicKeyVerify:function(t){return g("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(g("private key",t,32),v(r),n=y(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(f)}},publicKeyConvert:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(g("public key",t,[33,65]),v(r),n=y(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(u);case 2:throw new Error(f)}},publicKeyNegate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(g("public key",t,[33,65]),v(r),n=y(n,r?33:65),e.publicKeyNegate(n,t)){case 0:return n;case 1:throw new Error(u);case 2:throw new Error(a);case 3:throw new Error(f)}},publicKeyCombine:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2?arguments[2]:void 0;m(Array.isArray(t),"Expected public keys to be an Array"),m(t.length>0,"Expected public keys array will have more than zero items");var i,o=n(t);try{for(o.s();!(i=o.n()).done;){g("public key",i.value,[33,65])}}catch(s){o.e(s)}finally{o.f()}switch(v(r),a=y(a,r?33:65),e.publicKeyCombine(a,t)){case 0:return a;case 1:throw new Error(u);case 2:throw new Error(d);case 3:throw new Error(f)}},publicKeyTweakAdd:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0;switch(g("public key",t,[33,65]),g("tweak",r,32),v(n),a=y(a,n?33:65),e.publicKeyTweakAdd(a,t,r)){case 0:return a;case 1:throw new Error(u);case 2:throw new Error(i)}},publicKeyTweakMul:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0;switch(g("public key",t,[33,65]),g("tweak",r,32),v(n),a=y(a,n?33:65),e.publicKeyTweakMul(a,t,r)){case 0:return a;case 1:throw new Error(u);case 2:throw new Error(o)}},signatureNormalize:function(t){switch(g("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(l)}},signatureExport:function(t,r){g("signature",t,64);var n={output:r=y(r,72),outputlen:72};switch(e.signatureExport(n,t)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(l);case 2:throw new Error(a)}},signatureImport:function(t,r){switch(g("signature",t),r=y(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(l);case 2:throw new Error(a)}},ecdsaSign:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;g("message",t,32),g("private key",r,32),m("Object"===A(n),"Expected options to be an Object"),void 0!==n.data&&g("options.data",n.data),void 0!==n.noncefn&&m("Function"===A(n.noncefn),"Expected options.noncefn to be a Function");var o={signature:i=y(i,64),recid:null};switch(e.ecdsaSign(o,t,r,n.data,n.noncefn)){case 0:return o;case 1:throw new Error(h);case 2:throw new Error(a)}},ecdsaVerify:function(t,r,n){switch(g("signature",t,64),g("message",r,32),g("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(l);case 2:throw new Error(u)}},ecdsaRecover:function(t,r,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4?arguments[4]:void 0;switch(g("signature",t,64),m("Number"===A(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),g("message",n,32),v(i),o=y(o,i?33:65),e.ecdsaRecover(o,t,r,n)){case 0:return o;case 1:throw new Error(l);case 2:throw new Error(p);case 3:throw new Error(a)}},ecdh:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;switch(g("public key",t,[33,65]),g("private key",r,32),m("Object"===A(n),"Expected options to be an Object"),void 0!==n.data&&g("options.data",n.data),void 0!==n.hashfn?(m("Function"===A(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&g("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&g("options.ybuf",n.ybuf,32),g("output",a)):a=y(a,32),e.ecdh(a,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return a;case 1:throw new Error(u);case 2:throw new Error(b)}}}}},function(e,t,r){var n=new(0,r(171).ec)("secp256k1"),a=n.curve,i=a.n.constructor;function o(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new i(t);if(r.cmp(a.p)>=0)return null;var o=(r=r.toRed(a.red)).redSqr().redIMul(r).redIAdd(a.b).redSqrt();return 3===e!==o.isOdd()&&(o=o.redNeg()),n.keyPair({pub:{x:r,y:o}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var o=new i(t),s=new i(r);if(o.cmp(a.p)>=0||s.cmp(a.p)>=0)return null;if(o=o.toRed(a.red),s=s.toRed(a.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;var c=o.redSqr().redIMul(o);return s.redSqr().redISub(c.redIAdd(a.b)).isZero()?n.keyPair({pub:{x:o,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var r=t.encode(null,33===e.length),n=0;n=0)return 1;if(r.iadd(new i(e)),r.cmp(a.n)>=0&&r.isub(a.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul:function(e,t){var r=new i(t);if(r.cmp(a.n)>=0||r.isZero())return 1;r.imul(new i(e)),r.cmp(a.n)>=0&&(r=r.umod(a.n));var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:function(e){return null===o(e)?1:0},publicKeyCreate:function(e,t){var r=new i(t);return r.cmp(a.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var r=o(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate:function(e,t){var r=o(t);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine:function(e,t){for(var r=new Array(t.length),n=0;n=0)return 2;var c=n.getPublic().add(a.g.mul(r));return c.isInfinity()?2:(s(e,c),0)},publicKeyTweakMul:function(e,t,r){var n=o(t);return null===n?1:(r=new i(r)).cmp(a.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize:function(e){var t=new i(e.subarray(0,32)),r=new i(e.subarray(32,64));return t.cmp(a.n)>=0||r.cmp(a.n)>=0?1:(1===r.cmp(n.nh)&&e.set(a.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var r=t.subarray(0,32),n=t.subarray(32,64);if(new i(r).cmp(a.n)>=0)return 1;if(new i(n).cmp(a.n)>=0)return 1;var o=e.output,s=o.subarray(4,37);s[0]=0,s.set(r,1);for(var c=33,u=0;c>1&&0===s[u]&&!(128&s[u+1]);--c,++u);if(128&(s=s.subarray(u))[0])return 1;if(c>1&&0===s[0]&&!(128&s[1]))return 1;var f=o.subarray(39,72);f[0]=0,f.set(n,1);for(var d=33,l=0;d>1&&0===f[l]&&!(128&f[l+1]);--d,++l);return 128&(f=f.subarray(l))[0]||d>1&&0===f[0]&&!(128&f[1])?1:(e.outputlen=6+c+d,o[0]=48,o[1]=e.outputlen-2,o[2]=2,o[3]=s.length,o.set(s,4),o[4+c]=2,o[5+c]=f.length,o.set(f,6+c),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;var n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;var o=t.subarray(4,4+r);if(33===o.length&&0===o[0]&&(o=o.subarray(1)),o.length>32)return 1;var s=t.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var c=new i(o);c.cmp(a.n)>=0&&(c=new i(0));var u=new i(t.subarray(6+r));return u.cmp(a.n)>=0&&(u=new i(0)),e.set(c.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,r,o,s){if(s){var c=s;s=function(e){var n=c(t,r,null,o,e);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new i(n)}}var u,f=new i(r);if(f.cmp(a.n)>=0||f.isZero())return 1;try{u=n.sign(t,r,{canonical:!0,k:s,pers:o})}catch(d){return 1}return e.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),e.recid=u.recoveryParam,0},ecdsaVerify:function(e,t,r){var s={r:e.subarray(0,32),s:e.subarray(32,64)},c=new i(s.r),u=new i(s.s);if(c.cmp(a.n)>=0||u.cmp(a.n)>=0)return 1;if(1===u.cmp(n.nh)||c.isZero()||u.isZero())return 3;var f=o(r);if(null===f)return 2;var d=f.getPublic();return n.verify(t,s,d)?0:3},ecdsaRecover:function(e,t,r,o){var c,u={r:t.slice(0,32),s:t.slice(32,64)},f=new i(u.r),d=new i(u.s);if(f.cmp(a.n)>=0||d.cmp(a.n)>=0)return 1;if(f.isZero()||d.isZero())return 2;try{c=n.recoverPubKey(o,u,r)}catch(l){return 2}return s(e,c),0},ecdh:function(e,t,r,s,c,u,f){var d=o(t);if(null===d)return 1;var l=new i(r);if(l.cmp(a.n)>=0||l.isZero())return 2;var h=d.getPublic().mul(l);if(void 0===c)for(var p=h.encode(null,!0),b=n.hash().update(p).digest(),m=0;m<32;++m)e[m]=b[m];else{u||(u=new Uint8Array(32));for(var g=h.getX().toArray("be",32),v=0;v<32;++v)u[v]=g[v];f||(f=new Uint8Array(32));for(var y=h.getY().toArray("be",32),A=0;A<32;++A)f[A]=y[A];var w=c(u,f,s);if(!(w instanceof Uint8Array&&w.length===e.length))return 2;e.set(w)}return 0}}},,,function(e,t,r){(function(t){self,e.exports=function(){var e={1645:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.chains=t._getInitializedChains=void 0;var a=n(r(7295)),i=n(r(1227)),o=n(r(439)),s=n(r(7098)),c=n(r(7687));function u(e){var t,r,n={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli"},u={mainnet:a.default,ropsten:i.default,rinkeby:o.default,kovan:s.default,goerli:c.default};if(e)try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),d=f.next();!d.done;d=f.next()){var l=d.value,h=l.name;n[l.chainId.toString()]=h,u[h]=l}}catch(e){t={error:e}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}return u.names=n,u}t._getInitializedChains=u,t.chains=u()},425:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIPs=void 0,t.EIPs={1559:r(7523),2315:r(3339),2537:r(6769),2565:r(7897),2718:r(2170),2929:r(8436),2930:r(6213),3198:r(5491),3529:r(7852),3541:r(1871),3554:r(7225),3675:r(8571)}},7002:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=void 0,t.hardforks=[["chainstart",r(114)],["homestead",r(2800)],["dao",r(7197)],["tangerineWhistle",r(2302)],["spuriousDragon",r(716)],["byzantium",r(6985)],["constantinople",r(5993)],["petersburg",r(4064)],["istanbul",r(3166)],["muirGlacier",r(2946)],["berlin",r(15)],["london",r(1250)],["shanghai",r(5553)],["merge",r(8648)]]},3863:function(e,t,r){"use strict";var n,a=r(9033).Buffer,i=r(8847)(r(3355)),o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsensusAlgorithm=t.ConsensusType=t.Hardfork=t.Chain=t.CustomChain=void 0;var u,f,d,l,h,p=r(8291),b=r(4628),m=r(3062),g=r(1645),v=r(7002),y=r(425);!function(e){e.PolygonMainnet="polygon-mainnet",e.PolygonMumbai="polygon-mumbai",e.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",e.xDaiChain="x-dai-chain"}(u=t.CustomChain||(t.CustomChain={})),(h=t.Chain||(t.Chain={}))[h.Mainnet=1]="Mainnet",h[h.Ropsten=3]="Ropsten",h[h.Rinkeby=4]="Rinkeby",h[h.Kovan=42]="Kovan",h[h.Goerli=5]="Goerli",function(e){e.Chainstart="chainstart",e.Homestead="homestead",e.Dao="dao",e.TangerineWhistle="tangerineWhistle",e.SpuriousDragon="spuriousDragon",e.Byzantium="byzantium",e.Constantinople="constantinople",e.Petersburg="petersburg",e.Istanbul="istanbul",e.MuirGlacier="muirGlacier",e.Berlin="berlin",e.London="london",e.Shanghai="shanghai",e.Merge="merge"}(f=t.Hardfork||(t.Hardfork={})),(l=t.ConsensusType||(t.ConsensusType={})).ProofOfStake="pos",l.ProofOfWork="pow",l.ProofOfAuthority="poa",(d=t.ConsensusAlgorithm||(t.ConsensusAlgorithm={})).Ethash="ethash",d.Clique="clique",d.Casper="casper";var A=function(e){function t(t){var r,n,a,i,o=e.call(this)||this;o._supportedHardforks=[],o._eips=[],o._customChains=null!==(a=t.customChains)&&void 0!==a?a:[],o._chainParams=o.setChain(t.chain),o.DEFAULT_HARDFORK=null!==(i=o._chainParams.defaultHardfork)&&void 0!==i?i:f.Istanbul;try{for(var s=c(o._chainParams.hardforks),u=s.next();!u.done;u=s.next()){var d=u.value;d.forkHash||(d.forkHash=o._calcForkHash(d.name))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o._hardfork=o.DEFAULT_HARDFORK,t.supportedHardforks&&(o._supportedHardforks=t.supportedHardforks),t.hardfork&&o.setHardfork(t.hardfork),t.eips&&o.setEIPs(t.eips),o}return o(t,e),t.custom=function(e,r){var n;void 0===r&&(r={});var a=null!==(n=r.baseChain)&&void 0!==n?n:"mainnet",i=s({},t._getChainParams(a));if(i.name="custom-chain","string"!=typeof e)return new t(s({chain:s(s({},i),e)},r));if(e===u.PolygonMainnet)return t.custom({name:u.PolygonMainnet,chainId:137,networkId:137});if(e===u.PolygonMumbai)return t.custom({name:u.PolygonMumbai,chainId:80001,networkId:80001});if(e===u.ArbitrumRinkebyTestnet)return t.custom({name:u.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611});if(e===u.xDaiChain)return t.custom({name:u.xDaiChain,chainId:100,networkId:100});throw new Error("Custom chain "+e+" not supported")},t.forCustomChain=function(e,r,n,a){var i=t._getChainParams(e);return new t({chain:s(s({},i),r),hardfork:n,supportedHardforks:a})},t.isSupportedChainId=function(e){var t=(0,g._getInitializedChains)();return Boolean(t.names[e.toString()])},t._getChainParams=function(e,t){var r=(0,g._getInitializedChains)(t);if("number"==typeof e||m.BN.isBN(e)){if(e=e.toString(),r.names[e])return r[r.names[e]];throw new Error("Chain with ID "+e+" not supported")}if(r[e])return r[e];throw new Error("Chain with name "+e+" not supported")},t.prototype.setChain=function(e){var r,n;if("number"==typeof e||"string"==typeof e||m.BN.isBN(e)){var a;a=this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0])?this._customChains.map((function(e){return e[0]})):this._customChains,this._chainParams=t._getChainParams(e,a)}else{if("object"!==(0,i.default)(e))throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");try{for(var o=c(["networkId","genesis","hardforks","bootstrapNodes"]),s=o.next();!s.done;s=o.next()){var u=s.value;if(void 0===e[u])throw new Error("Missing required chain parameter: "+u)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}this._chainParams=e}return this._chainParams},t.prototype.setHardfork=function(e){var t,r;if(!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks");var n=!1;try{for(var a=c(v.hardforks),i=a.next();!i.done;i=a.next())i.value[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),n=!0)}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}if(!n)throw new Error("Hardfork with name "+e+" not supported")},t.prototype.getHardforkByBlockNumber=function(e,t){var r,n;e=(0,m.toType)(e,m.TypeOutput.BN),t=t?(0,m.toType)(t,m.TypeOutput.BN):void 0;var a,i,o,s=f.Chainstart;try{for(var u=c(this.hardforks()),d=u.next();!d.done;d=u.next()){var l=d.value;if(null!==l.block)e.gte(new m.BN(l.block))&&(s=l.name),t&&l.td&&(t.gten(l.td)?a=l.name:i=o),o=l.name;else if(t&&l.td&&t.gten(l.td))return l.name}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(t){var h="block number: "+e+" (-> "+s+"), ";if(a&&!this.hardforkGteHardfork(s,a)){var p="HF determined by block number is lower than the minimum total difficulty HF";throw h+="total difficulty: "+t+" (-> "+a+")",new Error(p+": "+h)}if(i&&!this.hardforkGteHardfork(i,s))throw p="Maximum HF determined by total difficulty is lower than the block number HF",h+="total difficulty: "+t+" (-> "+i+")",new Error(p+": "+h)}return s},t.prototype.setHardforkByBlockNumber=function(e,t){var r=this.getHardforkByBlockNumber(e,t);return this.setHardfork(r),r},t.prototype._chooseHardfork=function(e,t){if(void 0===t&&(t=!0),e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks")}else e=this._hardfork;return e},t.prototype._getHardfork=function(e){var t,r,n=this.hardforks();try{for(var a=c(n),i=a.next();!i.done;i=a.next()){var o=i.value;if(o.name===e)return o}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}throw new Error("Hardfork "+e+" not defined for chain "+this.chainName())},t.prototype._isSupportedHardfork=function(e){var t,r;if(!(this._supportedHardforks.length>0))return!0;try{for(var n=c(this._supportedHardforks),a=n.next();!a.done;a=n.next())if(e===a.value)return!0}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.setEIPs=function(e){var t,r,n=this;void 0===e&&(e=[]);var a=function(t){if(!(t in y.EIPs))throw new Error(t+" not supported");var r=i.gteHardfork(y.EIPs[t].minimumHardfork);if(!r)throw new Error(t+" cannot be activated on hardfork "+i.hardfork()+", minimumHardfork: "+r);y.EIPs[t].requiredEIPs&&y.EIPs[t].requiredEIPs.forEach((function(r){if(!e.includes(r)&&!n.isActivatedEIP(r))throw new Error(t+" requires EIP "+r+", but is not included in the EIP list")}))},i=this;try{for(var o=c(e),s=o.next();!s.done;s=o.next())a(s.value)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}this._eips=e},t.prototype.param=function(e,t){var r,n,a=null;try{for(var i=c(this._eips),o=i.next();!o.done;o=i.next()){var s=o.value;if(null!==(a=this.paramByEIP(e,t,s)))return a}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this.paramByHardfork(e,t,this._hardfork)},t.prototype.paramByHardfork=function(e,t,r){var n,a,i,o;r=this._chooseHardfork(r);var s=null;try{for(var u=c(v.hardforks),f=u.next();!f.done;f=u.next()){var d=f.value;if("eips"in d[1]){var l=d[1].eips;try{for(var h=(i=void 0,c(l)),p=h.next();!p.done;p=h.next()){var b=p.value,m=this.paramByEIP(e,t,b);s=null!==m?m:s}}catch(e){i={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}}else{if(!d[1][e])throw new Error("Topic "+e+" not defined");void 0!==d[1][e][t]&&(s=d[1][e][t].v)}if(d[0]===r)break}}catch(e){n={error:e}}finally{try{f&&!f.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}return s},t.prototype.paramByEIP=function(e,t,r){if(!(r in y.EIPs))throw new Error(r+" not supported");var n=y.EIPs[r];if(!(e in n))throw new Error("Topic "+e+" not defined");return void 0===n[e][t]?null:n[e][t].v},t.prototype.paramByBlock=function(e,t,r){var n=this.activeHardforks(r),a=n[n.length-1].name;return this.paramByHardfork(e,t,a)},t.prototype.isActivatedEIP=function(e){var t,r;if(this.eips().includes(e))return!0;try{for(var n=c(v.hardforks),a=n.next();!a.done;a=n.next()){var i=a.value[1];if(this.gteHardfork(i.name)&&"eips"in i&&i.eips.includes(e))return!0}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.hardforkIsActiveOnBlock=function(e,t,r){var n;void 0===r&&(r={}),t=(0,m.toType)(t,m.TypeOutput.BN);var a=null!==(n=r.onlySupported)&&void 0!==n&&n;e=this._chooseHardfork(e,a);var i=this.hardforkBlockBN(e);return!(!i||!t.gte(i))},t.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},t.prototype.hardforkGteHardfork=function(e,t,r){var n,a;void 0===r&&(r={});var i,o=void 0!==r.onlyActive&&r.onlyActive;e=this._chooseHardfork(e,r.onlySupported),i=o?this.activeHardforks(null,r):this.hardforks();var s=-1,u=-1,f=0;try{for(var d=c(i),l=d.next();!l.done;l=d.next()){var h=l.value;h.name===e&&(s=f),h.name===t&&(u=f),f+=1}}catch(e){n={error:e}}finally{try{l&&!l.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}return s>=u&&-1!==u},t.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},t.prototype.hardforkIsActiveOnChain=function(e,t){var r,n,a;void 0===t&&(t={});var i=null!==(a=t.onlySupported)&&void 0!==a&&a;e=this._chooseHardfork(e,i);try{for(var o=c(this.hardforks()),s=o.next();!s.done;s=o.next()){var u=s.value;if(u.name===e&&null!==u.block)return!0}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1},t.prototype.activeHardforks=function(e,t){var r,n;void 0===t&&(t={});var a=[],i=this.hardforks();try{for(var o=c(i),s=o.next();!s.done;s=o.next()){var u=s.value;if(null!==u.block){if(null!=e&&e0)return r[r.length-1].name;throw new Error("No (supported) active hardfork found")},t.prototype.hardforkBlock=function(e){var t=this.hardforkBlockBN(e);return t?(0,m.toType)(t,m.TypeOutput.Number):null},t.prototype.hardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).block;return null==t?null:new m.BN(t)},t.prototype.hardforkTD=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).td;return null==t?null:new m.BN(t)},t.prototype.isHardforkBlock=function(e,t){e=(0,m.toType)(e,m.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.hardforkBlockBN(t);return!!r&&r.eq(e)},t.prototype.nextHardforkBlock=function(e){var t=this.nextHardforkBlockBN(e);return null===t?null:(0,m.toType)(t,m.TypeOutput.Number)},t.prototype.nextHardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this.hardforkBlockBN(e);return null===t?null:this.hardforks().reduce((function(e,r){var n=new m.BN(r.block);return n.gt(t)&&null===e?n:e}),null)},t.prototype.isNextHardforkBlock=function(e,t){e=(0,m.toType)(e,m.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.nextHardforkBlockBN(t);return null!==r&&r.eq(e)},t.prototype._calcForkHash=function(e){var t,r,n=a.from(this.genesis().hash.substr(2),"hex"),i=a.alloc(0),o=0;try{for(var s=c(this.hardforks()),u=s.next();!u.done;u=s.next()){var f=u.value,d=f.block;if(0!==d&&null!==d&&d!==o){var l=a.from(d.toString(16).padStart(16,"0"),"hex");i=a.concat([i,l])}if(f.name===e)break;null!==d&&(o=d)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}var h=a.concat([n,i]);return"0x"+(0,m.intToBuffer)((0,b.buf)(h)>>>0).toString("hex")},t.prototype.forkHash=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e);if(null===t.block)throw new Error("No fork hash calculation possible for non-applied or future hardfork");return void 0!==t.forkHash?t.forkHash:this._calcForkHash(e)},t.prototype.hardforkForForkHash=function(e){var t=this.hardforks().filter((function(t){return t.forkHash===e}));return t.length>=1?t[t.length-1]:null},t.prototype.genesis=function(){return this._chainParams.genesis},t.prototype.genesisState=function(){var e,t;switch(this.chainName()){case"mainnet":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/mainnet.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"ropsten":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/ropsten.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"rinkeby":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/rinkeby.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"kovan":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/kovan.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"goerli":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/goerli.json'");throw e.code="MODULE_NOT_FOUND",e}()))}if(this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0]))try{for(var n=c(this._customChains),a=n.next();!a.done;a=n.next()){var i=a.value;if(i[0].name===this.chainName())return i[1]}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return{}},t.prototype.hardforks=function(){return this._chainParams.hardforks},t.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},t.prototype.dnsNetworks=function(){return this._chainParams.dnsNetworks},t.prototype.hardfork=function(){return this._hardfork},t.prototype.chainId=function(){return(0,m.toType)(this.chainIdBN(),m.TypeOutput.Number)},t.prototype.chainIdBN=function(){return new m.BN(this._chainParams.chainId)},t.prototype.chainName=function(){return this._chainParams.name},t.prototype.networkId=function(){return(0,m.toType)(this.networkIdBN(),m.TypeOutput.Number)},t.prototype.networkIdBN=function(){return new m.BN(this._chainParams.networkId)},t.prototype.eips=function(){return this._eips},t.prototype.consensusType=function(){var e,t,r,n=this.hardfork();try{for(var a=c(v.hardforks),i=a.next();!i.done;i=a.next()){var o=i.value;if("consensus"in o[1]&&(r=o[1].consensus.type),o[0]===n)break}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.type},t.prototype.consensusAlgorithm=function(){var e,t,r,n=this.hardfork();try{for(var a=c(v.hardforks),i=a.next();!i.done;i=a.next()){var o=i.value;if("consensus"in o[1]&&(r=o[1].consensus.algorithm),o[0]===n)break}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.algorithm},t.prototype.consensusConfig=function(){var e,t,r,n=this.hardfork();try{for(var a=c(v.hardforks),i=a.next();!i.done;i=a.next()){var o=i.value;if("consensus"in o[1]&&(r=o[1].consensus[o[1].consensus.algorithm]),o[0]===n)break}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}if(r)return r;var s=this.consensusAlgorithm();return this._chainParams.consensus[s]},t.prototype.copy=function(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this)},t}(p.EventEmitter);t.default=A},4383:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},i=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTransaction=void 0;var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t}(r(3863)),s=r(3062),c=r(7325),u=function(){function e(e){this.cache={hash:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=o.Chain.Mainnet,this.DEFAULT_HARDFORK=o.Hardfork.Istanbul;var t=e.nonce,r=e.gasLimit,n=e.to,a=e.value,i=e.data,c=e.v,u=e.r,f=e.s,d=e.type;this._type=new s.BN((0,s.toBuffer)(d)).toNumber();var l=(0,s.toBuffer)(""===n?"0x":n),h=(0,s.toBuffer)(""===c?"0x":c),p=(0,s.toBuffer)(""===u?"0x":u),b=(0,s.toBuffer)(""===f?"0x":f);this.nonce=new s.BN((0,s.toBuffer)(""===t?"0x":t)),this.gasLimit=new s.BN((0,s.toBuffer)(""===r?"0x":r)),this.to=l.length>0?new s.Address(l):void 0,this.value=new s.BN((0,s.toBuffer)(""===a?"0x":a)),this.data=(0,s.toBuffer)(""===i?"0x":i),this.v=h.length>0?new s.BN(h):void 0,this.r=p.length>0?new s.BN(p):void 0,this.s=b.length>0?new s.BN(b):void 0,this._validateCannotExceedMaxInteger({nonce:this.nonce,gasLimit:this.gasLimit,value:this.value,r:this.r,s:this.s})}return Object.defineProperty(e.prototype,"transactionType",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e.prototype.supports=function(e){return this.activeCapabilities.includes(e)},e.prototype.validate=function(e){void 0===e&&(e=!1);var t=[];return this.getBaseFee().gt(this.gasLimit)&&t.push("gasLimit is too low. given "+this.gasLimit+", need at least "+this.getBaseFee()),this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),e?t:0===t.length},e.prototype.getBaseFee=function(){var e=this.getDataFee().addn(this.common.param("gasPrices","tx"));return this.common.gteHardfork("homestead")&&this.toCreationAddress()&&e.iaddn(this.common.param("gasPrices","txCreation")),e},e.prototype.getDataFee=function(){for(var e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero"),r=0,n=0;n-1&&this.activeCapabilities.splice(f,1)}return u},e.prototype._getCommon=function(e,t){var r;if(t){var n=new s.BN((0,s.toBuffer)(t));if(e){if(!e.chainIdBN().eq(n))throw new Error("The chain ID does not match the chain ID of Common");return e.copy()}return o.default.isSupportedChainId(n)?new o.default({chain:n,hardfork:this.DEFAULT_HARDFORK}):o.default.forCustomChain(this.DEFAULT_CHAIN,{name:"custom-chain",networkId:n,chainId:n},this.DEFAULT_HARDFORK)}return null!==(r=null==e?void 0:e.copy())&&void 0!==r?r:new o.default({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})},e.prototype._validateCannotExceedMaxInteger=function(e,t){var r,n;void 0===t&&(t=53);try{for(var a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),o=a.next();!o.done;o=a.next()){var c=i(o.value,2),u=c[0],f=c[1];if(53===t){if(null==f?void 0:f.gt(s.MAX_INTEGER))throw new Error(u+" cannot exceed MAX_INTEGER, given "+f)}else{if(256!==t)throw new Error("unimplemented bits value");if(null==f?void 0:f.gte(s.TWO_POW256))throw new Error(u+" must be less than 2^256, given "+f)}}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}},e}();t.BaseTransaction=u},660:function(e,t,r){"use strict";var n,a=r(9033).Buffer,i=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}(e,12),a=n[0],i=n[1],o=n[2],c=n[3],u=n[4],f=n[5],d=n[6],l=n[7],h=n[8],p=n[9],b=n[10],m=n[11];return new t({chainId:new s.BN(a),nonce:i,maxPriorityFeePerGas:o,maxFeePerGas:c,gasLimit:u,to:f,value:d,data:l,accessList:null!=h?h:[],v:void 0!==p?new s.BN(p):void 0,r:b,s:m},r)},t.prototype.getDataFee=function(){var t=e.prototype.getDataFee.call(this);return t.iaddn(f.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),t},t.prototype.getUpfrontCost=function(e){void 0===e&&(e=new s.BN(0));var t=s.BN.min(this.maxPriorityFeePerGas,this.maxFeePerGas.sub(e)).add(e);return this.gasLimit.mul(t).add(this.value)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,s.bnToUnpaddedBuffer)(this.maxFeePerGas),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:a.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):a.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):a.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):a.from([])]},t.prototype.serialize=function(){var e=this.raw();return a.concat([d,s.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,9),r=a.concat([d,s.rlp.encode(t)]);return e?(0,s.keccak256)(r):r},t.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this,n=r.v,a=r.r,i=r.s;try{return(0,s.ecrecover)(t,n.addn(27),(0,s.bnToUnpaddedBuffer)(a),(0,s.bnToUnpaddedBuffer)(i))}catch(e){throw new Error("Invalid Signature")}},t.prototype._processSignature=function(e,r,n){var a={common:this.common};return t.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(r),s:new s.BN(n)},a)},t.prototype.toJSON=function(){var e=f.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),maxPriorityFeePerGas:(0,s.bnToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,s.bnToHex)(this.maxFeePerGas),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t}(c.BaseTransaction);t.default=l},7613:function(e,t,r){"use strict";var n,a=r(9033).Buffer,i=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}(e,11),a=n[0],i=n[1],o=n[2],c=n[3],u=n[4],f=n[5],d=n[6],l=n[7],h=n[8],p=n[9],b=n[10];return new t({chainId:new s.BN(a),nonce:i,gasPrice:o,gasLimit:c,to:u,value:f,data:d,accessList:null!=l?l:[],v:void 0!==h?new s.BN(h):void 0,r:p,s:b},r)},t.prototype.getDataFee=function(){var t=e.prototype.getDataFee.call(this);return t.iaddn(f.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),t},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:a.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):a.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):a.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):a.from([])]},t.prototype.serialize=function(){var e=this.raw();return a.concat([d,s.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,8),r=a.concat([d,s.rlp.encode(t)]);return e?(0,s.keccak256)(r):r},t.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this,n=r.yParity,a=r.r,i=r.s;try{return(0,s.ecrecover)(t,n.addn(27),(0,s.bnToUnpaddedBuffer)(a),(0,s.bnToUnpaddedBuffer)(i))}catch(e){throw new Error("Invalid Signature")}},t.prototype._processSignature=function(e,r,n){var a={common:this.common};return t.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(r),s:new s.BN(n)},a)},t.prototype.toJSON=function(){var e=f.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t}(c.BaseTransaction);t.default=l},2339:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FeeMarketEIP1559Transaction=t.TransactionFactory=t.AccessListEIP2930Transaction=t.Transaction=void 0;var i=r(3088);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return a(i).default}});var o=r(7613);Object.defineProperty(t,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return a(o).default}});var s=r(9562);Object.defineProperty(t,"TransactionFactory",{enumerable:!0,get:function(){return a(s).default}});var c=r(660);Object.defineProperty(t,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return a(c).default}}),function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)}(r(7325),t)},3088:function(e,t,r){"use strict";var n,a=r(9033).Buffer,i=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}(e,9);return new t({nonce:n[0],gasPrice:n[1],gasLimit:n[2],to:n[3],value:n[4],data:n[5],v:n[6],r:n[7],s:n[8]},r)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:a.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):a.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):a.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):a.from([])]},t.prototype.serialize=function(){return s.rlp.encode(this.raw())},t.prototype._getMessageToSign=function(){var e=[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:a.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data];return this.supports(c.Capability.EIP155ReplayProtection)&&(e.push((0,s.toBuffer)(this.common.chainIdBN())),e.push((0,s.unpadBuffer)((0,s.toBuffer)(0))),e.push((0,s.unpadBuffer)((0,s.toBuffer)(0)))),e},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this._getMessageToSign();return e?(0,s.rlphash)(t):t},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.hash=function(){return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.rlphash)(this.raw())),this.cache.hash):(0,s.rlphash)(this.raw())},t.prototype.getMessageToVerifySignature=function(){if(!this.isSigned())throw Error("This transaction is not signed");var e=this._getMessageToSign();return(0,s.rlphash)(e)},t.prototype.getSenderPublicKey=function(){var e,t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(c.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this,n=r.v,a=r.r,i=r.s;try{return(0,s.ecrecover)(t,n,(0,s.bnToUnpaddedBuffer)(a),(0,s.bnToUnpaddedBuffer)(i),this.supports(c.Capability.EIP155ReplayProtection)?this.common.chainIdBN():void 0)}catch(e){throw new Error("Invalid Signature")}},t.prototype._processSignature=function(e,r,n){var a=new s.BN(e);this.supports(c.Capability.EIP155ReplayProtection)&&a.iadd(this.common.chainIdBN().muln(2).addn(8));var i={common:this.common};return t.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:a,r:new s.BN(r),s:new s.BN(n)},i)},t.prototype.toJSON=function(){return{nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype._validateTxV=function(e,t){var r;if(void 0!==e&&!e.eqn(0)&&(!t||t.gteHardfork("spuriousDragon"))&&!e.eqn(27)&&!e.eqn(28))if(t){var n=t.chainIdBN().muln(2);if(!e.eq(n.addn(35))&&!e.eq(n.addn(36)))throw new Error("Incompatible EIP155-based V "+e.toString()+" and chain id "+t.chainIdBN().toString()+". See the Common parameter of the Transaction constructor to set the chain id.")}else{var a;a=e.subn(35).isEven()?35:36,r=e.subn(a).divn(2)}return this._getCommon(t,r)},t.prototype._unsignedTxImplementsEIP155=function(){return this.common.gteHardfork("spuriousDragon")},t.prototype._signedTxImplementsEIP155=function(){if(!this.isSigned())throw Error("This transaction is not signed");var e=this.common.gteHardfork("spuriousDragon"),t=this.v,r=this.common.chainIdBN().muln(2);return(t.eq(r.addn(35))||t.eq(r.addn(36)))&&e},t}(r(4383).BaseTransaction);t.default=u},9562:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var a=r(3062),i=r(2339),o=function(){function e(){}return e.fromTxData=function(e,t){if(void 0===t&&(t={}),"type"in e&&void 0!==e.type){var r=new a.BN((0,a.toBuffer)(e.type)).toNumber();if(0===r)return i.Transaction.fromTxData(e,t);if(1===r)return i.AccessListEIP2930Transaction.fromTxData(e,t);if(2===r)return i.FeeMarketEIP1559Transaction.fromTxData(e,t);throw new Error("Tx instantiation with type "+r+" not supported")}return i.Transaction.fromTxData(e,t)},e.fromSerializedData=function(e,t){if(void 0===t&&(t={}),e[0]<=127){var r=void 0;switch(e[0]){case 1:r=2930;break;case 2:r=1559;break;default:throw new Error("TypedTransaction with ID "+e[0]+" unknown")}return 1559===r?i.FeeMarketEIP1559Transaction.fromSerializedTx(e,t):i.AccessListEIP2930Transaction.fromSerializedTx(e,t)}return i.Transaction.fromSerializedTx(e,t)},e.fromBlockBodyData=function(e,t){if(void 0===t&&(t={}),n.isBuffer(e))return this.fromSerializedData(e,t);if(Array.isArray(e))return i.Transaction.fromValuesArray(e,t);throw new Error("Cannot decode transaction: unknown type input")},e.getTransactionClass=function(e,t){if(void 0===e&&(e=0),0==e||e>=128&&e<=255)return i.Transaction;switch(e){case 1:return i.AccessListEIP2930Transaction;case 2:return i.FeeMarketEIP1559Transaction;default:throw new Error("TypedTransaction with ID "+e+" unknown")}},e}();t.default=o},7325:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.N_DIV_2=t.isAccessList=t.isAccessListBuffer=t.Capability=void 0;var n,a=r(3062);function i(e){if(0===e.length)return!0;var t=e[0];return!!Array.isArray(t)}(n=t.Capability||(t.Capability={}))[n.EIP155ReplayProtection=155]="EIP155ReplayProtection",n[n.EIP1559FeeMarket=1559]="EIP1559FeeMarket",n[n.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",n[n.EIP2930AccessLists=2930]="EIP2930AccessLists",t.isAccessListBuffer=i,t.isAccessList=function(e){return!i(e)},t.N_DIV_2=new a.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16)},3789:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessLists=void 0;var n=r(3062),a=r(7325),i=function(){function e(){}return e.getAccessListData=function(e){var t,r;if(e&&(0,a.isAccessList)(e)){t=e;for(var i=[],o=0;o256||n%8!=0)&&w.throwArgumentError("invalid "+r[1]+" bit length","param",e),new g.NumberCoder(n/8,"int"===r[1],e.name)}if(r=e.type.match(x)){var a=parseInt(r[1]);return(0===a||a>32)&&w.throwArgumentError("invalid bytes length","param",e),new b.FixedBytesCoder(a,e.name)}return w.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new f.Reader(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new f.Writer(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(A.ParamType.from(e))}));return new y.TupleCoder(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&w.throwError("types/values length mismatch",c.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var n=e.map((function(e){return r._getCoder(A.ParamType.from(e))})),a=new y.TupleCoder(n,"_"),i=this._getWriter();return a.encode(i,t),i.data}},{key:"decode",value:function(e,t,r){var n=this,a=e.map((function(e){return n._getCoder(A.ParamType.from(e))}));return new y.TupleCoder(a,"_").decode(this._getReader((0,o.arrayify)(t),r))}}]),e}();t.AbiCoder=_;var C=new _;t.defaultAbiCoder=C},7316:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.Writer=t.Reader=t.Coder=void 0,t.checkResultErrors=function(e){var t=[];return function e(r,n){if(Array.isArray(n))for(var a in n){var i=r.slice();i.push(a);try{e(i,n[a])}catch(e){t.push({path:i,error:e})}}}([],e),t};var a=n(r(9721)),i=n(r(8985)),o=r(908),s=r(4952),c=r(3694),u=r(4327),f=r(8067),d=new u.Logger(f.version),l=function(){function e(t,r,n,i){(0,a.default)(this,e),this.name=t,this.type=r,this.localName=n,this.dynamic=i}return(0,i.default)(e,[{key:"_throwError",value:function(e,t){d.throwArgumentError(e,this.localName,t)}}]),e}();t.Coder=l;var h=function(){function e(t){(0,a.default)(this,e),(0,c.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return(0,i.default)(e,[{key:"data",get:function(){return(0,o.hexConcat)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData((0,o.concat)(e._data))}},{key:"writeBytes",value:function(e){var t=(0,o.arrayify)(e),r=t.length%this.wordSize;return r&&(t=(0,o.concat)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=(0,o.arrayify)(s.BigNumber.from(e));return t.length>this.wordSize&&d.throwError("value out-of-bounds",u.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,o.concat)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}();t.Writer=h;var p=function(){function e(t,r,n,i){(0,a.default)(this,e),(0,c.defineReadOnly)(this,"_data",(0,o.arrayify)(t)),(0,c.defineReadOnly)(this,"wordSize",r||32),(0,c.defineReadOnly)(this,"_coerceFunc",n),(0,c.defineReadOnly)(this,"allowLoose",i),this._offset=0}return(0,i.default)(e,[{key:"data",get:function(){return(0,o.hexlify)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:d.throwError("data out-of-bounds",u.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return s.BigNumber.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}();t.Reader=p},9146:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;var a=n(r(9721)),i=n(r(8985)),o=n(r(5163)),s=n(r(4650)),c=n(r(1949)),u=r(7921),f=r(908),d=function(e){(0,o.default)(d,e);var t,r,n=(t=d,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var a=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function d(e){return(0,a.default)(this,d),n.call(this,"address","address",e,!1)}return(0,i.default)(d,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{t=(0,u.getAddress)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return(0,u.getAddress)((0,f.hexZeroPad)(e.readValue().toHexString(),20))}}]),d}(r(7316).Coder);t.AddressCoder=d},8090:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;var a=n(r(9721)),i=n(r(8985)),o=n(r(5163)),s=n(r(4650)),c=n(r(1949)),u=function(e){(0,o.default)(u,e);var t,r,n=(t=u,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var a=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function u(e){var t;return(0,a.default)(this,u),(t=n.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,t}return(0,i.default)(u,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(e,t){return this.coder.encode(e,t)}},{key:"decode",value:function(e){return this.coder.decode(e)}}]),u}(r(7316).Coder);t.AnonymousCoder=u},4341:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=void 0,t.pack=b,t.unpack=m;var a=n(r(9721)),i=n(r(8985)),o=n(r(5163)),s=n(r(4650)),c=n(r(1949)),u=n(r(3355)),f=r(4327),d=r(8067),l=r(7316),h=r(8090),p=new f.Logger(d.version);function b(e,t,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===(0,u.default)(r)){var a={};n=t.map((function(e){var t=e.localName;return t||p.throwError("cannot encode object for signature with missing names",f.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),a[t]&&p.throwError("cannot encode object for signature with duplicate names",f.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),a[t]=!0,r[t]}))}else p.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&p.throwArgumentError("types/value length mismatch","tuple",r);var i=new l.Writer(e.wordSize),o=new l.Writer(e.wordSize),s=[];return t.forEach((function(e,t){var r=n[t];if(e.dynamic){var a=o.length;e.encode(o,r);var c=i.writeUpdatableValue();s.push((function(e){c(e+a)}))}else e.encode(i,r)})),s.forEach((function(e){e(i.length)})),e.appendWriter(i)+e.appendWriter(o)}function m(e,t){var r=[],n=e.subReader(0);t.forEach((function(t){var a=null;if(t.dynamic){var i=e.readValue(),o=n.subReader(i.toNumber());try{a=t.decode(o)}catch(e){if(e.code===f.Logger.errors.BUFFER_OVERRUN)throw e;(a=e).baseType=t.name,a.name=t.localName,a.type=t.type}}else try{a=t.decode(e)}catch(e){if(e.code===f.Logger.errors.BUFFER_OVERRUN)throw e;(a=e).baseType=t.name,a.name=t.localName,a.type=t.type}null!=a&&r.push(a)}));var a=t.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach((function(e,t){var n=e.localName;if(n&&1===a[n]&&("length"===n&&(n="_length"),null==r[n])){var i=r[t];i instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:function(){throw i}}):r[n]=i}}));for(var i=function(e){var t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:function(){throw t}})},o=0;o=0?t:"")+"]",s=-1===t||e.dynamic;return(i=n.call(this,"array",o,r,s)).coder=e,i.length=t,i}return(0,i.default)(u,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;re._data.length&&p.throwError("insufficient data length",f.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n=0||"tuple"===e)&&g[t])return!0;return(m[t]||"payable"===t)&&p.throwArgumentError("invalid modifier","name",t),!1}function y(e,t){for(var r in t)(0,f.defineReadOnly)(e,r,t[r])}var A=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"});t.FormatTypes=A;var w=new RegExp(/^(.*)\[([0-9]*)\]$/),x=function(){function e(t,r){(0,s.default)(this,e),t!==b&&p.throwError("use fromString",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),y(this,r);var n=this.type.match(w);y(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return(0,c.default)(e,[{key:"format",value:function(e){if(e||(e=A.sighash),A[e]||p.throwArgumentError("invalid format type","format",e),e===A.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==A.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===A.full?", ":",")+")"):r+=this.type,e!==A.sighash&&(!0===this.indexed&&(r+=" indexed"),e===A.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"==typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(b,{name:t.name||null,type:T(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return n=function(e,t){var r=e;function n(t){p.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function a(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var i={type:"",name:"",state:{allowType:!0}},o=i,s=0;s2&&p.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||p.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=u.BigNumber.from(r[1]),r[0]):e}function B(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function I(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&p.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&p.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||p.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&p.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&p.throwArgumentError("unable to determine stateMutability","value",e),t}t.EventFragment=C;var S=function(e){(0,a.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,c.default)(r,[{key:"format",value:function(e){if(e||(e=A.sighash),A[e]||p.throwArgumentError("invalid format type","format",e),e===A.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===A.sighash&&p.throwError("cannot format a constructor for sighash",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===A.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&p.throwArgumentError("invalid constructor object","value",e);var t=I(e);t.constant&&p.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(x.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?u.BigNumber.from(e.gas):null};return new r(b,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=k(e,t)).match(P);return n&&"constructor"===n[1].trim()||p.throwArgumentError("invalid constructor string","value",e),t.inputs=E(n[2].trim(),!1),B(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(_);t.ConstructorFragment=S;var O=function(e){(0,a.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,c.default)(r,[{key:"format",value:function(e){if(e||(e=A.sighash),A[e]||p.throwArgumentError("invalid format type","format",e),e===A.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==A.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===A.full?", ":",")+") ",e!==A.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&p.throwArgumentError("invalid function object","value",e);var t=I(e),n={type:e.type,name:R(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(x.fromObject):[],outputs:e.outputs?e.outputs.map(x.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?u.BigNumber.from(e.gas):null};return new r(b,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=k(e,t)).split(" returns ");n.length>2&&p.throwArgumentError("invalid function string","value",e);var a=n[0].match(P);if(a||p.throwArgumentError("invalid function signature","value",e),t.name=a[1].trim(),t.name&&R(t.name),t.inputs=E(a[2],!1),B(a[3].trim(),t),n.length>1){var i=n[1].match(P);""==i[1].trim()&&""==i[3].trim()||p.throwArgumentError("unexpected tokens","value",e),t.outputs=E(i[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(S);function M(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||p.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}t.FunctionFragment=O;var D=function(e){(0,a.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,c.default)(r,[{key:"format",value:function(e){if(e||(e=A.sighash),A[e]||p.throwArgumentError("invalid format type","format",e),e===A.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==A.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===A.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&p.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:R(e.name),inputs:e.inputs?e.inputs.map(x.fromObject):[]};return M(new r(b,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(P);return n||p.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&R(t.name),t.inputs=E(n[2],!1),M(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(_);function T(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}t.ErrorFragment=D;var F=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function R(e){return e&&e.match(F)||p.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var P=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},2914:function(e,t,r){"use strict";Object.defineProperty(t,"RQ",{enumerable:!0,get:function(){return a.AbiCoder}}),Object.defineProperty(t,"_R",{enumerable:!0,get:function(){return n.ParamType}});var n=r(800),a=r(4937);r(9044)},9044:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDescription=t.LogDescription=t.Interface=t.Indexed=t.ErrorDescription=void 0,Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return m.checkResultErrors}});var a=n(r(8985)),i=n(r(9721)),o=n(r(5163)),s=n(r(4650)),c=n(r(1949)),u=r(7921),f=r(4952),d=r(908),l=r(7515),h=r(4642),p=r(3694),b=r(4937),m=r(7316),g=r(800),v=r(4327),y=r(8067);function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,c.default)(e);if(t){var a=(0,c.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var w=new v.Logger(y.version),x=function(e){(0,o.default)(r,e);var t=A(r);function r(){return(0,i.default)(this,r),t.apply(this,arguments)}return(0,a.default)(r)}(p.Description);t.LogDescription=x;var E=function(e){(0,o.default)(r,e);var t=A(r);function r(){return(0,i.default)(this,r),t.apply(this,arguments)}return(0,a.default)(r)}(p.Description);t.TransactionDescription=E;var _=function(e){(0,o.default)(r,e);var t=A(r);function r(){return(0,i.default)(this,r),t.apply(this,arguments)}return(0,a.default)(r)}(p.Description);t.ErrorDescription=_;var C=function(e){(0,o.default)(r,e);var t=A(r);function r(){return(0,i.default)(this,r),t.apply(this,arguments)}return(0,a.default)(r,null,[{key:"isIndexed",value:function(e){return!(!e||!e._isIndexed)}}]),r}(p.Description);t.Indexed=C;var k={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function B(e,t){var r=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return r.error=t,r}var I=function(){function e(t){var r=this;(0,i.default)(this,e);var n=[];n="string"==typeof t?JSON.parse(t):t,(0,p.defineReadOnly)(this,"fragments",n.map((function(e){return g.Fragment.from(e)})).filter((function(e){return null!=e}))),(0,p.defineReadOnly)(this,"_abiCoder",(0,p.getStatic)(this instanceof e?this.constructor:void 0,"getAbiCoder")()),(0,p.defineReadOnly)(this,"functions",{}),(0,p.defineReadOnly)(this,"errors",{}),(0,p.defineReadOnly)(this,"events",{}),(0,p.defineReadOnly)(this,"structs",{}),this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":return r.deploy?void w.warn("duplicate definition - constructor"):void(0,p.defineReadOnly)(r,"deploy",e);case"function":t=r.functions;break;case"event":t=r.events;break;case"error":t=r.errors;break;default:return}var n=e.format();t[n]?w.warn("duplicate definition - "+n):t[n]=e})),this.deploy||(0,p.defineReadOnly)(this,"deploy",g.ConstructorFragment.from({payable:!1,type:"constructor"})),(0,p.defineReadOnly)(this,"_isInterface",!0)}return(0,a.default)(e,[{key:"format",value:function(e){e||(e=g.FormatTypes.full),e===g.FormatTypes.sighash&&w.throwArgumentError("interface does not support formatting sighash","format",e);var t=this.fragments.map((function(t){return t.format(e)}));return e===g.FormatTypes.json?JSON.stringify(t.map((function(e){return JSON.parse(e)}))):t}},{key:"getFunction",value:function(e){if((0,d.isHexString)(e)){for(var t in this.functions)if(e===this.getSighash(t))return this.functions[t];w.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){var r=e.trim(),n=Object.keys(this.functions).filter((function(e){return e.split("(")[0]===r}));return 0===n.length?w.throwArgumentError("no matching function","name",r):n.length>1&&w.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var a=this.functions[g.FunctionFragment.fromString(e).format()];return a||w.throwArgumentError("no matching function","signature",e),a}},{key:"getEvent",value:function(e){if((0,d.isHexString)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];w.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var n=e.trim(),a=Object.keys(this.events).filter((function(e){return e.split("(")[0]===n}));return 0===a.length?w.throwArgumentError("no matching event","name",n):a.length>1&&w.throwArgumentError("multiple matching events","name",n),this.events[a[0]]}var i=this.events[g.EventFragment.fromString(e).format()];return i||w.throwArgumentError("no matching event","signature",e),i}},{key:"getError",value:function(e){if((0,d.isHexString)(e)){var t=(0,p.getStatic)(this.constructor,"getSighash");for(var r in this.errors)if(e===t(this.errors[r]))return this.errors[r];w.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),a=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));return 0===a.length?w.throwArgumentError("no matching error","name",n):a.length>1&&w.throwArgumentError("multiple matching errors","name",n),this.errors[a[0]]}var i=this.errors[g.FunctionFragment.fromString(e).format()];return i||w.throwArgumentError("no matching error","signature",e),i}},{key:"getSighash",value:function(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,p.getStatic)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,p.getStatic)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeErrorResult",value:function(e,t){"string"==typeof e&&(e=this.getError(e));var r=(0,d.arrayify)(t);return(0,d.hexlify)(r.slice(0,4))!==this.getSighash(e)&&w.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",(0,d.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,d.hexlify)((0,d.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,d.arrayify)(t);return(0,d.hexlify)(r.slice(0,4))!==this.getSighash(e)&&w.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",(0,d.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,d.hexlify)((0,d.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,d.arrayify)(t),n=null,a="",i=null,o=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(f){}break;case 4:var c=(0,d.hexlify)(r.slice(0,4)),u=k[c];if(u)i=this._abiCoder.decode(u.inputs,r.slice(4)),o=u.name,s=u.signature,u.reason&&(n=i[0]),"Error"===o?a="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(i[0])):"Panic"===o&&(a="; VM Exception while processing transaction: reverted with panic code ".concat(i[0]));else try{var f=this.getError(c);i=this._abiCoder.decode(f.inputs,r.slice(4)),o=f.name,s=f.format()}catch(f){}}return w.throwError("call revert exception"+a,v.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,d.hexlify)(t),errorArgs:i,errorName:o,errorSignature:s,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,d.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&w.throwError("too many arguments for "+e.format(),v.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var n=[];e.anonymous||n.push(this.getEventTopic(e));var a=function(e,t){return"string"===e.type?(0,l.id)(t):"bytes"===e.type?(0,h.keccak256)((0,d.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=f.BigNumber.from(t).toHexString()),"address"===e.type&&r._abiCoder.encode(["address"],[t]),(0,d.hexZeroPad)((0,d.hexlify)(t),32))};for(t.forEach((function(t,r){var i=e.inputs[r];i.indexed?null==t?n.push(null):"array"===i.baseType||"tuple"===i.baseType?w.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?n.push(t.map((function(e){return a(i,e)}))):n.push(a(i,t)):null!=t&&w.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e));var n=[],a=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&w.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,o){var s=t[o];if(e.indexed)if("string"===e.type)n.push((0,l.id)(s));else if("bytes"===e.type)n.push((0,h.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[s]))}else a.push(e),i.push(s)})),{data:this._abiCoder.encode(a,i),topics:n}}},{key:"decodeEventLog",value:function(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){var n=this.getEventTopic(e);(0,d.isHexString)(r[0],32)&&r[0].toLowerCase()===n||w.throwError("fragment/topic mismatch",v.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var a=[],i=[],o=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(a.push(g.ParamType.fromObject({type:"bytes32",name:e.name})),o.push(!0)):(a.push(e),o.push(!1)):(i.push(e),o.push(!1))}));var s=null!=r?this._abiCoder.decode(a,(0,d.concat)(r)):null,c=this._abiCoder.decode(i,t,!0),u=[],f=0,l=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)u[t]=new C({_isIndexed:!0,hash:null});else if(o[t])u[t]=new C({_isIndexed:!0,hash:s[l++]});else try{u[t]=s[l++]}catch(e){u[t]=e}else try{u[t]=c[f++]}catch(e){u[t]=e}if(e.name&&null==u[e.name]){var r=u[t];r instanceof Error?Object.defineProperty(u,e.name,{enumerable:!0,get:function(){throw B("property ".concat(JSON.stringify(e.name)),r)}}):u[e.name]=r}}));for(var h=function(e){var t=u[e];t instanceof Error&&Object.defineProperty(u,e,{enumerable:!0,get:function(){throw B("index ".concat(e),t)}})},p=0;p>1]>>4>=8&&(t[s]=t[s].toUpperCase()),(15&o[s>>1])>=8&&(t[s+1]=t[s+1].toUpperCase());return"0x"+t.join("")}for(var d={},l=0;l<10;l++)d[String(l)]=String(l);for(var h=0;h<26;h++)d[String.fromCharCode(65+h)]=String(10+h);var p,b=Math.floor((p=9007199254740991,Math.log10?Math.log10(p):Math.log(p)/Math.LN10));function m(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return d[e]})).join("");t.length>=b;){var r=t.substring(0,b);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function g(e){var t=null;if("string"!=typeof e&&u.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=f(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==m(e)&&u.throwArgumentError("bad icap checksum","address",e),t=(0,a._base36To16)(e.substring(4));t.length<40;)t="0"+t;t=f("0x"+t)}else u.throwArgumentError("invalid address","address",e);return t}},5798:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){e=atob(e);for(var t=[],r=0;r0&&(10===arguments[0]?p||(p=!0,d.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?d.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",c.Logger.errors.UNEXPECTED_ARGUMENT,{}):d.throwError("BigNumber.toString does not accept parameters",c.Logger.errors.UNEXPECTED_ARGUMENT,{})),v(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(l,m(t)):t.match(/^-?[0-9]+$/)?new e(l,m(new f(t))):d.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&y("underflow","BigNumber.from",t),(t>=h||t<=-h)&&y("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"==typeof r)return e.from(r.toString());if((0,s.isBytes)(r))return e.from((0,s.hexlify)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"==typeof n)return e.from(n)}else{var a=r._hex;if(null==a&&"BigNumber"===r.type&&(a=r.hex),"string"==typeof a&&((0,s.isHexString)(a)||"-"===a[0]&&(0,s.isHexString)(a.substring(1))))return e.from(a)}return d.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function m(e){if("string"!=typeof e)return m(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&d.throwArgumentError("invalid hex","value",e),"0x00"===(e=m(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function g(e){return b.from(m(e))}function v(e){var t=b.from(e).toHexString();return"-"===t[0]?new f("-"+t.substring(3),16):new f(t.substring(2),16)}function y(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),d.throwError(e,c.Logger.errors.NUMERIC_FAULT,n)}t.BigNumber=b},8390:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=t.FixedFormat=void 0,t.formatFixed=v,t.parseFixed=y;var a=n(r(3355)),i=n(r(9721)),o=n(r(8985)),s=r(908),c=r(4327),u=r(3042),f=r(1872),d=new c.Logger(u.version),l={},h=f.BigNumber.from(0),p=f.BigNumber.from(-1);function b(e,t,r,n){var a={fault:t,operation:r};return void 0!==n&&(a.value=n),d.throwError(e,c.Logger.errors.NUMERIC_FAULT,a)}for(var m="0";m.length<256;)m+=m;function g(e){if("number"!=typeof e)try{e=f.BigNumber.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+m.substring(0,e):d.throwArgumentError("invalid decimal size","decimals",e)}function v(e,t){null==t&&(t=0);var r=g(t),n=(e=f.BigNumber.from(e)).lt(h);n&&(e=e.mul(p));for(var a=e.mod(r).toString();a.length2&&d.throwArgumentError("too many decimal points","value",e);var i=a[0],o=a[1];for(i||(i="0"),o||(o="0");"0"===o[o.length-1];)o=o.substring(0,o.length-1);for(o.length>r.length-1&&b("fractional component exceeds decimals","underflow","parseFixed"),""===o&&(o="0");o.length80&&d.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new e(l,r,n,i)}}]),e}();t.FixedFormat=A;var w=function(){function e(t,r,n,a){(0,i.default)(this,e),t!==l&&d.throwError("cannot use FixedNumber constructor; use FixedNumber.from",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=a,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return(0,o.default)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&d.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=y(this._value,this.format.decimals),n=y(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=y(this._value,this.format.decimals),n=y(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=y(this._value,this.format.decimals),n=y(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=y(this._value,this.format.decimals),n=y(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(x.toFormat(r.format))),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(x.toFormat(r.format))),r}},{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&d.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+m.substring(0,t),this.format),a=E.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(a).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&d.throwArgumentError("invalid byte width","width",e);var t=f.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,s.hexZeroPad)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||(0,f.isBigNumberish)(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(v(t,r),A.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=A.from(r),a=y(t,n.decimals);!n.signed&&a.lt(h)&&b("unsigned value cannot be negative","overflow","value",t);var i=null;n.signed?i=a.toTwos(n.width).toHexString():(i=a.toHexString(),i=(0,s.hexZeroPad)(i,n.width/8));var o=v(a,n.decimals);return new e(l,i,o,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=A.from(r);if((0,s.arrayify)(t).length>n.width/8)throw new Error("overflow");var a=f.BigNumber.from(t);n.signed&&(a=a.fromTwos(n.width));var i=a.toTwos((n.signed?0:1)+n.width).toHexString(),o=v(a,n.decimals);return new e(l,i,o,n)}},{key:"from",value:function(t,r){if("string"==typeof t)return e.fromString(t,r);if((0,s.isBytes)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(e){if(e.code!==c.Logger.errors.INVALID_ARGUMENT)throw e}return d.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}();t.FixedNumber=w;var x=w.from(1),E=w.from("0.5")},4952:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BigNumber",{enumerable:!0,get:function(){return n.BigNumber}}),Object.defineProperty(t,"FixedFormat",{enumerable:!0,get:function(){return a.FixedFormat}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return a.FixedNumber}}),Object.defineProperty(t,"_base16To36",{enumerable:!0,get:function(){return n._base16To36}}),Object.defineProperty(t,"_base36To16",{enumerable:!0,get:function(){return n._base36To16}}),Object.defineProperty(t,"formatFixed",{enumerable:!0,get:function(){return a.formatFixed}}),Object.defineProperty(t,"parseFixed",{enumerable:!0,get:function(){return a.parseFixed}});var n=r(1872),a=r(8390)},8729:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="bytes/5.7.0"},908:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayify=d,t.concat=l,t.hexConcat=function(e){var t="0x";return e.forEach((function(e){t+=m(e).substring(2)})),t},t.hexDataLength=function(e){if("string"!=typeof e)e=m(e);else if(!p(e)||e.length%2)return null;return(e.length-2)/2},t.hexDataSlice=function(e,t,r){return"string"!=typeof e?e=m(e):(!p(e)||e.length%2)&&i.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)},t.hexStripZeros=g,t.hexValue=function(e){var t=g(m(e,{hexPad:"left"}));return"0x"===t?"0x0":t},t.hexZeroPad=v,t.hexlify=m,t.isBytes=f,t.isBytesLike=c,t.isHexString=p,t.joinSignature=function(e){return m(l([(e=y(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))},t.splitSignature=y,t.stripZeros=function(e){var t=d(e);if(0===t.length)return t;for(var r=0;r=256)return!1}return!0}function d(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),s(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e)&&(e=e.toHexString()),p(e)){var n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":i.throwArgumentError("hex data is odd-length","value",e));for(var a=[],c=0;ct&&i.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),s(r)}function p(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}var b="0123456789abcdef";function m(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r=b[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":i.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(f(e)){for(var n="0x",a=0;a>4]+b[15&s]}return n}return i.throwArgumentError("invalid hexlify value","value",e)}function g(e){"string"!=typeof e&&(e=m(e)),p(e)||i.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&i.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function y(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(c(e)){var r=d(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64))):65===r.length?(t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64)),t.v=r[64]):i.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:i.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=m(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var n=h(d(t._vs),32);t._vs=m(n);var a=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=a:t.recoveryParam!==a&&i.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;var o=m(n);null==t.s?t.s=o:t.s!==o&&i.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?i.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var s=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==s&&i.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=v(t.r,32):i.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=v(t.s,32):i.throwArgumentError("signature missing or invalid s","signature",e);var u=d(t.s);u[0]>=128&&i.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(u[0]|=128);var f=m(u);t._vs&&(p(t._vs)||i.throwArgumentError("signature invalid _vs","signature",e),t._vs=v(t._vs,32)),null==t._vs?t._vs=f:t._vs!==f&&i.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},8721:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressZero=void 0,t.AddressZero="0x0000000000000000000000000000000000000000"},2997:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Zero=t.WeiPerEther=t.Two=t.One=t.NegativeOne=t.MinInt256=t.MaxUint256=t.MaxInt256=void 0;var n=r(4952),a=n.BigNumber.from(-1);t.NegativeOne=a;var i=n.BigNumber.from(0);t.Zero=i;var o=n.BigNumber.from(1);t.One=o;var s=n.BigNumber.from(2);t.Two=s;var c=n.BigNumber.from("1000000000000000000");t.WeiPerEther=c;var u=n.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxUint256=u;var f=n.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");t.MinInt256=f;var d=n.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxInt256=d},396:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashZero=void 0,t.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"},5465:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AddressZero",{enumerable:!0,get:function(){return n.AddressZero}}),Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return o.EtherSymbol}}),Object.defineProperty(t,"HashZero",{enumerable:!0,get:function(){return i.HashZero}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return a.MaxInt256}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return a.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return a.MinInt256}}),Object.defineProperty(t,"NegativeOne",{enumerable:!0,get:function(){return a.NegativeOne}}),Object.defineProperty(t,"One",{enumerable:!0,get:function(){return a.One}}),Object.defineProperty(t,"Two",{enumerable:!0,get:function(){return a.Two}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return a.WeiPerEther}}),Object.defineProperty(t,"Zero",{enumerable:!0,get:function(){return a.Zero}});var n=r(8721),a=r(2997),i=r(396),o=r(8347)},8347:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherSymbol=void 0,t.EtherSymbol="\u039e"},3989:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="hash/5.7.0"},3731:function(e,t){"use strict";function r(e,t){null==t&&(t=1);var r=[],n=r.forEach;return function e(t,a){n.call(t,(function(t){a>0&&Array.isArray(t)?e(t,a-1):r.push(t)}))}(e,t),r}function n(e){var t=0;function r(){return e[t++]<<8|e[t++]}for(var n=r(),a=1,i=[0,1],o=1;o>--u&1}for(var l=Math.pow(2,31),h=l>>>1,p=h>>1,b=l-1,m=0,g=0;g<31;g++)m=m<<1|d();for(var v=[],y=0,A=l;;){for(var w=Math.floor(((m-y+1)*a-1)/A),x=0,E=n;E-x>1;){var _=x+E>>>1;w>>1|d(),C=C<<1^h,k=(k^h)<<1|h|1;y=C,A=1+k-C}var B=n-4;return v.map((function(t){switch(t-B){case 3:return B+65792+(e[c++]<<16|e[c++]<<8|e[c++]);case 2:return B+256+(e[c++]<<8|e[c++]);case 1:return B+e[c++];default:return t-1}}))}function a(e){var t=0;return function(){return e[t++]}}function i(e){return 1&e?~e>>1:e>>1}function o(e,t){for(var r=Array(e),n=0,a=-1;n>=1),check:2==i}}()},t.read_mapped_map=function(e){for(var t=[];;){var n=e();if(0==n)break;t.push(d(n,e))}for(;;){var a=e()-1;if(a<0)break;t.push(l(a,e))}return function(e){for(var t={},r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(e.split("."));try{for(r.s();!(t=r.n()).done;){var n=t.value,a=p(n);try{for(var i=a.lastIndexOf(95)-1;i>=0;i--)if(95!==a[i])throw new Error("underscore only allowed at start");if(a.length>=4&&a.every((function(e){return e<128}))&&45===a[2]&&45===a[3])throw new Error("invalid label extension")}catch(e){throw new Error('Invalid label "'.concat(n,'": ').concat(e.message))}}}catch(e){r.e(e)}finally{r.f()}return e}function g(e,t){var r,n,i,o=h,s=[],c=e.length;t&&(t.length=0);for(var u=function(){var u=e[--c];if(!(o=null===(r=o.branches.find((function(e){return e.set.has(u)})))||void 0===r?void 0:r.node))return"break";if(o.save)i=u;else if(o.check&&u===i)return"break";s.push(u),o.fe0f&&(s.push(65039),c>0&&65039==e[c-1]&&c--),o.valid&&(n=s.slice(),2==o.valid&&n.splice(1,1),t&&t.push.apply(t,(0,a.default)(e.slice(c).reverse())),e.length=c)};c&&"break"!==u(););return n}},7901:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=function(e){return(0,n.keccak256)((0,a.toUtf8Bytes)(e))};var n=r(4642),a=r(8627)},7515:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return o.TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return a.dnsEncode}}),Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return a.ensNormalize}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return i.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return n.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return a.isValidName}}),Object.defineProperty(t,"messagePrefix",{enumerable:!0,get:function(){return i.messagePrefix}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return a.namehash}});var n=r(7901),a=r(4898),i=r(4443),o=r(2171)},4443:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashMessage=function(e){return"string"==typeof e&&(e=(0,i.toUtf8Bytes)(e)),(0,a.keccak256)((0,n.concat)([(0,i.toUtf8Bytes)(o),(0,i.toUtf8Bytes)(String(e.length)),e]))},t.messagePrefix=void 0;var n=r(908),a=r(4642),i=r(8627),o="\x19Ethereum Signed Message:\n";t.messagePrefix=o},4898:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsEncode=function(e){return(0,n.hexlify)((0,n.concat)(l(e).map((function(e){if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"},t.ensNormalize=function(e){return l(e).map((function(e){return(0,a.toUtf8String)(e)})).join(".")},t.isValidName=function(e){try{return 0!==l(e).length}catch(e){}return!1},t.namehash=function(e){"string"!=typeof e&&u.throwArgumentError("invalid ENS name; not a string","name",e);for(var t=f,r=l(e);r.length;)t=(0,i.keccak256)((0,n.concat)([t,(0,i.keccak256)(r.pop())]));return(0,n.hexlify)(t)};var n=r(908),a=r(8627),i=r(4642),o=r(4327),s=r(3989),c=r(7032),u=new o.Logger(s.version),f=new Uint8Array(32);function d(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function l(e){var t=(0,a.toUtf8Bytes)((0,c.ens_normalize)(e)),r=[];if(0===e.length)return r;for(var n=0,i=0;i=t.length)throw new Error("invalid ENS name; empty component");return r.push(d(t.slice(n))),r}f.fill(0)},2171:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.TypedDataEncoder=void 0;var a=n(r(2247)),i=n(r(9721)),o=n(r(8985)),s=r(7921),c=r(4952),u=r(908),f=r(4642),d=r(3694),l=r(4327),h=r(3989),p=r(7901),b=new l.Logger(h.version),m=new Uint8Array(32);m.fill(0);var g=c.BigNumber.from(-1),v=c.BigNumber.from(0),y=c.BigNumber.from(1),A=c.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),w=(0,u.hexZeroPad)(y.toHexString(),32),x=(0,u.hexZeroPad)(v.toHexString(),32),E={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},_=["name","version","chainId","verifyingContract","salt"];function C(e){return function(t){return"string"!=typeof t&&b.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var k={name:C("name"),version:C("version"),chainId:function(e){try{return c.BigNumber.from(e).toString()}catch(e){}return b.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,s.getAddress)(e).toLowerCase()}catch(e){}return b.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=(0,u.arrayify)(e);if(32!==t.length)throw new Error("bad length");return(0,u.hexlify)(t)}catch(e){}return b.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function B(e){var t=e.match(/^(u?)int(\d*)$/);if(t){var r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&b.throwArgumentError("invalid numeric width","type",e);var a=A.mask(r?n-1:n),i=r?a.add(y).mul(g):v;return function(t){var r=c.BigNumber.from(t);return(r.lt(i)||r.gt(a))&&b.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),(0,u.hexZeroPad)(r.toTwos(256).toHexString(),32)}}var o=e.match(/^bytes(\d+)$/);if(o){var d=parseInt(o[1]);return(0===d||d>32||o[1]!==String(d))&&b.throwArgumentError("invalid bytes width","type",e),function(t){return(0,u.arrayify)(t).length!==d&&b.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=(0,u.arrayify)(e),r=t.length%32;return r?(0,u.hexConcat)([t,m.slice(r)]):(0,u.hexlify)(t)}(t)}}switch(e){case"address":return function(e){return(0,u.hexZeroPad)((0,s.getAddress)(e),32)};case"bool":return function(e){return e?w:x};case"bytes":return function(e){return(0,f.keccak256)(e)};case"string":return function(e){return(0,p.id)(e)}}return null}function I(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var S=function(){function e(t){(0,i.default)(this,e),(0,d.defineReadOnly)(this,"types",Object.freeze((0,d.deepCopy)(t))),(0,d.defineReadOnly)(this,"_encoderCache",{}),(0,d.defineReadOnly)(this,"_types",{});var r={},n={},a={};Object.keys(t).forEach((function(e){r[e]={},n[e]=[],a[e]={}}));var o=function(e){var a={};t[e].forEach((function(i){a[i.name]&&b.throwArgumentError("duplicate variable name ".concat(JSON.stringify(i.name)," in ").concat(JSON.stringify(e)),"types",t),a[i.name]=!0;var o=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];o===e&&b.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),B(o)||(n[o]||b.throwArgumentError("unknown type ".concat(JSON.stringify(o)),"types",t),n[o].push(e),r[e][o]=!0)}))};for(var s in t)o(s);var c=Object.keys(n).filter((function(e){return 0===n[e].length}));for(var u in 0===c.length?b.throwArgumentError("missing primary type","types",t):c.length>1&&b.throwArgumentError("ambiguous primary types or unused types: ".concat(c.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),(0,d.defineReadOnly)(this,"primaryType",c[0]),function e(i,o){o[i]&&b.throwArgumentError("circular type reference to ".concat(JSON.stringify(i)),"types",t),o[i]=!0,Object.keys(r[i]).forEach((function(t){n[t]&&(e(t,o),Object.keys(o).forEach((function(e){a[e][t]=!0})))})),delete o[i]}(this.primaryType,{}),a){var f=Object.keys(a[u]);f.sort(),this._types[u]=I(u,t[u])+f.map((function(e){return I(e,t[e])})).join("")}}return(0,o.default)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,r=B(e);if(r)return r;var n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var a=n[1],i=this.getEncoder(a),o=parseInt(n[3]);return function(e){o>=0&&e.length!==o&&b.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var r=e.map(i);return t._types[a]&&(r=r.map(f.keccak256)),(0,f.keccak256)((0,u.hexConcat)(r))}}var s=this.types[e];if(s){var c=(0,p.id)(this._types[e]);return function(e){var r=s.map((function(r){var n=r.name,a=r.type,i=t.getEncoder(a)(e[n]);return t._types[a]?(0,f.keccak256)(i):i}));return r.unshift(c),(0,u.hexConcat)(r)}}return b.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||b.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return(0,f.keccak256)(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,r){var n=this;if(B(e))return r(e,t);var a=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(a){var i=a[1],o=parseInt(a[3]);return o>=0&&t.length!==o&&b.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return n._visit(i,e,r)}))}var s=this.types[e];return s?s.reduce((function(e,a){var i=a.name,o=a.type;return e[i]=n._visit(o,t[i],r),e}),{}):b.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,r,n){return e.from(r).hashStruct(t,n)}},{key:"hashDomain",value:function(t){var r=[];for(var n in t){var a=E[n];a||b.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",t),r.push({name:n,type:a})}return r.sort((function(e,t){return _.indexOf(e.name)-_.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:r},t)}},{key:"encode",value:function(t,r,n){return(0,u.hexConcat)(["0x1901",e.hashDomain(t),e.from(r).hash(n)])}},{key:"hash",value:function(t,r,n){return(0,f.keccak256)(e.encode(t,r,n))}},{key:"resolveNames",value:function(t,r,n,i){return o=this,s=void 0,c=void 0,f=a.default.mark((function o(){var s,c,f;return a.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:t=(0,d.shallowCopy)(t),s={},t.verifyingContract&&!(0,u.isHexString)(t.verifyingContract,20)&&(s[t.verifyingContract]="0x"),(c=e.from(r)).visit(n,(function(e,t){return"address"!==e||(0,u.isHexString)(t,20)||(s[t]="0x"),t})),o.t0=a.default.keys(s);case 6:if((o.t1=o.t0()).done){o.next=13;break}return f=o.t1.value,o.next=10,i(f);case 10:s[f]=o.sent,o.next=6;break;case 13:return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),n=c.visit(n,(function(e,t){return"address"===e&&s[t]?s[t]:t})),o.abrupt("return",{domain:t,value:n});case 16:case"end":return o.stop()}}),o)})),new(c||(c=Promise))((function(e,t){function r(e){try{a(f.next(e))}catch(e){t(e)}}function n(e){try{a(f.throw(e))}catch(e){t(e)}}function a(t){var a;t.done?e(t.value):(a=t.value,a instanceof c?a:new c((function(e){e(a)}))).then(r,n)}a((f=f.apply(o,s||[])).next())}));var o,s,c,f}},{key:"getPayload",value:function(t,r,n){e.hashDomain(t);var a={},i=[];_.forEach((function(e){var r=t[e];null!=r&&(a[e]=k[e](r),i.push({name:e,type:E[e]}))}));var o=e.from(r),s=(0,d.shallowCopy)(r);return s.EIP712Domain?b.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):s.EIP712Domain=i,o.encode(n),{types:s,domain:a,primaryType:o.primaryType,message:o.visit(n,(function(e,t){if(e.match(/^bytes(\d*)/))return(0,u.hexlify)((0,u.arrayify)(t));if(e.match(/^u?int/))return c.BigNumber.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&b.throwArgumentError("invalid string","value",t),t}return b.throwArgumentError("unsupported type","type",e)}))}}}]),e}();t.TypedDataEncoder=S},4642:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e){return"0x"+a.default.keccak_256((0,i.arrayify)(e))};var a=n(r(5975)),i=r(908)},5975:function(e,t,r){"use strict";e=r.nmd(e);var n,a=r(9142),i=r(8847)(r(3355));!function(){var o="input is invalid type",s="object"===("undefined"==typeof window?"undefined":(0,i.default)(window)),c=s?window:{};c.JS_SHA3_NO_WINDOW&&(s=!1);var u=!s&&"object"===("undefined"==typeof self?"undefined":(0,i.default)(self));!c.JS_SHA3_NO_NODE_JS&&"object"===(void 0===a?"undefined":(0,i.default)(a))&&a.versions&&a.versions.node?c=r.g:u&&(c=self);var f=!c.JS_SHA3_NO_COMMON_JS&&"object"===(0,i.default)(e)&&e.exports,d=r.amdO,l=!c.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),p=[4,1024,262144,67108864],b=[0,8,16,24],m=[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],y=["hex","buffer","arrayBuffer","array","digest"],A={128:168,256:136};!c.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!l||!c.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,i.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,r){return function(n){return new P(e,t,e).update(n)[r]()}},x=function(e,t,r){return function(n,a){return new P(e,t,a).update(n)[r]()}},E=function(e,t,r){return function(t,n,a,i){return I["cshake"+e].update(t,n,a,i)[r]()}},_=function(e,t,r){return function(t,n,a,i){return I["kmac"+e].update(t,n,a,i)[r]()}},C=function(e,t,r,n){for(var a=0;a>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function N(e,t,r){P.call(this,e,t,r)}P.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,i.default)(e);if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,a,s=this.blocks,c=this.byteCount,u=e.length,f=this.blockCount,d=0,h=this.s;d>2]|=e[d]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(s[n>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=c){for(this.start=n-c,this.block=s[f],n=0;n>=8);r>0;)a.unshift(r),r=255&(e>>=8),++n;return t?a.push(n):a.unshift(n),this.update(a),a.length},P.prototype.encodeString=function(e){var t,r=(0,i.default)(e);if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,a=e.length;if(t)n=a;else for(var s=0;s=57344?n+=3:(c=65536+((1023&c)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},P.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];o%t==0&&(j(r),i=0)}return a&&(e=r[i],s+=h[e>>4&15]+h[15&e],a>1&&(s+=h[e>>12&15]+h[e>>8&15]),a>2&&(s+=h[e>>20&15]+h[e>>16&15])),s},P.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,a=this.extraBytes,i=0,o=0,s=this.outputBits>>3;e=a?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);o>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%r==0&&j(n)}return i&&(e=s<<2,t=n[o],c[e]=255&t,i>1&&(c[e+1]=t>>8&255),i>2&&(c[e+2]=t>>16&255)),c},N.prototype=new P,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),P.prototype.finalize.call(this)};var j=function(e){var t,r,n,a,i,o,s,c,u,f,d,l,h,p,b,g,v,y,A,w,x,E,_,C,k,B,I,S,O,M,D,T,F,R,P,N,j,L,U,Q,G,H,z,q,K,V,W,Y,J,X,Z,$,ee,te,re,ne,ae,ie,oe,se,ce,ue,fe;for(n=0;n<48;n+=2)a=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|o>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=a^(c<<1|u>>>31),r=i^(u<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=o^(f<<1|d>>>31),r=s^(d<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(a<<1|i>>>31),r=d^(i<<1|a>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],b=e[1],V=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,S=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,z=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,P=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,D=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,T=e[45]<<29|e[44]>>>3,F=e[44]<<29|e[45]>>>3,C=e[6]<<28|e[7]>>>4,k=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,Q=e[38]<<8|e[39]>>>24,G=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,_=e[49]<<14|e[48]>>>18,e[0]=p^~g&y,e[1]=b^~v&A,e[10]=C^~B&S,e[11]=k^~I&O,e[20]=R^~N&L,e[21]=P^~j&U,e[30]=q^~V&Y,e[31]=K^~W&J,e[40]=te^~ne&ie,e[41]=re^~ae&oe,e[2]=g^~y&w,e[3]=v^~A&x,e[12]=B^~S&M,e[13]=I^~O&D,e[22]=N^~L&Q,e[23]=j^~U&G,e[32]=V^~Y&X,e[33]=W^~J&Z,e[42]=ne^~ie&se,e[43]=ae^~oe&ce,e[4]=y^~w&E,e[5]=A^~x&_,e[14]=S^~M&T,e[15]=O^~D&F,e[24]=L^~Q&H,e[25]=U^~G&z,e[34]=Y^~X&$,e[35]=J^~Z&ee,e[44]=ie^~se&ue,e[45]=oe^~ce&fe,e[6]=w^~E&p,e[7]=x^~_&b,e[16]=M^~T&C,e[17]=D^~F&k,e[26]=Q^~H&R,e[27]=G^~z&P,e[36]=X^~$&q,e[37]=Z^~ee&K,e[46]=se^~ue&te,e[47]=ce^~fe&re,e[8]=E^~p&g,e[9]=_^~b&v,e[18]=T^~C&B,e[19]=F^~k&I,e[28]=H^~R&N,e[29]=z^~P&j,e[38]=$^~q&V,e[39]=ee^~K&W,e[48]=ue^~te&ne,e[49]=fe^~re&ae,e[0]^=m[n],e[1]^=m[n+1]};if(f)e.exports=I;else{for(O=0;Od[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=b[15&t[i]];a.push(e+"=Uint8Array(0x"+r+")")}else a.push(e+"="+JSON.stringify(t))}catch(t){a.push(e+"="+JSON.stringify(n[e].toString()))}})),a.push("code=".concat(r)),a.push("version=".concat(this.version));var o=t,s="";switch(r){case i.NUMERIC_FAULT:s="NUMERIC_FAULT";var c=t;switch(c){case"overflow":case"underflow":case"division-by-zero":s+="-"+c;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-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:s=r}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),a.length&&(t+=" ("+a.join(", ")+")");var u=new Error(t);return u.reason=o,u.code=r,Object.keys(n).forEach((function(e){u[e]=n[e]})),u}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}},{key:"checkSafeUint53",value:function(t,r){"number"==typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return h||(h=new e(c.version)),h}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),u){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}f=!!t,u=!!r}},{key:"setLogLevel",value:function(t){var r=d[t.toLowerCase()];null!=r?l=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();t.Logger=m,m.errors=i,m.levels=a},4071:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="properties/5.7.0"},3694:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.Description=void 0,t.checkProperties=function(e,t){e&&"object"===(0,s.default)(e)||d.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((function(r){t[r]||d.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))},t.deepCopy=m,t.defineReadOnly=l,t.getStatic=function(e,t){for(var r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==(0,s.default)(e.prototype))break;e=Object.getPrototypeOf(e.prototype).constructor}return null},t.resolveProperties=function(e){return f(this,void 0,void 0,a.default.mark((function t(){var r,n;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.keys(e).map((function(t){var r=e[t];return Promise.resolve(r).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(r);case 3:return n=t.sent,t.abrupt("return",n.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))},t.shallowCopy=function(e){var t={};for(var r in e)t[r]=e[r];return t};var a=n(r(2247)),i=n(r(8985)),o=n(r(9721)),s=n(r(3355)),c=r(4327),u=r(4071),f=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},d=new c.Logger(u.version);function l(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}var h={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function p(e){if(null==e||h[(0,s.default)(e)])return!0;if(Array.isArray(e)||"object"===(0,s.default)(e)){if(!Object.isFrozen(e))return!1;for(var t=Object.keys(e),r=0;r>=8;return t}function c(e,t,r){for(var n=0,a=0;at+1+n&&o.throwError("child data too short",a.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function d(e,t){if(0===e.length&&o.throwError("data too short",a.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&o.throwError("data short segment too short",a.Logger.errors.BUFFER_OVERRUN,{});var i=c(e,t+1,r);return t+1+r+i>e.length&&o.throwError("data long segment too short",a.Logger.errors.BUFFER_OVERRUN,{}),f(e,t,t+1+r,r+i)}if(e[t]>=192){var s=e[t]-192;return t+1+s>e.length&&o.throwError("data array too short",a.Logger.errors.BUFFER_OVERRUN,{}),f(e,t,t+1,s)}if(e[t]>=184){var u=e[t]-183;t+1+u>e.length&&o.throwError("data array too short",a.Logger.errors.BUFFER_OVERRUN,{});var d=c(e,t+1,u);return t+1+u+d>e.length&&o.throwError("data array too short",a.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+u+d,result:(0,n.hexlify)(e.slice(t+1+u,t+1+u+d))}}if(e[t]>=128){var l=e[t]-128;return t+1+l>e.length&&o.throwError("data too short",a.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+l,result:(0,n.hexlify)(e.slice(t+1,t+1+l))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}},8100:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="signing-key/5.7.0"},6918:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.EC=void 0;var a=n(r(3355)),i=n(r(1734)),o=n(r(7198));function s(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var c=u;function u(e,t){if(!e)throw new Error(t||"Assertion failed")}u.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var f=s((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r>8,o=255&a;i?r.push(i,o):r.push(o)}return r},r.zero2=n,r.toHex=a,r.encode=function(e,t){return"hex"===t?a(e):e}})),d=s((function(e,t){var r=t;r.assert=c,r.toArray=f.toArray,r.zero2=f.zero2,r.toHex=f.toHex,r.encode=f.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var a=1<(a>>1)-1?(a>>1)-c:c,i.isubn(s)):s=0,n[o]=s,i.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,a=0,i=0;e.cmpn(-a)>0||t.cmpn(-i)>0;){var o,s,c=e.andln(3)+a&3,u=t.andln(3)+i&3;3===c&&(c=-1),3===u&&(u=-1),o=0==(1&c)?0:3!=(n=e.andln(7)+a&7)&&5!==n||2!==u?c:-c,r[0].push(o),s=0==(1&u)?0:3!=(n=t.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[1].push(s),2*a===o+1&&(a=1-a),2*i===s+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i.default(e,"hex","le")}})),l=d.getNAF,h=d.getJSF,p=d.assert;function b(e,t){this.type=e,this.p=new i.default(t.p,16),this.red=t.prime?i.default.red(t.prime):i.default.mont(this.p),this.zero=new i.default(0).toRed(this.red),this.one=new i.default(1).toRed(this.red),this.two=new i.default(2).toRed(this.red),this.n=t.n&&new i.default(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var m=b;function g(e,t){this.curve=e,this.type=t,this.precomputed=null}b.prototype.point=function(){throw new Error("Not implemented")},b.prototype.validate=function(){throw new Error("Not implemented")},b.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=l(t,1,this._bitLength),a=(1<=i;c--)o=(o<<1)+n[c];s.push(o)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),d=a;d>0;d--){for(i=0;i=0;s--){for(var c=0;s>=0&&0===i[s];s--)c++;if(s>=0&&c++,o=o.dblp(c),s<0)break;var u=i[s];p(0!==u),o="affine"===e.type?u>0?o.mixedAdd(a[u-1>>1]):o.mixedAdd(a[-u-1>>1].neg()):u>0?o.add(a[u-1>>1]):o.add(a[-u-1>>1].neg())}return"affine"===e.type?o.toP():o},b.prototype._wnafMulAdd=function(e,t,r,n,a){var i,o,s,c=this._wnafT1,u=this._wnafT2,f=this._wnafT3,d=0;for(i=0;i=1;i-=2){var b=i-1,m=i;if(1===c[b]&&1===c[m]){var g=[t[b],null,null,t[m]];0===t[b].y.cmp(t[m].y)?(g[1]=t[b].add(t[m]),g[2]=t[b].toJ().mixedAdd(t[m].neg())):0===t[b].y.cmp(t[m].y.redNeg())?(g[1]=t[b].toJ().mixedAdd(t[m]),g[2]=t[b].add(t[m].neg())):(g[1]=t[b].toJ().mixedAdd(t[m]),g[2]=t[b].toJ().mixedAdd(t[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=h(r[b],r[m]);for(d=Math.max(y[0].length,d),f[b]=new Array(d),f[m]=new Array(d),o=0;o=0;i--){for(var _=0;i>=0;){var C=!0;for(o=0;o=0&&_++,x=x.dblp(_),i<0)break;for(o=0;o0?s=u[o][k-1>>1]:k<0&&(s=u[o][-k-1>>1].neg()),x="affine"===s.type?x.mixedAdd(s):x.add(s))}}for(i=0;i=Math.ceil((e.bitLength()+1)/t.step)},g.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,a=0;a=0&&(o=t,s=r),n.negative&&(n=n.neg(),a=a.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:a},{a:o,b:s}]},A.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],a=n.b.mul(e).divRound(this.n),i=r.b.neg().mul(e).divRound(this.n),o=a.mul(r.a),s=i.mul(n.a),c=a.mul(r.b),u=i.mul(n.b);return{k1:e.sub(o).sub(s),k2:c.add(u).neg()}},A.prototype.pointFromX=function(e,t){(e=new i.default(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=n.fromRed().isOdd();return(t&&!a||!t&&a)&&(n=n.redNeg()),this.point(e,n)},A.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(a).cmpn(0)},A.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,a=this._endoWnafT2,i=0;i":""},x.prototype.isInfinity=function(){return this.inf},x.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},x.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),a=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),i=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,o)},x.prototype.getX=function(){return this.x.fromRed()},x.prototype.getY=function(){return this.y.fromRed()},x.prototype.mul=function(e){return e=new i.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},x.prototype.mulAdd=function(e,t,r){var n=[this,t],a=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,a):this.curve._wnafMulAdd(1,n,a,2)},x.prototype.jmulAdd=function(e,t,r){var n=[this,t],a=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,a,!0):this.curve._wnafMulAdd(1,n,a,2,!0)},x.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},x.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},x.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},v(E,m.BasePoint),A.prototype.jpoint=function(e,t,r){return new E(this,e,t,r)},E.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},E.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},E.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),a=e.x.redMul(r),i=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(a),c=i.redSub(o);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),d=n.redMul(u),l=c.redSqr().redIAdd(f).redISub(d).redISub(d),h=c.redMul(d.redISub(l)).redISub(i.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},E.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),a=this.y,i=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=a.redSub(i);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),u=c.redMul(o),f=r.redMul(c),d=s.redSqr().redIAdd(u).redISub(f).redISub(f),l=s.redMul(f.redISub(d)).redISub(a.redMul(u)),h=this.z.redMul(o);return this.curve.jpoint(d,l,h)},E.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(a),0===this.x.cmp(r))return!0}},E.prototype.inspect=function(){return this.isInfinity()?"":""},E.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var _=s((function(e,t){var r=t;r.base=m,r.short=w,r.mont=null,r.edwards=null})),C=s((function(e,t){var r,n=t,a=d.assert;function i(e){"short"===e.type?this.curve=new _.short(e):"edwards"===e.type?this.curve=new _.edwards(e):this.curve=new _.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new i(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=i,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.default.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function k(e){if(!(this instanceof k))return new k(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=f.toArray(e.entropy,e.entropyEnc||"hex"),r=f.toArray(e.nonce,e.nonceEnc||"hex"),n=f.toArray(e.pers,e.persEnc||"hex");c(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var B=k;k.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},k.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=f.toArray(r,n||"hex"),this._update(r));for(var a=[];a.length"};var M=d.assert;function D(e,t){if(e instanceof D)return e;this._importDER(e,t)||(M(e.r&&e.s,"Signature without r or s"),this.r=new i.default(e.r,16),this.s=new i.default(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var T=D;function F(){this.place=0}function R(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var a=0,i=0,o=t.place;i>>=0;return!(a<=127)&&(t.place=o,a)}function P(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}D.prototype._importDER=function(e,t){e=d.toArray(e,t);var r=new F;if(48!==e[r.place++])return!1;var n=R(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=R(e,r);if(!1===a)return!1;var o=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var s=R(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var c=e.slice(r.place,s+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}return this.r=new i.default(o),this.s=new i.default(c),this.recoveryParam=null,!0},D.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=P(t),r=P(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];N(n,t.length),(n=n.concat(t)).push(2),N(n,r.length);var a=n.concat(r),i=[48];return N(i,a.length),i=i.concat(a),d.encode(i,e)};var j=function(){throw new Error("unsupported")},L=d.assert;function U(e){if(!(this instanceof U))return new U(e);"string"==typeof e&&(L(Object.prototype.hasOwnProperty.call(C,e),"Unknown curve "+e),e=C[e]),e instanceof C.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Q=U;U.prototype.keyPair=function(e){return new O(this,e)},U.prototype.keyFromPrivate=function(e,t){return O.fromPrivate(this,e,t)},U.prototype.keyFromPublic=function(e,t){return O.fromPublic(this,e,t)},U.prototype.genKeyPair=function(e){e||(e={});for(var t=new B({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||j(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i.default(2));;){var a=new i.default(t.generate(r));if(!(a.cmp(n)>0))return a.iaddn(1),this.keyFromPrivate(a)}},U.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},U.prototype.sign=function(e,t,r,n){"object"===(0,a.default)(r)&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i.default(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),c=e.toArray("be",o),u=new B({hash:this.hash,entropy:s,nonce:c,pers:n.pers,persEnc:n.persEnc||"utf8"}),f=this.n.sub(new i.default(1)),d=0;;d++){var l=n.k?n.k(d):new i.default(u.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(f)>=0)){var h=this.g.mul(l);if(!h.isInfinity()){var p=h.getX(),b=p.umod(this.n);if(0!==b.cmpn(0)){var m=l.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(h.getY().isOdd()?1:0)|(0!==p.cmp(b)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new T({r:b,s:m,recoveryParam:g})}}}}}},U.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i.default(e,16)),r=this.keyFromPublic(r,n);var a=(t=new T(t,"hex")).r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,c=o.invm(this.n),u=c.mul(e).umod(this.n),f=c.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),f)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(u,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},U.prototype.recoverPubKey=function(e,t,r,n){L((3&r)===r,"The recovery param is more than two bits"),t=new T(t,n);var a=this.n,o=new i.default(e),s=t.r,c=t.s,u=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),u):this.curve.pointFromX(s,u);var d=t.r.invm(a),l=a.sub(o).mul(d).umod(a),h=c.mul(d).umod(a);return this.g.mulAdd(l,s,h)},U.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new T(t,n)).recoveryParam)return t.recoveryParam;for(var a=0;a<4;a++){var i;try{i=this.recoverPubKey(e,t,a)}catch(e){continue}if(i.eq(r))return a}throw new Error("Unable to find valid recovery factor")};var G=s((function(e,t){var r=t;r.version="6.5.4",r.utils=d,r.rand=function(){throw new Error("unsupported")},r.curve=_,r.curves=C,r.ec=Q,r.eddsa=null})),H=G.ec;t.EC=H},7612:function(e,t,r){"use strict";var n=r(8847);Object.defineProperty(t,"__esModule",{value:!0}),t.SigningKey=void 0,t.computePublicKey=b,t.recoverPublicKey=function(e,t){var r=(0,s.splitSignature)(t),n={r:(0,s.arrayify)(r.r),s:(0,s.arrayify)(r.s)};return"0x"+h().recoverPubKey((0,s.arrayify)(e),n,r.recoveryParam).encode("hex",!1)};var a=n(r(9721)),i=n(r(8985)),o=r(6918),s=r(908),c=r(3694),u=r(4327),f=r(8100),d=new u.Logger(f.version),l=null;function h(){return l||(l=new o.EC("secp256k1")),l}var p=function(){function e(t){(0,a.default)(this,e),(0,c.defineReadOnly)(this,"curve","secp256k1"),(0,c.defineReadOnly)(this,"privateKey",(0,s.hexlify)(t)),32!==(0,s.hexDataLength)(this.privateKey)&&d.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=h().keyFromPrivate((0,s.arrayify)(this.privateKey));(0,c.defineReadOnly)(this,"publicKey","0x"+r.getPublic(!1,"hex")),(0,c.defineReadOnly)(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),(0,c.defineReadOnly)(this,"_isSigningKey",!0)}return(0,i.default)(e,[{key:"_addPoint",value:function(e){var t=h().keyFromPublic((0,s.arrayify)(this.publicKey)),r=h().keyFromPublic((0,s.arrayify)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=h().keyFromPrivate((0,s.arrayify)(this.privateKey)),r=(0,s.arrayify)(e);32!==r.length&&d.throwArgumentError("bad digest length","digest",e);var n=t.sign(r,{canonical:!0});return(0,s.splitSignature)({recoveryParam:n.recoveryParam,r:(0,s.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,s.hexZeroPad)("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=h().keyFromPrivate((0,s.arrayify)(this.privateKey)),r=h().keyFromPublic((0,s.arrayify)(b(e)));return(0,s.hexZeroPad)("0x"+t.derive(r.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function b(e,t){var r=(0,s.arrayify)(e);if(32===r.length){var n=new p(r);return t?"0x"+h().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}return 33===r.length?t?(0,s.hexlify)(r):"0x"+h().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+h().keyFromPublic(r).getPublic(!0,"hex"):(0,s.hexlify)(r):d.throwArgumentError("invalid public or private key","key","[REDACTED]")}t.SigningKey=p},6518:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="strings/5.7.0"},5856:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=function(e){var t=(0,i.toUtf8Bytes)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,a.hexlify)((0,a.concat)([t,n.HashZero]).slice(0,32))},t.parseBytes32String=function(e){var t=(0,a.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===t[r-1];)r--;return(0,i.toUtf8String)(t.slice(0,r))};var n=r(5465),a=r(908),i=r(4997)},8645:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._nameprepTableA1=p,t._nameprepTableB2=b,t._nameprepTableC=m,t.nameprep=function(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();var t,r=(0,n.toUtf8CodePoints)(e);t=r.map((function(e){return c.indexOf(e)>=0||e>=65024&&e<=65039?[]:b(e)||[e]})),r=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(r=(0,n.toUtf8CodePoints)((0,n._toUtf8String)(r),n.UnicodeNormalizationForm.NFKC)).forEach((function(e){if(m(e))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(e){if(p(e))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var a=(0,n._toUtf8String)(r);if("-"===a.substring(0,1)||"--"===a.substring(2,4)||"-"===a.substring(a.length-1))throw new Error("invalid hyphen");return a};var n=r(4997);function a(e,t){t||(t=function(e){return[parseInt(e,16)]});var r=0,n={};return e.split(",").forEach((function(e){var a=e.split(":");r+=parseInt(a[0],16),n[r]=t(a[1])})),n}function i(e){var t=0;return e.split(",").map((function(e){var r=e.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:t+parseInt(r[0],16),h:t=parseInt(r[1],16)}}))}function o(e,t){for(var r=0,n=0;n=(r+=a.l)&&e<=r+a.h&&(e-r)%(a.d||1)==0){if(a.e&&-1!==a.e.indexOf(e-r))continue;return a}}return null}var s=i("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),c="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),u=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],f=a("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),d=a("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),l=a("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");for(var t=[],r=0;r=32&&e<127)return String.fromCharCode(e)}return e<=65535?h(e):h(55296+((e-=65536)>>10&1023))+h(56320+(1023&e))})).join("")+'"'},t._toUtf8String=p,t.toUtf8Bytes=l,t.toUtf8CodePoints=function(e){return d(l(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current))},t.toUtf8String=function(e,t){return p(d(e,t))};var n,a,i=r(908),o=r(4327),s=r(6518),c=new o.Logger(s.version);function u(e,t,r,n,i){if(e===a.BAD_PREFIX||e===a.UNEXPECTED_CONTINUE){for(var o=0,s=t+1;s>6==2;s++)o++;return o}return e===a.OVERRUN?r.length-t-1:0}t.UnicodeNormalizationForm=n,function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n||(t.UnicodeNormalizationForm=n={})),t.Utf8ErrorReason=a,function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(a||(t.Utf8ErrorReason=a={}));var f=Object.freeze({error:function(e,t,r,n,a){return c.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:u,replace:function(e,t,r,n,i){return e===a.OVERLONG?(n.push(i),0):(n.push(65533),u(e,t,r))}});function d(e,t){null==t&&(t=f.error),e=(0,i.arrayify)(e);for(var r=[],n=0;n>7!=0){var s=null,c=null;if(192==(224&o))s=1,c=127;else if(224==(240&o))s=2,c=2047;else{if(240!=(248&o)){n+=t(128==(192&o)?a.UNEXPECTED_CONTINUE:a.BAD_PREFIX,n-1,e,r);continue}s=3,c=65535}if(n-1+s>=e.length)n+=t(a.OVERRUN,n-1,e,r);else{for(var u=o&(1<<8-s-1)-1,d=0;d1114111?n+=t(a.OUT_OF_RANGE,n-1-s,e,r,u):u>=55296&&u<=57343?n+=t(a.UTF16_SURROGATE,n-1-s,e,r,u):u<=c?n+=t(a.OVERLONG,n-1-s,e,r,u):r.push(u))}}else r.push(o)}return r}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;t!=n.current&&(c.checkNormalize(),e=e.normalize(t));for(var r=[],a=0;a>6|192),r.push(63&o|128);else if(55296==(64512&o)){a++;var s=e.charCodeAt(a);if(a>=e.length||56320!=(64512&s))throw new Error("invalid utf-8 string");var u=65536+((1023&o)<<10)+(1023&s);r.push(u>>18|240),r.push(u>>12&63|128),r.push(u>>6&63|128),r.push(63&u|128)}else r.push(o>>12|224),r.push(o>>6&63|128),r.push(63&o|128)}return(0,i.arrayify)(r)}function h(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function p(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}t.Utf8ErrorFuncs=f},6783:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="transactions/5.7.0"},1936:function(e,t,r){"use strict";var n=r(3355);Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionTypes=void 0,t.accessListify=C,t.computeAddress=w,t.parse=function(e){var t=(0,o.arrayify)(e);if(t[0]>127)return function(e){var t=f.decode(e);9!==t.length&&6!==t.length&&m.throwArgumentError("invalid raw transaction","rawTransaction",e);var r={nonce:v(t[0]).toNumber(),gasPrice:v(t[1]),gasLimit:v(t[2]),to:g(t[3]),value:v(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=i.BigNumber.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,o.hexZeroPad)(t[7],32),r.s=(0,o.hexZeroPad)(t[8],32),i.BigNumber.from(r.r).isZero()&&i.BigNumber.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,a=t.slice(0,6);0!==r.chainId&&(a.push((0,o.hexlify)(r.chainId)),a.push("0x"),a.push("0x"),n-=2*r.chainId+8);var s=(0,c.keccak256)(f.encode(a));try{r.from=x(s,{r:(0,o.hexlify)(r.r),s:(0,o.hexlify)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,c.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){var t=f.decode(e.slice(1));8!==t.length&&11!==t.length&&m.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.hexlify)(e));var r={type:1,chainId:v(t[0]).toNumber(),nonce:v(t[1]).toNumber(),gasPrice:v(t[2]),gasLimit:v(t[3]),to:g(t[4]),value:v(t[5]),data:t[6],accessList:C(t[7])};return 8===t.length||(r.hash=(0,c.keccak256)(e),S(r,t.slice(8),I)),r}(t);case 2:return function(e){var t=f.decode(e.slice(1));9!==t.length&&12!==t.length&&m.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.hexlify)(e));var r=v(t[2]),n=v(t[3]),a={type:2,chainId:v(t[0]).toNumber(),nonce:v(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:v(t[4]),to:g(t[5]),value:v(t[6]),data:t[7],accessList:C(t[8])};return 9===t.length||(a.hash=(0,c.keccak256)(e),S(a,t.slice(9),B)),a}(t)}return m.throwError("unsupported transaction type: ".concat(t[0]),l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})},t.recoverAddress=x,t.serialize=function(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&m.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,u.checkProperties)(e,A);var r=[];y.forEach((function(t){var n=e[t.name]||[],a={};t.numeric&&(a.hexPad="left"),n=(0,o.arrayify)((0,o.hexlify)(n,a)),t.length&&n.length!==t.length&&n.length>0&&m.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,o.stripZeros)(n)).length>t.maxLength&&m.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push((0,o.hexlify)(n))}));var n=0;if(null!=e.chainId?"number"!=typeof(n=e.chainId)&&m.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!(0,o.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,o.hexlify)(n)),r.push("0x"),r.push("0x")),!t)return f.encode(r);var a=(0,o.splitSignature)(t),i=27+a.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),i+=2*n+8,a.v>28&&a.v!==i&&m.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):a.v!==i&&m.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,o.hexlify)(i)),r.push((0,o.stripZeros)((0,o.arrayify)(a.r))),r.push((0,o.stripZeros)((0,o.arrayify)(a.s))),f.encode(r)}(e,t);switch(e.type){case 1:return I(e,t);case 2:return B(e,t)}return m.throwError("unsupported transaction type: ".concat(e.type),l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})};var a=r(7921),i=r(4952),o=r(908),s=r(5465),c=r(4642),u=r(3694),f=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(a,o,s):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(r(5265)),d=r(7612),l=r(4327),h=r(6783);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}var b,m=new l.Logger(h.version);function g(e){return"0x"===e?null:(0,a.getAddress)(e)}function v(e){return"0x"===e?s.Zero:i.BigNumber.from(e)}t.TransactionTypes=b,function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(b||(t.TransactionTypes=b={}));var y=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],A={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function w(e){var t=(0,d.computePublicKey)(e);return(0,a.getAddress)((0,o.hexDataSlice)((0,c.keccak256)((0,o.hexDataSlice)(t,1)),12))}function x(e,t){return w((0,d.recoverPublicKey)((0,o.arrayify)(e),t))}function E(e,t){var r=(0,o.stripZeros)(i.BigNumber.from(e).toHexString());return r.length>32&&m.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function _(e,t){return{address:(0,a.getAddress)(e),storageKeys:(t||[]).map((function(t,r){return 32!==(0,o.hexDataLength)(t)&&m.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase()}))}}function C(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&m.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),_(e[0],e[1])):_(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var r=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return _(t,Object.keys(r).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function k(e){return C(e).map((function(e){return[e.address,e.storageKeys]}))}function B(e,t){if(null!=e.gasPrice){var r=i.BigNumber.from(e.gasPrice),n=i.BigNumber.from(e.maxFeePerGas||0);r.eq(n)||m.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var s=[E(e.chainId||0,"chainId"),E(e.nonce||0,"nonce"),E(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),E(e.maxFeePerGas||0,"maxFeePerGas"),E(e.gasLimit||0,"gasLimit"),null!=e.to?(0,a.getAddress)(e.to):"0x",E(e.value||0,"value"),e.data||"0x",k(e.accessList||[])];if(t){var c=(0,o.splitSignature)(t);s.push(E(c.recoveryParam,"recoveryParam")),s.push((0,o.stripZeros)(c.r)),s.push((0,o.stripZeros)(c.s))}return(0,o.hexConcat)(["0x02",f.encode(s)])}function I(e,t){var r=[E(e.chainId||0,"chainId"),E(e.nonce||0,"nonce"),E(e.gasPrice||0,"gasPrice"),E(e.gasLimit||0,"gasLimit"),null!=e.to?(0,a.getAddress)(e.to):"0x",E(e.value||0,"value"),e.data||"0x",k(e.accessList||[])];if(t){var n=(0,o.splitSignature)(t);r.push(E(n.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(n.r)),r.push((0,o.stripZeros)(n.s))}return(0,o.hexConcat)(["0x01",f.encode(r)])}function S(e,t,r){try{var n=v(t[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");e.v=n}catch(e){m.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,o.hexZeroPad)(t[1],32),e.s=(0,o.hexZeroPad)(t[2],32);try{var a=(0,c.keccak256)(r(e));e.from=x(a,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}},3368:function(e,t,r){"use strict";var n,a,i=r(8847)(r(3355));void 0===(a="function"==typeof(n=function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r>6],a=0==(32&r);if(31==(31&r)){var i=r;for(r=0;128==(128&i);){if(i=e.readUInt8(t),e.isError(i))return i;r<<=7,r|=127&i}}else r&=31;return{cls:n,primitive:a,tag:r,tagStr:s.tag[r]}}function d(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var a=127&n;if(a>4)return e.error("length octect is too long");n=0;for(var i=0;i=31?n.error("Multi-octet tag encoding unsupported"):(t||(a|=32),a|=o.tagClassByName[r||"universal"]<<6)}(e,t,r,this.reporter);if(n.length<128){var s=a.alloc(2);return s[0]=i,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var c=1,u=n.length;u>=256;u>>=8)c++;var f=a.alloc(2+c);f[0]=i,f[1]=128|c;for(var d=1+c,l=n.length;l>0;d--,l>>=8)f[d]=255&l;return this._createEncoderBuffer([f,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=a.alloc(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var o=0,s=0;s=128;c>>=7)o++}for(var u=a.alloc(o),f=u.length-1,d=e.length-1;d>=0;d--){var l=e[d];for(u[f--]=127&l;(l>>=7)>0;)u[f--]=128|127&l}return this._createEncoderBuffer(u)},c.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[u(n.getUTCFullYear()),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(n.getUTCFullYear()%100),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!a.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=a.from(r)}if(a.isBuffer(e)){var n=e.length;0===e.length&&n++;var i=a.alloc(n);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var o=1,s=e;s>=256;s>>=8)o++;for(var c=new Array(o),u=c.length-1;u>=0;u--)c[u]=255&e,e>>=8;return 128&c[0]&&c.unshift(0),this._createEncoderBuffer(a.from(c))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var n,a=this._baseState;if(null===a.default)return!1;var i=e.join();if(void 0===a.defaultBuffer&&(a.defaultBuffer=this._encodeValue(a.default,t,r).join()),i.length!==a.defaultBuffer.length)return!1;for(n=0;n=0;c--)if(f[c]!==d[c])return!1;for(c=f.length-1;c>=0;c--)if(!A(e[o=f[c]],t[o],r,n))return!1;return!0}(e,t,r,a))}return r?e===t:e==t}function w(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function x(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,r,n){var a;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),a=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!a&&v(a,r,"Missing expected exception"+n);var i="string"==typeof n,o=!e&&a&&!r;if((!e&&s.isError(a)&&i&&x(a,r)||o)&&v(a,r,"Got unwanted exception"+n),e&&a&&r&&!x(a,r)||!e&&a)throw a}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,a=b(t),i=n.indexOf("\n"+a);if(i>=0){var o=n.indexOf("\n",i+1);n=n.substring(o+1)}this.stack=n}}},s.inherits(h.AssertionError,Error),h.fail=v,h.ok=y,h.equal=function(e,t,r){e!=t&&v(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&v(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){A(e,t,!1)||v(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){A(e,t,!0)||v(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){A(e,t,!1)&&v(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){A(t,r,!0)&&v(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&v(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&v(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){E(!0,e,t,r)},h.doesNotThrow=function(e,t,r){E(!1,e,t,r)},h.ifError=function(e){if(e)throw e},h.strict=a((function e(t,r){t||v(t,!0,r,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var _=Object.keys||function(e){var t=[];for(var r in e)c.call(e,r)&&t.push(r);return t}},4074:function(e){"use strict";"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},6732:function(e,t,r){"use strict";var n=r(8847)(r(3355));e.exports=function(e){return e&&"object"===(0,n.default)(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},9954:function(e,t,r){"use strict";var n=r(9142),a=r(8847)(r(3355)),i=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),b(r)?n.showHidden=r:r&&t._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),d(n,e,n.depth)}function u(e,t){var r=c.styles[t];return r?"\x1b["+c.colors[r][0]+"m"+e+"\x1b["+c.colors[r][1]+"m":e}function f(e,t){return e}function d(e,r,n){if(e.customInspect&&r&&_(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var a=r.inspect(n,e);return v(a)||(a=d(e,a,n)),a}var i=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):b(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(i)return i;var o=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),E(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return l(r);if(0===o.length){if(_(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(A(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return l(r)}var u,f="",w=!1,C=["{","}"];return p(r)&&(w=!0,C=["[","]"]),_(r)&&(f=" [Function"+(r.name?": "+r.name:"")+"]"),A(r)&&(f=" "+RegExp.prototype.toString.call(r)),x(r)&&(f=" "+Date.prototype.toUTCString.call(r)),E(r)&&(f=" "+l(r)),0!==o.length||w&&0!=r.length?n<0?A(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=w?function(e,t,r,n,a){for(var i=[],o=0,s=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(u,f,C)):C[0]+f+C[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,a,i){var o,s,c;if((c=Object.getOwnPropertyDescriptor(t,a)||{value:t[a]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),S(n,a)||(o="["+a+"]"),s||(e.seen.indexOf(c.value)<0?(s=m(r)?d(e,c.value,null):d(e,c.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),y(o)){if(i&&a.match(/^\d+$/))return s;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function p(e){return Array.isArray(e)}function b(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function y(e){return void 0===e}function A(e){return w(e)&&"[object RegExp]"===C(e)}function w(e){return"object"===(0,a.default)(e)&&null!==e}function x(e){return w(e)&&"[object Date]"===C(e)}function E(e){return w(e)&&("[object Error]"===C(e)||e instanceof Error)}function _(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(y(o)&&(o=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=b,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"===(0,a.default)(e)},t.isUndefined=y,t.isRegExp=A,t.isObject=w,t.isDate=x,t.isError=E,t.isFunction=_,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(0,a.default)(e)||void 0===e},t.isBuffer=r(6732);var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),B[e.getMonth()],t].join(" ")}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",I(),t.format.apply(t,arguments))},t.inherits=r(4074),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},7548:function(e,t,r){"use strict";var n=r(8850).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,f=new Uint8Array(o);e[r];){var d=t[e.charCodeAt(r)];if(255===d)return;for(var l=0,h=o-1;(0!==d||l>>0,f[h]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");i=l,r++}for(var p=o-i;p!==o&&0===f[p];)p++;var b=n.allocUnsafe(a+(o-p));b.fill(0,0,a);for(var m=a;p!==o;)b[m++]=f[p++];return b}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,a=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var u=(o-i)*f+1>>>0,d=new Uint8Array(u);i!==o;){for(var l=t[i],h=0,p=u-1;(0!==l||h>>0,d[p]=l%s>>>0,l=l/s>>>0;if(0!==l)throw new Error("Non-zero carry");a=h,i++}for(var b=u-a;b!==u&&0===d[b];)b++;for(var m=c.repeat(r);b0?o-4:o;for(r=0;r>16&255,u[f++]=t>>8&255,u[f++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[f++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,i=[],o=16383,s=0,c=n-a;sc?c:s+o));return 1===a?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===a&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var a,i,o=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},1734:function(e,t,r){"use strict";e=r.nmd(e);var n=r(8847)(r(3355));!function(e,t){function a(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"===(0,n.default)(e)?e.exports=o:(void 0).BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(9033).Buffer}catch(e){}function c(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void a(!1,"Invalid character in "+e)}function u(e,t,r){var n=c(e,r);return r-1>=t&&(n|=c(e,r-1)<<4),n}function f(e,t,r,n){for(var i=0,o=0,s=Math.min(e.length,r),c=t;c=49?u-49+10:u>=17?u-17+10:u,a(u>=0&&o0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"===(0,n.default)(e))return this._initArray(e,t,r);"hex"===t&&(t=16),a(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;n-=3)o=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(n=0,i=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=u(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?""}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(o=(a=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,i=0,o=0;o>>24-n&16777215,(n+=2)>=26&&(n-=26,o--),r=0!==i||o!==this.length-1?h[6-c.length]+c+r:c+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=p[e],f=b[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var l=d.modrn(f).toString(e);r=(d=d.idivn(f)).isZero()?l+r:h[u-l.length]+l+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}a(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var n=this.byteLength(),i=r||Math.max(1,n);a(n<=i,"byte array longer than desired length"),a(i>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,n),o},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===i?(r>=0&&(e[r--]=o>>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){a("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){a("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],A=8191&y,w=y>>>13,x=0|o[4],E=8191&x,_=x>>>13,C=0|o[5],k=8191&C,B=C>>>13,I=0|o[6],S=8191&I,O=I>>>13,M=0|o[7],D=8191&M,T=M>>>13,F=0|o[8],R=8191&F,P=F>>>13,N=0|o[9],j=8191&N,L=N>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,Y=0|s[3],J=8191&Y,X=Y>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,Q))|0)+((8191&(a=(a=Math.imul(d,G))+Math.imul(l,Q)|0))<<13)|0;u=((i=Math.imul(l,G))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,Q),a=(a=Math.imul(p,G))+Math.imul(b,Q)|0,i=Math.imul(b,G);var ge=(u+(n=n+Math.imul(d,z)|0)|0)+((8191&(a=(a=a+Math.imul(d,q)|0)+Math.imul(l,z)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,Q),a=(a=Math.imul(g,G))+Math.imul(v,Q)|0,i=Math.imul(v,G),n=n+Math.imul(p,z)|0,a=(a=a+Math.imul(p,q)|0)+Math.imul(b,z)|0,i=i+Math.imul(b,q)|0;var ve=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,Q),a=(a=Math.imul(A,G))+Math.imul(w,Q)|0,i=Math.imul(w,G),n=n+Math.imul(g,z)|0,a=(a=a+Math.imul(g,q)|0)+Math.imul(v,z)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(p,V)|0,a=(a=a+Math.imul(p,W)|0)+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ye=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(a=(a=a+Math.imul(d,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((i=i+Math.imul(l,X)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,Q),a=(a=Math.imul(E,G))+Math.imul(_,Q)|0,i=Math.imul(_,G),n=n+Math.imul(A,z)|0,a=(a=a+Math.imul(A,q)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,q)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(p,J)|0,a=(a=a+Math.imul(p,X)|0)+Math.imul(b,J)|0,i=i+Math.imul(b,X)|0;var Ae=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(k,Q),a=(a=Math.imul(k,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),n=n+Math.imul(E,z)|0,a=(a=a+Math.imul(E,q)|0)+Math.imul(_,z)|0,i=i+Math.imul(_,q)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(g,J)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,a=(a=a+Math.imul(p,ee)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((i=i+Math.imul(l,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,Q),a=(a=Math.imul(S,G))+Math.imul(O,Q)|0,i=Math.imul(O,G),n=n+Math.imul(k,z)|0,a=(a=a+Math.imul(k,q)|0)+Math.imul(B,z)|0,i=i+Math.imul(B,q)|0,n=n+Math.imul(E,V)|0,a=(a=a+Math.imul(E,W)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(A,J)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,a=(a=a+Math.imul(p,ne)|0)+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var xe=(u+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,oe)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Q),a=(a=Math.imul(D,G))+Math.imul(T,Q)|0,i=Math.imul(T,G),n=n+Math.imul(S,z)|0,a=(a=a+Math.imul(S,q)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,q)|0,n=n+Math.imul(k,V)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(A,$)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(p,ie)|0,a=(a=a+Math.imul(p,oe)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,oe)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(a=(a=a+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,Q),a=(a=Math.imul(R,G))+Math.imul(P,Q)|0,i=Math.imul(P,G),n=n+Math.imul(D,z)|0,a=(a=a+Math.imul(D,q)|0)+Math.imul(T,z)|0,i=i+Math.imul(T,q)|0,n=n+Math.imul(S,V)|0,a=(a=a+Math.imul(S,W)|0)+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,n=n+Math.imul(E,$)|0,a=(a=a+Math.imul(E,ee)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(p,ce)|0,a=(a=a+Math.imul(p,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0;var _e=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),a=(a=Math.imul(j,G))+Math.imul(L,Q)|0,i=Math.imul(L,G),n=n+Math.imul(R,z)|0,a=(a=a+Math.imul(R,q)|0)+Math.imul(P,z)|0,i=i+Math.imul(P,q)|0,n=n+Math.imul(D,V)|0,a=(a=a+Math.imul(D,W)|0)+Math.imul(T,V)|0,i=i+Math.imul(T,W)|0,n=n+Math.imul(S,J)|0,a=(a=a+Math.imul(S,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,a=(a=a+Math.imul(E,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(g,ce)|0,a=(a=a+Math.imul(g,ue)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,a=(a=a+Math.imul(p,le)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,le)|0;var Ce=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(a=(a=a+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((i=i+Math.imul(l,be)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,z),a=(a=Math.imul(j,q))+Math.imul(L,z)|0,i=Math.imul(L,q),n=n+Math.imul(R,V)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(S,$)|0,a=(a=a+Math.imul(S,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(E,ie)|0,a=(a=a+Math.imul(E,oe)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(A,ce)|0,a=(a=a+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,n=n+Math.imul(g,de)|0,a=(a=a+Math.imul(g,le)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0;var ke=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(a=(a=a+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,V),a=(a=Math.imul(j,W))+Math.imul(L,V)|0,i=Math.imul(L,W),n=n+Math.imul(R,J)|0,a=(a=a+Math.imul(R,X)|0)+Math.imul(P,J)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,ee)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,ee)|0,n=n+Math.imul(S,re)|0,a=(a=a+Math.imul(S,ne)|0)+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(E,ce)|0,a=(a=a+Math.imul(E,ue)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,le)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0;var Be=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(a=(a=a+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((i=i+Math.imul(v,be)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,J),a=(a=Math.imul(j,X))+Math.imul(L,J)|0,i=Math.imul(L,X),n=n+Math.imul(R,$)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(P,$)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(D,re)|0,a=(a=a+Math.imul(D,ne)|0)+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,n=n+Math.imul(S,ie)|0,a=(a=a+Math.imul(S,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(k,ce)|0,a=(a=a+Math.imul(k,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,n=n+Math.imul(E,de)|0,a=(a=a+Math.imul(E,le)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,le)|0;var Ie=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(a=(a=a+Math.imul(A,be)|0)+Math.imul(w,pe)|0))<<13)|0;u=((i=i+Math.imul(w,be)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,$),a=(a=Math.imul(j,ee))+Math.imul(L,$)|0,i=Math.imul(L,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(D,ie)|0,a=(a=a+Math.imul(D,oe)|0)+Math.imul(T,ie)|0,i=i+Math.imul(T,oe)|0,n=n+Math.imul(S,ce)|0,a=(a=a+Math.imul(S,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,le)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,le)|0;var Se=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(a=(a=a+Math.imul(E,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((i=i+Math.imul(_,be)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,re),a=(a=Math.imul(j,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(D,ce)|0,a=(a=a+Math.imul(D,ue)|0)+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,n=n+Math.imul(S,de)|0,a=(a=a+Math.imul(S,le)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(a=(a=a+Math.imul(k,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,be)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ie),a=(a=Math.imul(j,oe))+Math.imul(L,ie)|0,i=Math.imul(L,oe),n=n+Math.imul(R,ce)|0,a=(a=a+Math.imul(R,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,n=n+Math.imul(D,de)|0,a=(a=a+Math.imul(D,le)|0)+Math.imul(T,de)|0,i=i+Math.imul(T,le)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(a=(a=a+Math.imul(S,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,be)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,ce),a=(a=Math.imul(j,ue))+Math.imul(L,ce)|0,i=Math.imul(L,ue),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,le)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,le)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(a=(a=a+Math.imul(D,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((i=i+Math.imul(T,be)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,de),a=(a=Math.imul(j,le))+Math.imul(L,de)|0,i=Math.imul(L,le);var Te=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(a=(a=a+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,be)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Fe=(u+(n=Math.imul(j,pe))|0)+((8191&(a=(a=Math.imul(j,be))+Math.imul(L,pe)|0))<<13)|0;return u=((i=Math.imul(L,be))+(a>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=Ae,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=_e,c[9]=Ce,c[10]=ke,c[11]=Be,c[12]=Ie,c[13]=Se,c[14]=Oe,c[15]=Me,c[16]=De,c[17]=Te,c[18]=Fe,0!==u&&(c[19]=u,r.length++),r};function v(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function y(e,t,r){return v(e,t,r)}function A(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?m(this,e,t):r<1024?v(this,e,t):y(this,e,t)},A.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},A.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,r+=i/67108864|0,r+=o>>>26,this.words[n]=67108863&o}return 0!==r&&(this.words[n]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,n=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==f||u>=n);u--){var d=0|this.words[u];this.words[u]=f<<26-i|d>>>i,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return a(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){a("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<=0);var t=e%26,r=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(a("number"==typeof e),a(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[n+r]=67108863&i}for(;n>26,this.words[n+r]=67108863&i;if(0===s)return this._strip();for(a(-1===s),s=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,i=0|a.words[a.length-1];0!=(r=26-this._countBits(i))&&(a=a.ushln(r),n.iushln(r),i=0|a.words[a.length-1]);var s,c=n.length-a.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(l=Math.min(l/i|0,67108863),n._ishlnsubmul(a,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return a(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(i=s.mod.neg(),r&&0!==i.negative&&i.iadd(e)),{div:n,mod:i}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(i=s.mod.neg(),r&&0!==i.negative&&i.isub(e)),{div:s.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,i,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),a(e<=67108863);for(var r=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(r*n+(0|this.words[i]))%e;return t?-n:n},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),a(e<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*r;this.words[n]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),i=new o(0),s=new o(0),c=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0==(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(f),i.isub(d)),n.iushrn(1),i.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(s),i.isub(c)):(r.isub(t),s.isub(n),c.isub(i))}return{a:s,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,i=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(c),i.iushrn(1);for(var d=0,l=1;0==(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s)):(r.isub(t),s.isub(i))}return(n=0===t.cmpn(1)?i:s).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){a("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),a(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new B(e)},o.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function x(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function B(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){B.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}x.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},i(E,x),E.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=o}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new _;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return w[e]=t,t},B.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},B.prototype._verify2=function(e,t){a(0==(e.negative|t.negative),"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},B.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(d(e,e.umod(this.m)._forceRed(this)),e)},B.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},B.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},B.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},B.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},B.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},B.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},B.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},B.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},B.prototype.isqr=function(e){return this.imul(e,e.clone())},B.prototype.sqr=function(e){return this.mul(e,e)},B.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),i=0;!n.isZero()&&0===n.andln(1);)i++,n.iushrn(1);a(!n.isZero());var s=new o(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,n),l=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),p=i;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();a(m=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var d=u>>f&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==i?(i<<=1,i|=d,(4==++s||0===n&&0===f)&&(a=this.mul(a,r[i]),s=0,i=0)):s=0}c=26}return a},B.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},B.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new I(e)},i(I,B),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e)},2202:function(e,t,r){"use strict";var n,a=r(8847)(r(3355));function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^f[p>>>16&255]^d[b>>>8&255]^l[255&m]^t[g++],o=u[p>>>24]^f[b>>>16&255]^d[m>>>8&255]^l[255&h]^t[g++],s=u[b>>>24]^f[m>>>16&255]^d[h>>>8&255]^l[255&p]^t[g++],c=u[m>>>24]^f[h>>>16&255]^d[p>>>8&255]^l[255&b]^t[g++],h=i,p=o,b=s,m=c;return i=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&m])^t[g++],o=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[m>>>8&255]<<8|n[255&h])^t[g++],s=(n[b>>>24]<<24|n[m>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[g++],c=(n[m>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^t[g++],[i>>>=0,o>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],a=[[],[],[],[]],i=[[],[],[],[]],o=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,r[o]=u,n[u]=o;var f=e[o],d=e[f],l=e[d],h=257*e[u]^16843008*u;a[0][o]=h<<24|h>>>8,a[1][o]=h<<16|h>>>16,a[2][o]=h<<8|h>>>24,a[3][o]=h,h=16843009*l^65537*d^257*f^16843008*o,i[0][u]=h<<24|h>>>8,i[1][u]=h<<16|h>>>16,i[2][u]=h<<8|h>>>24,i[3][u]=h,0===o?o=s=1:(o=f^e[e[e[l^f]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:a,INV_SUB_MIX:i}}();function u(e){this._key=a(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),a=[],i=0;i>>24,o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o],o^=s[i/t|0]<<24):t>6&&i%t==4&&(o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o]),a[i]=a[i-t]^o}for(var u=[],f=0;f>>24]]^c.INV_SUB_MIX[1][c.SBOX[l>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[l>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&l]]}this._nRounds=r,this._keySchedule=a,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return o(e=a(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},u.prototype.decryptBlock=function(e){var t=(e=a(e))[1];e[1]=e[3],e[3]=t;var r=o(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),i=n.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i},u.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},e.exports.AES=u},426:function(e,t,r){"use strict";var n=r(7494),a=r(8850).Buffer,i=r(3013),o=r(1736),s=r(6626),c=r(6316),u=r(7557);function f(e,t,r,o){i.call(this);var c=a.alloc(4,0);this._cipher=new n.AES(t);var f=this._cipher.encryptBlock(c);this._ghash=new s(f),r=function(e,t,r){if(12===t.length)return e._finID=a.concat([t,a.from([0,0,0,1])]),a.concat([t,a.from([0,0,0,2])]);var n=new s(r),i=t.length,o=i%16;n.update(t),o&&(o=16-o,n.update(a.alloc(o,0))),n.update(a.alloc(8,0));var c=8*i,f=a.alloc(8);f.writeUIntBE(c,0,8),n.update(f),e._finID=n.state;var d=a.from(e._finID);return u(d),d}(this,r,f),this._prev=a.from(r),this._cache=a.allocUnsafe(0),this._secCache=a.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(f,i),f.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=a.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),a=0;a16)throw new Error("unable to decrypt data");for(var r=-1;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},d.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=i[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(t,!1,r.key,r.iv);return l(e,n.key,n.iv)},t.createDecipheriv=l},5478:function(e,t,r){"use strict";var n=r(8408),a=r(426),i=r(8850).Buffer,o=r(1408),s=r(3013),c=r(7494),u=r(7085);function f(e,t,r){s.call(this),this._cache=new l,this._cipher=new c.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}r(1736)(f,s),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return i.concat(n)};var d=i.alloc(16,16);function l(){this.cache=i.allocUnsafe(0)}function h(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new o(s.module,t,r):"auth"===s.type?new a(s.module,t,r):new f(s.module,t,r)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(d))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=i.concat([this.cache,e])},l.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,t=i.allocUnsafe(e),r=-1;++r>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=i(a)},o.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,a],16)),this.ghash(i([0,e,0,t])),this.state},e.exports=o},7557:function(e){"use strict";e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},7427:function(e,t,r){"use strict";var n=r(6316);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var a=e._cipher.decryptBlock(t);return n(a,r)}},4030:function(e,t,r){"use strict";var n=r(8850).Buffer,a=r(6316);function i(e,t,r){var i=t.length,o=a(t,e._cache);return e._cache=e._cache.slice(i),e._prev=n.concat([e._prev,r?t:o]),o}t.encrypt=function(e,t,r){for(var a,o=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){o=n.concat([o,i(e,t,r)]);break}a=e._cache.length,o=n.concat([o,i(e,t.slice(0,a),r)]),t=t.slice(a)}return o}},3206:function(e,t,r){"use strict";var n=r(8850).Buffer;function a(e,t,r){for(var n,a,o=-1,s=0;++o<8;)n=t&1<<7-o?128:0,s+=(128&(a=e._cipher.encryptBlock(e._prev)[0]^n))>>o%8,e._prev=i(e._prev,r?n:a);return s}function i(e,t){var r=e.length,a=-1,i=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++a>7;return i}t.encrypt=function(e,t,r){for(var i=t.length,o=n.allocUnsafe(i),s=-1;++s=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,t){var r=function(e){var t=o(e);return{blinder:t.toRed(a.mont(e.modulus)).redPow(new a(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),i=t.modulus.byteLength(),s=new a(e).mul(r.blinder).umod(t.modulus),c=s.toRed(a.mont(t.prime1)),u=s.toRed(a.mont(t.prime2)),f=t.coefficient,d=t.prime1,l=t.prime2,h=c.redPow(t.exponent1).fromRed(),p=u.redPow(t.exponent2).fromRed(),b=h.isub(p).imul(f).umod(d).imul(l);return p.iadd(b).imul(r.unblinder).umod(t.modulus).toArrayLike(n,"be",i)}s.getr=o,e.exports=s},6561:function(e,t,r){"use strict";e.exports=r(5207)},9527:function(e,t,r){"use strict";var n=r(8850).Buffer,a=r(5866),i=r(6505),o=r(1736),s=r(1628),c=r(5410),u=r(5207);function f(e){i.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=a(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){i.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hash=a(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){return new f(e)}function h(e){return new d(e)}Object.keys(u).forEach((function(e){u[e].id=n.from(u[e].id,"hex"),u[e.toLowerCase()]=u[e]})),o(f,i.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},f.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=s(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},o(d,i.Writable),d.prototype._write=function(e,t,r){this._hash.update(e),r()},d.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},d.prototype.verify=function(e,t,r){"string"==typeof t&&(t=n.from(t,r)),this.end();var a=this._hash.digest();return c(t,a,e,this._signType,this._tag)},e.exports={Sign:l,Verify:h,createSign:l,createVerify:h}},1628:function(e,t,r){"use strict";var n=r(8850).Buffer,a=r(4424),i=r(9782),o=r(6597).ec,s=r(1734),c=r(7552),u=r(1308);function f(e,t,r,i){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function l(e,t,r){var i,o;do{for(i=n.alloc(0);8*i.length=t)throw new Error("invalid sig")}e.exports=function(e,t,r,u,f){var d=o(r);if("ec"===d.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var a=new i(n),o=r.data.subjectPrivateKey.data;return a.verify(t,e,o)}(e,t,d)}if("dsa"===d.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,i=r.data.q,s=r.data.g,u=r.data.pub_key,f=o.signature.decode(e,"der"),d=f.s,l=f.r;c(d,i),c(l,i);var h=a.mont(n),p=d.invm(i);return 0===s.toRed(h).redPow(new a(t).mul(p).mod(i)).fromRed().mul(u.toRed(h).redPow(l.mul(p).mod(i)).fromRed()).mod(n).mod(i).cmp(l)}(e,t,d)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");t=n.concat([f,t]);for(var l=d.modulus.byteLength(),h=[1],p=0;t.length+h.length+2=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(e).length;default:if(n)return U(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return S(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,a);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,a){var i,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var f=-1;for(i=r;is&&(r=s-c),i=r;i>=0;i--){for(var d=!0,l=0;la&&(n=a):n=a;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o>8,a=r%256,i.push(a),i.push(n);return i}(t,e.length-r),e,r,n)}function C(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a239?4:u>223?3:u>191?2:1;if(a+d<=r)switch(d){case 1:u<128&&(f=u);break;case 2:128==(192&(i=e[a+1]))&&(c=(31&u)<<6|63&i)>127&&(f=c);break;case 3:i=e[a+1],o=e[a+2],128==(192&i)&&128==(192&o)&&(c=(15&u)<<12|(63&i)<<6|63&o)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:i=e[a+1],o=e[a+2],s=e[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(f=c)}null===f?(f=65533,d=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),a+=d}return function(e){var t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);for(var r="",n=0;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},c.prototype.compare=function(e,t,r,n,a){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(i,o),u=this.slice(n,a),f=e.slice(t,r),d=0;da)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;function I(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;aa)&&(r=a);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,r,n,a,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function F(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,i=Math.min(e.length-r,2);a>>8*(n?a:1-a)}function R(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,i=Math.min(e.length-r,4);a>>8*(n?a:3-a)&255}function P(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,i){return i||P(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,i){return i||P(e,0,r,8),a.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(a*=256);)n+=this[e+--t]*a;return n},c.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||D(e,t,this.length);for(var n=this[e],a=1,i=0;++i=(a*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||D(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),a.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+a]=e/i&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);T(this,e,t,r,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);T(this,e,t,r,a-1,-a)}var i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--a)e[a+t]=this[a+r];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Q(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,r,n){for(var a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}},3675:function(e){"use strict";e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},593:function(e,t,r){"use strict";var n=r(7701),a=r(4373),i=a(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?a(r):r}},4373:function(e,t,r){"use strict";var n=r(3767),a=r(7701),i=a("%Function.prototype.apply%"),o=a("%Function.prototype.call%"),s=a("%Reflect.apply%",!0)||n.call(o,i),c=a("%Object.getOwnPropertyDescriptor%",!0),u=a("%Object.defineProperty%",!0),f=a("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var t=s(n,o,arguments);return c&&u&&c(t,"length").configurable&&u(t,"length",{value:1+f(0,e.length-(arguments.length-1))}),t};var d=function(){return s(n,i,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7759:function(e,t,r){"use strict";for(var n=r(8847)(r(4519)),a=r(3630),i={},o=0,s=Object.entries(a);o0&&void 0!==arguments[0]?arguments[0]:this.multibaseName;if(this.string&&e===this.multibaseName)return this.string;var t=null;if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");t=s.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");t=c.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}},{key:e,value:function(){return"CID("+this.toString()+")"}},{key:"toString",value:function(e){return this.toBaseEncodedString(e)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}}],[{key:"validateCID",value:function(e){var t=d.checkCIDComponents(e);if(t)throw new Error(t)}}]),t}(Symbol.for("nodejs.util.inspect.custom")),{className:"CID",symbolName:"@ipld/js-cid/CID"});l.codecs=f,e.exports=l},3013:function(e,t,r){"use strict";var n=r(8850).Buffer,a=r(7245).Transform,i=r(3462).s;function o(e){a.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(1736)(o,a),o.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var a=this._update(e);return this.hashMode?this:(r&&(a=this._toString(a,r)),a)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},o.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},o.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},o.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new i(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=o},3162:function(e,t,r){"use strict";var n=r(8847),a=n(r(4727)),i=n(r(775)),o=n(r(9721)),s=n(r(8985)),c=n(r(8975)),u=n(r(5163)),f=n(r(4650)),d=n(r(1949));e.exports=function(e,t){var r=t.className,n=t.symbolName,a=Symbol.for(n),l=(0,i.default)({},r,function(e,t){(0,u.default)(h,e);var n,i,l=(n=h,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,d.default)(n);if(i){var r=(0,d.default)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,f.default)(this,e)});function h(){var e;(0,o.default)(this,h);for(var t=arguments.length,r=new Array(t),n=0;n>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=function(e){var t=0,r=0,n=0,a="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)a[n]=e[n];for(n=0;256!=n;++n)for(r=e[n],t=256+n;t<4096;t+=256)r=a[t]=r>>>8^e[255&r];var i=[];for(n=1;16!=n;++n)i[n-1]="undefined"!=typeof Int32Array?a.subarray(256*n,256*n+256):a.slice(256*n,256*n+256);return i}(t),n=r[0],a=r[1],i=r[2],o=r[3],s=r[4],c=r[5],u=r[6],f=r[7],d=r[8],l=r[9],h=r[10],p=r[11],b=r[12],m=r[13],g=r[14];e.table=t,e.bstr=function(e,r){for(var n=-1^r,a=0,i=e.length;a>>8^t[255&(n^e.charCodeAt(a++))];return~n},e.buf=function(e,r){for(var v=-1^r,y=e.length-15,A=0;A>8&255]^b[e[A++]^v>>16&255]^p[e[A++]^v>>>24]^h[e[A++]]^l[e[A++]]^d[e[A++]]^f[e[A++]]^u[e[A++]]^c[e[A++]]^s[e[A++]]^o[e[A++]]^i[e[A++]]^a[e[A++]]^n[e[A++]]^t[e[A++]];for(y+=15;A>>8^t[255&(v^e[A++])];return~v},e.str=function(e,r){for(var n=-1^r,a=0,i=e.length,o=0,s=0;a>>8^t[255&(n^o)]:o<2048?n=(n=n>>>8^t[255&(n^(192|o>>6&31))])>>>8^t[255&(n^(128|63&o))]:o>=55296&&o<57344?(o=64+(1023&o),s=1023&e.charCodeAt(a++),n=(n=(n=(n=n>>>8^t[255&(n^(240|o>>8&7))])>>>8^t[255&(n^(128|o>>2&63))])>>>8^t[255&(n^(128|s>>6&15|(3&o)<<4))])>>>8^t[255&(n^(128|63&s))]):n=(n=(n=n>>>8^t[255&(n^(224|o>>12&15))])>>>8^t[255&(n^(128|o>>6&63))])>>>8^t[255&(n^(128|63&o))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?"object"===(0,i.default)(t)?a(t):(n=function(){var e={};return a(e),e}.call(t,r,t,e),void 0===n||(e.exports=n)):a({})},5102:function(e,t,r){"use strict";var n=r(9033).Buffer,a=r(6597),i=r(1734);e.exports=function(e){return new s(e)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new a.ec(this.curveType.name),this.keys=void 0}function c(e,t,r){Array.isArray(e)||(e=e.toArray());var a=new n(e);if(r&&a.lengthr?t=("rmd160"===e?new c:u(e)).update(t).digest():t.lengths?t=e(t):t.length-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function f(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function l(e){this.map={},e instanceof l?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function b(e){var t=new FileReader,r=p(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(b)}),this.text=function(){var e,t,r,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=p(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function A(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),a=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(a))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new l(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},g.call(y.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];w.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function E(e,r){return new Promise((function(n,i){var o=new y(e,r);if(o.signal&&o.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new l,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var a=r.join(":").trim();t.append(n,a)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var a="response"in s?s.response:s.responseText;n(new w(a,r))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&a&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}E.polyfill=!0,e.fetch||(e.fetch=E,e.Headers=l,e.Request=y,e.Response=w),t.Headers=l,t.Request=y,t.Response=w,t.fetch=E,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:void 0)},4293:function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(5010),t.createHash=t.Hash=r(5866),t.createHmac=t.Hmac=r(4424);var n=r(6561),a=Object.keys(n),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(a);t.getHashes=function(){return i};var o=r(4192);t.pbkdf2=o.pbkdf2,t.pbkdf2Sync=o.pbkdf2Sync;var s=r(6805);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var c=r(8333);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var u=r(9527);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=r(5102);var f=r(6991);t.publicEncrypt=f.publicEncrypt,t.privateEncrypt=f.privateEncrypt,t.publicDecrypt=f.publicDecrypt,t.privateDecrypt=f.privateDecrypt;var d=r(6509);t.randomFill=d.randomFill,t.randomFillSync=d.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},34:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a="%[a-f0-9]{2}",i=new RegExp("("+a+")|([^%]+?)","gi"),o=new RegExp("("+a+")+","gi");function s(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],s(r),s(n))}function c(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(i)||[],r=1;r0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(a,r);return t+=this._buffer(e,t),a},a.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},a.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=i.r28shl(r,s),a=i.r28shl(a,s),i.pc2(r,a,e.keys,o)}},c.prototype._update=function(e,t,r,n){var a=this._desState,o=i.readUInt32BE(e,t),s=i.readUInt32BE(e,t+4);i.ip(o,s,a.tmp,0),o=a.tmp[0],s=a.tmp[1],"encrypt"===this.type?this._encrypt(a,o,s,a.tmp,0):this._decrypt(a,o,s,a.tmp,0),o=a.tmp[0],s=a.tmp[1],i.writeUInt32BE(r,o,n),i.writeUInt32BE(r,s,n+4)},c.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,o=l}i.rip(s,o,n,a)},c.prototype._decrypt=function(e,t,r,n,a){for(var o=r,s=t,c=e.keys.length-2;c>=0;c-=2){var u=e.keys[c],f=e.keys[c+1];i.expand(o,e.tmp,0),u^=e.tmp[0],f^=e.tmp[1];var d=i.substitute(u,f),l=o;o=(s^i.permute(d))>>>0,s=l}i.rip(o,s,n,a)}},9413:function(e,t,r){"use strict";var n=r(4504),a=r(1736),i=r(9591),o=r(3049);function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),a=t.slice(8,16),i=t.slice(16,24);this.ciphers="encrypt"===e?[o.create({type:"encrypt",key:r}),o.create({type:"decrypt",key:a}),o.create({type:"encrypt",key:i})]:[o.create({type:"decrypt",key:i}),o.create({type:"encrypt",key:a}),o.create({type:"decrypt",key:r})]}function c(e){i.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}a(c,i),e.exports=c,c.create=function(e){return new c(e)},c.prototype._update=function(e,t,r,n){var a=this._edeState;a.ciphers[0]._update(e,t,r,n),a.ciphers[1]._update(r,n,r,n),a.ciphers[2]._update(r,n,r,n)},c.prototype._pad=o.prototype._pad,c.prototype._unpad=o.prototype._unpad},319:function(e,t){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var a=0,i=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)a<<=1,a|=t>>>s+o&1;for(s=0;s<=24;s+=8)a<<=1,a|=e>>>s+o&1}for(o=6;o>=0;o-=2){for(s=1;s<=25;s+=8)i<<=1,i|=t>>>s+o&1;for(s=1;s<=25;s+=8)i<<=1,i|=e>>>s+o&1}r[n+0]=a>>>0,r[n+1]=i>>>0},t.rip=function(e,t,r,n){for(var a=0,i=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)a<<=1,a|=t>>>s+o&1,a<<=1,a|=e>>>s+o&1;for(o=4;o<8;o++)for(s=24;s>=0;s-=8)i<<=1,i|=t>>>s+o&1,i<<=1,i|=e>>>s+o&1;r[n+0]=a>>>0,r[n+1]=i>>>0},t.pc1=function(e,t,r,n){for(var a=0,i=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1}for(s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(o=1;o<=3;o++){for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1;r[n+0]=a>>>0,r[n+1]=i>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,a){for(var i=0,o=0,s=r.length>>>1,c=0;c>>r[c]&1;for(c=s;c>>r[c]&1;n[a+0]=i>>>0,n[a+1]=o>>>0},t.expand=function(e,t,r){var n=0,a=0;n=(1&e)<<5|e>>>27;for(var i=23;i>=15;i-=4)n<<=6,n|=e>>>i&63;for(i=11;i>=3;i-=4)a|=e>>>i&63,a<<=6;a|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=a>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,a=0;a<4;a++)r<<=4,r|=n[64*a+(e>>>18-6*a&63)];for(a=0;a<4;a++)r<<=4,r|=n[256+64*a+(t>>>18-6*a&63)];return r>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>a[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(c),t.cmp(c)){if(!t.cmp(u))for(;r.mod(f).cmp(d);)r.iadd(h)}else for(;r.mod(i).cmp(l);)r.iadd(h);if(m(p=r.shrn(1))&&m(r)&&g(p)&&g(r)&&o.test(p)&&o.test(r))return r}}},6597:function(e,t,r){"use strict";var n=t;n.version=r(8597).i8,n.utils=r(7528),n.rand=r(2202),n.curve=r(6063),n.curves=r(506),n.ec=r(8320),n.eddsa=r(8027)},1249:function(e,t,r){"use strict";var n=r(1734),a=r(7528),i=a.getNAF,o=a.getJSF,s=a.assert;function c(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=i(t,1,this._bitLength),a=(1<=o;f--)c=(c<<1)+n[f];u.push(c)}for(var d=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=a;h>0;h--){for(o=0;o=0;u--){for(var f=0;u>=0&&0===o[u];u--)f++;if(u>=0&&f++,c=c.dblp(f),u<0)break;var d=o[u];s(0!==d),c="affine"===e.type?d>0?c.mixedAdd(a[d-1>>1]):c.mixedAdd(a[-d-1>>1].neg()):d>0?c.add(a[d-1>>1]):c.add(a[-d-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,r,n,a){var s,c,u,f=this._wnafT1,d=this._wnafT2,l=this._wnafT3,h=0;for(s=0;s=1;s-=2){var b=s-1,m=s;if(1===f[b]&&1===f[m]){var g=[t[b],null,null,t[m]];0===t[b].y.cmp(t[m].y)?(g[1]=t[b].add(t[m]),g[2]=t[b].toJ().mixedAdd(t[m].neg())):0===t[b].y.cmp(t[m].y.redNeg())?(g[1]=t[b].toJ().mixedAdd(t[m]),g[2]=t[b].add(t[m].neg())):(g[1]=t[b].toJ().mixedAdd(t[m]),g[2]=t[b].toJ().mixedAdd(t[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=o(r[b],r[m]);for(h=Math.max(y[0].length,h),l[b]=new Array(h),l[m]=new Array(h),c=0;c=0;s--){for(var _=0;s>=0;){var C=!0;for(c=0;c=0&&_++,x=x.dblp(_),s<0)break;for(c=0;c0?u=d[c][k-1>>1]:k<0&&(u=d[c][-k-1>>1].neg()),x="affine"===u.type?x.mixedAdd(u):x.add(u))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,a=0;a":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),a=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),i=n.redAdd(t),o=i.redSub(r),s=n.redSub(t),c=a.redMul(o),u=i.redMul(s),f=a.redMul(s),d=o.redMul(i);return this.curve.point(c,u,d,f)},u.prototype._projDbl=function(){var e,t,r,n,a,i,o=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(c);this.zOne?(e=o.redSub(s).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(c)),r=u.redSqr().redSub(u).redSub(u)):(a=this.z.redSqr(),i=u.redSub(a).redISub(a),e=o.redSub(s).redISub(c).redMul(i),t=u.redMul(n.redSub(c)),r=u.redMul(i))}else n=s.redAdd(c),a=this.curve._mulC(this.z).redSqr(),i=n.redSub(a).redSub(a),e=this.curve._mulC(o.redISub(n)).redMul(i),t=this.curve._mulC(n).redMul(s.redISub(c)),r=n.redMul(i);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),a=this.z.redMul(e.z.redAdd(e.z)),i=r.redSub(t),o=a.redSub(n),s=a.redAdd(n),c=r.redAdd(t),u=i.redMul(o),f=s.redMul(c),d=i.redMul(c),l=o.redMul(s);return this.curve.point(u,f,l,d)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),a=n.redSqr(),i=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(i).redMul(o),c=a.redSub(s),u=a.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(o),d=n.redMul(c).redMul(f);return this.curve.twisted?(t=n.redMul(u).redMul(o.redSub(this.curve._mulA(i))),r=c.redMul(u)):(t=n.redMul(u).redMul(o.redSub(i)),r=this.curve._mulC(c).redMul(u)),this.curve.point(d,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},6063:function(e,t,r){"use strict";var n=t;n.base=r(1249),n.short=r(3148),n.mont=r(1105),n.edwards=r(1123)},1105:function(e,t,r){"use strict";var n=r(1734),a=r(1736),i=r(1249),o=r(7528);function s(e){i.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){i.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}a(s,i),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},a(c,i.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},s.prototype.point=function(e,t){return new c(this,e,t)},s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),a=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,a)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),a=e.x.redAdd(e.z),i=e.x.redSub(e.z).redMul(r),o=a.redMul(n),s=t.z.redMul(i.redAdd(o).redSqr()),c=t.x.redMul(i.redISub(o).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),a=[];0!==t.cmpn(0);t.iushrn(1))a.push(t.andln(1));for(var i=a.length-1;i>=0;i--)0===a[i]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},3148:function(e,t,r){"use strict";var n=r(7528),a=r(1734),i=r(1736),o=r(1249),s=n.assert;function c(e){o.call(this,"short",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,r,n){o.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(t,16),this.y=new a(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(e,t,r,n){o.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(t,16),this.y=new a(r,16),this.z=new a(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}i(c,o),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new a(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new a(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new a(e.a,16),b:new a(e.b,16)}})):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:a.mont(e),r=new a(2).toRed(t).redInvm(),n=r.redNeg(),i=new a(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,s,c,u,f,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new a(1),b=new a(0),m=new a(0),g=new a(1),v=0;0!==l.cmpn(0);){var y=h.div(l);u=h.sub(y.mul(l)),f=m.sub(y.mul(p));var A=g.sub(y.mul(b));if(!n&&u.cmp(d)<0)t=c.neg(),r=p,n=u.neg(),i=f;else if(n&&2==++v)break;c=u,h=l,l=u,m=p,p=f,g=b,b=A}o=u.neg(),s=f;var w=n.sqr().add(i.sqr());return o.sqr().add(s.sqr()).cmp(w)>=0&&(o=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:i},{a:o,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],a=n.b.mul(e).divRound(this.n),i=r.b.neg().mul(e).divRound(this.n),o=a.mul(r.a),s=i.mul(n.a),c=a.mul(r.b),u=i.mul(n.b);return{k1:e.sub(o).sub(s),k2:c.add(u).neg()}},c.prototype.pointFromX=function(e,t){(e=new a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(a).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,a=this._endoWnafT2,i=0;i":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),a=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),i=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,o)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new a(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],a=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,a):this.curve._wnafMulAdd(1,n,a,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],a=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,a,!0):this.curve._wnafMulAdd(1,n,a,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},i(f,o.BasePoint),c.prototype.jpoint=function(e,t,r){return new f(this,e,t,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),a=e.x.redMul(r),i=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(a),c=i.redSub(o);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),d=n.redMul(u),l=c.redSqr().redIAdd(f).redISub(d).redISub(d),h=c.redMul(d.redISub(l)).redISub(i.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),a=this.y,i=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=a.redSub(i);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),u=c.redMul(o),f=r.redMul(c),d=s.redSqr().redIAdd(u).redISub(f).redISub(f),l=s.redMul(f.redISub(d)).redISub(a.redMul(u)),h=this.z.redMul(o);return this.curve.jpoint(d,l,h)},f.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(a),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},506:function(e,t,r){"use strict";var n,a=t,i=r(7198),o=r(6063),s=r(7528).assert;function c(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(a,e,{configurable:!0,enumerable:!0,get:function(){var r=new c(t);return Object.defineProperty(a,e,{configurable:!0,enumerable:!0,value:r}),r}})}a.PresetCurve=c,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:i.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:i.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(6401)}catch(e){n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},8320:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(1734),i=r(9410),o=r(7528),s=r(506),c=r(2202),u=o.assert,f=r(7791),d=r(488);function l(e){if(!(this instanceof l))return new l(e);"string"==typeof e&&(u(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=l,l.prototype.keyPair=function(e){return new f(this,e)},l.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},l.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||c(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new a(2));;){var o=new a(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},l.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,r,o){"object"===(0,n.default)(r)&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new a(e,16));for(var s=this.n.byteLength(),c=t.getPrivate().toArray("be",s),u=e.toArray("be",s),f=new i({hash:this.hash,entropy:c,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new a(1)),h=0;;h++){var p=o.k?o.k(h):new a(f.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(l)>=0)){var b=this.g.mul(p);if(!b.isInfinity()){var m=b.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=p.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var y=(b.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),y^=1),new d({r:g,s:v,recoveryParam:y})}}}}}},l.prototype.verify=function(e,t,r,n){e=this._truncateToN(new a(e,16)),r=this.keyFromPublic(r,n);var i=(t=new d(t,"hex")).r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,c=o.invm(this.n),u=c.mul(e).umod(this.n),f=c.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),f)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(u,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},l.prototype.recoverPubKey=function(e,t,r,n){u((3&r)===r,"The recovery param is more than two bits"),t=new d(t,n);var i=this.n,o=new a(e),s=t.r,c=t.s,f=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),f):this.curve.pointFromX(s,f);var h=t.r.invm(i),p=i.sub(o).mul(h).umod(i),b=c.mul(h).umod(i);return this.g.mulAdd(p,s,b)},l.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new d(t,n)).recoveryParam)return t.recoveryParam;for(var a=0;a<4;a++){var i;try{i=this.recoverPubKey(e,t,a)}catch(e){continue}if(i.eq(r))return a}throw new Error("Unable to find valid recovery factor")}},7791:function(e,t,r){"use strict";var n=r(1734),a=r(7528).assert;function i(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=i,i.fromPublic=function(e,t,r){return t instanceof i?t:new i(e,{pub:t,pubEnc:r})},i.fromPrivate=function(e,t,r){return t instanceof i?t:new i(e,{priv:t,privEnc:r})},i.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},i.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},i.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?a(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||a(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},i.prototype.derive=function(e){return e.validate()||a(e.validate(),"public point not validated"),e.mul(this.priv).getX()},i.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},i.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},i.prototype.inspect=function(){return""}},488:function(e,t,r){"use strict";var n=r(1734),a=r(7528),i=a.assert;function o(e,t){if(e instanceof o)return e;this._importDER(e,t)||(i(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function c(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var a=0,i=0,o=t.place;i>>=0;return!(a<=127)&&(t.place=o,a)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=a.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var i=c(e,r);if(!1===i)return!1;if(i+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=c(e,r);if(!1===o)return!1;var u=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var f=c(e,r);if(!1===f)return!1;if(e.length!==f+r.place)return!1;var d=e.slice(r.place,f+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(u),this.s=new n(d),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];f(n,t.length),(n=n.concat(t)).push(2),f(n,r.length);var i=n.concat(r),o=[48];return f(o,i.length),o=o.concat(i),a.encode(o,e)}},8027:function(e,t,r){"use strict";var n=r(7198),a=r(506),i=r(7528),o=i.assert,s=i.parseBytes,c=r(7303),u=r(6646);function f(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=a[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=f,f.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),a=this.g.mul(n),i=this.encodePoint(a),o=this.hashInt(i,r.pubBytes(),e).mul(r.priv()),c=n.add(o).umod(this.curve.n);return this.makeSignature({R:a,S:c,Rencoded:i})},f.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),a=this.hashInt(t.Rencoded(),n.pubBytes(),e),i=this.g.mul(t.S());return t.R().add(n.pub().mul(a)).eq(i)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(a>>1)-1?(a>>1)-c:c,i.isubn(s)):s=0,n[o]=s,i.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,a=0,i=0;e.cmpn(-a)>0||t.cmpn(-i)>0;){var o,s,c=e.andln(3)+a&3,u=t.andln(3)+i&3;3===c&&(c=-1),3===u&&(u=-1),o=0==(1&c)?0:3!=(n=e.andln(7)+a&7)&&5!==n||2!==u?c:-c,r[0].push(o),s=0==(1&u)?0:3!=(n=t.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[1].push(s),2*a===o+1&&(a=1-a),2*i===s+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new a(e,"hex","le")}},6464:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=function(){if("object"===("undefined"==typeof self?"undefined":(0,n.default)(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":(0,n.default)(window))&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return a()}try{return __global__||a()}finally{delete Object.prototype.__global__}}()},4258:function(e,t,r){"use strict";var n,a,i,o=r(9142),s=r(8847)(r(3355));i=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,a=void 0,i=void 0,c=function(e,t){b[n]=e,b[n+1]=t,2===(n+=2)&&(i?i(m):w())},u="undefined"!=typeof window?window:void 0,f=u||{},d=f.MutationObserver||f.WebKitMutationObserver,l="undefined"==typeof self&&void 0!==o&&"[object process]"==={}.toString.call(o),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(m,1)}}var b=new Array(1e3);function m(){for(var e=0;e=0;r--){var s=a(i[r]);t=a(new n(t+s,"hex"))}}return"0x"+t},t.normalize=o},3058:function(e,t,r){"use strict";var n=r(9033).Buffer,a=r(8847)(r(4519)),i=r(6851),o=r(9733),s=r(6597),c=(r(6740),new s.ec("secp256k1")),u=r(2922),f=u.keccak256,d=u.keccak256s,l=function(e){for(var t=d(e.slice(2)),r="0x",n=0;n<40;n++)r+=parseInt(t[n+2],16)>7?e[n+2].toUpperCase():e[n+2];return r},h=function(e){var t=new n(e.slice(2),"hex"),r="0x"+c.keyFromPrivate(t).getPublic(!1,"hex").slice(2),a=f(r);return{address:l("0x"+a.slice(-40)),privateKey:e}},p=function(e){var t=(0,a.default)(e,3),r=t[0],n=t[1],o=t[2];return i.flatten([n,o,r])},b=function(e){return[i.slice(64,i.length(e),e),i.slice(0,32,e),i.slice(32,64,e)]},m=function(e){return function(t,r){var a=c.keyFromPrivate(new n(r.slice(2),"hex")).sign(new n(t.slice(2),"hex"),{canonical:!0});return p([o.fromString(i.fromNumber(e+a.recoveryParam)),i.pad(32,i.fromNat("0x"+a.r.toString(16))),i.pad(32,i.fromNat("0x"+a.s.toString(16)))])}},g=m(27);e.exports={create:function(e){var t=f(i.concat(i.random(32),e||i.random(32))),r=i.concat(i.concat(i.random(32),t),i.random(32)),n=f(r);return h(n)},toChecksum:l,fromPrivate:h,sign:g,makeSigner:m,recover:function(e,t){var r=b(t),a={v:i.toNumber(r[0]),r:r[1].slice(2),s:r[2].slice(2)},o="0x"+c.recoverPubKey(new n(e.slice(2),"hex"),a,a.v<2?a.v:1-a.v%2).encode("hex",!1).slice(2),s=f(o);return l("0x"+s.slice(-40))},encodeSignature:p,decodeSignature:b}},1376:function(e){"use strict";var t=function(e,t){for(var r=[],n=0;n>6|192);else{if(a>55295&&a<56320){if(++n==e.length)return null;var i=e.charCodeAt(n);if(i<56320||i>57343)return null;r+=t((a=65536+((1023&a)<<10)+(1023&i))>>18|240),r+=t(a>>12&63|128)}else r+=t(a>>12|224);r+=t(a>>6&63|128)}r+=t(63&a|128)}}return r},toString:function(e){for(var t="",r=0,i=a(e);r127){if(o>191&&o<224){if(r>=i)return null;o=(31&o)<<6|63&n(e,r)}else if(o>223&&o<240){if(r+1>=i)return null;o=(15&o)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(o>239&&o<248))return null;if(r+2>=i)return null;o=(7&o)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(o<=65535)t+=String.fromCharCode(o);else{if(!(o<=1114111))return null;o-=65536,t+=String.fromCharCode(o>>10|55296),t+=String.fromCharCode(1023&o|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:o,toArray:i,fromUint8Array:function(e){return o([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(i(e))}}},2922:function(e){"use strict";var t="0123456789abcdef".split(""),r=[1,256,65536,16777216],n=[0,8,16,24],a=[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],i=function(e){var t,r,n,i,o,s,c,u,f,d,l,h,p,b,m,g,v,y,A,w,x,E,_,C,k,B,I,S,O,M,D,T,F,R,P,N,j,L,U,Q,G,H,z,q,K,V,W,Y,J,X,Z,$,ee,te,re,ne,ae,ie,oe,se,ce,ue,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],c=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|c>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(c<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|f>>>31),r=o^(f<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(d<<1|l>>>31),r=c^(l<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=f^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],m=e[1],V=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,S=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,z=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,P=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,D=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,T=e[45]<<29|e[44]>>>3,F=e[44]<<29|e[45]>>>3,C=e[6]<<28|e[7]>>>4,k=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,Q=e[38]<<8|e[39]>>>24,G=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,_=e[49]<<14|e[48]>>>18,e[0]=b^~g&y,e[1]=m^~v&A,e[10]=C^~B&S,e[11]=k^~I&O,e[20]=R^~N&L,e[21]=P^~j&U,e[30]=q^~V&Y,e[31]=K^~W&J,e[40]=te^~ne&ie,e[41]=re^~ae&oe,e[2]=g^~y&w,e[3]=v^~A&x,e[12]=B^~S&M,e[13]=I^~O&D,e[22]=N^~L&Q,e[23]=j^~U&G,e[32]=V^~Y&X,e[33]=W^~J&Z,e[42]=ne^~ie&se,e[43]=ae^~oe&ce,e[4]=y^~w&E,e[5]=A^~x&_,e[14]=S^~M&T,e[15]=O^~D&F,e[24]=L^~Q&H,e[25]=U^~G&z,e[34]=Y^~X&$,e[35]=J^~Z&ee,e[44]=ie^~se&ue,e[45]=oe^~ce&fe,e[6]=w^~E&b,e[7]=x^~_&m,e[16]=M^~T&C,e[17]=D^~F&k,e[26]=Q^~H&R,e[27]=G^~z&P,e[36]=X^~$&q,e[37]=Z^~ee&K,e[46]=se^~ue&te,e[47]=ce^~fe&re,e[8]=E^~b&g,e[9]=_^~m&v,e[18]=T^~C&B,e[19]=F^~k&I,e[28]=H^~R&N,e[29]=z^~P&j,e[38]=$^~q&V,e[39]=ee^~K&W,e[48]=ue^~te&ne,e[49]=fe^~re&ae,e[0]^=a[n],e[1]^=a[n+1]},o=function(e){return function(a){var o;if("0x"===a.slice(0,2)){o=[];for(var s=2,c=a.length;s>2]|=a[h]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(c[m>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=u){for(e.start=m-u,e.block=c[f],m=0;m>2]|=r[3&m],e.lastByteIndex===u)for(c[0]=c[f],m=1;m>4&15]+t[15&p]+t[p>>12&15]+t[p>>8&15]+t[p>>20&15]+t[p>>16&15]+t[p>>28&15]+t[p>>24&15];g%f==0&&(i(l),m=0)}return"0x"+b}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),o)}};e.exports={keccak256:o(256),keccak512:o(512),keccak256s:o(256),keccak512s:o(512)}},9733:function(e,t,r){"use strict";var n=r(1734),a=r(6851),i=function(e){return new n(e.slice(2),16)},o=function(e){var t="0x"+("0x"===e.slice(0,2)?new n(e.slice(2),16):new n(e,10)).toString("hex");return"0x0"===t?"0x":t},s=function(e){return"string"==typeof e?/^0x/.test(e)?e:"0x"+e:"0x"+new n(e).toString("hex")},c=function(e){return i(e).toNumber()},u=function(e){return function(t,r){return"0x"+i(t)[e](i(r)).toString("hex")}},f=u("add"),d=u("mul"),l=u("div"),h=u("sub");e.exports={toString:function(e){return i(e).toString(10)},fromString:o,toNumber:c,fromNumber:s,toEther:function(e){return c(l(e,o("10000000000")))/1e8},fromEther:function(e){return d(s(Math.floor(1e8*e)),o("10000000000"))},toUint256:function(e){return a.pad(32,e)},add:f,mul:d,div:l,sub:h}},6740:function(e){"use strict";e.exports={encode:function(e){var t=function(e){return(t=e.toString(16)).length%2==0?t:"0"+t;var t},r=function(e,r){return e<56?t(r+e):t(r+t(e).length/2+55)+t(e)};return"0x"+function e(t){if("string"==typeof t){var n=t.slice(2);return(2!=n.length||n>="80"?r(n.length/2,128):"")+n}var a=t.map(e).join("");return r(a.length/2,192)+a}(e)},decode:function(e){var t=2,r=function(){if(t>=e.length)throw"";var r=e.slice(t,t+2);return r<"80"?(t+=2,"0x"+r):r<"c0"?a():i()},n=function(){var r=parseInt(e.slice(t,t+=2),16)%64;return r<56?r:parseInt(e.slice(t,t+=2*(r-55)),16)},a=function(){var r=n();return"0x"+e.slice(t,t+=2*r)},i=function(){for(var e=2*n()+t,a=[];t=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error("invalid bloom")}function c(e){return!("string"!=typeof e||!/^(0x)?[0-9a-f]{64}$/i.test(e)||!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e))}function u(e){return!("string"!=typeof e||!e.match(/^(0x)?[0-9a-fA-F]{40}$/)&&!e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}t.isBloom=i,t.isInBloom=o,t.isUserEthereumAddressInBloom=function(e,t){if(!i(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error('Invalid ethereum address given: "'.concat(t,'"'));return o(e,a.padLeft(t,64))},t.isContractAddressInBloom=function(e,t){if(!i(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error('Invalid contract address given: "'.concat(t,'"'));return o(e,t)},t.isTopicInBloom=function(e,t){if(!i(e))throw new Error("Invalid bloom given");if(!c(t))throw new Error("Invalid topic");return o(e,t)},t.isTopic=c,t.isAddress=u},8179:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7286);function a(e){if(null==e)throw new Error("cannot convert null value to array");if("string"==typeof e){var t=e.match(/^(0x)?[0-9a-fA-F]*$/);if(!t)throw new Error("invalid hexidecimal string");if("0x"!==t[1])throw new Error("hex string must have 0x prefix");(e=e.substring(2)).length%2&&(e="0"+e);for(var r=[],n=0;n=256||parseInt(String(r))!=r)return!1}return!0}(e))return i(new Uint8Array(e));throw new Error("invalid arrayify value")}function i(e){var t=arguments;return void 0!==e.slice||(e.slice=function(){var r=Array.prototype.slice.call(t);return i(new Uint8Array(Array.prototype.slice.apply(e,r)))}),e}t.keccak256=function(e){return"0x"+n.keccak_256(a(e))},t.padLeft=function(e,t){var r=/^0x/i.test(e)||"number"==typeof e,n=t-(e=e.toString().replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(r?"0x":"")+new Array(n).join("0")+e},t.bytesToHex=function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x".concat(t.join("").replace(/^0+/,""))},t.toByteArray=a},7286:function(e,t,r){"use strict";e=r.nmd(e);var n,a=r(9142),i=r(8847)(r(3355));!function(){var o="input is invalid type",s="object"===("undefined"==typeof window?"undefined":(0,i.default)(window)),c=s?window:{};c.JS_SHA3_NO_WINDOW&&(s=!1);var u=!s&&"object"===("undefined"==typeof self?"undefined":(0,i.default)(self));!c.JS_SHA3_NO_NODE_JS&&"object"===(void 0===a?"undefined":(0,i.default)(a))&&a.versions&&a.versions.node?c=r.g:u&&(c=self);var f=!c.JS_SHA3_NO_COMMON_JS&&"object"===(0,i.default)(e)&&e.exports,d=r.amdO,l=!c.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),p=[4,1024,262144,67108864],b=[0,8,16,24],m=[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],y=["hex","buffer","arrayBuffer","array","digest"],A={128:168,256:136};!c.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!l||!c.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,i.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,r){return function(n){return new P(e,t,e).update(n)[r]()}},x=function(e,t,r){return function(n,a){return new P(e,t,a).update(n)[r]()}},E=function(e,t,r){return function(t,n,a,i){return I["cshake"+e].update(t,n,a,i)[r]()}},_=function(e,t,r){return function(t,n,a,i){return I["kmac"+e].update(t,n,a,i)[r]()}},C=function(e,t,r,n){for(var a=0;a>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function N(e,t,r){P.call(this,e,t,r)}P.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,i.default)(e);if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,a,s=this.blocks,c=this.byteCount,u=e.length,f=this.blockCount,d=0,h=this.s;d>2]|=e[d]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(s[n>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=c){for(this.start=n-c,this.block=s[f],n=0;n>=8);r>0;)a.unshift(r),r=255&(e>>=8),++n;return t?a.push(n):a.unshift(n),this.update(a),a.length},P.prototype.encodeString=function(e){var t,r=(0,i.default)(e);if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,a=e.length;if(t)n=a;else for(var s=0;s=57344?n+=3:(c=65536+((1023&c)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},P.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];o%t==0&&(j(r),i=0)}return a&&(e=r[i],s+=h[e>>4&15]+h[15&e],a>1&&(s+=h[e>>12&15]+h[e>>8&15]),a>2&&(s+=h[e>>20&15]+h[e>>16&15])),s},P.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,a=this.extraBytes,i=0,o=0,s=this.outputBits>>3;e=a?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);o>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%r==0&&j(n)}return i&&(e=s<<2,t=n[o],c[e]=255&t,i>1&&(c[e+1]=t>>8&255),i>2&&(c[e+2]=t>>16&255)),c},N.prototype=new P,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),P.prototype.finalize.call(this)};var j=function(e){var t,r,n,a,i,o,s,c,u,f,d,l,h,p,b,g,v,y,A,w,x,E,_,C,k,B,I,S,O,M,D,T,F,R,P,N,j,L,U,Q,G,H,z,q,K,V,W,Y,J,X,Z,$,ee,te,re,ne,ae,ie,oe,se,ce,ue,fe;for(n=0;n<48;n+=2)a=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|o>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=a^(c<<1|u>>>31),r=i^(u<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=o^(f<<1|d>>>31),r=s^(d<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(a<<1|i>>>31),r=d^(i<<1|a>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],b=e[1],V=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,S=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,z=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,P=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,D=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,T=e[45]<<29|e[44]>>>3,F=e[44]<<29|e[45]>>>3,C=e[6]<<28|e[7]>>>4,k=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,Q=e[38]<<8|e[39]>>>24,G=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,_=e[49]<<14|e[48]>>>18,e[0]=p^~g&y,e[1]=b^~v&A,e[10]=C^~B&S,e[11]=k^~I&O,e[20]=R^~N&L,e[21]=P^~j&U,e[30]=q^~V&Y,e[31]=K^~W&J,e[40]=te^~ne&ie,e[41]=re^~ae&oe,e[2]=g^~y&w,e[3]=v^~A&x,e[12]=B^~S&M,e[13]=I^~O&D,e[22]=N^~L&Q,e[23]=j^~U&G,e[32]=V^~Y&X,e[33]=W^~J&Z,e[42]=ne^~ie&se,e[43]=ae^~oe&ce,e[4]=y^~w&E,e[5]=A^~x&_,e[14]=S^~M&T,e[15]=O^~D&F,e[24]=L^~Q&H,e[25]=U^~G&z,e[34]=Y^~X&$,e[35]=J^~Z&ee,e[44]=ie^~se&ue,e[45]=oe^~ce&fe,e[6]=w^~E&p,e[7]=x^~_&b,e[16]=M^~T&C,e[17]=D^~F&k,e[26]=Q^~H&R,e[27]=G^~z&P,e[36]=X^~$&q,e[37]=Z^~ee&K,e[46]=se^~ue&te,e[47]=ce^~fe&re,e[8]=E^~p&g,e[9]=_^~b&v,e[18]=T^~C&B,e[19]=F^~k&I,e[28]=H^~R&N,e[29]=z^~P&j,e[38]=$^~q&V,e[39]=ee^~K&W,e[48]=ue^~te&ne,e[49]=fe^~re&ae,e[0]^=m[n],e[1]^=m[n+1]};if(f)e.exports=I;else{for(O=0;O0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}(t,4),n=r[0],a=r[1],i=r[2],s=r[3];return new e(new o.BN(n),new o.BN(a),i,s)},e.prototype._validate=function(){if(this.nonce.lt(new o.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new o.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,h.bnToUnpaddedBuffer)(this.nonce),(0,h.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return o.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(u.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(u.KECCAK256_NULL)},e}();t.Account=p,t.isValidAddress=function(e){try{(0,l.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,l.assertIsHexString)(e);var r=(0,c.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,h.toType)(t,h.TypeOutput.BN).toString()+"0x");for(var a=(0,d.keccakFromString)(n+r).toString("hex"),i="0x",o=0;o=8?i+=r[o].toUpperCase():i+=r[o];return i},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){(0,l.assertIsBuffer)(e),(0,l.assertIsBuffer)(t);var r=new o.BN(t);return r.isZero()?(0,d.rlphash)([e,null]).slice(-20):(0,d.rlphash)([e,n.from(r.toArray())]).slice(-20)},t.generateAddress2=function(e,t,r){return(0,l.assertIsBuffer)(e),(0,l.assertIsBuffer)(t),(0,l.assertIsBuffer)(r),(0,i.default)(20===e.length),(0,i.default)(32===t.length),(0,d.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,d.keccak256)(r)])).slice(-20)},t.isValidPrivate=function(e){return(0,s.privateKeyVerify)(e)},t.isValidPublic=function(e,t){return void 0===t&&(t=!1),(0,l.assertIsBuffer)(e),64===e.length?(0,s.publicKeyVerify)(n.concat([n.from([4]),e])):!!t&&(0,s.publicKeyVerify)(e)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),(0,l.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from((0,s.publicKeyConvert)(e,!1).slice(1))),(0,i.default)(64===e.length),(0,d.keccak)(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,l.assertIsBuffer)(e),n.from((0,s.publicKeyCreate)(e,!1)).slice(1)},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,l.assertIsBuffer)(e),64!==e.length&&(e=n.from((0,s.publicKeyConvert)(e,!1).slice(1))),e},t.zeroAddress=function(){var e=(0,f.zeros)(20);return(0,f.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,l.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}},1984:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var a,i=(a=r(3894))&&a.__esModule?a:{default:a},o=r(9100),s=r(3464),c=r(1968),u=function(){function e(e){(0,i.default)(20===e.length,"Invalid address length"),this.buf=e}return e.zero=function(){return new e((0,s.zeros)(20))},e.fromString=function(t){return(0,i.default)((0,c.isValidAddress)(t),"Invalid address"),new e((0,s.toBuffer)(t))},e.fromPublicKey=function(t){return(0,i.default)(n.isBuffer(t),"Public key should be Buffer"),new e((0,c.pubToAddress)(t))},e.fromPrivateKey=function(t){return(0,i.default)(n.isBuffer(t),"Private key should be Buffer"),new e((0,c.privateToAddress)(t))},e.generate=function(t,r){return(0,i.default)(o.BN.isBN(r)),new e((0,c.generateAddress)(t.buf,r.toArrayLike(n)))},e.generate2=function(t,r,a){return(0,i.default)(n.isBuffer(r)),(0,i.default)(n.isBuffer(a)),new e((0,c.generateAddress2)(t.buf,r,a))},e.prototype.equals=function(e){return this.buf.equals(e.buf)},e.prototype.isZero=function(){return this.equals(e.zero())},e.prototype.isPrecompileOrSystemAddress=function(){var e=new o.BN(this.buf),t=new o.BN(0),r=new o.BN("ffff","hex");return e.gte(t)&&e.lte(r)},e.prototype.toString=function(){return"0x"+this.buf.toString("hex")},e.prototype.toBuffer=function(){return n.from(this.buf)},e}();t.Address=u},3464:function(e,t,r){"use strict";var n=r(9033).Buffer,a=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o};Object.defineProperty(t,"__esModule",{value:!0}),t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var i=r(9100),o=r(3271),s=r(5725);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))},t.intToBuffer=function(e){var r=(0,t.intToHex)(e);return n.from((0,o.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};var c=function(e,r,n){var a=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,s.assertIsBuffer)(e),u(e)},t.unpadArray=function(e){return(0,s.assertIsArray)(e),u(e)},t.unpadHexString=function(e){return(0,s.assertIsHexString)(e),e=(0,o.stripHexPrefix)(e),u(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,o.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return n.from((0,o.padToEven)((0,o.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if(i.BN.isBN(e)){if(e.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(e));return e.toArrayLike(n)}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")},t.bufferToInt=function(e){return new i.BN((0,t.toBuffer)(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.fromSigned=function(e){return new i.BN(e).fromTwos(256)},t.toUnsigned=function(e){return n.from(e.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!=typeof e||(0,o.isHexPrefixed)(e)?e:"0x"+e},t.toUtf8=function(e){if((e=(0,o.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var r=[],a=0;a=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),i=n.next();!i.done;i=n.next()){var o=a(i.value,2),s=o[0],c=o[1];if(void 0!==c&&c.length>0&&0===c[0])throw new Error("".concat(s," cannot have leading zeroes, received: ").concat(c.toString("hex")))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):Uint8Array.from(null!=t?t:[])}},986:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(9033),a=r(9100);t.MAX_UINT64=new a.BN("ffffffffffffffff",16),t.MAX_INTEGER=new a.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new a.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex")},9100:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var i,o=(i=r(1734))&&i.__esModule?i:{default:i};t.BN=o.default;var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t}(r(6905));t.rlp=s},9808:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160FromArray=t.ripemd160FromString=t.ripemd160=t.sha256FromArray=t.sha256FromString=t.sha256=t.keccakFromArray=t.keccakFromHexString=t.keccakFromString=t.keccak256=t.keccak=void 0;var a=r(1243),i=r(5866),o=r(9100),s=r(3464),c=r(5725);t.keccak=function(e,t){switch(void 0===t&&(t=256),(0,c.assertIsBuffer)(e),t){case 224:return(0,a.keccak224)(e);case 256:return(0,a.keccak256)(e);case 384:return(0,a.keccak384)(e);case 512:return(0,a.keccak512)(e);default:throw new Error("Invald algorithm: keccak".concat(t))}},t.keccak256=function(e){return(0,t.keccak)(e)},t.keccakFromString=function(e,r){void 0===r&&(r=256),(0,c.assertIsString)(e);var a=n.from(e,"utf8");return(0,t.keccak)(a,r)},t.keccakFromHexString=function(e,r){return void 0===r&&(r=256),(0,c.assertIsHexString)(e),(0,t.keccak)((0,s.toBuffer)(e),r)},t.keccakFromArray=function(e,r){return void 0===r&&(r=256),(0,c.assertIsArray)(e),(0,t.keccak)((0,s.toBuffer)(e),r)};var u=function(e){return e=(0,s.toBuffer)(e),i("sha256").update(e).digest()};t.sha256=function(e){return(0,c.assertIsBuffer)(e),u(e)},t.sha256FromString=function(e){return(0,c.assertIsString)(e),u(e)},t.sha256FromArray=function(e){return(0,c.assertIsArray)(e),u(e)};var f=function(e,t){e=(0,s.toBuffer)(e);var r=i("rmd160").update(e).digest();return!0===t?(0,s.setLengthLeft)(r,32):r};t.ripemd160=function(e,t){return(0,c.assertIsBuffer)(e),f(e,t)},t.ripemd160FromString=function(e,t){return(0,c.assertIsString)(e),f(e,t)},t.ripemd160FromArray=function(e,t){return(0,c.assertIsArray)(e),f(e,t)},t.rlphash=function(e){return(0,t.keccak)(o.rlp.encode(e))}},5725:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var a=r(3271);t.assertIsHexString=function(e){if(!(0,a.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}},t.assertIsBuffer=function(e){if(!n.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}},t.assertIsArray=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}},t.assertIsString=function(e){if("string"!=typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}}},3062:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},a=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,a(r(986),t),a(r(1968),t),a(r(1984),t),a(r(9808),t),a(r(6081),t),a(r(3464),t),a(r(1677),t),a(r(9100),t),a(r(5513),t);var i=r(3271);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return i.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return i.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return i.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return i.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return i.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return i.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return i.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return i.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return i.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return i.isHexString}})},3271:function(e,t,r){"use strict";var n=r(9033).Buffer,a=r(8847)(r(3355));function i(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat((0,a.default)(e)));return"0"===e[0]&&"x"===e[1]}function o(e){var t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat((0,a.default)(t)));return t.length%2&&(t="0".concat(t)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=i,t.stripHexPrefix=function(e){if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat((0,a.default)(e)));return i(e)?e.slice(2):e},t.padToEven=o,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat((0,a.default)(e)));return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat((0,a.default)(e),"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat((0,a.default)(t),"'"));return t[r?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r=a.length,"The field ".concat(t.name," must not have more ").concat(t.length," bytes"))):t.allowZero&&0===a.length||!t.length||(0,o.default)(t.length===a.length,"The field ".concat(t.name," must have byte length of ").concat(t.length)),e.raw[r]=a}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:a,set:i}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:i,get:a})})),r)if("string"==typeof r&&(r=n.from((0,s.stripHexPrefix)(r),"hex")),n.isBuffer(r)&&(r=c.rlp.decode(r)),Array.isArray(r)){if(r.length>e._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(t,r){e[e._fields[r]]=(0,u.toBuffer)(t)}))}else{if("object"!==(0,a.default)(r))throw new Error("invalid data");var i=Object.keys(r);t.forEach((function(t){-1!==i.indexOf(t.name)&&(e[t.name]=r[t.name]),-1!==i.indexOf(t.alias)&&(e[t.alias]=r[t.alias])}))}}},6081:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var a=r(6992),i=r(9100),o=r(3464),s=r(9808),c=r(5725),u=r(5513);function f(e,t){var r=(0,u.toType)(e,u.TypeOutput.BN);if(r.eqn(0)||r.eqn(1))return(0,u.toType)(e,u.TypeOutput.BN);if(!t)return r.subn(27);var n=(0,u.toType)(t,u.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function d(e){var t=new i.BN(e);return t.eqn(0)||t.eqn(1)}t.ecsign=function(e,t,r){var i=(0,a.ecdsaSign)(e,t),o=i.signature,s=i.recid,c=n.from(o.slice(0,32)),f=n.from(o.slice(32,64));if(!r||"number"==typeof r){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:c,s:f,v:r?s+(2*r+35):s+27}}return{r:c,s:f,v:(0,u.toType)(r,u.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(n)}},t.ecrecover=function(e,t,r,i,s){var c=n.concat([(0,o.setLengthLeft)(r,32),(0,o.setLengthLeft)(i,32)],64),u=f(t,s);if(!d(u))throw new Error("Invalid signature v value");var l=(0,a.ecdsaRecover)(c,u.toNumber(),e);return n.from((0,a.publicKeyConvert)(l,!1).slice(1))},t.toRpcSig=function(e,t,r,a){if(!d(f(e,a)))throw new Error("Invalid signature v value");return(0,o.bufferToHex)(n.concat([(0,o.setLengthLeft)(t,32),(0,o.setLengthLeft)(r,32),(0,o.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,a){if(!d(f(e,a)))throw new Error("Invalid signature v value");var i=(0,u.toType)(e,u.TypeOutput.Number),s=r;return(i>28&&i%2==1||1===i||28===i)&&((s=n.from(r))[0]|=128),(0,o.bufferToHex)(n.concat([(0,o.setLengthLeft)(t,32),(0,o.setLengthLeft)(s,32)]))},t.fromRpcSig=function(e){var t,r,n,a=(0,o.toBuffer)(e);if(a.length>=65)t=a.slice(0,32),r=a.slice(32,64),n=(0,o.bufferToInt)(a.slice(64));else{if(64!==a.length)throw new Error("Invalid signature length");t=a.slice(0,32),r=a.slice(32,64),n=(0,o.bufferToInt)(a.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}},t.isValidSignature=function(e,t,r,n,a){void 0===n&&(n=!0);var o=new i.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new i.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!d(f(e,a)))return!1;var c=new i.BN(t),u=new i.BN(r);return!(c.isZero()||c.gt(s)||u.isZero()||u.gt(s)||n&&1===u.cmp(o))},t.hashPersonalMessage=function(e){(0,c.assertIsBuffer)(e);var t=n.from("\x19Ethereum Signed Message:\n".concat(e.length),"utf-8");return(0,s.keccak)(n.concat([t,e]))}},5513:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var a,i=r(9100),o=r(3271),s=r(3464);function c(e){return(0,s.unpadBuffer)(e.toArrayLike(n))}t.bnToHex=function(e){return"0x".concat(e.toString(16))},t.bnToUnpaddedBuffer=c,t.bnToRlp=function(e){return c(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(a=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"==typeof e&&!(0,o.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(e));if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,s.toBuffer)(e);if(t===a.Buffer)return r;if(t===a.BN)return new i.BN(r);if(t===a.Number){var n=new i.BN(r),c=new i.BN(Number.MAX_SAFE_INTEGER.toString());if(n.gt(c))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return n.toNumber()}return"0x".concat(r.toString("hex"))}}},7130:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(1734),i=r(7277),o=new a(0),s=new a(-1),c={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function u(e){var t=e?e.toLowerCase():"ether",r=c[t];if("string"!=typeof r)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(c,null,2));return new a(r,10)}function f(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"===(0,n.default)(e)&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+(0,n.default)(e)+".")}e.exports={unitMap:c,numberToString:f,getValueOfUnit:u,fromWei:function(e,t,r){var n=i(e),a=n.lt(o),f=u(t),d=c[t].length-1||1,l=r||{};a&&(n=n.mul(s));for(var h=n.mod(f).toString(10);h.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var l=d[0],h=d[1];if(l||(l="0"),h||(h="0"),h.length>i)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;h.length0&&c.length>o){c.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+c.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=c.length,"object"===("undefined"==typeof console?"undefined":(0,n.default)(console))&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else c=s[t]=r,++e._eventsCount;return e}function v(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var c=new Error('Unhandled "error" event. ('+t+")");throw c.context=t,c}if(!(r=o[e]))return!1;var u="function"==typeof r;switch(n=arguments.length){case 1:l(r,u,this);break;case 2:h(r,u,this,arguments[1]);break;case 3:p(r,u,this,arguments[1],arguments[2]);break;case 4:b(r,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(a=new Array(n-1),i=1;i=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(var r=t,n=r+1,a=e.length;n=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return A(this,e,!0)},s.prototype.rawListeners=function(e){return A(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):w.call(e,t)},s.prototype.listenerCount=w,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},7085:function(e,t,r){"use strict";var n=r(8850).Buffer,a=r(807);e.exports=function(e,t,r,i){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=r/8,s=n.alloc(o),c=n.alloc(i||0),u=n.alloc(0);o>0||i>0;){var f=new a;f.update(u),f.update(e),t&&f.update(t),u=f.digest();var d=0;if(o>0){var l=s.length-o;d=Math.min(o,u.length),u.copy(s,l,0,d),o-=d}if(d0){var h=c.length-i,p=Math.min(i,u.length-d);u.copy(c,h,d,d+p),i-=p}}return u.fill(0),{key:s,iv:c}}},8184:function(e,t,r){"use strict";var n=r(1493),a=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=function(e,t,r){for(var n=0,a=e.length;n=3&&(i=r),"[object Array]"===a.call(e)?o(e,t,i):"string"==typeof e?s(e,t,i):c(e,t,i)}},3161:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,a="[object Function]";e.exports=function(e){var i=this;if("function"!=typeof i||n.call(i)!==a)throw new TypeError(t+i);for(var o,s=r.call(arguments,1),c=function(){if(this instanceof o){var t=i.apply(this,s.concat(r.call(arguments)));return Object(t)===t?t:this}return i.apply(e,s.concat(r.call(arguments)))},u=Math.max(0,i.length-s.length),f=[],d=0;d1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=I(e),n=r.length>0?r[0]:"",a=S("%"+n+"%",t),o=a.name,c=a.value,f=!1,d=a.alias;d&&(n=d[0],x(r,w([0,1],d)));for(var l=1,h=!0;l=r.length){var v=u(c,p);c=(h=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[p]}else h=A(c,p),c=c[p];h&&!f&&(m[o]=c)}}return c}},2948:function(e,t,r){"use strict";var n;n="undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},e.exports=n},3820:function(e,t,r){"use strict";var n=r(7701)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8489:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a="undefined"!=typeof Symbol&&Symbol,i=r(7027);e.exports=function(){return"function"==typeof a&&"function"==typeof Symbol&&"symbol"===(0,n.default)(a("foo"))&&"symbol"===(0,n.default)(Symbol("bar"))&&i()}},7027:function(e,t,r){"use strict";var n=r(8847)(r(3355));e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===(0,n.default)(Symbol.iterator))return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var a=Object.getOwnPropertySymbols(e);if(1!==a.length||a[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},1191:function(e,t,r){"use strict";var n=r(7027);e.exports=function(){return n()&&!!Symbol.toStringTag}},1888:function(e,t,r){"use strict";var n=r(3767);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},2353:function(e,t,r){"use strict";var n=r(8850).Buffer,a=r(6505).Transform;function i(e){a.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1736)(i,a),i.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},i.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},i.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,a=0;this._blockOffset+e.length-a>=this._blockSize;){for(var i=this._blockOffset;i0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},i.prototype._update=function(){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i},7198:function(e,t,r){"use strict";var n=t;n.utils=r(4268),n.common=r(4696),n.sha=r(9310),n.ripemd=r(9294),n.hmac=r(3201),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},4696:function(e,t,r){"use strict";var n=r(4268),a=r(4504);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=i,i.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var a=0;a>>24&255,n[a++]=e>>>16&255,n[a++]=e>>>8&255,n[a++]=255&e}else for(n[a++]=255&e,n[a++]=e>>>8&255,n[a++]=e>>>16&255,n[a++]=e>>>24&255,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,i=8;ithis.blockSize&&(e=(new this.Hash).update(e).digest()),a(e.length<=this.blockSize);for(var t=e.length;t>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},4268:function(e,t,r){"use strict";var n=r(4504),a=r(1736);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=a,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a>6|192,r[n++]=63&o|128):i(e,a)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++a)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(a=0;a>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,a=0;n>>24,r[a+1]=i>>>16&255,r[a+2]=i>>>8&255,r[a+3]=255&i):(r[a+3]=i>>>24,r[a+2]=i>>>16&255,r[a+1]=i>>>8&255,r[a]=255&i)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,a){return e+t+r+n+a>>>0},t.sum64=function(e,t,r,n){var a=e[t],i=n+e[t+1]>>>0,o=(i>>0,e[t+1]=i},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,a,i,o,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,a,i,o,s){return t+n+i+s>>>0},t.sum64_5_hi=function(e,t,r,n,a,i,o,s,c,u){var f=0,d=t;return f+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,a,i,o,s,c,u){return t+n+i+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},9410:function(e,t,r){"use strict";var n=r(7198),a=r(6580),i=r(4504);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=a.toArray(e.entropy,e.entropyEnc||"hex"),r=a.toArray(e.nonce,e.nonceEnc||"hex"),n=a.toArray(e.pers,e.persEnc||"hex");i(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=o,o.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},o.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=a.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length\\$%@\u0621\u0624\u0629\"'^|~\u2985\u2986\u30fb\u30a5\u30e3\xa2\xa3\xac\xa6\xa5\u20a9\u2502\u2190\u2191\u2192\u2193\u25a0\u25cb\ud801\udc28\ud801\udc29\ud801\udc2a\ud801\udc2b\ud801\udc2c\ud801\udc2d\ud801\udc2e\ud801\udc2f\ud801\udc30\ud801\udc31\ud801\udc32\ud801\udc33\ud801\udc34\ud801\udc35\ud801\udc36\ud801\udc37\ud801\udc38\ud801\udc39\ud801\udc3a\ud801\udc3b\ud801\udc3c\ud801\udc3d\ud801\udc3e\ud801\udc3f\ud801\udc40\ud801\udc41\ud801\udc42\ud801\udc43\ud801\udc44\ud801\udc45\ud801\udc46\ud801\udc47\ud801\udc48\ud801\udc49\ud801\udc4a\ud801\udc4b\ud801\udc4c\ud801\udc4d\ud801\udc4e\ud801\udc4f\ud801\udcd8\ud801\udcd9\ud801\udcda\ud801\udcdb\ud801\udcdc\ud801\udcdd\ud801\udcde\ud801\udcdf\ud801\udce0\ud801\udce1\ud801\udce2\ud801\udce3\ud801\udce4\ud801\udce5\ud801\udce6\ud801\udce7\ud801\udce8\ud801\udce9\ud801\udcea\ud801\udceb\ud801\udcec\ud801\udced\ud801\udcee\ud801\udcef\ud801\udcf0\ud801\udcf1\ud801\udcf2\ud801\udcf3\ud801\udcf4\ud801\udcf5\ud801\udcf6\ud801\udcf7\ud801\udcf8\ud801\udcf9\ud801\udcfa\ud801\udcfb\ud803\udcc0\ud803\udcc1\ud803\udcc2\ud803\udcc3\ud803\udcc4\ud803\udcc5\ud803\udcc6\ud803\udcc7\ud803\udcc8\ud803\udcc9\ud803\udcca\ud803\udccb\ud803\udccc\ud803\udccd\ud803\udcce\ud803\udccf\ud803\udcd0\ud803\udcd1\ud803\udcd2\ud803\udcd3\ud803\udcd4\ud803\udcd5\ud803\udcd6\ud803\udcd7\ud803\udcd8\ud803\udcd9\ud803\udcda\ud803\udcdb\ud803\udcdc\ud803\udcdd\ud803\udcde\ud803\udcdf\ud803\udce0\ud803\udce1\ud803\udce2\ud803\udce3\ud803\udce4\ud803\udce5\ud803\udce6\ud803\udce7\ud803\udce8\ud803\udce9\ud803\udcea\ud803\udceb\ud803\udcec\ud803\udced\ud803\udcee\ud803\udcef\ud803\udcf0\ud803\udcf1\ud803\udcf2\ud806\udcc0\ud806\udcc1\ud806\udcc2\ud806\udcc3\ud806\udcc4\ud806\udcc5\ud806\udcc6\ud806\udcc7\ud806\udcc8\ud806\udcc9\ud806\udcca\ud806\udccb\ud806\udccc\ud806\udccd\ud806\udcce\ud806\udccf\ud806\udcd0\ud806\udcd1\ud806\udcd2\ud806\udcd3\ud806\udcd4\ud806\udcd5\ud806\udcd6\ud806\udcd7\ud806\udcd8\ud806\udcd9\ud806\udcda\ud806\udcdb\ud806\udcdc\ud806\udcdd\ud806\udcde\ud806\udcdf\u0131\u0237\u2207\u2202\ud83a\udd22\ud83a\udd23\ud83a\udd24\ud83a\udd25\ud83a\udd26\ud83a\udd27\ud83a\udd28\ud83a\udd29\ud83a\udd2a\ud83a\udd2b\ud83a\udd2c\ud83a\udd2d\ud83a\udd2e\ud83a\udd2f\ud83a\udd30\ud83a\udd31\ud83a\udd32\ud83a\udd33\ud83a\udd34\ud83a\udd35\ud83a\udd36\ud83a\udd37\ud83a\udd38\ud83a\udd39\ud83a\udd3a\ud83a\udd3b\ud83a\udd3c\ud83a\udd3d\ud83a\udd3e\ud83a\udd3f\ud83a\udd40\ud83a\udd41\ud83a\udd42\ud83a\udd43\u066e\u06a1\u066f\u5b57\u53cc\u591a\u89e3\u4ea4\u6620\u7121\u524d\u5f8c\u518d\u65b0\u521d\u7d42\u8ca9\u58f0\u5439\u6f14\u6295\u6355\u904a\u6307\u7981\u7a7a\u5408\u6e80\u7533\u5272\u55b6\u914d\u5f97\u53ef\u4e3d\u4e38\u4e41\ud840\udd22\u4f60\u4fbb\u5002\u507a\u5099\u50cf\u349e\ud841\ude3a\u5154\u5164\u5177\ud841\udd1c\u34b9\u5167\ud841\udd4b\u5197\u51a4\u4ecc\u51ac\ud864\udddf\u5203\u34df\u523b\u5246\u5277\u3515\u5305\u5306\u5349\u535a\u5373\u537d\u537f\ud842\ude2c\u7070\u53ca\u53df\ud842\udf63\u53eb\u53f1\u5406\u549e\u5438\u5448\u5468\u54a2\u54f6\u5510\u5553\u5563\u5584\u55ab\u55b3\u55c2\u5716\u5717\u5651\u5674\u58ee\u57ce\u57f4\u580d\u578b\u5832\u5831\u58ac\ud845\udce4\u58f2\u58f7\u5906\u5922\u5962\ud845\udea8\ud845\udeea\u59ec\u5a1b\u5a27\u59d8\u5a66\u36ee\u5b08\u5b3e\ud846\uddc8\u5bc3\u5bd8\u5bf3\ud846\udf18\u5bff\u5c06\u3781\u5c60\u5cc0\u5c8d\ud847\udde4\u5d43\ud847\udde6\u5d6e\u5d6b\u5d7c\u5de1\u5de2\u382f\u5dfd\u5e28\u5e3d\u5e69\u3862\ud848\udd83\u387c\u5eb0\u5eb3\u5eb6\ud868\udf92\ud848\udf31\u8201\u5f22\u38c7\ud84c\udeb8\ud858\uddda\u5f62\u5f6b\u38e3\u5f9a\u5fcd\u5fd7\u5ff9\u6081\u393a\u391c\ud849\uded4\u60c7\u6148\u614c\u617a\u61b2\u61a4\u61af\u61de\u621b\u625d\u62b1\u62d4\u6350\ud84a\udf0c\u633d\u62fc\u6368\u6383\u63e4\ud84a\udff1\u6422\u63c5\u63a9\u3a2e\u6469\u647e\u649d\u6477\u3a6c\u656c\ud84c\udc0a\u65e3\u66f8\u6649\u3b19\u3b08\u3ae4\u5192\u5195\u6700\u669c\u80ad\u43d9\u6721\u675e\u6753\ud84c\udfc3\u3b49\u67fa\u6785\u6852\ud84d\udc6d\u688e\u681f\u6914\u6942\u69a3\u69ea\u6aa8\ud84d\udea3\u6adb\u3c18\u6b21\ud84e\udca7\u6b54\u3c4e\u6b72\u6b9f\u6bbb\ud84e\ude8d\ud847\udd0b\ud84e\udefa\u6c4e\ud84f\udcbc\u6cbf\u6ccd\u6c67\u6d16\u6d3e\u6d69\u6d78\u6d85\ud84f\udd1e\u6d34\u6e2f\u6e6e\u3d33\u6ec7\ud84f\uded1\u6df9\u6f6e\ud84f\udf5e\ud84f\udf8e\u6fc6\u7039\u701b\u3d96\u704a\u707d\u7077\u70ad\ud841\udd25\u7145\ud850\ude63\u719c\u7228\u7250\ud851\ude08\u7280\u7295\ud851\udf35\ud852\udc14\u737a\u738b\u3eac\u73a5\u3eb8\u7447\u745c\u7485\u74ca\u3f1b\u7524\ud853\udc36\u753e\ud853\udc92\ud848\udd9f\u7610\ud853\udfa1\ud853\udfb8\ud854\udc44\u3ffc\u4008\ud854\udcf3\ud854\udcf2\ud854\udd19\ud854\udd33\u771e\u771f\u778b\u4046\u4096\ud855\udc1d\u784e\u40e3\ud855\ude26\ud855\ude9a\ud855\udec5\u79eb\u412f\u7a4a\u7a4f\ud856\udd7c\ud856\udea7\u4202\ud856\udfab\u7bc6\u7bc9\u4227\ud857\udc80\u7cd2\u42a0\u7ce8\u7ce3\u7d00\ud857\udf86\u7d63\u4301\u7dc7\u7e02\u7e45\u4334\ud858\ude28\ud858\ude47\u4359\ud858\uded9\u7f7a\ud858\udf3e\u7f95\u7ffa\ud859\udcda\ud859\udd23\u8060\ud859\udda8\u8070\ud84c\udf5f\u43d5\u80b2\u8103\u440b\u813e\u5ab5\ud859\udfa7\ud859\udfb5\ud84c\udf93\ud84c\udf9c\u8204\u8f9e\u446b\u8291\u828b\u829d\u52b3\u82b1\u82b3\u82bd\u82e6\ud85a\udf3c\u831d\u8363\u83ad\u8323\u83bd\u83e7\u8353\u83ca\u83cc\u83dc\ud85b\udc36\ud85b\udd6b\ud85b\udcd5\u452b\u84f1\u84f3\u8516\ud85c\udfca\u8564\ud85b\udf2c\u455d\u4561\ud85b\udfb1\ud85c\udcd2\u456b\u8650\u8667\u8669\u86a9\u8688\u870e\u86e2\u8728\u876b\u8786\u87e1\u8801\u45f9\u8860\ud85d\ude67\u88d7\u88de\u4635\u88fa\u34bb\ud85e\udcae\ud85e\udd66\u46be\u46c7\u8aa0\ud85f\udca8\u8cab\u8cc1\u8d1b\u8d77\ud85f\udf2f\ud842\udc04\u8dcb\u8dbc\u8df0\ud842\udcde\u8ed4\ud861\uddd2\ud861\udded\u9094\u90f1\u9111\ud861\udf2e\u911b\u9238\u92d7\u92d8\u927c\u93f9\u9415\ud862\udffa\u958b\u4995\u95b7\ud863\udd77\u49e6\u96c3\u5db2\u9723\ud864\udd45\ud864\ude1a\u4a6e\u4a76\u97e0\ud865\udc0a\u4ab2\ud865\udc96\u9829\ud865\uddb6\u98e2\u4b33\u9929\u99a7\u99c2\u99fe\u4bce\ud866\udf30\u9c40\u9cfd\u4cce\u4ced\u9d67\ud868\udcce\u4cf8\ud868\udd05\ud868\ude0e\ud868\ude91\u4d56\u9efe\u9f05\u9f0f\u9f16\ud869\ude00",mapChar:function(r){return r>=196608?r>=917760&&r<=917999?18874368:0:e[t[r>>4]][15&r]}};var e,t}.apply(t,[]))||(e.exports=n)},4489:function(e,t,r){"use strict";var n=r(8847)(r(3106));function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=Math.floor,h=String.fromCharCode;function p(e){throw new RangeError(d[e])}function b(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]);var a=function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(f,".")).split("."),t).join(".");return n+a}function m(e){for(var t=[],r=0,n=e.length;r=55296&&a<=56319&&r>1,e+=l(e/t);e>455;n+=s)e=l(e/35);return l(n+36*e/(e+38))},y=function(e){var t,r=[],n=e.length,a=0,i=128,c=72,u=e.lastIndexOf("-");u<0&&(u=0);for(var f=0;f=128&&p("not-basic"),r.push(e.charCodeAt(f));for(var d=u>0?u+1:0;d=n&&p("invalid-input");var g=(t=e.charCodeAt(d++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:s;(g>=s||g>l((o-a)/b))&&p("overflow"),a+=g*b;var y=m<=c?1:m>=c+26?26:m-c;if(gl(o/A)&&p("overflow"),b*=A}var w=r.length+1;c=v(a-h,w,0==h),l(a/w)>o-i&&p("overflow"),i+=l(a/w),a%=w,r.splice(a++,0,i)}return String.fromCodePoint.apply(String,r)},A=function(e){var t,r=[],n=(e=m(e)).length,i=128,c=0,u=72,f=a(e);try{for(f.s();!(t=f.n()).done;){var d=t.value;d<128&&r.push(h(d))}}catch(e){f.e(e)}finally{f.f()}var b=r.length,y=b;for(b&&r.push("-");y=i&&El((o-c)/_)&&p("overflow"),c+=(w-i)*_,i=w;var C,k=a(e);try{for(k.s();!(C=k.n()).done;){var B=C.value;if(Bo&&p("overflow"),B==i){for(var I=c,S=s;;S+=s){var O=S<=u?1:S>=u+26?26:S-u;if(I>23,l=f>>21&3,h=f>>5&65535,p=31&f,b=t.mapStr.substr(h,p);if(0===l||n&&1&d)throw new Error("Illegal char "+u);1===l?i.push(b):2===l?i.push(a?b:u):3===l&&i.push(u)}return i.join("").normalize("NFC")}function n(t,n,i){void 0===i&&(i=!1);var o=r(t,i,n).split(".");return(o=o.map((function(t){return t.startsWith("xn--")?a(t=e.decode(t.substring(4)),i,!1):a(t,i,n),t}))).join(".")}function a(e,n,a){if("-"===e[2]&&"-"===e[3])throw new Error("Failed to validate "+e);if(e.startsWith("-")||e.endsWith("-"))throw new Error("Failed to validate "+e);if(e.includes("."))throw new Error("Failed to validate "+e);if(r(e,n,a)!==e)throw new Error("Failed to validate "+e);var i=e.codePointAt(0);if(t.mapChar(i)&2<<23)throw new Error("Label contains illegal character: "+i)}return{toUnicode:function(e,t){return void 0===t&&(t={}),n(e,!1,"useStd3ASCII"in t&&t.useStd3ASCII)},toAscii:function(t,r){void 0===r&&(r={});var a,i=!("transitional"in r)||r.transitional,o="useStd3ASCII"in r&&r.useStd3ASCII,s="verifyDnsLength"in r&&r.verifyDnsLength,c=n(t,i,o).split(".").map(e.toASCII),u=c.join(".");if(s){if(u.length<1||u.length>253)throw new Error("DNS name has wrong length: "+u);for(a=0;a63)throw new Error("DNS label has wrong length: "+f)}}return u}}}(e,t)}.apply(t,n))||(e.exports=a)},3226:function(e,t){"use strict";t.read=function(e,t,r,n,a){var i,o,s=8*a-n-1,c=(1<>1,f=-7,d=r?a-1:0,l=r?-1:1,h=e[t+d];for(d+=l,i=h&(1<<-f)-1,h>>=-f,f+=s;f>0;i=256*i+e[t+d],d+=l,f-=8);for(o=i&(1<<-f)-1,i>>=-f,f+=n;f>0;o=256*o+e[t+d],d+=l,f-=8);if(0===i)i=1-u;else{if(i===c)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),i-=u}return(h?-1:1)*o*Math.pow(2,i-n)},t.write=function(e,t,r,n,a,i){var o,s,c,u=8*i-a-1,f=(1<>1,l=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+d>=1?l/c:l*Math.pow(2,1-d))*c>=2&&(o++,c/=2),o+d>=f?(s=0,o=f):o+d>=1?(s=(t*c-1)*Math.pow(2,a),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;e[r+h]=255&s,h+=p,s/=256,a-=8);for(o=o<0;e[r+h]=255&o,h+=p,o/=256,u-=8);e[r+h-p]|=128*b}},1736:function(e){"use strict";"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},9446:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(1191)(),i=r(593)("Object.prototype.toString"),o=function(e){return!(a&&e&&"object"===(0,n.default)(e)&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},s=function(e){return!!o(e)||null!==e&&"object"===(0,n.default)(e)&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},c=function(){return o(arguments)}();o.isLegacyArguments=s,e.exports=c?o:s},1493:function(e,t,r){"use strict";var n,a,i=r(8847)(r(3355)),o=Function.prototype.toString,s="object"===("undefined"==typeof Reflect?"undefined":(0,i.default)(Reflect))&&null!==Reflect&&Reflect.apply;if("function"==typeof s&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw a}}),a={},s((function(){throw 42}),null,n)}catch(e){e!==a&&(s=null)}else s=null;var c=/^\s*class\b/,u=function(e){try{var t=o.call(e);return c.test(t)}catch(e){return!1}},f=function(e){try{return!u(e)&&(o.call(e),!0)}catch(e){return!1}},d=Object.prototype.toString,l="function"==typeof Symbol&&!!Symbol.toStringTag,h=!(0 in[,]),p=function(){return!1};if("object"===("undefined"==typeof document?"undefined":(0,i.default)(document))){var b=document.all;d.call(b)===d.call(document.all)&&(p=function(e){if((h||!e)&&(void 0===e||"object"===(0,i.default)(e)))try{var t=d.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=s?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!==(0,i.default)(e))return!1;try{s(e,null,n)}catch(e){if(e!==a)return!1}return!u(e)&&f(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!==(0,i.default)(e))return!1;if(l)return f(e);if(u(e))return!1;var t=d.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&f(e)}},4339:function(e){"use strict";e.exports=function(e){if(!e)return!1;var r=t.call(e);return"[object Function]"===r||"function"==typeof e&&"[object RegExp]"!==r||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},4477:function(e,t,r){"use strict";var n,a=Object.prototype.toString,i=Function.prototype.toString,o=/^\s*(?:function)?\*/,s=r(1191)(),c=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(o.test(i.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===a.call(e);if(!c)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&c(t)}return c(e)===n}},8619:function(e,t,r){"use strict";var n=r(8847)(r(3355));e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+(0,n.default)(e)+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},8915:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(8184),i=r(3604),o=r(593),s=o("Object.prototype.toString"),c=r(1191)(),u=r(3820),f="undefined"==typeof globalThis?r.g:globalThis,d=i(),l=o("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1}return!!u&&function(e){var t=!1;return a(p,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},9484:function(e){"use strict";var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},4858:function(e,t,r){"use strict";e=r.nmd(e);var n=r(9142),a=r(8847)(r(3355));!function(){var t="object"===("undefined"==typeof window?"undefined":(0,a.default)(window))?window:{};!t.JS_SHA3_NO_NODE_JS&&"object"===(void 0===n?"undefined":(0,a.default)(n))&&n.versions&&n.versions.node&&(t=r.g);for(var i=!t.JS_SHA3_NO_COMMON_JS&&"object"===(0,a.default)(e)&&e.exports,o="0123456789abcdef".split(""),s=[0,8,16,24],c=[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],u=[224,256,384,512],f=["hex","buffer","arrayBuffer","array"],d=function(e,t,r){return function(n){return new x(e,t,e).update(n)[r]()}},l=function(e,t,r){return function(n,a){return new x(e,t,a).update(n)[r]()}},h=function(e,t){var r=d(e,t,"hex");r.create=function(){return new x(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}x.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,a=e.length,i=this.blocks,o=this.byteCount,c=this.blockCount,u=0,f=this.s;u>2]|=e[u]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(i[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=o){for(this.start=r-o,this.block=i[c],r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+o[15&e]+o[e>>12&15]+o[e>>8&15]+o[e>>20&15]+o[e>>16&15]+o[e>>28&15]+o[e>>24&15];s%t==0&&(E(r),i=0)}return a&&(e=r[i],a>0&&(c+=o[e>>4&15]+o[15&e]),a>1&&(c+=o[e>>12&15]+o[e>>8&15]),a>2&&(c+=o[e>>20&15]+o[e>>16&15])),c},x.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,a=this.extraBytes,i=0,o=0,s=this.outputBits>>3;e=a?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);o>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%r==0&&E(n)}return i&&(e=s<<2,t=n[o],i>0&&(c[e]=255&t),i>1&&(c[e+1]=t>>8&255),i>2&&(c[e+2]=t>>16&255)),c};var E=function(e){var t,r,n,a,i,o,s,u,f,d,l,h,p,b,m,g,v,y,A,w,x,E,_,C,k,B,I,S,O,M,D,T,F,R,P,N,j,L,U,Q,G,H,z,q,K,V,W,Y,J,X,Z,$,ee,te,re,ne,ae,ie,oe,se,ce,ue,fe;for(n=0;n<48;n+=2)a=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|o>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=a^(u<<1|f>>>31),r=i^(f<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=o^(d<<1|l>>>31),r=s^(l<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=f^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(a<<1|i>>>31),r=l^(i<<1|a>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],m=e[1],V=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,S=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,z=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,P=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,D=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,T=e[45]<<29|e[44]>>>3,F=e[44]<<29|e[45]>>>3,C=e[6]<<28|e[7]>>>4,k=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,Q=e[38]<<8|e[39]>>>24,G=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,_=e[49]<<14|e[48]>>>18,e[0]=b^~g&y,e[1]=m^~v&A,e[10]=C^~B&S,e[11]=k^~I&O,e[20]=R^~N&L,e[21]=P^~j&U,e[30]=q^~V&Y,e[31]=K^~W&J,e[40]=te^~ne&ie,e[41]=re^~ae&oe,e[2]=g^~y&w,e[3]=v^~A&x,e[12]=B^~S&M,e[13]=I^~O&D,e[22]=N^~L&Q,e[23]=j^~U&G,e[32]=V^~Y&X,e[33]=W^~J&Z,e[42]=ne^~ie&se,e[43]=ae^~oe&ce,e[4]=y^~w&E,e[5]=A^~x&_,e[14]=S^~M&T,e[15]=O^~D&F,e[24]=L^~Q&H,e[25]=U^~G&z,e[34]=Y^~X&$,e[35]=J^~Z&ee,e[44]=ie^~se&ue,e[45]=oe^~ce&fe,e[6]=w^~E&b,e[7]=x^~_&m,e[16]=M^~T&C,e[17]=D^~F&k,e[26]=Q^~H&R,e[27]=G^~z&P,e[36]=X^~$&q,e[37]=Z^~ee&K,e[46]=se^~ue&te,e[47]=ce^~fe&re,e[8]=E^~b&g,e[9]=_^~m&v,e[18]=T^~C&B,e[19]=F^~k&I,e[28]=H^~R&N,e[29]=z^~P&j,e[38]=$^~q&V,e[39]=ee^~K&W,e[48]=ue^~te&ne,e[49]=fe^~re&ae,e[0]^=c[n],e[1]^=c[n+1]};if(i)e.exports=b;else for(g=0;g>>31),p=l^(o<<1|i>>>31),b=e[0]^h,m=e[1]^p,g=e[10]^h,v=e[11]^p,y=e[20]^h,A=e[21]^p,w=e[30]^h,x=e[31]^p,E=e[40]^h,_=e[41]^p;h=n^(s<<1|c>>>31),p=a^(c<<1|s>>>31);var C=e[2]^h,k=e[3]^p,B=e[12]^h,I=e[13]^p,S=e[22]^h,O=e[23]^p,M=e[32]^h,D=e[33]^p,T=e[42]^h,F=e[43]^p;h=i^(u<<1|f>>>31),p=o^(f<<1|u>>>31);var R=e[4]^h,P=e[5]^p,N=e[14]^h,j=e[15]^p,L=e[24]^h,U=e[25]^p,Q=e[34]^h,G=e[35]^p,H=e[44]^h,z=e[45]^p;h=s^(d<<1|l>>>31),p=c^(l<<1|d>>>31);var q=e[6]^h,K=e[7]^p,V=e[16]^h,W=e[17]^p,Y=e[26]^h,J=e[27]^p,X=e[36]^h,Z=e[37]^p,$=e[46]^h,ee=e[47]^p;h=u^(n<<1|a>>>31),p=f^(a<<1|n>>>31);var te=e[8]^h,re=e[9]^p,ne=e[18]^h,ae=e[19]^p,ie=e[28]^h,oe=e[29]^p,se=e[38]^h,ce=e[39]^p,ue=e[48]^h,fe=e[49]^p,de=b,le=m,he=v<<4|g>>>28,pe=g<<4|v>>>28,be=y<<3|A>>>29,me=A<<3|y>>>29,ge=x<<9|w>>>23,ve=w<<9|x>>>23,ye=E<<18|_>>>14,Ae=_<<18|E>>>14,we=C<<1|k>>>31,xe=k<<1|C>>>31,Ee=I<<12|B>>>20,_e=B<<12|I>>>20,Ce=S<<10|O>>>22,ke=O<<10|S>>>22,Be=D<<13|M>>>19,Ie=M<<13|D>>>19,Se=T<<2|F>>>30,Oe=F<<2|T>>>30,Me=P<<30|R>>>2,De=R<<30|P>>>2,Te=N<<6|j>>>26,Fe=j<<6|N>>>26,Re=U<<11|L>>>21,Pe=L<<11|U>>>21,Ne=Q<<15|G>>>17,je=G<<15|Q>>>17,Le=z<<29|H>>>3,Ue=H<<29|z>>>3,Qe=q<<28|K>>>4,Ge=K<<28|q>>>4,He=W<<23|V>>>9,ze=V<<23|W>>>9,qe=Y<<25|J>>>7,Ke=J<<25|Y>>>7,Ve=X<<21|Z>>>11,We=Z<<21|X>>>11,Ye=ee<<24|$>>>8,Je=$<<24|ee>>>8,Xe=te<<27|re>>>5,Ze=re<<27|te>>>5,$e=ne<<20|ae>>>12,et=ae<<20|ne>>>12,tt=oe<<7|ie>>>25,rt=ie<<7|oe>>>25,nt=se<<8|ce>>>24,at=ce<<8|se>>>24,it=ue<<14|fe>>>18,ot=fe<<14|ue>>>18;e[0]=de^~Ee&Re,e[1]=le^~_e&Pe,e[10]=Qe^~$e&be,e[11]=Ge^~et&me,e[20]=we^~Te&qe,e[21]=xe^~Fe&Ke,e[30]=Xe^~he&Ce,e[31]=Ze^~pe&ke,e[40]=Me^~He&tt,e[41]=De^~ze&rt,e[2]=Ee^~Re&Ve,e[3]=_e^~Pe&We,e[12]=$e^~be&Be,e[13]=et^~me&Ie,e[22]=Te^~qe&nt,e[23]=Fe^~Ke&at,e[32]=he^~Ce&Ne,e[33]=pe^~ke&je,e[42]=He^~tt&ge,e[43]=ze^~rt&ve,e[4]=Re^~Ve&it,e[5]=Pe^~We&ot,e[14]=be^~Be&Le,e[15]=me^~Ie&Ue,e[24]=qe^~nt&ye,e[25]=Ke^~at&Ae,e[34]=Ce^~Ne&Ye,e[35]=ke^~je&Je,e[44]=tt^~ge&Se,e[45]=rt^~ve&Oe,e[6]=Ve^~it&de,e[7]=We^~ot&le,e[16]=Be^~Le&Qe,e[17]=Ie^~Ue&Ge,e[26]=nt^~ye&we,e[27]=at^~Ae&xe,e[36]=Ne^~Ye&Xe,e[37]=je^~Je&Ze,e[46]=ge^~Se&Me,e[47]=ve^~Oe&De,e[8]=it^~de&Ee,e[9]=ot^~le&_e,e[18]=Le^~Qe&$e,e[19]=Ue^~Ge&et,e[28]=ye^~we&Te,e[29]=Ae^~xe&Fe,e[38]=Ye^~Xe&he,e[39]=Je^~Ze&pe,e[48]=Se^~Me&He,e[49]=Oe^~De&ze,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},801:function(e,t,r){"use strict";var n=r(9033).Buffer,a=r(5612);function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(var t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(a.p1600(this.state),this.count=0);return t},i.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i},807:function(e,t,r){"use strict";var n=r(1736),a=r(2353),i=r(8850).Buffer,o=new Array(16);function s(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function c(e,t){return e<>>32-t}function u(e,t,r,n,a,i,o){return c(e+(t&r|~t&n)+a+i|0,o)+t|0}function f(e,t,r,n,a,i,o){return c(e+(t&n|r&~n)+a+i|0,o)+t|0}function d(e,t,r,n,a,i,o){return c(e+(t^r^n)+a+i|0,o)+t|0}function l(e,t,r,n,a,i,o){return c(e+(r^(t|~n))+a+i|0,o)+t|0}n(s,a),s.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,a=this._c,i=this._d;r=u(r,n,a,i,e[0],3614090360,7),i=u(i,r,n,a,e[1],3905402710,12),a=u(a,i,r,n,e[2],606105819,17),n=u(n,a,i,r,e[3],3250441966,22),r=u(r,n,a,i,e[4],4118548399,7),i=u(i,r,n,a,e[5],1200080426,12),a=u(a,i,r,n,e[6],2821735955,17),n=u(n,a,i,r,e[7],4249261313,22),r=u(r,n,a,i,e[8],1770035416,7),i=u(i,r,n,a,e[9],2336552879,12),a=u(a,i,r,n,e[10],4294925233,17),n=u(n,a,i,r,e[11],2304563134,22),r=u(r,n,a,i,e[12],1804603682,7),i=u(i,r,n,a,e[13],4254626195,12),a=u(a,i,r,n,e[14],2792965006,17),r=f(r,n=u(n,a,i,r,e[15],1236535329,22),a,i,e[1],4129170786,5),i=f(i,r,n,a,e[6],3225465664,9),a=f(a,i,r,n,e[11],643717713,14),n=f(n,a,i,r,e[0],3921069994,20),r=f(r,n,a,i,e[5],3593408605,5),i=f(i,r,n,a,e[10],38016083,9),a=f(a,i,r,n,e[15],3634488961,14),n=f(n,a,i,r,e[4],3889429448,20),r=f(r,n,a,i,e[9],568446438,5),i=f(i,r,n,a,e[14],3275163606,9),a=f(a,i,r,n,e[3],4107603335,14),n=f(n,a,i,r,e[8],1163531501,20),r=f(r,n,a,i,e[13],2850285829,5),i=f(i,r,n,a,e[2],4243563512,9),a=f(a,i,r,n,e[7],1735328473,14),r=d(r,n=f(n,a,i,r,e[12],2368359562,20),a,i,e[5],4294588738,4),i=d(i,r,n,a,e[8],2272392833,11),a=d(a,i,r,n,e[11],1839030562,16),n=d(n,a,i,r,e[14],4259657740,23),r=d(r,n,a,i,e[1],2763975236,4),i=d(i,r,n,a,e[4],1272893353,11),a=d(a,i,r,n,e[7],4139469664,16),n=d(n,a,i,r,e[10],3200236656,23),r=d(r,n,a,i,e[13],681279174,4),i=d(i,r,n,a,e[0],3936430074,11),a=d(a,i,r,n,e[3],3572445317,16),n=d(n,a,i,r,e[6],76029189,23),r=d(r,n,a,i,e[9],3654602809,4),i=d(i,r,n,a,e[12],3873151461,11),a=d(a,i,r,n,e[15],530742520,16),r=l(r,n=d(n,a,i,r,e[2],3299628645,23),a,i,e[0],4096336452,6),i=l(i,r,n,a,e[7],1126891415,10),a=l(a,i,r,n,e[14],2878612391,15),n=l(n,a,i,r,e[5],4237533241,21),r=l(r,n,a,i,e[12],1700485571,6),i=l(i,r,n,a,e[3],2399980690,10),a=l(a,i,r,n,e[10],4293915773,15),n=l(n,a,i,r,e[1],2240044497,21),r=l(r,n,a,i,e[8],1873313359,6),i=l(i,r,n,a,e[15],4264355552,10),a=l(a,i,r,n,e[6],2734768916,15),n=l(n,a,i,r,e[13],1309151649,21),r=l(r,n,a,i,e[4],4149444226,6),i=l(i,r,n,a,e[11],3174756917,10),a=l(a,i,r,n,e[2],718787259,15),n=l(n,a,i,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+a|0,this._d=this._d+i|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=i.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},137:function(e,t,r){"use strict";var n=r(1734),a=r(2202);function i(e){this.rand=e||new a.Rand}e.exports=i,i.create=function(e){return new i(e)},i.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var a=new n(this.rand.generate(r))}while(a.cmp(e)>=0);return a},i.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},i.prototype.test=function(e,t,r){var a=e.bitLength(),i=n.mont(e),o=new n(1).toRed(i);t||(t=Math.max(1,a/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var u=e.shrn(c),f=s.toRed(i);t>0;t--){var d=this._randrange(new n(2),s);r&&r(d);var l=d.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(f)){for(var h=1;h0;t--){var f=this._randrange(new n(2),o),d=e.gcd(f);if(0!==d.cmpn(1))return d;var l=f.toRed(a).redPow(c);if(0!==l.cmp(i)&&0!==l.cmp(u)){for(var h=1;h>8,o=255&a;i?r.push(i,o):r.push(o)}return r},r.zero2=n,r.toHex=a,r.encode=function(e,t){return"hex"===t?a(e):e}},6565:function(e,t,r){"use strict";var n=r(8847),a=n(r(9721)),i=n(r(8985)),o=function(){function e(t,r,n,i){(0,a.default)(this,e),this.name=t,this.code=r,this.alphabet=i,n&&i&&(this.engine=n(i))}return(0,i.default)(e,[{key:"encode",value:function(e){return this.engine.encode(e)}},{key:"decode",value:function(e){return this.engine.decode(e)}},{key:"isImplemented",value:function(){return this.engine}}]),e}();e.exports=o},2642:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(e.indexOf(o)<0)throw new Error("invalid base16 character")}}catch(e){i.e(e)}finally{i.f()}return a.from(t,"hex")}}}},6494:function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[o>>>i-5&31],i-=5;if(i>0&&(s+=t[o<<5-i&31]),a)for(;s.length%8!=0;)s+="=";return s}("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(r){var n,a=function(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw o}}}}(r);try{for(a.s();!(n=a.n()).done;){var i=n.value;if(e.indexOf(i)<0)throw new Error("invalid base32 character")}}catch(e){a.e(e)}finally{a.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,a=0,i=0,o=new Uint8Array(5*r/8|0),s=0;s=8&&(o[i++]=a>>>n-8&255,n-=8);return o.buffer}(r,e)}}}},6627:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?a.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var i=n.indexOf("=");return i>0&&!t&&(n=n.substring(0,i)),n},decode:function(t){var r,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(e.indexOf(o)<0)throw new Error("invalid base64 character")}}catch(e){i.e(e)}finally{i.f()}return a.from(t,"base64")}}}},7905:function(e,t,r){"use strict";var n=r(6565),a=r(7548),i=r(2642),o=r(6494),s=r(6627),c=[["base1","1","","1"],["base2","0",a,"01"],["base8","7",a,"01234567"],["base10","9",a,"0123456789"],["base16","f",i,"0123456789abcdef"],["base32","b",o,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",o,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",o,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",o,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",o,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",a,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",a,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],u=c.reduce((function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e}),{}),f=c.reduce((function(e,t){return e[t[1]]=u[t[0]],e}),{});e.exports={names:u,codes:f}},6086:function(e,t,r){"use strict";var n=r(9033).Buffer,a=r(7905);(t=e.exports=o).encode=function(e,t){var r=s(e);return o(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());var t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));var r=s(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;var t=e.substring(0,1);try{return s(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(a.names)),t.codes=Object.freeze(Object.keys(a.codes));var i=new Error("Unsupported encoding");function o(e,t){if(!t)throw new Error("requires an encoded buffer");var r=s(e),a=n.from(r.code);return function(e,t){s(e).decode(t.toString())}(r.name,t),n.concat([a,t])}function s(e){var t;if(a.names[e])t=a.names[e];else{if(!a.codes[e])throw i;t=a.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}},4093:function(e,t,r){"use strict";for(var n=r(8847)(r(4519)),a=r(4070),i={},o=0,s=Object.entries(a);oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(e.indexOf(o)<0)throw new Error("invalid base16 character")}}catch(e){i.e(e)}finally{i.f()}return a.from(t,"hex")}}}},976:function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[o>>>i-5&31],i-=5;if(i>0&&(s+=t[o<<5-i&31]),a)for(;s.length%8!=0;)s+="=";return s}("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(r){var n,a=function(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw o}}}}(r);try{for(a.s();!(n=a.n()).done;){var i=n.value;if(e.indexOf(i)<0)throw new Error("invalid base32 character")}}catch(e){a.e(e)}finally{a.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,a=0,i=0,o=new Uint8Array(5*r/8|0),s=0;s=8&&(o[i++]=a>>>n-8&255,n-=8);return o.buffer}(r,e)}}}},8504:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?a.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var i=n.indexOf("=");return i>0&&!t&&(n=n.substring(0,i)),n},decode:function(t){var r,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(e.indexOf(o)<0)throw new Error("invalid base64 character")}}catch(e){i.e(e)}finally{i.f()}return a.from(t,"base64")}}}},2263:function(e,t,r){"use strict";var n=r(1786),a=r(7548),i=r(7739),o=r(976),s=r(8504),c=[["base1","1","","1"],["base2","0",a,"01"],["base8","7",a,"01234567"],["base10","9",a,"0123456789"],["base16","f",i,"0123456789abcdef"],["base32","b",o,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",o,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",o,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",o,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",o,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",a,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",a,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],u=c.reduce((function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e}),{}),f=c.reduce((function(e,t){return e[t[1]]=u[t[0]],e}),{});e.exports={names:u,codes:f}},2592:function(e,t,r){"use strict";var n=r(9033).Buffer,a=r(2263);function i(e,t){if(!t)throw new Error("requires an encoded buffer");var r=o(e),a=n.from(r.code);return function(e,t){o(e).decode(t.toString())}(r.name,t),n.concat([a,t])}function o(e){var t;if(a.names[e])t=a.names[e];else{if(!a.codes[e])throw new Error("Unsupported encoding");t=a.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}(t=e.exports=i).encode=function(e,t){var r=o(e);return i(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());var t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));var r=o(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;var t=e.substring(0,1);try{return o(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(a.names)),t.codes=Object.freeze(Object.keys(a.codes))},1269:function(e,t){"use strict";t.names=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,md4:212,md5:213,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),t.codes=Object.freeze({0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",212:"md4",213:"md5",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46e3:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),t.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46e3:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},7748:function(e,t,r){"use strict";var n=r(9033).Buffer,a=r(2592),i=r(6657),o=r(1269);function s(e){t.decode(e)}t.names=o.names,t.codes=o.codes,t.defaultLengths=o.defaultLengths,t.toHexString=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return e.toString("hex")},t.fromHexString=function(e){return n.from(e,"hex")},t.toB58String=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return a.encode("base58btc",e).toString().slice(1)},t.fromB58String=function(e){var t=e;return n.isBuffer(e)&&(t=e.toString()),a.decode("z"+t)},t.decode=function(e){if(!n.isBuffer(e))throw new Error("multihash must be a Buffer");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");var r=i.decode(e);if(!t.isValidCode(r))throw new Error("multihash unknown function code: 0x".concat(r.toString(16)));e=e.slice(i.decode.bytes);var a=i.decode(e);if(a<0)throw new Error("multihash invalid length: ".concat(a));if((e=e.slice(i.decode.bytes)).length!==a)throw new Error("multihash length inconsistent: 0x".concat(e.toString("hex")));return{code:r,name:o.codes[r],length:a,digest:e}},t.encode=function(e,r,a){if(!e||void 0===r)throw new Error("multihash encode requires at least two args: digest, code");var o=t.coerceCode(r);if(!n.isBuffer(e))throw new Error("digest should be a Buffer");if(null==a&&(a=e.length),a&&e.length!==a)throw new Error("digest length should be equal to specified length.");return n.concat([n.from(i.encode(o)),n.from(i.encode(a)),e])},t.coerceCode=function(e){var r=e;if("string"==typeof e){if(void 0===o.names[e])throw new Error("Unrecognized hash function named: ".concat(e));r=o.names[e]}if("number"!=typeof r)throw new Error("Hash function code should be a number. Got: ".concat(r));if(void 0===o.codes[r]&&!t.isAppCode(r))throw new Error("Unrecognized function code: ".concat(r));return r},t.isAppCode=function(e){return e>0&&e<16},t.isValidCode=function(e){return!!t.isAppCode(e)||!!o.codes[e]},t.validate=s,t.prefix=function(e){return s(e),e.slice(0,2)}},7277:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(1734),i=r(6931);e.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new a(1),r=String(e).toLowerCase().trim(),o="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),s=i(r);if("-"===s.substr(0,1)&&(s=i(s.slice(1)),t=new a(-1,10)),!(s=""===s?"0":s).match(/^-?[0-9]+$/)&&s.match(/^[0-9A-Fa-f]+$/)||s.match(/^[a-fA-F]+$/)||!0===o&&s.match(/^[0-9A-Fa-f]+$/))return new a(s,16).mul(t);if((s.match(/^-?[0-9]+$/)||""===s)&&!1===o)return new a(s,10).mul(t)}else if("object"===(0,n.default)(e)&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new a(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},3103:function(e){"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,s,c=a(e),u=1;u0&&(a=r),r=e[u++]);)switch(G++,"\n"===r?(z++,H=0):H++,N){case h:if("{"===r)N=b;else if("["===r)N=g;else if(!K(r))return q("Non-whitespace before {[.");continue;case A:case b:if(K(r))continue;if(N===A)j.push(w);else{if("}"===r){s({}),c(),N=j.pop()||p;continue}j.push(m)}if('"'!==r)return q('Malformed object key should start with " ');N=y;continue;case w:case m:if(K(r))continue;if(":"===r)N===m?(j.push(m),void 0!==i&&(s({}),o(i),i=void 0),Q++):void 0!==i&&(o(i),i=void 0),N=p;else if("}"===r)void 0!==i&&(s(i),c(),i=void 0),c(),Q--,N=j.pop()||p;else{if(","!==r)return q("Bad object");N===m&&j.push(m),void 0!==i&&(s(i),c(),i=void 0),N=A}continue;case g:case p:if(K(r))continue;if(N===g){if(s([]),Q++,N=p,"]"===r){c(),Q--,N=j.pop()||p;continue}j.push(v)}if('"'===r)N=y;else if("{"===r)N=b;else if("["===r)N=g;else if("t"===r)N=x;else if("f"===r)N=C;else if("n"===r)N=S;else if("-"===r)F+=r;else if("0"===r)F+=r,N=20;else{if(-1==="123456789".indexOf(r))return q("Bad value");F+=r,N=20}continue;case v:if(","===r)j.push(v),void 0!==i&&(s(i),c(),i=void 0),N=p;else{if("]"!==r){if(K(r))continue;return q("Bad array")}void 0!==i&&(s(i),c(),i=void 0),c(),Q--,N=j.pop()||p}continue;case y:void 0===i&&(i="");var l=u-1;e:for(;;){for(;U>0;)if(L+=r,r=e.charAt(u++),4===U?(i+=String.fromCharCode(parseInt(L,16)),U=0,l=u-1):U++,!r)break e;if('"'===r&&!R){N=j.pop()||p,i+=e.substring(l,u-1);break}if(!("\\"!==r||R||(R=!0,i+=e.substring(l,u-1),r=e.charAt(u++))))break;if(R){if(R=!1,"n"===r?i+="\n":"r"===r?i+="\r":"t"===r?i+="\t":"f"===r?i+="\f":"b"===r?i+="\b":"u"===r?(U=1,L=""):i+=r,r=e.charAt(u++),l=u-1,r)continue;break}d.lastIndex=u;var V=d.exec(e);if(!V){u=e.length+1,i+=e.substring(l,u-1);break}if(u=V.index+1,!(r=e.charAt(V.index))){i+=e.substring(l,u-1);break}}continue;case x:if(!r)continue;if("r"!==r)return q("Invalid true started with t"+r);N=E;continue;case E:if(!r)continue;if("u"!==r)return q("Invalid true started with tr"+r);N=_;continue;case _:if(!r)continue;if("e"!==r)return q("Invalid true started with tru"+r);s(!0),c(),N=j.pop()||p;continue;case C:if(!r)continue;if("a"!==r)return q("Invalid false started with f"+r);N=k;continue;case k:if(!r)continue;if("l"!==r)return q("Invalid false started with fa"+r);N=B;continue;case B:if(!r)continue;if("s"!==r)return q("Invalid false started with fal"+r);N=I;continue;case I:if(!r)continue;if("e"!==r)return q("Invalid false started with fals"+r);s(!1),c(),N=j.pop()||p;continue;case S:if(!r)continue;if("u"!==r)return q("Invalid null started with n"+r);N=O;continue;case O:if(!r)continue;if("l"!==r)return q("Invalid null started with nu"+r);N=M;continue;case M:if(!r)continue;if("l"!==r)return q("Invalid null started with nul"+r);s(null),c(),N=j.pop()||p;continue;case D:if("."!==r)return q("Leading zero not followed by .");F+=r,N=20;continue;case 20:if(-1!=="0123456789".indexOf(r))F+=r;else if("."===r){if(-1!==F.indexOf("."))return q("Invalid number has two dots");F+=r}else if("e"===r||"E"===r){if(-1!==F.indexOf("e")||-1!==F.indexOf("E"))return q("Invalid number has two exponential");F+=r}else if("+"===r||"-"===r){if("e"!==a&&"E"!==a)return q("Invalid symbol in number");F+=r}else F&&(s(parseFloat(F)),c(),F=""),u--,N=j.pop()||p;continue;default:return q("Unknown state: "+N)}G>=T&&(n=0,void 0!==i&&i.length>f&&(q("Max buffer length exceeded: textNode"),n=Math.max(n,i.length)),F.length>f&&(q("Max buffer length exceeded: numberNode"),n=Math.max(n,F.length)),T=f-n+G)}})),e(n.n).on((function(){if(N===h)return s({}),c(),void(P=!0);N===p&&0===Q||q("Unexpected end"),void 0!==i&&(s(i),c(),i=void 0),P=!0}))}},function(e,t,r){r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return u}));var n=r(19),a=r(3),i=r(2),o=r(20),s=r(0);function c(){return new XMLHttpRequest}function u(e,t,r,c,u,f,d){var l=e(a.m).emit,h=e(a.b).emit,p=0,b=!0;function m(){if("2"===String(t.status)[0]){var e=t.responseText,r=(" "+e.substr(p)).substr(1);r&&l(r),p=Object(i.e)(e)}}function g(t){try{b&&e(a.c).emit(t.status,Object(o.a)(t.getAllResponseHeaders())),b=!1}catch(e){}}e(a.a).on((function(){t.onreadystatechange=null,t.abort()})),"onprogress"in t&&(t.onprogress=m),t.onreadystatechange=function(){switch(t.readyState){case 2:case 3:return g(t);case 4:g(t),"2"===String(t.status)[0]?(m(),e(a.n).emit()):h(Object(a.o)(t.status,t.responseText))}};try{for(var v in t.open(r,c,!0),f)t.setRequestHeader(v,f[v]);Object(n.a)(window.location,Object(n.b)(c))||t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.withCredentials=d,t.send(u)}catch(e){window.setTimeout(Object(s.j)(h,Object(a.o)(void 0,void 0,e)),0)}}},function(e,t,r){function n(e,t){function r(t){return String(t.port||{"http:":80,"https:":443}[t.protocol||e.protocol])}return!!(t.protocol&&t.protocol!==e.protocol||t.host&&t.host!==e.host||t.host&&r(t)!==r(e))}function a(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e)||[];return{protocol:t[1]||"",host:t[2]||"",port:t[3]||""}}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a}))},function(e,t,r){function n(e){var t={};return e&&e.split("\r\n").forEach((function(e){var r=e.indexOf(": ");t[e.substring(0,r)]=e.substring(r+2)})),t}r.d(t,"a",(function(){return n}))}]).default},"object"===(0,s.default)(t)&&"object"===(0,s.default)(e)?e.exports=o():(a=[],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},1823:function(e,t,r){"use strict";var n=r(8357);t.certificate=r(1320);var a=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=a;var i=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=i;var o=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=o;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),c=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=c;var u=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=u;var f=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=f,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var d=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=d;var l=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1320:function(e,t,r){"use strict";var n=r(8357),a=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),i=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),o=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())})),c=n.define("RelativeDistinguishedName",(function(){this.setof(i)})),u=n.define("RDNSequence",(function(){this.seqof(c)})),f=n.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),d=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(a),this.key("notAfter").use(a))})),l=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(f),this.key("validity").use(d),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())}));e.exports=p},4988:function(e,t,r){"use strict";var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,o=r(7085),s=r(8073),c=r(8850).Buffer;e.exports=function(e,t){var r,u=e.toString(),f=u.match(n);if(f){var d="aes"+f[1],l=c.from(f[2],"hex"),h=c.from(f[3].replace(/[\r\n]/g,""),"base64"),p=o(t,l.slice(0,8),parseInt(f[1],10)).key,b=[],m=s.createDecipheriv(d,p,l);b.push(m.update(h)),b.push(m.final()),r=c.concat(b)}else{var g=u.match(i);r=c.from(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(a)[1],data:r}}},7552:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(1823),i=r(2562),o=r(4988),s=r(8073),c=r(4192),u=r(8850).Buffer;function f(e){var t;"object"!==(0,n.default)(e)||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var r,f,d=o(e,t),l=d.tag,h=d.data;switch(l){case"CERTIFICATE":f=a.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=a.PublicKey.decode(h,"der")),r=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=a.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":h=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=i[e.algorithm.decrypt.cipher.algo.join(".")],o=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,d=parseInt(a.split("-")[1],10)/8,l=c.pbkdf2Sync(t,r,n,d,"sha1"),h=s.createDecipheriv(a,l,o),p=[];return p.push(h.update(f)),p.push(h.final()),u.concat(p)}(h=a.EncryptedPrivateKey.decode(h,"der"),t);case"PRIVATE KEY":switch(r=(f=a.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:a.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=a.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return a.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return a.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:a.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=a.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+l)}}e.exports=f,f.signature=a.signature},8209:function(e){"use strict";var t=function(e){return e.replace(/^\s+|\s+$/g,"")};e.exports=function(e){if(!e)return{};for(var r,n={},a=t(e).split("\n"),i=0;i=6?"utf-8":"binary":"utf-8",e.exports=n},3127:function(e){"use strict";var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!=r)throw new TypeError("Bad key length")}},1658:function(e,t,r){"use strict";var n=r(5349),a=r(6707),i=r(1708),o=r(8850).Buffer,s=r(3127),c=r(7401),u=r(8398),f=o.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,t,r){var s=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new a).update(e).digest()}:"md5"===e?n:function(t){return i(e).update(t).digest()}}(e),c="sha512"===e||"sha384"===e?128:64;t.length>c?t=s(t):t.length1)for(var r=1;rp||new o(t).cmp(h.modulus)>=0)throw new Error("decryption error");l=r?u(new o(t),h):s(t,h);var b=f.alloc(p-l.length);if(l=f.concat([b,l],p),4===d)return function(e,t){var r=e.modulus.byteLength(),n=c("sha1").update(f.alloc(0)).digest(),o=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,o+1),u=t.slice(o+1),d=i(s,a(u,o)),l=i(u,a(d,r-o-1));if(function(e,t){e=f.from(e),t=f.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var a=-1;++a=t.length){i++;break}var o=t.slice(2,a-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&i++,o.length<8&&i++,i)throw new Error("decryption error");return t.slice(a)}(0,l,r);if(3===d)return l;throw new Error("unknown padding")}},2466:function(e,t,r){"use strict";var n=r(7552),a=r(5010),i=r(5866),o=r(6873),s=r(817),c=r(1734),u=r(2561),f=r(9782),d=r(8850).Buffer;e.exports=function(e,t,r){var l;l=e.padding?e.padding:r?1:4;var h,p=n(e);if(4===l)h=function(e,t){var r=e.modulus.byteLength(),n=t.length,u=i("sha1").update(d.alloc(0)).digest(),f=u.length,l=2*f;if(n>r-l-2)throw new Error("message too long");var h=d.alloc(r-n-l-2),p=r-f-1,b=a(f),m=s(d.concat([u,h,d.alloc(1,1),t],p),o(b,p)),g=s(b,o(m,f));return new c(d.concat([d.alloc(1),g,m],r))}(p,t);else if(1===l)h=function(e,t,r){var n,i=t.length,o=e.modulus.byteLength();if(i>o-11)throw new Error("message too long");return n=r?d.alloc(o-i-3,255):function(e){for(var t,r=d.allocUnsafe(e),n=0,i=a(2*e),o=0;n=0)throw new Error("data too long for modulus")}return r?f(h,p):u(h,p)}},2561:function(e,t,r){"use strict";var n=r(1734),a=r(8850).Buffer;e.exports=function(e,t){return a.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},817:function(e){"use strict";e.exports=function(e,t){for(var r=e.length,n=-1;++n4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(e);if(e>0)if(e>a)for(var s=0;sf||e<0)throw new TypeError("offset must be a uint32");if(e>c||e>t)throw new RangeError("offset out of range")}function l(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>c)throw new RangeError("buffer too small")}function h(e,t,r,a){if(n.browser){var i=e.buffer,s=new Uint8Array(i,t,r);return u.getRandomValues(s),a?void n.nextTick((function(){a(null,e)})):e}if(!a)return o(r).copy(e,t),e;o(r,(function(r,n){if(r)return a(r);n.copy(e,t),a(null,e)}))}u&&u.getRandomValues||!n.browser?(t.randomFill=function(e,t,n,a){if(!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)a=t,t=0,n=e.length;else if("function"==typeof n)a=n,n=e.length-t;else if("function"!=typeof a)throw new TypeError('"cb" argument must be a function');return d(t,e.length),l(n,t,e.length),h(e,t,n,a)},t.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return d(t,e.length),void 0===n&&(n=e.length-t),l(n,t,e.length),h(e,t,n)}):(t.randomFill=a,t.randomFillSync=a)},9024:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a={};function i(e,t,r){r||(r=Error);var n=function(e){var r,n;function a(r,n,a){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,a))||this}return n=e,(r=a).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,a}(r);n.prototype.name=r.name,n.prototype.code=e,a[e]=n}function o(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var a,i,s,c,u;if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(a="must not be",t=t.replace(/^not /,"")):a="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(a," ").concat(o(t,"type"));else{var f=("number"!=typeof u&&(u=0),u+1>(c=e).length||-1===c.indexOf(".",u)?"argument":"property");s='The "'.concat(e,'" ').concat(f," ").concat(a," ").concat(o(t,"type"))}return s+". Received type ".concat((0,n.default)(r))}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=a},6884:function(e,t,r){"use strict";var n=r(9142),a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var i=r(6297),o=r(1471);r(1736)(f,i);for(var s=a(o.prototype),c=0;c0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n)s.endEmitted?x(e,new w):B(e,s,t,!0);else if(s.ended)x(e,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?B(e,s,t,!1):D(e,s)):B(e,s,t,!1)}else n||(s.reading=!1,D(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,a.nextTick(M,e))}function M(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function D(e,t){t.readingMore||(t.readingMore=!0,a.nextTick(T,e,t))}function T(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){i("readable nexttick read 0"),e.read(0)}function P(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function L(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,a.nextTick(U,t,e))}function U(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function Q(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):O(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&L(this),null;var n,a=t.needReadable;return i("need readable",a),(0===t.length||t.length-e0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},C.prototype._read=function(e){x(this,new A("_read()"))},C.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===a.stdout||e===a.stderr?b:c;function c(){i("onend"),e.end()}n.endEmitted?a.nextTick(s):r.once("end",s),e.on("unpipe",(function t(a,o){i("onunpipe"),a===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,i("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",l),e.removeListener("unpipe",t),r.removeListener("end",c),r.removeListener("end",b),r.removeListener("data",d),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}));var u=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,N(e))}}(r);e.on("drain",u);var f=!1;function d(t){i("ondata");var a=e.write(t);i("dest.write",a),!1===a&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==Q(n.pipes,e))&&!f&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function l(t){i("onerror",t),b(),e.removeListener("error",l),0===o(e,"error")&&x(e,t)}function h(){e.removeListener("finish",p),b()}function p(){i("onfinish"),e.removeListener("close",h),b()}function b(){i("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",l),e.once("close",h),e.once("finish",p),e.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),e},C.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?O(this):n.reading||a.nextTick(R,this))),r},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&a.nextTick(F,this),r},C.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||a.nextTick(F,this),t},C.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,a.nextTick(P,e,t))}(this,e)),e.paused=!1,this},C.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var a in e.on("end",(function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(a){i("wrapped data"),r.decoder&&(a=r.decoder.write(a)),r.objectMode&&null==a||(r.objectMode||a&&a.length)&&(t.push(a)||(n=!0,e.pause()))})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(e,t,r){r(new b("_write()"))},C.prototype._writev=null,C.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?a.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),C.prototype.destroy=d.destroy,C.prototype._undestroy=d.undestroy,C.prototype._destroy=function(e,t){t(e)}},2317:function(e,t,r){"use strict";var n,a=r(9142);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(5831),s=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),d=Symbol("lastPromise"),l=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function b(e){var t=e[s];if(null!==t){var r=e[h].read();null!==r&&(e[d]=null,e[s]=null,e[c]=null,t(p(r,!1)))}}function m(e){a.nextTick(b,e)}var g=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){a.nextTick((function(){e[u]?r(e[u]):t(p(void 0,!0))}))}));var r,n=this[d];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[f]?r(p(void 0,!0)):t[l](r,n)}),n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(p(i,!1));r=new Promise(this[l])}return this[d]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),g);e.exports=function(e){var t,r=Object.create(v,(i(t={},h,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,f,{value:e._readableState.endEmitted,writable:!0}),i(t,l,{value:function(e,t){var n=r[h].read();n?(r[d]=null,r[s]=null,r[c]=null,e(p(n,!1))):(r[s]=e,r[c]=t)},writable:!0}),t));return r[d]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];return null!==t&&(r[d]=null,r[s]=null,r[c]=null,t(e)),void(r[u]=e)}var n=r[s];null!==n&&(r[d]=null,r[s]=null,r[c]=null,n(p(void 0,!0))),r[f]=!0})),e.on("readable",m.bind(null,r)),r}},5392:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){for(var r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,r,n,a=o.allocUnsafe(e>>>0),i=this.head,s=0;i;)t=i.data,r=a,n=s,o.prototype.copy.call(t,r,n),s+=i.data.length,i=i.next;return a}},{key:"consume",value:function(e,t){var r;return ea.length?a.length:e;if(i===a.length?n+=a:n+=a.slice(0,e),0==(e-=i)){i===a.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=a.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var a=r.data,i=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,i),0==(e-=i)){i===a.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=a.slice(i));break}++n}return this.length-=n,t}},{key:c,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&o.forEach(u),i||(o.forEach(u),a(n))}))}));return t.reduce(f)}},6756:function(e,t,r){"use strict";var n=r(9024).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,a){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(a?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},7144:function(e,t,r){"use strict";e.exports=r(8291).EventEmitter},6505:function(e,t,r){"use strict";(t=e.exports=r(6297)).Stream=t,t.Readable=t,t.Writable=r(1471),t.Duplex=r(6884),t.Transform=r(9154),t.PassThrough=r(3582),t.finished=r(5831),t.pipeline=r(384)},6707:function(e,t,r){"use strict";var n=r(9033).Buffer,a=r(1736),i=r(2353),o=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function h(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function b(e,t,r,n,a,i,o,s){return p(e+(t^r^n)+i+o|0,s)+a|0}function m(e,t,r,n,a,i,o,s){return p(e+(t&r|~t&n)+i+o|0,s)+a|0}function g(e,t,r,n,a,i,o,s){return p(e+((t|~r)^n)+i+o|0,s)+a|0}function v(e,t,r,n,a,i,o,s){return p(e+(t&n|r&~n)+i+o|0,s)+a|0}function y(e,t,r,n,a,i,o,s){return p(e+(t^(r|~n))+i+o|0,s)+a|0}a(h,i),h.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,a=0|this._c,i=0|this._d,h=0|this._e,A=0|this._a,w=0|this._b,x=0|this._c,E=0|this._d,_=0|this._e,C=0;C<80;C+=1){var k,B;C<16?(k=b(r,n,a,i,h,e[s[C]],d[0],u[C]),B=y(A,w,x,E,_,e[c[C]],l[0],f[C])):C<32?(k=m(r,n,a,i,h,e[s[C]],d[1],u[C]),B=v(A,w,x,E,_,e[c[C]],l[1],f[C])):C<48?(k=g(r,n,a,i,h,e[s[C]],d[2],u[C]),B=g(A,w,x,E,_,e[c[C]],l[2],f[C])):C<64?(k=v(r,n,a,i,h,e[s[C]],d[3],u[C]),B=m(A,w,x,E,_,e[c[C]],l[3],f[C])):(k=y(r,n,a,i,h,e[s[C]],d[4],u[C]),B=b(A,w,x,E,_,e[c[C]],l[4],f[C])),r=h,h=i,i=p(a,10),a=n,n=k,A=_,_=E,E=p(x,10),x=w,w=B}var I=this._b+a+E|0;this._b=this._c+i+_|0,this._c=this._d+h+A|0,this._d=this._e+r+w|0,this._e=this._a+n+x|0,this._a=I},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},6905:function(e,t,r){"use strict";var n=r(9033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.getLength=t.decode=t.encode=void 0;var a,i=(a=r(1734))&&a.__esModule?a:{default:a};function o(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function s(e,t){if(e<56)return n.from([e+t]);var r=f(e),a=f(t+55+r.length/2);return n.from(a+r,"hex")}function c(e){var t,r,a,i,s,u=[],f=e[0];if(f<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(f<=183){if(t=f-127,a=128===f?n.from([]):e.slice(1,t),2===t&&a[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:a,remainder:e.slice(t)}}if(f<=191){if(r=f-182,e.length-1e.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(i=e.slice(r,d)).length)throw new Error("invalid rlp, List has a invalid length");for(;i.length;)s=c(i),u.push(s.data),i=s.remainder;return{data:u,remainder:e.slice(d)}}function u(e){return"0x"===e.slice(0,2)}function f(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function d(e){if(!n.isBuffer(e)){if("string"==typeof e)return u(e)?n.from((r="string"!=typeof(a=e)?a:u(a)?a.slice(2):a).length%2?"0"+r:r,"hex"):n.from(e);if("number"==typeof e||"bigint"==typeof e)return e?(t=f(e),n.from(t,"hex")):n.from([]);if(null==e)return n.from([]);if(e instanceof Uint8Array)return n.from(e);if(i.default.isBN(e))return n.from(e.toArray());throw new Error("invalid type")}var t,r,a;return e}t.encode=function e(t){if(Array.isArray(t)){for(var r=[],a=0;a=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=s(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!c.kStringMaxLength)try{c.kStringMaxLength=a.binding("buffer").kStringMaxLength}catch(e){}c.constants||(c.constants={MAX_LENGTH:c.kMaxLength},c.kStringMaxLength&&(c.constants.MAX_STRING_LENGTH=c.kStringMaxLength)),e.exports=c},7799:function(e){"use strict";!function(r){var n=2147483647;function a(e){var t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),r=1779033703,n=3144134277,a=1013904242,i=2773480762,o=1359893119,s=2600822924,c=528734635,u=1541459225,f=new Uint32Array(64);function d(e){for(var d=0,l=e.length;l>=64;){var h=r,p=n,b=a,m=i,g=o,v=s,y=c,A=u,w=void 0,x=void 0,E=void 0,_=void 0,C=void 0;for(x=0;x<16;x++)E=d+4*x,f[x]=(255&e[E])<<24|(255&e[E+1])<<16|(255&e[E+2])<<8|255&e[E+3];for(x=16;x<64;x++)_=((w=f[x-2])>>>17|w<<15)^(w>>>19|w<<13)^w>>>10,C=((w=f[x-15])>>>7|w<<25)^(w>>>18|w<<14)^w>>>3,f[x]=(_+f[x-7]|0)+(C+f[x-16]|0)|0;for(x=0;x<64;x++)_=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&v^~g&y)|0)+(A+(t[x]+f[x]|0)|0)|0,C=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&p^h&b^p&b)|0,A=y,y=v,v=g,g=m+_|0,m=b,b=p,p=h,h=_+C|0;r=r+h|0,n=n+p|0,a=a+b|0,i=i+m|0,o=o+g|0,s=s+v|0,c=c+y|0,u=u+A|0,d+=64,l-=64}}d(e);var l,h=e.length%64,p=e.length/536870912|0,b=e.length<<3,m=h<56?56:120,g=e.slice(e.length-h,e.length);for(g.push(128),l=h+1;l>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(b>>>24&255),g.push(b>>>16&255),g.push(b>>>8&255),g.push(b>>>0&255),d(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255]}function i(e,t,r){e=e.length<=64?e:a(e);var n,i=64+t.length+4,o=new Array(i),s=new Array(64),c=[];for(n=0;n<64;n++)o[n]=54;for(n=0;n=i-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;r>=32;)u(),c=c.concat(a(s.concat(a(o)))),r-=32;return r>0&&(u(),c=c.concat(a(s.concat(a(o))).slice(0,r))),c}function o(e,t,r,n,a){var i;for(f(e,16*(2*r-1),a,0,16),i=0;i<2*r;i++)u(e,16*i,a,16),c(a,n),f(a,0,e,t+16*i,16);for(i=0;i>>32-t}function c(e,t){f(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=s(t[0]+t[12],7),t[8]^=s(t[4]+t[0],9),t[12]^=s(t[8]+t[4],13),t[0]^=s(t[12]+t[8],18),t[9]^=s(t[5]+t[1],7),t[13]^=s(t[9]+t[5],9),t[1]^=s(t[13]+t[9],13),t[5]^=s(t[1]+t[13],18),t[14]^=s(t[10]+t[6],7),t[2]^=s(t[14]+t[10],9),t[6]^=s(t[2]+t[14],13),t[10]^=s(t[6]+t[2],18),t[3]^=s(t[15]+t[11],7),t[7]^=s(t[3]+t[15],9),t[11]^=s(t[7]+t[3],13),t[15]^=s(t[11]+t[7],18),t[1]^=s(t[0]+t[3],7),t[2]^=s(t[1]+t[0],9),t[3]^=s(t[2]+t[1],13),t[0]^=s(t[3]+t[2],18),t[6]^=s(t[5]+t[4],7),t[7]^=s(t[6]+t[5],9),t[4]^=s(t[7]+t[6],13),t[5]^=s(t[4]+t[7],18),t[11]^=s(t[10]+t[9],7),t[8]^=s(t[11]+t[10],9),t[9]^=s(t[8]+t[11],13),t[10]^=s(t[9]+t[8],18),t[12]^=s(t[15]+t[14],7),t[13]^=s(t[12]+t[15],9),t[14]^=s(t[13]+t[12],13),t[15]^=s(t[14]+t[13],18);for(var n=0;n<16;++n)e[n]+=t[n]}function u(e,t,r,n){for(var a=0;a=256)return!1}return!0}function l(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function h(e,r,a,s,c,h,p){if(a=l(a,"N"),s=l(s,"r"),c=l(c,"p"),h=l(h,"dkLen"),0===a||0!=(a&a-1))throw new Error("N must be power of 2");if(a>n/128/s)throw new Error("N too large");if(s>n/128/c)throw new Error("r too large");if(!d(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!d(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var b=i(e,r,128*c*s),m=new Uint32Array(32*c*s),g=0;gD&&(r=D);for(var n=0;nD&&(r=D);for(var l=0;l>0&255),b.push(m[F]>>8&255),b.push(m[F]>>16&255),b.push(m[F]>>24&255);var R=i(e,b,h);return p&&p(null,1,R),R}p&&T(t)};if(!p)for(;;){var R=F();if(null!=R)return R}F()}var p={scrypt:function(e,t,r,n,a,i,o){return new Promise((function(s,c){var u=0;o&&o(0),h(e,t,r,n,a,i,(function(e,t,r){if(e)c(e);else if(r)o&&1!==u&&o(1),s(new Uint8Array(r));else if(o&&t!==u)return u=t,o(t)}))}))},syncScrypt:function(e,t,r,n,a,i){return new Uint8Array(h(e,t,r,n,a,i))}};e.exports=p}()},7902:function(e,t,r){"use strict";e.exports=r(6922)(r(8123))},8123:function(e,t,r){"use strict";var n=new(0,r(6597).ec)("secp256k1"),a=n.curve,i=a.n.constructor;function o(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new i(t);if(r.cmp(a.p)>=0)return null;var o=(r=r.toRed(a.red)).redSqr().redIMul(r).redIAdd(a.b).redSqrt();return 3===e!==o.isOdd()&&(o=o.redNeg()),n.keyPair({pub:{x:r,y:o}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var o=new i(t),s=new i(r);if(o.cmp(a.p)>=0||s.cmp(a.p)>=0)return null;if(o=o.toRed(a.red),s=s.toRed(a.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;var c=o.redSqr().redIMul(o);return s.redSqr().redISub(c.redIAdd(a.b)).isZero()?n.keyPair({pub:{x:o,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var r=t.encode(null,33===e.length),n=0;n=0)return 1;if(r.iadd(new i(e)),r.cmp(a.n)>=0&&r.isub(a.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul:function(e,t){var r=new i(t);if(r.cmp(a.n)>=0||r.isZero())return 1;r.imul(new i(e)),r.cmp(a.n)>=0&&(r=r.umod(a.n));var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:function(e){return null===o(e)?1:0},publicKeyCreate:function(e,t){var r=new i(t);return r.cmp(a.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var r=o(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate:function(e,t){var r=o(t);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine:function(e,t){for(var r=new Array(t.length),n=0;n=0)return 2;var c=n.getPublic().add(a.g.mul(r));return c.isInfinity()?2:(s(e,c),0)},publicKeyTweakMul:function(e,t,r){var n=o(t);return null===n?1:(r=new i(r)).cmp(a.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize:function(e){var t=new i(e.subarray(0,32)),r=new i(e.subarray(32,64));return t.cmp(a.n)>=0||r.cmp(a.n)>=0?1:(1===r.cmp(n.nh)&&e.set(a.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var r=t.subarray(0,32),n=t.subarray(32,64);if(new i(r).cmp(a.n)>=0)return 1;if(new i(n).cmp(a.n)>=0)return 1;var o=e.output,s=o.subarray(4,37);s[0]=0,s.set(r,1);for(var c=33,u=0;c>1&&0===s[u]&&!(128&s[u+1]);--c,++u);if(128&(s=s.subarray(u))[0])return 1;if(c>1&&0===s[0]&&!(128&s[1]))return 1;var f=o.subarray(39,72);f[0]=0,f.set(n,1);for(var d=33,l=0;d>1&&0===f[l]&&!(128&f[l+1]);--d,++l);return 128&(f=f.subarray(l))[0]||d>1&&0===f[0]&&!(128&f[1])?1:(e.outputlen=6+c+d,o[0]=48,o[1]=e.outputlen-2,o[2]=2,o[3]=s.length,o.set(s,4),o[4+c]=2,o[5+c]=f.length,o.set(f,6+c),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;var n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;var o=t.subarray(4,4+r);if(33===o.length&&0===o[0]&&(o=o.subarray(1)),o.length>32)return 1;var s=t.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var c=new i(o);c.cmp(a.n)>=0&&(c=new i(0));var u=new i(t.subarray(6+r));return u.cmp(a.n)>=0&&(u=new i(0)),e.set(c.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,r,o,s){if(s){var c=s;s=function(e){var n=c(t,r,null,o,e);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new i(n)}}var u,f=new i(r);if(f.cmp(a.n)>=0||f.isZero())return 1;try{u=n.sign(t,r,{canonical:!0,k:s,pers:o})}catch(e){return 1}return e.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),e.recid=u.recoveryParam,0},ecdsaVerify:function(e,t,r){var s={r:e.subarray(0,32),s:e.subarray(32,64)},c=new i(s.r),u=new i(s.s);if(c.cmp(a.n)>=0||u.cmp(a.n)>=0)return 1;if(1===u.cmp(n.nh)||c.isZero()||u.isZero())return 3;var f=o(r);if(null===f)return 2;var d=f.getPublic();return n.verify(t,s,d)?0:3},ecdsaRecover:function(e,t,r,o){var c,u={r:t.slice(0,32),s:t.slice(32,64)},f=new i(u.r),d=new i(u.s);if(f.cmp(a.n)>=0||d.cmp(a.n)>=0)return 1;if(f.isZero()||d.isZero())return 2;try{c=n.recoverPubKey(o,u,r)}catch(e){return 2}return s(e,c),0},ecdh:function(e,t,r,s,c,u,f){var d=o(t);if(null===d)return 1;var l=new i(r);if(l.cmp(a.n)>=0||l.isZero())return 2;var h=d.getPublic().mul(l);if(void 0===c)for(var p=h.encode(null,!0),b=n.hash().update(p).digest(),m=0;m<32;++m)e[m]=b[m];else{u||(u=new Uint8Array(32));for(var g=h.getX().toArray("be",32),v=0;v<32;++v)u[v]=g[v];f||(f=new Uint8Array(32));for(var y=h.getY().toArray("be",32),A=0;A<32;++A)f[A]=y[A];var w=c(u,f,s);if(!(w instanceof Uint8Array&&w.length===e.length))return 2;e.set(w)}return 0}}},6922:function(e){"use strict";function t(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw o}}}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"==typeof e&&(e=e(t)),b("output",e,t),e}function v(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){if(p(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&b("seed",t,32),1===e.contextRandomize(t))throw new Error("Unknow error on context randomization")},privateKeyVerify:function(t){return b("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(b("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(n)}},privateKeyTweakAdd:function(t,r){switch(b("private key",t,32),b("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(a)}},privateKeyTweakMul:function(t,r){switch(b("private key",t,32),b("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(i)}},publicKeyVerify:function(t){return b("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(b("private key",t,32),m(r),n=g(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error(o);case 2:throw new Error(c)}},publicKeyConvert:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(b("public key",t,[33,65]),m(r),n=g(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(c)}},publicKeyNegate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2?arguments[2]:void 0;switch(b("public key",t,[33,65]),m(r),a=g(a,r?33:65),e.publicKeyNegate(a,t)){case 0:return a;case 1:throw new Error(s);case 2:throw new Error(n);case 3:throw new Error(c)}},publicKeyCombine:function(r){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2?arguments[2]:void 0;p(Array.isArray(r),"Expected public keys to be an Array"),p(r.length>0,"Expected public keys array will have more than zero items");var i,o=t(r);try{for(o.s();!(i=o.n()).done;)b("public key",i.value,[33,65])}catch(e){o.e(e)}finally{o.f()}switch(m(n),a=g(a,n?33:65),e.publicKeyCombine(a,r)){case 0:return a;case 1:throw new Error(s);case 2:throw new Error(u);case 3:throw new Error(c)}},publicKeyTweakAdd:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(b("public key",t,[33,65]),b("tweak",r,32),m(n),i=g(i,n?33:65),e.publicKeyTweakAdd(i,t,r)){case 0:return i;case 1:throw new Error(s);case 2:throw new Error(a)}},publicKeyTweakMul:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0;switch(b("public key",t,[33,65]),b("tweak",r,32),m(n),a=g(a,n?33:65),e.publicKeyTweakMul(a,t,r)){case 0:return a;case 1:throw new Error(s);case 2:throw new Error(i)}},signatureNormalize:function(t){switch(b("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(f)}},signatureExport:function(t,r){b("signature",t,64);var a={output:r=g(r,72),outputlen:72};switch(e.signatureExport(a,t)){case 0:return r.slice(0,a.outputlen);case 1:throw new Error(f);case 2:throw new Error(n)}},signatureImport:function(t,r){switch(b("signature",t),r=g(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(f);case 2:throw new Error(n)}},ecdsaSign:function(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;b("message",t,32),b("private key",r,32),p("Object"===v(a),"Expected options to be an Object"),void 0!==a.data&&b("options.data",a.data),void 0!==a.noncefn&&p("Function"===v(a.noncefn),"Expected options.noncefn to be a Function");var o={signature:i=g(i,64),recid:null};switch(e.ecdsaSign(o,t,r,a.data,a.noncefn)){case 0:return o;case 1:throw new Error(d);case 2:throw new Error(n)}},ecdsaVerify:function(t,r,n){switch(b("signature",t,64),b("message",r,32),b("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(f);case 2:throw new Error(s)}},ecdsaRecover:function(t,r,a){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4?arguments[4]:void 0;switch(b("signature",t,64),p("Number"===v(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),b("message",a,32),m(i),o=g(o,i?33:65),e.ecdsaRecover(o,t,r,a)){case 0:return o;case 1:throw new Error(f);case 2:throw new Error(l);case 3:throw new Error(n)}},ecdh:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;switch(b("public key",t,[33,65]),b("private key",r,32),p("Object"===v(n),"Expected options to be an Object"),void 0!==n.data&&b("options.data",n.data),void 0!==n.hashfn?(p("Function"===v(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&b("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&b("options.ybuf",n.ybuf,32),b("output",a)):a=g(a,32),e.ecdh(a,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return a;case 1:throw new Error(s);case 2:throw new Error(h)}}}}},6003:function(e,t,r){"use strict";var n=r(8850).Buffer;function a(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}a.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,a=this._blockSize,i=e.length,o=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,a=(r-n)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},a.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=a},1708:function(e,t,r){"use strict";var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(8210),n.sha1=r(544),n.sha224=r(6288),n.sha256=r(4571),n.sha384=r(6959),n.sha512=r(4515)},8210:function(e,t,r){"use strict";var n=r(1736),a=r(6003),i=r(8850).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,a.call(this,64,56)}function u(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,a),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,a=0|this._b,i=0|this._c,s=0|this._d,c=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=r[d-3]^r[d-8]^r[d-14]^r[d-16];for(var l=0;l<80;++l){var h=~~(l/20),p=0|((t=n)<<5|t>>>27)+f(h,a,i,s)+c+r[l]+o[h];c=s,s=i,i=u(a),a=n,n=p}this._a=n+this._a|0,this._b=a+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},544:function(e,t,r){"use strict";var n=r(1736),a=r(6003),i=r(8850).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,a.call(this,64,56)}function u(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function d(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,a),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,a=0|this._b,i=0|this._c,s=0|this._d,c=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=(t=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),b=u(n)+d(p,a,i,s)+c+r[h]+o[p]|0;c=s,s=i,i=f(a),a=n,n=b}this._a=n+this._a|0,this._b=a+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},6288:function(e,t,r){"use strict";var n=r(1736),a=r(4571),i=r(6003),o=r(8850).Buffer,s=new Array(64);function c(){this.init(),this._w=s,i.call(this,64,56)}n(c,a),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c},4571:function(e,t,r){"use strict";var n=r(1736),a=r(6003),i=r(8850).Buffer,o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function c(){this.init(),this._w=s,a.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(c,a),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,a=0|this._b,i=0|this._c,s=0|this._d,c=0|this._e,p=0|this._f,b=0|this._g,m=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+h(r[g-15])+r[g-16];for(var v=0;v<64;++v){var y=m+l(c)+u(c,p,b)+o[v]+r[v]|0,A=d(n)+f(n,a,i)|0;m=b,b=p,p=c,c=s+y|0,s=i,i=a,a=n,n=y+A|0}this._a=n+this._a|0,this._b=a+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=m+this._h|0},c.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},6959:function(e,t,r){"use strict";var n=r(1736),a=r(4515),i=r(6003),o=r(8850).Buffer,s=new Array(160);function c(){this.init(),this._w=s,i.call(this,128,112)}n(c,a),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},4515:function(e,t,r){"use strict";var n=r(1736),a=r(6003),i=r(8850).Buffer,o=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function c(){this.init(),this._w=s,a.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0>>0?1:0}n(c,a),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,a=0|this._ch,i=0|this._dh,s=0|this._eh,c=0|this._fh,v=0|this._gh,y=0|this._hh,A=0|this._al,w=0|this._bl,x=0|this._cl,E=0|this._dl,_=0|this._el,C=0|this._fl,k=0|this._gl,B=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var S=t[I-30],O=t[I-30+1],M=h(S,O),D=p(O,S),T=b(S=t[I-4],O=t[I-4+1]),F=m(O,S),R=t[I-14],P=t[I-14+1],N=t[I-32],j=t[I-32+1],L=D+P|0,U=M+R+g(L,D)|0;U=(U=U+T+g(L=L+F|0,F)|0)+N+g(L=L+j|0,j)|0,t[I]=U,t[I+1]=L}for(var Q=0;Q<160;Q+=2){U=t[Q],L=t[Q+1];var G=f(r,n,a),H=f(A,w,x),z=d(r,A),q=d(A,r),K=l(s,_),V=l(_,s),W=o[Q],Y=o[Q+1],J=u(s,c,v),X=u(_,C,k),Z=B+V|0,$=y+K+g(Z,B)|0;$=($=($=$+J+g(Z=Z+X|0,X)|0)+W+g(Z=Z+Y|0,Y)|0)+U+g(Z=Z+L|0,L)|0;var ee=q+H|0,te=z+G+g(ee,q)|0;y=v,B=k,v=c,k=C,c=s,C=_,s=i+$+g(_=E+Z|0,E)|0,i=a,E=x,a=n,x=w,n=r,w=A,r=$+te+g(A=Z+ee|0,Z)|0}this._al=this._al+A|0,this._bl=this._bl+w|0,this._cl=this._cl+x|0,this._dl=this._dl+E|0,this._el=this._el+_|0,this._fl=this._fl+C|0,this._gl=this._gl+k|0,this._hl=this._hl+B|0,this._ah=this._ah+r+g(this._al,A)|0,this._bh=this._bh+n+g(this._bl,w)|0,this._ch=this._ch+a+g(this._cl,x)|0,this._dh=this._dh+i+g(this._dl,E)|0,this._eh=this._eh+s+g(this._el,_)|0,this._fh=this._fh+c+g(this._fl,C)|0,this._gh=this._gh+v+g(this._gl,k)|0,this._hh=this._hh+y+g(this._hl,B)|0},c.prototype._hash=function(){var e=i.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},7245:function(e,t,r){"use strict";e.exports=a;var n=r(8291).EventEmitter;function a(){n.call(this)}r(1736)(a,n),a.Readable=r(6297),a.Writable=r(1471),a.Duplex=r(6884),a.Transform=r(9154),a.PassThrough=r(3582),a.finished=r(5831),a.pipeline=r(384),a.Stream=a,a.prototype.pipe=function(e,t){var r=this;function a(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",a),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",c));var o=!1;function s(){o||(o=!0,e.end())}function c(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",a),e.removeListener("drain",i),r.removeListener("end",s),r.removeListener("close",c),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",u),e.on("error",u),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},9519:function(e,t,r){"use strict";var n=r(8844),a=r(3319),i=r(7705),o=r(3675),s=r(1143),c=t;c.request=function(e,t){e="string"==typeof e?s.parse(e):i(e);var a=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||a,c=e.hostname||e.host,u=e.port,f=e.path||"/";c&&-1!==c.indexOf(":")&&(c="["+c+"]"),e.url=(c?o+"//"+c:"")+(u?":"+u:"")+f,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new n(e);return t&&d.on("response",t),d},c.get=function(e,t){var r=c.request(e,t);return r.end(),r},c.ClientRequest=n,c.IncomingMessage=a.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=o,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},3928:function(e,t,r){"use strict";var n;function a(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function i(e){var t=a();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function o(e){return"function"==typeof e}t.fetch=o(r.g.fetch)&&o(r.g.ReadableStream),t.writableStream=o(r.g.WritableStream),t.abortController=o(r.g.AbortController),t.arraybuffer=t.fetch||i("arraybuffer"),t.msstream=!t.fetch&&i("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!a()&&o(a().overrideMimeType),n=null},8844:function(e,t,r){"use strict";var n=r(9033).Buffer,a=r(9142),i=r(3928),o=r(1736),s=r(3319),c=r(6505),u=s.IncomingMessage,f=s.readyStates,d=e.exports=function(e){var t,r=this;c.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+n.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var a=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)a=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":"text"}(t,a),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};o(d,c.Writable),d.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===l.indexOf(r)&&(this._headers[r]={name:e,value:t})},d.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},d.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},d.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var n=e._headers,o=null;"GET"!==t.method&&"HEAD"!==t.method&&(o=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach((function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach((function(e){s.push([t,e])})):s.push([t,r])})),"fetch"===e._mode){var c=null;if(i.abortController){var u=new AbortController;c=u.signal,e._fetchAbortController=u,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}r.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:c}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var d=e._xhr=new r.g.XMLHttpRequest;try{d.open(e._opts.method,e._opts.url,!0)}catch(t){return void a.nextTick((function(){e.emit("error",t)}))}"responseType"in d&&(d.responseType=e._mode),"withCredentials"in d&&(d.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(d.timeout=t.requestTimeout,d.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){d.setRequestHeader(e[0],e[1])})),e._response=null,d.onreadystatechange=function(){switch(d.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(d.onprogress=function(){e._onXHRProgress()}),d.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{d.send(o)}catch(t){return void a.nextTick((function(){e.emit("error",t)}))}}}},d.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},d.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},d.prototype._write=function(e,t,r){this._body.push(e),r()},d.prototype._resetTimers=function(e){var t=this;r.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(r.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=r.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},d.prototype.abort=d.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},d.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),c.Writable.prototype.end.call(this,e,t,r)},d.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},d.prototype.flushHeaders=function(){},d.prototype.setNoDelay=function(){},d.prototype.setSocketKeepAlive=function(){};var l=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},3319:function(e,t,r){"use strict";var n=r(9142),a=r(9033).Buffer,i=r(3928),o=r(1736),s=r(6505),c=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=t.IncomingMessage=function(e,t,r,o){var c=this;if(s.Readable.call(c),c._mode=r,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){n.nextTick((function(){c.emit("close")}))})),"fetch"===r){if(c._fetchResponse=t,c.url=t.url,c.statusCode=t.status,c.statusMessage=t.statusText,t.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),i.writableStream){var u=new WritableStream({write:function(e){return o(!1),new Promise((function(t,r){c._destroyed?r():c.push(a.from(e))?t():c._resumeFetch=t}))},close:function(){o(!0),c._destroyed||c.push(null)},abort:function(e){o(!0),c._destroyed||c.emit("error",e)}});try{return void t.body.pipeTo(u).catch((function(e){o(!0),c._destroyed||c.emit("error",e)}))}catch(e){}}var f=t.body.getReader();!function e(){f.read().then((function(t){c._destroyed||(o(t.done),t.done?c.push(null):(c.push(a.from(t.value)),e()))})).catch((function(e){o(!0),c._destroyed||c.emit("error",e)}))}()}else if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(t[2])):void 0!==c.headers[r]?c.headers[r]+=", "+t[2]:c.headers[r]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!i.overrideMimeType){var d=c.rawHeaders["mime-type"];if(d){var l=d.match(/;\s*charset=([^;])(;|$)/);l&&(c._charset=l[1].toLowerCase())}c._charset||(c._charset="utf-8")}};o(u,s.Readable),u.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},u.prototype._onXHRProgress=function(e){var t=this,n=t._xhr,i=null;switch(t._mode){case"text":if((i=n.responseText).length>t._pos){var o=i.substr(t._pos);if("x-user-defined"===t._charset){for(var s=a.alloc(o.length),u=0;ut._pos&&(t.push(a.from(new Uint8Array(f.result.slice(t._pos)))),t._pos=f.result.byteLength)},f.onload=function(){e(!0),t.push(null)},f.readAsArrayBuffer(i)}t._xhr.readyState===c.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},3462:function(e,t,r){"use strict";var n=r(8850).Buffer,a=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===a||!a(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=d,t=3;break;default:return this.write=l,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.s=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(a>0&&(e.lastNeed=a-1),a):--n=0?(a>0&&(e.lastNeed=a-2),a):--n=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},6931:function(e,t,r){"use strict";var n=r(8619);e.exports=function(e){return"string"!=typeof e?e:n(e)?e.slice(2):e}},6427:function(e,t,r){"use strict";var n=function(){throw"This swarm.js function isn't available on the browser."},a={readFile:n},i={download:n,safeDownloadArchived:n,directoryTree:n},o={platform:n,arch:n},s={join:n,slice:n},c={spawn:n},u={lookup:n},f=r(1357),d=r(631),l=r(2733),h=r(2510),p=r(3094);e.exports=p({fs:a,files:i,os:o,path:s,child_process:c,defaultArchives:{},mimetype:u,request:f,downloadUrl:null,bytes:d,hash:l,pick:h})},2510:function(e){"use strict";var t=function(e){return function(){return new Promise((function(t,r){var n,a=function(r){var n={},a=r.target.files.length,i=0;[].map.call(r.target.files,(function(r){var o=new FileReader;o.onload=function(o){var s=new Uint8Array(o.target.result);if("directory"===e){var c=r.webkitRelativePath;n[c.slice(c.indexOf("/")+1)]={type:"text/plain",data:s},++i===a&&t(n)}else if("file"===e){var u=r.webkitRelativePath;t({type:mimetype.lookup(u),data:s})}else t(s)},o.readAsArrayBuffer(r)}))};"directory"===e?((n=document.createElement("input")).addEventListener("change",a),n.type="file",n.webkitdirectory=!0,n.mozdirectory=!0,n.msdirectory=!0,n.odirectory=!0,n.directory=!0):((n=document.createElement("input")).addEventListener("change",a),n.type="file");var i=document.createEvent("MouseEvents");i.initEvent("click",!0,!1),n.dispatchEvent(i)}))}};e.exports={data:t("data"),file:t("file"),directory:t("directory")}},2733:function(e,t,r){"use strict";var n=r(9574).keccak256,a=r(631),i=function(e,t){var r=a.reverse(a.pad(6,a.fromNumber(e))),i=a.flatten([r,"0x0000",t]);return n(i).slice(2)};e.exports=function e(t){"string"==typeof t&&"0x"!==t.slice(0,2)?t=a.fromString(t):"string"!=typeof t&&void 0!==t.length&&(t=a.fromUint8Array(t));var r=a.length(t);if(r<=4096)return i(r,t);for(var n=4096;128*n=400?n(new Error("Error ".concat(a.statusCode,"."))):r(new Uint8Array(t))}))}))}},m=function(e){return function(t){return function t(r){return function(n){return function(a){var i=function(e){return void 0===e.path?Promise.resolve():"application/bzz-manifest+json"===e.contentType?t(e.hash)(n+e.path)(a):Promise.resolve((r=n+e.path,function(e){return function(t){return t[r]=e,t}})(function(e){return{type:e.contentType,hash:e.hash}}(e))(a));var r};return b(e)(r).then((function(e){return JSON.parse(P(e)).entries})).then((function(e){return Promise.all(e.map(i))})).then((function(){return a}))}}}(t)("")({})}},g=function(e){return function(t){return m(e)(t).then((function(e){return h(Object.keys(e))(Object.keys(e).map((function(t){return e[t].hash})))}))}},v=function(e){return function(t){return m(e)(t).then((function(t){var r=Object.keys(t),n=r.map((function(e){return t[e].hash})),a=r.map((function(e){return t[e].type})),i=n.map(b(e));return Promise.all(i).then((function(e){return h(r)(function(e){return e.map((function(e,t){return{type:a[t],data:e}}))}(e))}))}))}},y=function(e){return function(t){return function(n){return r.download(p(e)(t))(n)}}},A=function(e){return function(t){return function(r){return g(e)(t).then((function(t){var n=[];for(var i in t)if(i.length>0){var o=a.join(r,i);n.push(y(e)(t[i])(o))}return Promise.all(n).then((function(){return r}))}))}}},w=function(e){return function(t){return new Promise((function(r,n){var a={body:"string"==typeof t?N(t):t,method:"POST"};c("".concat(e,"/bzz-raw:/"),a,(function(e,t){return e?n(e):r(t)}))}))}},x=function(e){return function(t){return function(r){return function(n){return function a(i){var o="/"===r[0]?r:"/"+r,s="".concat(e,"/bzz:/").concat(t).concat(o),u={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return new Promise((function(e,t){c(s,u,(function(r,n){return r?t(r):-1!==n.indexOf("error")?t(n):e(n)}))})).catch((function(e){return i>0&&a(i-1)}))}(3)}}}},E=function(e){return function(t){return C(e)({"":t})}},_=function(e){return function(r){return t.readFile(r).then((function(t){return E(e)({type:o.lookup(r),data:t})}))}},C=function(e){return function(t){return w(e)("{}").then((function(r){return Object.keys(t).reduce((function(r,n){return r.then(function(r){return function(n){return x(e)(n)(r)(t[r])}}(n))}),Promise.resolve(r))}))}},k=function(e){return function(r){return t.readFile(r).then(w(e))}},B=function(e){return function(n){return function(a){return r.directoryTree(a).then((function(e){return Promise.all(e.map((function(e){return t.readFile(e)}))).then((function(t){var r=e.map((function(e){return e.slice(a.length)})),n=e.map((function(e){return o.lookup(e)||"text/plain"}));return h(r)(t.map((function(e,t){return{type:n[t],data:e}})))}))})).then((function(e){return(t=n?{"":e[n]}:{},function(e){var r={};for(var n in t)r[n]=t[n];for(var a in e)r[a]=e[a];return r})(e);var t})).then(C(e))}}},I=function(e){return function(t){if("data"===t.pick)return l.data().then(w(e));if("file"===t.pick)return l.file().then(E(e));if("directory"===t.pick)return l.directory().then(C(e));if(t.path)switch(t.kind){case"data":return k(e)(t.path);case"file":return _(e)(t.path);case"directory":return B(e)(t.defaultFile)(t.path)}else{if(t.length||"string"==typeof t)return w(e)(t);if(t instanceof Object)return C(e)(t)}return Promise.reject(new Error("Bad arguments"))}},S=function(e){return function(t){return function(r){return F(e)(t).then((function(n){return n?r?A(e)(t)(r):v(e)(t):r?y(e)(t)(r):b(e)(t)}))}}},O=function(e,t){var a=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),i=(t||s)[a],o=u+i.archive+".tar.gz",c=i.archiveMD5,f=i.binaryMD5;return r.safeDownloadArchived(o)(c)(f)(e)},M=function(e){return new Promise((function(t,r){var n=i.spawn,a=function(e){return function(t){return-1!==(""+t).indexOf(e)}},o=e.account,s=e.password,c=e.dataDir,u=e.ensApi,f=e.privateKey,d=0,l=n(e.binPath,["--bzzaccount",o||f,"--datadir",c,"--ens-api",u]),h=function(e){0===d&&a("Passphrase")(e)?setTimeout((function(){d=1,l.stdin.write(s+"\n")}),500):a("Swarm http proxy started")(e)&&(d=2,clearTimeout(p),t(l))};l.stdout.on("data",h),l.stderr.on("data",h);var p=setTimeout((function(){return r(new Error("Couldn't start swarm process."))}),2e4)}))},D=function(e){return new Promise((function(t,r){e.stderr.removeAllListeners("data"),e.stdout.removeAllListeners("data"),e.stdin.removeAllListeners("error"),e.removeAllListeners("error"),e.removeAllListeners("exit"),e.kill("SIGINT");var n=setTimeout((function(){return e.kill("SIGKILL")}),8e3);e.once("close",(function(){clearTimeout(n),t()}))}))},T=function(e){return w(e)("test").then((function(e){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===e})).catch((function(){return!1}))},F=function(e){return function(t){return b(e)(t).then((function(e){try{return!!JSON.parse(P(e)).entries}catch(e){return!1}}))}},R=function(e){return function(t,r,n,a,i){var o;return void 0!==t&&(o=e(t)),void 0!==r&&(o=e(r)),void 0!==n&&(o=e(n)),void 0!==a&&(o=e(a)),void 0!==i&&(o=e(i)),o}},P=function(e){return f.toString(f.fromUint8Array(e))},N=function(e){return f.toUint8Array(f.fromString(e))},j=function(e){return{download:function(t,r){return S(e)(t)(r)},downloadData:R(b(e)),downloadDataToDisk:R(y(e)),downloadDirectory:R(v(e)),downloadDirectoryToDisk:R(A(e)),downloadEntries:R(m(e)),downloadRoutes:R(g(e)),isAvailable:function(){return T(e)},upload:function(t){return I(e)(t)},uploadData:R(w(e)),uploadFile:R(E(e)),uploadFileFromDisk:R(E(e)),uploadDataFromDisk:R(k(e)),uploadDirectory:R(C(e)),uploadDirectoryFromDisk:R(B(e)),uploadToManifest:R(x(e)),pick:l,hash:d,fromString:N,toString:P}};return{at:j,local:function(e){return function(t){return T("http://localhost:8500").then((function(r){return r?t(j("http://localhost:8500")).then((function(){})):O(e.binPath,e.archives).onData((function(t){return(e.onProgress||function(){})(t.length)})).then((function(){return M(e)})).then((function(e){return t(j("http://localhost:8500")).then((function(){return e}))})).then(D)}))}},download:S,downloadBinary:O,downloadData:b,downloadDataToDisk:y,downloadDirectory:v,downloadDirectoryToDisk:A,downloadEntries:m,downloadRoutes:g,isAvailable:T,startProcess:M,stopProcess:D,upload:I,uploadData:w,uploadDataFromDisk:k,uploadFile:E,uploadFileFromDisk:_,uploadDirectory:C,uploadDirectoryFromDisk:B,uploadToManifest:x,pick:l,hash:d,fromString:N,toString:P}}},7380:function(e){"use strict";var t=function(e,t){for(var r=[],n=0;n>6|192);else{if(a>55295&&a<56320){if(++n==e.length)return null;var i=e.charCodeAt(n);if(i<56320||i>57343)return null;r+=t((a=65536+((1023&a)<<10)+(1023&i))>>18|240),r+=t(a>>12&63|128)}else r+=t(a>>12|224);r+=t(a>>6&63|128)}r+=t(63&a|128)}}return r},toString:function(e){for(var t="",r=0,i=a(e);r127){if(o>191&&o<224){if(r>=i)return null;o=(31&o)<<6|63&n(e,r)}else if(o>223&&o<240){if(r+1>=i)return null;o=(15&o)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(o>239&&o<248))return null;if(r+2>=i)return null;o=(7&o)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(o<=65535)t+=String.fromCharCode(o);else{if(!(o<=1114111))return null;o-=65536,t+=String.fromCharCode(o>>10|55296),t+=String.fromCharCode(1023&o|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:o,toArray:i,fromUint8Array:function(e){return o([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(i(e))}}},9574:function(e){"use strict";var t="0123456789abcdef".split(""),r=[1,256,65536,16777216],n=[0,8,16,24],a=[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],i=function(e){var t,r,n,i,o,s,c,u,f,d,l,h,p,b,m,g,v,y,A,w,x,E,_,C,k,B,I,S,O,M,D,T,F,R,P,N,j,L,U,Q,G,H,z,q,K,V,W,Y,J,X,Z,$,ee,te,re,ne,ae,ie,oe,se,ce,ue,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],c=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|c>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(c<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|f>>>31),r=o^(f<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(d<<1|l>>>31),r=c^(l<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=f^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],m=e[1],V=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,S=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,z=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,P=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,D=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,T=e[45]<<29|e[44]>>>3,F=e[44]<<29|e[45]>>>3,C=e[6]<<28|e[7]>>>4,k=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,Q=e[38]<<8|e[39]>>>24,G=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,_=e[49]<<14|e[48]>>>18,e[0]=b^~g&y,e[1]=m^~v&A,e[10]=C^~B&S,e[11]=k^~I&O,e[20]=R^~N&L,e[21]=P^~j&U,e[30]=q^~V&Y,e[31]=K^~W&J,e[40]=te^~ne&ie,e[41]=re^~ae&oe,e[2]=g^~y&w,e[3]=v^~A&x,e[12]=B^~S&M,e[13]=I^~O&D,e[22]=N^~L&Q,e[23]=j^~U&G,e[32]=V^~Y&X,e[33]=W^~J&Z,e[42]=ne^~ie&se,e[43]=ae^~oe&ce,e[4]=y^~w&E,e[5]=A^~x&_,e[14]=S^~M&T,e[15]=O^~D&F,e[24]=L^~Q&H,e[25]=U^~G&z,e[34]=Y^~X&$,e[35]=J^~Z&ee,e[44]=ie^~se&ue,e[45]=oe^~ce&fe,e[6]=w^~E&b,e[7]=x^~_&m,e[16]=M^~T&C,e[17]=D^~F&k,e[26]=Q^~H&R,e[27]=G^~z&P,e[36]=X^~$&q,e[37]=Z^~ee&K,e[46]=se^~ue&te,e[47]=ce^~fe&re,e[8]=E^~b&g,e[9]=_^~m&v,e[18]=T^~C&B,e[19]=F^~k&I,e[28]=H^~R&N,e[29]=z^~P&j,e[38]=$^~q&V,e[39]=ee^~K&W,e[48]=ue^~te&ne,e[49]=fe^~re&ae,e[0]^=a[n],e[1]^=a[n+1]},o=function(e){return function(a){var o;if("0x"===a.slice(0,2)){o=[];for(var s=2,c=a.length;s>2]|=a[h]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(c[m>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=u){for(e.start=m-u,e.block=c[f],m=0;m>2]|=r[3&m],e.lastByteIndex===u)for(c[0]=c[f],m=1;m>4&15]+t[15&p]+t[p>>12&15]+t[p>>8&15]+t[p>>20&15]+t[p>>16&15]+t[p>>28&15]+t[p>>24&15];g%f==0&&(i(l),m=0)}return"0x"+b}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),o)}};e.exports={keccak256:o(256),keccak512:o(512),keccak256s:o(256),keccak512s:o(512)}},8419:function(e){"use strict";e.exports=function(e,t){if(t){t=(t=t.trim().replace(/^(\?|#|&)/,""))?"?"+t:t;var r=e.split(/[\?\#]/)[0];t&&/\:\/\/[^\/]*$/.test(r)&&(r+="/");var n=e.match(/(\#.*)$/);e=r+t,n&&(e+=n[0])}return e}},8677:function(e,t,r){"use strict";var n;e=r.nmd(e);var a=r(8847)(r(3355));!function(i){var o="object"==(0,a.default)(t)&&t&&!t.nodeType&&t,s="object"==(0,a.default)(e)&&e&&!e.nodeType&&e,c="object"==(void 0===r.g?"undefined":(0,a.default)(r.g))&&r.g;c.global!==c&&c.window!==c&&c.self!==c||(i=c);var u,f,d=2147483647,l=36,h=/^xn--/,p=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,v=String.fromCharCode;function y(e){throw RangeError(m[e])}function A(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function w(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+A((e=e.replace(b,".")).split("."),t).join(".")}function x(e){for(var t,r,n=[],a=0,i=e.length;a=55296&&t<=56319&&a65535&&(t+=v((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+v(e)})).join("")}function _(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function C(e,t,r){var n=0;for(e=r?g(e/700):e>>1,e+=g(e/t);e>455;n+=l)e=g(e/35);return g(n+36*e/(e+38))}function k(e){var t,r,n,a,i,o,s,c,u,f,h,p=[],b=e.length,m=0,v=128,A=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&y("not-basic"),p.push(e.charCodeAt(n));for(a=r>0?r+1:0;a=b&&y("invalid-input"),((c=(h=e.charCodeAt(a++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:l)>=l||c>g((d-m)/o))&&y("overflow"),m+=c*o,!(c<(u=s<=A?1:s>=A+26?26:s-A));s+=l)o>g(d/(f=l-u))&&y("overflow"),o*=f;A=C(m-i,t=p.length+1,0==i),g(m/t)>d-v&&y("overflow"),v+=g(m/t),m%=t,p.splice(m++,0,v)}return E(p)}function B(e){var t,r,n,a,i,o,s,c,u,f,h,p,b,m,A,w=[];for(p=(e=x(e)).length,t=128,r=0,i=72,o=0;o=t&&hg((d-r)/(b=n+1))&&y("overflow"),r+=(s-t)*b,t=s,o=0;od&&y("overflow"),h==t){for(c=r,u=l;!(c<(f=u<=i?1:u>=i+26?26:u-i));u+=l)A=c-f,m=l-f,w.push(v(_(f+A%m,0))),c=g(A/m);w.push(v(_(c,0))),i=C(r,b,n==a),r=0,++n}++r,++t}return w.join("")}if(u={version:"1.3.2",ucs2:{decode:x,encode:E},decode:k,encode:B,toASCII:function(e){return w(e,(function(e){return p.test(e)?"xn--"+B(e):e}))},toUnicode:function(e){return w(e,(function(e){return h.test(e)?k(e.slice(4).toLowerCase()):e}))}},"object"==(0,a.default)(r.amdO)&&r.amdO)void 0===(n=function(){return u}.call(t,r,t,e))||(e.exports=n);else if(o&&s)if(e.exports==o)s.exports=u;else for(f in u)u.hasOwnProperty(f)&&(o[f]=u[f]);else i.punycode=u}(void 0)},8983:function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,a){r=r||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(r);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var c=e.length;s>0&&c>s&&(c=s);for(var u=0;u=0?(f=p.substr(0,b),d=p.substr(b+1)):(f=p,d=""),l=decodeURIComponent(f),h=decodeURIComponent(d),t(i,l)?Array.isArray(i[l])?i[l].push(h):i[l]=[i[l],h]:i[l]=h}return i}},4031:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=function(e){switch((0,n.default)(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===(0,n.default)(e)?Object.keys(e).map((function(n){var i=encodeURIComponent(a(n))+r;return Array.isArray(e[n])?e[n].map((function(e){return i+encodeURIComponent(a(e))})).join(t):i+encodeURIComponent(a(e[n]))})).join(t):i?encodeURIComponent(a(i))+r+encodeURIComponent(a(e)):""}},845:function(e,t,r){"use strict";t.decode=t.parse=r(8983),t.encode=t.stringify=r(4031)},1143:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(8677),i=r(5751);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=A,t.resolve=function(e,t){return A(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?A(e,!1,!0).resolveObject(t):t},t.format=function(e){return i.isString(e)&&(e=A(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,f=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(f),l=["%","/","?",";","#"].concat(d),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(845);function A(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+(0,n.default)(e));var o=e.indexOf("?"),c=-1!==o&&o127?F+="x":F+=T[R];if(!F.match(p)){var N=M.slice(0,I),j=M.slice(I+1),L=T.match(b);L&&(N.push(L[1]),j.unshift(L[2])),j.length&&(A="/"+j.join(".")+A),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=a.toASCII(this.hostname));var U=this.port?":"+this.port:"",Q=this.hostname||"";this.host=Q+U,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==A[0]&&(A="/"+A))}if(!m[E])for(I=0,D=d.length;I0)&&r.host.split("@"))&&(r.auth=S.shift(),r.host=r.hostname=S.shift())),r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var C=E.slice(-1)[0],k=(r.host||e.host||E.length>1)&&("."===C||".."===C)||""===C,B=0,I=E.length;I>=0;I--)"."===(C=E[I])?E.splice(I,1):".."===C?(E.splice(I,1),B++):B&&(E.splice(I,1),B--);if(!w&&!x)for(;B--;B)E.unshift("..");!w||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),k&&"/"!==E.join("/").substr(-1)&&E.push("");var S,O=""===E[0]||E[0]&&"/"===E[0].charAt(0);return _&&(r.hostname=r.host=O?"":E.length?E.shift():"",(S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=S.shift(),r.host=r.hostname=S.shift())),(w=w||r.host&&E.length)&&!O&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},5751:function(e,t,r){"use strict";var n=r(8847)(r(3355));e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===(0,n.default)(e)&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},8632:function(e,t){"use strict";!function(e){var t,r,n,a=String.fromCharCode;function i(e){for(var t,r,n=[],a=0,i=e.length;a=55296&&t<=56319&&a=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return a(e>>t&63|128)}function c(e){if(0==(4294967168&e))return a(e);var t="";return 0==(4294965248&e)?t=a(e>>6&31|192):0==(4294901760&e)?(o(e),t=a(e>>12&15|224),t+=s(e,6)):0==(4292870144&e)&&(t=a(e>>18&7|240),t+=s(e,12),t+=s(e,6)),t+a(63&e|128)}function u(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function f(){var e,a;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,0==(128&e))return e;if(192==(224&e)){if((a=(31&e)<<6|u())>=128)return a;throw Error("Invalid continuation byte")}if(224==(240&e)){if((a=(15&e)<<12|u()<<6|u())>=2048)return o(a),a;throw Error("Invalid continuation byte")}if(240==(248&e)&&(a=(7&e)<<18|u()<<12|u()<<6|u())>=65536&&a<=1114111)return a;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=i(e),r=t.length,n=-1,a="";++n65535&&(i+=a((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=a(t);return i}(s)}}(t)},6219:function(e,t,r){"use strict";function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},6248:function(e,t,r){"use strict";var n=r(8847)(r(3355));e.exports=function(e){return e&&"object"===(0,n.default)(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},7092:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(9446),i=r(4477),o=r(2337),s=r(8915);function c(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,f="undefined"!=typeof Symbol,d=c(Object.prototype.toString),l=c(Number.prototype.valueOf),h=c(String.prototype.valueOf),p=c(Boolean.prototype.valueOf);if(u)var b=c(BigInt.prototype.valueOf);if(f)var m=c(Symbol.prototype.valueOf);function g(e,t){if("object"!==(0,n.default)(e))return!1;try{return t(e),!0}catch(e){return!1}}function v(e){return"[object Map]"===d(e)}function y(e){return"[object Set]"===d(e)}function A(e){return"[object WeakMap]"===d(e)}function w(e){return"[object WeakSet]"===d(e)}function x(e){return"[object ArrayBuffer]"===d(e)}function E(e){return"undefined"!=typeof ArrayBuffer&&(x.working?x(e):e instanceof ArrayBuffer)}function _(e){return"[object DataView]"===d(e)}function C(e){return"undefined"!=typeof DataView&&(_.working?_(e):e instanceof DataView)}t.isArgumentsObject=a,t.isGeneratorFunction=i,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"===(0,n.default)(e)&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||C(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},v.working="undefined"!=typeof Map&&v(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(v.working?v(e):e instanceof Map)},y.working="undefined"!=typeof Set&&y(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(y.working?y(e):e instanceof Set)},A.working="undefined"!=typeof WeakMap&&A(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(A.working?A(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},x.working="undefined"!=typeof ArrayBuffer&&x(new ArrayBuffer),t.isArrayBuffer=E,_.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&_(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=C;var k="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function B(e){return"[object SharedArrayBuffer]"===d(e)}function I(e){return void 0!==k&&(void 0===B.working&&(B.working=B(new k)),B.working?B(e):e instanceof k)}function S(e){return g(e,l)}function O(e){return g(e,h)}function M(e){return g(e,p)}function D(e){return u&&g(e,b)}function T(e){return f&&g(e,m)}t.isSharedArrayBuffer=I,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===d(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===d(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===d(e)},t.isGeneratorObject=function(e){return"[object Generator]"===d(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===d(e)},t.isNumberObject=S,t.isStringObject=O,t.isBooleanObject=M,t.isBigIntObject=D,t.isSymbolObject=T,t.isBoxedPrimitive=function(e){return S(e)||O(e)||M(e)||D(e)||T(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(E(e)||I(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},5058:function(e,t,r){"use strict";var n=r(9142),a=r(8847)(r(3355)),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=d),h(n,e,n.depth)}function d(e,t){var r=f.styles[t];return r?"\x1b["+f.colors[r][0]+"m"+e+"\x1b["+f.colors[r][1]+"m":e}function l(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var a=r.inspect(n,e);return A(a)||(a=h(e,a,n)),a}var i=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(A(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}(e,r);if(i)return i;var o=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),C(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return p(r);if(0===o.length){if(k(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(x(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(C(r))return p(r)}var u,f="",d=!1,l=["{","}"];return m(r)&&(d=!0,l=["[","]"]),k(r)&&(f=" [Function"+(r.name?": "+r.name:"")+"]"),x(r)&&(f=" "+RegExp.prototype.toString.call(r)),_(r)&&(f=" "+Date.prototype.toUTCString.call(r)),C(r)&&(f=" "+p(r)),0!==o.length||d&&0!=r.length?n<0?x(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=d?function(e,t,r,n,a){for(var i=[],o=0,s=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(u,f,l)):l[0]+f+l[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function b(e,t,r,n,a,i){var o,s,c;if((c=Object.getOwnPropertyDescriptor(t,a)||{value:t[a]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),M(n,a)||(o="["+a+"]"),s||(e.seen.indexOf(c.value)<0?(s=v(r)?h(e,c.value,null):h(e,c.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),w(o)){if(i&&a.match(/^\d+$/))return s;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function y(e){return"number"==typeof e}function A(e){return"string"==typeof e}function w(e){return void 0===e}function x(e){return E(e)&&"[object RegExp]"===B(e)}function E(e){return"object"===(0,a.default)(e)&&null!==e}function _(e){return E(e)&&"[object Date]"===B(e)}function C(e){return E(e)&&("[object Error]"===B(e)||e instanceof Error)}function k(e){return"function"==typeof e}function B(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(c.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(7092),t.isArray=m,t.isBoolean=g,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=A,t.isSymbol=function(e){return"symbol"===(0,a.default)(e)},t.isUndefined=w,t.isRegExp=x,t.types.isRegExp=x,t.isObject=E,t.isDate=_,t.types.isDate=_,t.isError=C,t.types.isNativeError=C,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(0,a.default)(e)||void 0===e},t.isBuffer=r(6248);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var e=new Date,t=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":");return[e.getDate(),S[e.getMonth()],t].join(" ")}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))},t.inherits=r(1736),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var D="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function T(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(D&&e[D]){var t;if("function"!=typeof(t=e[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,D,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),a=[],i=0;i>>9<<4)+1}function n(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e,t,r,a,i,o){return n((s=n(n(t,e),n(a,o)))<<(c=i)|s>>>32-c,r);var s,c}function i(e,t,r,n,i,o,s){return a(t&r|~t&n,e,t,i,o,s)}function o(e,t,r,n,i,o,s){return a(t&n|r&~n,e,t,i,o,s)}function s(e,t,r,n,i,o,s){return a(t^r^n,e,t,i,o,s)}function c(e,t,r,n,i,o,s){return a(r^(t|~n),e,t,i,o,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var a=0;a>5]>>>a%32&255,o=parseInt(n.charAt(i>>>4&15)+n.charAt(15&i),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[a/8])<>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}},7300:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},4402:function(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};var n=new Uint8Array(16)},2702:function(e,t){"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){var t=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=[];for(var o=0;o>>0;w=A,A=y,y=n(v,30)>>>0,v=g,g=_}a[0]=a[0]+g>>>0,a[1]=a[1]+v>>>0,a[2]=a[2]+y>>>0,a[3]=a[3]+A>>>0,a[4]=a[4]+w>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,255&a[0],a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,255&a[1],a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,255&a[2],a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,255&a[3],a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,255&a[4]]}},2982:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=s;for(var n,a=(n=r(6163))&&n.__esModule?n:{default:n},i=[],o=0;o<256;++o)i.push((o+256).toString(16).slice(1));function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}t.default=function(e){var t=s(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0);if(!(0,a.default)(t))throw TypeError("Stringified UUID is invalid");return t}},5999:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a,i,o=(n=r(4402))&&n.__esModule?n:{default:n},s=r(2982),c=0,u=0;t.default=function(e,t,r){var n=t&&r||0,f=t||new Array(16),d=(e=e||{}).node||a,l=void 0!==e.clockseq?e.clockseq:i;if(null==d||null==l){var h=e.random||(e.rng||o.default)();null==d&&(d=a=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==l&&(l=i=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:Date.now(),b=void 0!==e.nsecs?e.nsecs:u+1,m=p-c+(b-u)/1e4;if(m<0&&void 0===e.clockseq&&(l=l+1&16383),(m<0||p>c)&&void 0===e.nsecs&&(b=0),b>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=p,u=b,i=l;var g=(1e4*(268435455&(p+=122192928e5))+b)%4294967296;f[n++]=g>>>24&255,f[n++]=g>>>16&255,f[n++]=g>>>8&255,f[n++]=255&g;var v=p/4294967296*1e4&268435455;f[n++]=v>>>8&255,f[n++]=255&v,f[n++]=v>>>24&15|16,f[n++]=v>>>16&255,f[n++]=l>>>8|128,f[n++]=255&l;for(var y=0;y<6;++y)f[n+y]=d[y];return t||(0,s.unsafeStringify)(f)}},8231:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(6125)),a=i(r(6792));function i(e){return e&&e.__esModule?e:{default:e}}var o=(0,n.default)("v3",48,a.default);t.default=o},6125:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,o,s){var c;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[o++],a+=i<28?(127&n)<=128);return e.bytes=o-r,a}},2699:function(e){"use strict";e.exports=function e(r,n,a){n=n||[];for(var i=a=a||0;r>=t;)n[a++]=255&r|128,r/=128;for(;-128&r;)n[a++]=255&r|128,r>>>=7;return n[a]=0|r,e.bytes=a-i+1,n};var t=Math.pow(2,31)},6657:function(e,t,r){"use strict";e.exports={encode:r(2699),decode:r(8325),encodingLength:r(7490)}},7490:function(e){"use strict";var t=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),a=Math.pow(2,28),i=Math.pow(2,35),o=Math.pow(2,42),s=Math.pow(2,49),c=Math.pow(2,56),u=Math.pow(2,63);e.exports=function(e){return e0&&(d=setTimeout((function(){if(!u){u=!0,f.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",a(e)}}),e.timeout)),f.setRequestHeader)for(s in b)b.hasOwnProperty(s)&&f.setRequestHeader(s,b[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(f.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(f),f.send(p||null),f}e.exports=c,e.exports.default=c,c.XMLHttpRequest=n.XMLHttpRequest||function(){},c.XDomainRequest="withCredentials"in new c.XMLHttpRequest?c.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var r=0;r1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},g.prototype.getCall=function(e){return"function"==typeof this.call?this.call(e):this.call},g.prototype.extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},g.prototype.validateArgs=function(e){if(e.length!==this.params)throw d.InvalidNumberOfParams(e.length,this.params,this.name)},g.prototype.formatInput=function(e){var t=this;return this.inputFormatter?this.inputFormatter.map((function(r,n){return r?r.call(t,e[n]):e[n]})):e},g.prototype.formatOutput=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.outputFormatter&&e?t.outputFormatter(e):e})):this.outputFormatter&&e?this.outputFormatter(e):e},g.prototype.toPayload=function(e){var t=this.getCall(e),r=this.extractCallback(e),n=this.formatInput(e);this.validateArgs(n);var a={method:t,params:n,callback:r};return this.transformPayload&&(a=this.transformPayload(a)),a},g.prototype._confirmTransaction=function(e,t,r){var n=this,i=!1,o=!0,u=0,f=0,v=null,y=null,A=null,w=r.params[0]&&"object"===(0,c.default)(r.params[0])&&r.params[0].gas?r.params[0].gas:null,x=!!r.params[0]&&"object"===(0,c.default)(r.params[0])&&r.params[0].data&&r.params[0].from&&!r.params[0].to,E=x&&r.params[0].data.length>2,_=[new g({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[l.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:l.outputBlockFormatter}),new g({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:l.outputTransactionReceiptFormatter}),new g({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[l.inputAddressFormatter,l.inputDefaultBlockNumberFormatter]}),new g({name:"getTransactionByHash",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:l.outputTransactionFormatter}),new b({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:l.outputBlockFormatter}}})],C={};_.forEach((function(e){e.attachToObject(C),e.requestManager=n.requestManager}));var k=function(c,b,g,_,k){if(!g)return k||(k={unsubscribe:function(){clearInterval(v),clearTimeout(y)}}),(c?p.resolve(c):C.getTransactionReceipt(t)).catch((function(t){k.unsubscribe(),i=!0,h._fireError({message:"Failed to check for transaction receipt:",data:t},e.eventEmitter,e.reject)})).then(function(){var t=(0,s.default)(a.default.mark((function t(r){var i,s,u;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r&&r.blockHash){t.next=2;break}throw new Error("Receipt missing or blockHash null");case 2:if(n.extraFormatters&&n.extraFormatters.receiptFormatter&&(r=n.extraFormatters.receiptFormatter(r)),!(e.eventEmitter.listeners("confirmation").length>0)){t.next=28;break}if(void 0!==c&&0===f){t.next=25;break}return t.next=7,C.getBlockByNumber("latest");case 7:if(s=t.sent,u=s?s.hash:null,!b){t.next=24;break}if(!A){t.next=17;break}return t.next=13,C.getBlockByNumber(A.number+1);case 13:(i=t.sent)&&(A=i,e.eventEmitter.emit("confirmation",f,r,u)),t.next=22;break;case 17:return t.next=19,C.getBlockByNumber(r.blockNumber);case 19:i=t.sent,A=i,e.eventEmitter.emit("confirmation",f,r,u);case 22:t.next=25;break;case 24:e.eventEmitter.emit("confirmation",f,r,u);case 25:(b&&i||!b)&&f++,o=!1,f===n.transactionConfirmationBlocks+1&&(k.unsubscribe(),e.eventEmitter.removeAllListeners());case 28:return t.abrupt("return",r);case 29:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(a.default.mark((function t(r){var s;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!x||i){t.next=19;break}if(r.contractAddress){t.next=5;break}return o&&(k.unsubscribe(),i=!0),h._fireError(d.NoContractAddressFoundError(r),e.eventEmitter,e.reject,null,r),t.abrupt("return");case 5:return t.prev=5,t.next=8,C.getCode(r.contractAddress);case 8:s=t.sent,t.next=13;break;case 11:t.prev=11,t.t0=t.catch(5);case 13:if(s){t.next=15;break}return t.abrupt("return");case 15:!0===r.status&&E||s.length>2?(e.eventEmitter.emit("receipt",r),n.extraFormatters&&n.extraFormatters.contractDeployFormatter?e.resolve(n.extraFormatters.contractDeployFormatter(r)):e.resolve(r),o&&e.eventEmitter.removeAllListeners()):h._fireError(d.ContractCodeNotStoredError(r),e.eventEmitter,e.reject,null,r),o&&k.unsubscribe(),i=!0;case 19:return t.abrupt("return",r);case 20:case"end":return t.stop()}}),t,null,[[5,11]])})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(a.default.mark((function t(s){var c,u,f,p;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(x||i){t.next=35;break}if(s.outOfGas||w&&w===s.gasUsed||!0!==s.status&&"0x1"!==s.status&&void 0!==s.status){t.next=7;break}e.eventEmitter.emit("receipt",s),e.resolve(s),o&&e.eventEmitter.removeAllListeners(),t.next=33;break;case 7:if(JSON.stringify(s,null,2),!1!==s.status&&"0x0"!==s.status){t.next=32;break}if(t.prev=9,c=null,!n.handleRevert||"eth_sendTransaction"!==n.call&&"eth_sendRawTransaction"!==n.call){t.next=24;break}return u=r.params[0],"eth_sendRawTransaction"===n.call&&(f=r.params[0],p=m.parse(f),u=l.inputTransactionFormatter({data:p.data,to:p.to,from:p.from,gas:p.gasLimit.toHexString(),gasPrice:p.gasPrice?p.gasPrice.toHexString():void 0,value:p.value.toHexString()})),t.next=16,n.getRevertReason(u,s.blockNumber);case 16:if(!(c=t.sent)){t.next=21;break}h._fireError(d.TransactionRevertInstructionError(c.reason,c.signature,s),e.eventEmitter,e.reject,null,s),t.next=22;break;case 21:throw!1;case 22:t.next=25;break;case 24:throw!1;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(9),h._fireError(d.TransactionRevertedWithoutReasonError(s),e.eventEmitter,e.reject,null,s);case 30:t.next=33;break;case 32:h._fireError(d.TransactionOutOfGasError(s),e.eventEmitter,e.reject,null,s);case 33:o&&k.unsubscribe(),i=!0;case 35:case"end":return t.stop()}}),t,null,[[9,27]])})));return function(e){return t.apply(this,arguments)}}()).catch((function(){u++,b?u-1>=n.transactionPollingTimeout&&(k.unsubscribe(),i=!0,h._fireError(d.TransactionError("Transaction was not mined within "+n.transactionPollingTimeout+" seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject)):u-1>=n.transactionBlockTimeout&&(k.unsubscribe(),i=!0,h._fireError(d.TransactionError("Transaction was not mined within "+n.transactionBlockTimeout+" blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject))}));k.unsubscribe(),i=!0,h._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:g},e.eventEmitter,e.reject)},B=function(e){var t=!1,r=function(){v=setInterval(k.bind(null,e,!0),n.transactionPollingInterval)};if(!this.requestManager.provider.on)return r();C.subscribe("newBlockHeaders",(function(n,a,i){if(t=!0,n||!a)return r();k(e,!1,n,0,i)})),y=setTimeout((function(){t||r()}),1e3*this.blockHeaderTimeout)}.bind(this);C.getTransactionReceipt(t).then((function(t){t&&t.blockHash?(e.eventEmitter.listeners("confirmation").length>0&&B(t),k(t,!1)):i||B()})).catch((function(){i||B()}))};var v=function(e,t){return"number"==typeof e?t.wallet[e]:e&&"object"===(0,c.default)(e)&&e.address&&e.privateKey?e:t.wallet[e.toLowerCase()]};function y(e,t){return new Promise((function(r,n){try{var a=new g({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[function(e){return e?h.toHex(e):"latest"},function(){return!1}]}).createFunction(e.requestManager),o=new g({name:"getGasPrice",call:"eth_gasPrice",params:0}).createFunction(e.requestManager);Promise.all([a(),o()]).then((function(e){var n=(0,i.default)(e,2),a=n[0],o=n[1];if(("0x2"===t.type||void 0===t.type)&&a&&a.baseFeePerGas){var s,c;t.gasPrice?(s=t.gasPrice,c=t.gasPrice,delete t.gasPrice):(s=t.maxPriorityFeePerGas||"0x9502F900",c=t.maxFeePerGas||h.toHex(h.toBN(a.baseFeePerGas).mul(h.toBN(2)).add(h.toBN(s)))),r({maxFeePerGas:c,maxPriorityFeePerGas:s})}else{if(t.maxPriorityFeePerGas||t.maxFeePerGas)throw Error("Network doesn't support eip-1559");r({gasPrice:o})}}))}catch(e){n(e)}}))}g.prototype.buildCall=function(){var e=this,t="eth_sendTransaction"===e.call||"eth_sendRawTransaction"===e.call,r="eth_call"===e.call,n=function(){var n=Array.prototype.slice.call(arguments),a=p(!t),i=e.toPayload(n);e.hexFormat=!1,"eth_getTransactionReceipt"===e.call&&(e.hexFormat=i.params.length0&&this.subscriptions.forEach((function(r,n){e&&"syncing"===r.name||t.removeSubscription(n)})),this.provider.reset&&this.provider.reset(),!0}catch(e){throw new Error("Error while clearing subscriptions: ".concat(e))}},u.prototype._isCleanCloseEvent=function(e){return"object"===(0,n.default)(e)&&([1e3].includes(e.code)||!0===e.wasClean)},u.prototype._isIpcCloseError=function(e){return"boolean"==typeof e&&e},u.prototype._jsonrpcResultCallback=function(e,t){return function(r,n){return n&&n.id&&t.id!==n.id?e(new Error("Wrong response id ".concat(n.id," (expected: ").concat(t.id,") in ").concat(JSON.stringify(t)))):r?e(r):n&&n.error?e(i.ErrorResponse(n)):o.isValidResponse(n)?void e(null,n.result):e(i.InvalidResponse(n))}},e.exports={Manager:u,BatchManager:s}},8155:function(e){"use strict";var t={messageId:Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),toPayload:function(e,r){if(!e)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(r)+'"!');return t.messageId===Number.MAX_SAFE_INTEGER?t.messageId=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER):t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:e,params:r||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!(!e||e.error||"2.0"!==e.jsonrpc||"number"!=typeof e.id&&"string"!=typeof e.id||void 0===e.result)}},toBatchPayload:function(e){return e.map((function(e){return t.toPayload(e.method,e.params)}))}};e.exports=t},4178:function(e,t,r){"use strict";var n=r(2929),a=function(e){this.name=e.name,this.type=e.type,this.subscriptions=e.subscriptions||{},this.requestManager=null};a.prototype.setRequestManager=function(e){this.requestManager=e},a.prototype.attachToObject=function(e){var t=this.buildCall(),r=this.name.split(".");r.length>1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},a.prototype.buildCall=function(){var e=this;return function(){e.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var t=new n({subscription:e.subscriptions[arguments[0]]||{},requestManager:e.requestManager,type:e.type});return t.subscribe.apply(t,arguments)}},e.exports={subscriptions:a,subscription:n}},2929:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(1314).errors,i=r(8008),o=r(1314).formatters;function s(e){return e}function c(e){i.call(this),this.id=null,this.callback=s,this.arguments=null,this.lastBlock=null,this.options={subscription:e.subscription,type:e.type,requestManager:e.requestManager}}c.prototype=Object.create(i.prototype),c.prototype.constructor=c,c.prototype._extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},c.prototype._validateArgs=function(e){var t=this.options.subscription;if(t||(t={}),t.params||(t.params=0),e.length!==t.params)throw a.InvalidNumberOfParams(e.length,t.params,t.subscriptionName)},c.prototype._formatInput=function(e){var t=this.options.subscription;return t&&t.inputFormatter?t.inputFormatter.map((function(t,r){return t?t(e[r]):e[r]})):e},c.prototype._formatOutput=function(e){var t=this.options.subscription;return t&&t.outputFormatter&&e?t.outputFormatter(e):e},c.prototype._toPayload=function(e){var t=[];if(this.callback=this._extractCallback(e)||s,this.subscriptionMethod||(this.subscriptionMethod=e.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(e),this._validateArgs(this.arguments),e=[]),t.push(this.subscriptionMethod),t=t.concat(this.arguments),e.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:t}},c.prototype.unsubscribe=function(e){this.options.requestManager.removeSubscription(this.id,e),this.id=null,this.lastBlock=null,this.removeAllListeners()},c.prototype.subscribe=function(){var e=this,t=Array.prototype.slice.call(arguments),r=this._toPayload(t);if(!r)return this;if(!this.options.requestManager.provider)return setTimeout((function(){var t=new Error("No provider set.");e.callback(t,null,e),e.emit("error",t)}),0),this;if(!this.options.requestManager.provider.on)return setTimeout((function(){var t=new Error("The current provider doesn't support subscriptions: "+e.options.requestManager.provider.constructor.name);e.callback(t,null,e),e.emit("error",t)}),0),this;if(this.lastBlock&&this.options.params&&"object"===(0,n.default)(this.options.params)&&(r.params[1]=this.options.params,r.params[1].fromBlock=o.inputBlockNumberFormatter(this.lastBlock+1)),this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&r.params[1]&&"object"===(0,n.default)(r.params[1])&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)){var a=Object.assign({},r.params[1]);this.options.requestManager.send({method:"eth_getLogs",params:[a]},(function(t,r){t?setTimeout((function(){e.callback(t,null,e),e.emit("error",t)}),0):r.forEach((function(t){var r=e._formatOutput(t);e.callback(null,r,e),e.emit("data",r)}))}))}return"object"===(0,n.default)(r.params[1])&&delete r.params[1].fromBlock,this.options.requestManager.send(r,(function(t,a){!t&&a?(e.id=a,e.method=r.params[0],e.options.requestManager.addSubscription(e,(function(t,r){t?(e.callback(t,!1,e),e.emit("error",t)):(Array.isArray(r)||(r=[r]),r.forEach((function(t){var r=e._formatOutput(t);if(e.lastBlock=r&&"object"===(0,n.default)(r)?r.blockNumber:null,"function"==typeof e.options.subscription.subscriptionHandler)return e.options.subscription.subscriptionHandler.call(e,r);e.emit("data",r),e.callback(null,r,e)})))})),e.emit("connected",a)):setTimeout((function(){e.callback(t,!1,e),e.emit("error",t)}),0)})),this},c.prototype.resubscribe=function(){this.options.requestManager.removeSubscription(this.id),this.id=null,this.subscribe(this.callback)},e.exports=c},9907:function(e,t,r){"use strict";var n=r(1314).formatters,a=r(3349),i=r(8161);e.exports=function(e){var t=function(t){var r;return t.property?(e[t.property]||(e[t.property]={}),r=e[t.property]):r=e,t.methods&&t.methods.forEach((function(t){t instanceof a||(t=new a(t)),t.attachToObject(r),t.setRequestManager(e._requestManager)})),e};return t.formatters=n,t.utils=i,t.Method=a,t}},606:function(e,t,r){"use strict";var n=r(2033),a=r(9907);e.exports={packageInit:function(e,t){if(t=Array.prototype.slice.call(t),!e)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(e,"currentProvider",{get:function(){return e._provider},set:function(t){return e.setProvider(t)},enumerable:!0,configurable:!0}),t[0]&&t[0]._requestManager?e._requestManager=t[0]._requestManager:e._requestManager=new n.Manager(t[0],t[1]),e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers,e._provider=e._requestManager.provider,e.setProvider||(e.setProvider=function(t,r){return e._requestManager.setProvider(t,r),e._provider=e._requestManager.provider,!0}),e.setRequestManager=function(t){e._requestManager=t,e._provider=t.provider},e.BatchRequest=n.BatchManager.bind(null,e._requestManager),e.extend=a(e)},addProviders:function(e){e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers}}},9901:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(9033).Buffer,i=r(8161),o=r(2914).RQ,s=r(2914)._R,c=new o((function(e,t){return!e.match(/^u?int/)||Array.isArray(t)||t&&"object"===(0,n.default)(t)&&"BN"===t.constructor.name?t:t.toString()}));function u(){}var f=function(){};f.prototype.encodeFunctionSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=i._jsonInterfaceMethodToString(e)),i.sha3(e).slice(0,10)},f.prototype.encodeEventSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=i._jsonInterfaceMethodToString(e)),i.sha3(e)},f.prototype.encodeParameter=function(e,t){return this.encodeParameters([e],[t])},f.prototype.encodeParameters=function(e,t){var r=this;return e=r.mapTypes(e),t=t.map((function(t,a){var i=e[a];return"object"===(0,n.default)(i)&&i.type&&(i=i.type),t=r.formatParam(i,t),"string"==typeof i&&i.includes("tuple")&&function e(t,n){if("array"===t.name){if(!t.type.match(/\[(\d+)\]/))return n.map((function(r){return e(c._getCoder(s.from(t.type.replace("[]",""))),r)}));var a=parseInt(t.type.match(/\[(\d+)\]/)[1]);if(n.length!==a)throw new Error("Array length does not matches with the given input");return n.map((function(r){return e(c._getCoder(s.from(t.type.replace(/\[\d+\]/,""))),r)}))}t.coders.forEach((function(t,a){"tuple"===t.name?e(t,n[a]):n[a]=r.formatParam(t.name,n[a])}))}(c._getCoder(s.from(i)),t),t})),c.encode(e,t)},f.prototype.mapTypes=function(e){var t=this,r=[];return e.forEach((function(e){if("object"===(0,n.default)(e)&&"function"===e.type&&(e=Object.assign({},e,{type:"bytes24"})),t.isSimplifiedStructFormat(e)){var a=Object.keys(e)[0];r.push(Object.assign(t.mapStructNameAndType(a),{components:t.mapStructToCoderFormat(e[a])}))}else r.push(e)})),r},f.prototype.isSimplifiedStructFormat=function(e){return"object"===(0,n.default)(e)&&void 0===e.components&&void 0===e.name},f.prototype.mapStructNameAndType=function(e){var t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}},f.prototype.mapStructToCoderFormat=function(e){var t=this,r=[];return Object.keys(e).forEach((function(a){"object"!==(0,n.default)(e[a])?r.push({name:a,type:e[a]}):r.push(Object.assign(t.mapStructNameAndType(a),{components:t.mapStructToCoderFormat(e[a])}))})),r},f.prototype.formatParam=function(e,t){var r=this,n=new RegExp(/^bytes([0-9]*)$/),o=new RegExp(/^bytes([0-9]*)\[\]$/),s=new RegExp(/^(u?int)([0-9]*)$/),c=new RegExp(/^(u?int)([0-9]*)\[\]$/);if(i.isBN(t)||i.isBigNumber(t))return t.toString(10);if(e.match(o)||e.match(c))return t.map((function(t){return r.formatParam(e.replace("[]",""),t)}));var u=e.match(s);if(u){var f=parseInt(u[2]||"256");f/80&&(!t||"0x"===t||"0X"===t))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var a=c.decode(this.mapTypes(e),"0x"+t.replace(/0x/i,""),r),i=new u;return i.__length__=0,e.forEach((function(e,t){var r=a[i.__length__],o="object"===(0,n.default)(e)&&e.type&&"string"===e.type;r="0x"!==r||o||"string"==typeof e&&"string"===e?r:null,i[t]=r,("function"==typeof e||e&&"object"===(0,n.default)(e))&&e.name&&(i[e.name]=r),i.__length__++})),i},f.prototype.decodeLog=function(e,t,r){var n=this;r=Array.isArray(r)?r:[r],t=t||"";var a=[],i=[],o=0;e.forEach((function(e,t){e.indexed?(i[t]=["bool","int","uint","address","fixed","ufixed"].find((function(t){return-1!==e.type.indexOf(t)}))?n.decodeParameter(e.type,r[o]):r[o],o++):a[t]=e}));var s=t,c=s?this.decodeParametersWith(a,s,!0):[],f=new u;return f.__length__=0,e.forEach((function(e,t){f[t]="string"===e.type?"":null,void 0!==c[t]&&(f[t]=c[t]),void 0!==i[t]&&(f[t]=i[t]),e.name&&(f[e.name]=f[t]),f.__length__++})),f};var d=new f;e.exports=d},9819:function(e,t,r){"use strict";var n=r(9033).Buffer,a=r(8847),i=a(r(3106)),o=a(r(3355)),s=a(r(775)),c=a(r(4519));function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var f,l="Signer Error: ",h=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(u);try{for(h.s();!(f=h.n()).done;){var p=f.value;l+="".concat(l," ").concat(p,".")}}catch(e){h.e(e)}finally{h.f()}throw new Error(l)}var b="0x"+c.serialize().toString("hex"),m=v.keccak256(b),g={messageHash:"0x"+n.from(c.getMessageToSign(!0)).toString("hex"),v:"0x"+c.v.toString("hex"),r:"0x"+c.r.toString("hex"),s:"0x"+c.s.toString("hex"),rawTransaction:b,transactionHash:m};return r(null,g),g}catch(e){return r(e),Promise.reject(e)}}return e.type=function(e){var t,r=void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas;if(void 0!==e.type?t=v.toHex(e.type):void 0===e.type&&r&&(t="0x2"),void 0!==e.gasPrice&&("0x2"===t||r))throw Error("eip-1559 transactions don't support gasPrice");if(("0x1"===t||"0x0"===t)&&r)throw Error("pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas");return r||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===x.London||e.hardfork&&e.hardfork.toLowerCase()===x.London?t="0x2":(e.accessList||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===x.Berlin||e.hardfork&&e.hardfork.toLowerCase()===x.Berlin)&&(t="0x1"),t}(e),void 0!==e.nonce&&void 0!==e.chainId&&(void 0!==e.gasPrice||void 0!==e.maxFeePerGas&&void 0!==e.maxPriorityFeePerGas)&&s?Promise.resolve(u(e)):Promise.all([_(e.common)||_(e.common.customChain.chainId)?_(e.chainId)?a._ethereumCall.getChainId():e.chainId:void 0,_(e.nonce)?a._ethereumCall.getTransactionCount(a.privateKeyToAccount(t).address):e.nonce,_(s)?a._ethereumCall.getNetworkId():1,B(a,e)]).then((function(t){var r=(0,c.default)(t,4),n=r[0],a=r[1],i=r[2],o=r[3];if(_(n)&&_(e.common)&&_(e.common.customChain.chainId)||_(a)||_(i)||_(o))throw new Error('One of the values "chainId", "networkId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(t));return u(f(f(f({},e),_(e.common)||_(e.common.customChain.chainId)?{chainId:n}:{}),{},{nonce:a,networkId:i},o))}))},k.prototype.recoverTransaction=function(e){var t=n.from(e.slice(2),"hex"),r=A.fromSerializedData(t);return v.toChecksumAddress(r.getSenderAddress().toString("hex"))},k.prototype.hashMessage=function(e){var t=v.isHexStrict(e)?e:v.utf8ToHex(e),r=v.hexToBytes(t),a=n.from(r),i="\x19Ethereum Signed Message:\n"+r.length,o=n.from(i),s=n.concat([o,a]);return E.bufferToHex(E.keccak256(s))},k.prototype.sign=function(e,t){if(t.startsWith("0x")||(t="0x"+t),66!==t.length)throw new Error("Private key must be 32 bytes long");var r=this.hashMessage(e),n=p.sign(r,t),a=p.decodeSignature(n);return{message:e,messageHash:r,v:a[0],r:a[1],s:a[2],signature:n}},k.prototype.recover=function(e,t,r){var n=[].slice.apply(arguments);return e&&"object"===(0,o.default)(e)?this.recover(e.messageHash,p.encodeSignature([e.v,e.r,e.s]),!0):(r||(e=this.hashMessage(e)),n.length>=4?(r="boolean"==typeof(r=n.slice(-1)[0])&&!!r,this.recover(e,p.encodeSignature(n.slice(1,4)),r)):p.recover(e,t))},k.prototype.decrypt=function(e,t,r){if("string"!=typeof t)throw new Error("No password given.");var a,s,c=e&&"object"===(0,o.default)(e)?e:JSON.parse(r?e.toLowerCase():e);if(3!==c.version)throw new Error("Not a valid V3 wallet");if("scrypt"===c.crypto.kdf)s=c.crypto.kdfparams,a=m.syncScrypt(n.from(t),n.from(s.salt,"hex"),s.n,s.r,s.p,s.dklen);else{if("pbkdf2"!==c.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(s=c.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");a=b.pbkdf2Sync(n.from(t),n.from(s.salt,"hex"),s.c,s.dklen,"sha256")}var u=n.from(c.crypto.ciphertext,"hex");if(v.sha3(n.from([].concat((0,i.default)(a.slice(16,32)),(0,i.default)(u)))).replace("0x","")!==c.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var f=b.createDecipheriv(c.crypto.cipher,a.slice(0,16),n.from(c.crypto.cipherparams.iv,"hex")),d="0x"+n.from([].concat((0,i.default)(f.update(u)),(0,i.default)(f.final()))).toString("hex");return this.privateKeyToAccount(d,!0)},k.prototype.encrypt=function(e,t,r){var a,o=this.privateKeyToAccount(e,!0),s=(r=r||{}).salt||b.randomBytes(32),c=r.iv||b.randomBytes(16),u=r.kdf||"scrypt",f={dklen:r.dklen||32,salt:s.toString("hex")};if("pbkdf2"===u)f.c=r.c||262144,f.prf="hmac-sha256",a=b.pbkdf2Sync(n.from(t),n.from(f.salt,"hex"),f.c,f.dklen,"sha256");else{if("scrypt"!==u)throw new Error("Unsupported kdf");f.n=r.n||8192,f.r=r.r||8,f.p=r.p||1,a=m.syncScrypt(n.from(t),n.from(f.salt,"hex"),f.n,f.r,f.p,f.dklen)}var d=b.createCipheriv(r.cipher||"aes-128-ctr",a.slice(0,16),c);if(!d)throw new Error("Unsupported cipher");var l=n.from([].concat((0,i.default)(d.update(n.from(o.privateKey.replace("0x",""),"hex"))),(0,i.default)(d.final()))),h=v.sha3(n.from([].concat((0,i.default)(a.slice(16,32)),(0,i.default)(l)))).replace("0x","");return{version:3,id:g.v4({random:r.uuid||b.randomBytes(16)}),address:o.address.toLowerCase().replace("0x",""),crypto:{ciphertext:l.toString("hex"),cipherparams:{iv:c.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:u,kdfparams:f,mac:h.toString("hex")}}},I.prototype._findSafeIndex=function(e){return e=e||0,this.hasOwnProperty(e)?this._findSafeIndex(e+1):e},I.prototype._currentIndexes=function(){return Object.keys(this).map((function(e){return parseInt(e)})).filter((function(e){return e<9e20}))},I.prototype.create=function(e,t){for(var r=0;r0&&e.topics.length!==n+1&&(t={anonymous:!0,inputs:[]})}var a=t.anonymous?e.topics:e.topics.slice(1);return r.returnValues=b.decodeLog(t.inputs,e.data,a),delete r.returnValues.__length__,r.event=t.name,r.signature=t.anonymous||!e.topics[0]?null:e.topics[0],r.raw={data:r.data,topics:r.topics},delete r.data,delete r.topics,r},m.prototype._encodeMethodABI=function(){var e=this._method.signature,t=this.arguments||[],r=!1,n=this._parent.options.jsonInterface.filter((function(t){return"constructor"===e&&t.type===e||(t.signature===e||t.signature===e.replace("0x","")||t.name===e)&&"function"===t.type})).map((function(e){var n=Array.isArray(e.inputs)?e.inputs.length:0;if(n!==t.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+n+" arguments.");return"function"===e.type&&(r=e.signature),Array.isArray(e.inputs)?e.inputs:[]})).map((function(e){return b.encodeParameters(e,t).replace("0x","")}))[0]||"";if("constructor"===e){if(!this._deployData)throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");return this._deployData.startsWith("0x")||(this._deployData="0x"+this._deployData),this._deployData+n}var a=r?r+n:n;if(!a)throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".');return a},m.prototype._decodeMethodReturn=function(e,t){if(!t)return null;t=t.length>=2?t.slice(2):t;var r=b.decodeParameters(e,t);return 1===r.__length__?r[0]:(delete r.__length__,r)},m.prototype.deploy=function(e,t){if((e=e||{}).arguments=e.arguments||[],!(e=this._getOrSetDefaultOptions(e)).data){if("function"==typeof t)return t(h.ContractMissingDeployDataError());throw h.ContractMissingDeployDataError()}var r=this.options.jsonInterface.find((function(e){return"constructor"===e.type}))||{};return r.signature="constructor",this._createTxObject.apply({method:r,parent:this,deployData:e.data,_ethAccounts:this.constructor._ethAccounts},e.arguments)},m.prototype._generateEventOptions=function(){var e=Array.prototype.slice.call(arguments),t=this._getCallback(e),r="object"===(!!e[e.length-1]&&(0,i.default)(e[e.length-1]))?e.pop():{},n="string"==typeof e[0]?e[0]:"allevents",a="allevents"===n.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find((function(e){return"event"===e.type&&(e.name===n||e.signature==="0x"+n.replace("0x",""))}));if(!a)throw h.ContractEventDoesNotExistError(n);if(!f.isAddress(this.options.address))throw h.ContractNoAddressDefinedError();return{params:this._encodeEventABI(a,r),event:a,callback:t}},m.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},m.prototype.once=function(e,t,r){var n=Array.prototype.slice.call(arguments);if(!(r=this._getCallback(n)))throw h.ContractOnceRequiresCallbackError();t&&delete t.fromBlock,this._on(e,t,(function(e,t,n){n.unsubscribe(),"function"==typeof r&&r(e,t,n)}))},m.prototype._on=function(){var e=this._generateEventOptions.apply(this,arguments);e.params&&e.params.toBlock&&(delete e.params.toBlock,console.warn("Invalid option: toBlock. Use getPastEvents for specific range.")),this._checkListener("newListener",e.event.name),this._checkListener("removeListener",e.event.name);var t=new d({subscription:{params:1,inputFormatter:[l.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event),subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},type:"eth",requestManager:this._requestManager});return t.subscribe("logs",e.params,e.callback||function(){}),t},m.prototype.getPastEvents=function(){var e=this._generateEventOptions.apply(this,arguments),t=new u({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[l.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event)});t.setRequestManager(this._requestManager);var r=t.buildCall();return t=null,r(e.params,e.callback)},m.prototype._createTxObject=function(){var e=Array.prototype.slice.call(arguments),t={};if("function"===this.method.type&&(t.call=this.parent._executeMethod.bind(t,"call"),t.call.request=this.parent._executeMethod.bind(t,"call",!0)),t.send=this.parent._executeMethod.bind(t,"send"),t.send.request=this.parent._executeMethod.bind(t,"send",!0),t.encodeABI=this.parent._encodeMethodABI.bind(t),t.estimateGas=this.parent._executeMethod.bind(t,"estimate"),t.createAccessList=this.parent._executeMethod.bind(t,"createAccessList"),e&&this.method.inputs&&e.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,e);throw h.InvalidNumberOfParams(e.length,this.method.inputs.length,this.method.name)}return t.arguments=e||[],t._method=this.method,t._parent=this.parent,t._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(t._deployData=this.deployData),t},m.prototype._processExecuteArguments=function(e,t){var r={};if(r.type=e.shift(),r.callback=this._parent._getCallback(e),"call"!==r.type||!0===e[e.length-1]||"string"!=typeof e[e.length-1]&&!isFinite(e[e.length-1])||(r.defaultBlock=e.pop()),r.options="object"===(!!e[e.length-1]&&(0,i.default)(e[e.length-1]))?e.pop():{},r.generateRequest=!0===e[e.length-1]&&e.pop(),r.options=this._parent._getOrSetDefaultOptions(r.options),r.options.data=this.encodeABI(),!this._deployData&&!f.isAddress(this._parent.options.address))throw h.ContractNoAddressDefinedError();return this._deployData||(r.options.to=this._parent.options.address),r.options.data?r:f._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),t.eventEmitter,t.reject,r.callback)},m.prototype._executeMethod=function(){var e=this,t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),r),r=p("send"!==t.type),n=e.constructor._ethAccounts||e._ethAccounts;if(t.generateRequest){var a={params:[l.inputCallFormatter.call(this._parent,t.options)],callback:t.callback};return"call"===t.type?(a.params.push(l.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)),a.method="eth_call",a.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):a.method="eth_sendTransaction",a}switch(t.type){case"createAccessList":return f.isAddress(t.options.from)?new u({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[l.inputTransactionFormatter,l.inputDefaultBlockNumberFormatter],requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback):f._fireError(h.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);case"estimate":return new u({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[l.inputCallFormatter],outputFormatter:f.hexToNumber,requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback);case"call":var i=new u({name:"call",call:"eth_call",params:2,inputFormatter:[l.inputCallFormatter,l.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,handleRevert:e._parent.handleRevert,abiCoder:b}).createFunction();return i(t.options,t.defaultBlock,t.callback);case"send":if(!f.isAddress(t.options.from))return f._fireError(h.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);if("boolean"==typeof this._method.payable&&!this._method.payable&&t.options.value&&t.options.value>0)return f._fireError(new Error("Can not send value to non-payable contract method or constructor"),r.eventEmitter,r.reject,t.callback);var o={receiptFormatter:function(t){if(Array.isArray(t.logs)){var r=t.logs.map((function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)}));t.events={};var n=0;r.forEach((function(e){e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[n]=e,n++)})),delete t.logs}return t},contractDeployFormatter:function(t){var r=e._parent.clone();return r.options.address=t.contractAddress,r}};return new u({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[l.inputTransactionFormatter],requestManager:e._parent._requestManager,accounts:e.constructor._ethAccounts||e._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,transactionBlockTimeout:e._parent.transactionBlockTimeout,transactionConfirmationBlocks:e._parent.transactionConfirmationBlocks,transactionPollingTimeout:e._parent.transactionPollingTimeout,transactionPollingInterval:e._parent.transactionPollingInterval,defaultCommon:e._parent.defaultCommon,defaultChain:e._parent.defaultChain,defaultHardfork:e._parent.defaultHardfork,handleRevert:e._parent.handleRevert,extraFormatters:o,abiCoder:b}).createFunction()(t.options,t.callback);default:throw new Error('Method "'+t.type+'" not implemented.')}},e.exports=m},6764:function(e,t,r){"use strict";var n=r(8847),a=n(r(2247)),i=n(r(5698)),o=r(5160),s=r(1314).formatters,c=r(8161),u=r(1841),f=r(2867),d=r(2689);function l(e){this.eth=e;var t=null;this._detectedAddress=null,this._lastSyncCheck=null,Object.defineProperty(this,"registry",{get:function(){return new u(this)},enumerable:!0}),Object.defineProperty(this,"resolverMethodHandler",{get:function(){return new f(this.registry)},enumerable:!0}),Object.defineProperty(this,"registryAddress",{get:function(){return t},set:function(e){t=null!==e?s.inputAddressFormatter(e):e},enumerable:!0})}l.prototype.supportsInterface=function(e,t,r){return this.getResolver(e).then((function(e){return c.isHexStrict(t)||(t=c.sha3(t).slice(0,10)),e.methods.supportsInterface(t).call(r)})).catch((function(e){if("function"!=typeof r)throw e;r(e,null)}))},l.prototype.resolver=function(e,t){return this.registry.resolver(e,t)},l.prototype.getResolver=function(e,t){return this.registry.getResolver(e,t)},l.prototype.setResolver=function(e,t,r,n){return this.registry.setResolver(e,t,r,n)},l.prototype.setRecord=function(e,t,r,n,a,i){return this.registry.setRecord(e,t,r,n,a,i)},l.prototype.setSubnodeRecord=function(e,t,r,n,a,i,o){return this.registry.setSubnodeRecord(e,t,r,n,a,i,o)},l.prototype.setApprovalForAll=function(e,t,r,n){return this.registry.setApprovalForAll(e,t,r,n)},l.prototype.isApprovedForAll=function(e,t,r){return this.registry.isApprovedForAll(e,t,r)},l.prototype.recordExists=function(e,t){return this.registry.recordExists(e,t)},l.prototype.setSubnodeOwner=function(e,t,r,n,a){return this.registry.setSubnodeOwner(e,t,r,n,a)},l.prototype.getTTL=function(e,t){return this.registry.getTTL(e,t)},l.prototype.setTTL=function(e,t,r,n){return this.registry.setTTL(e,t,r,n)},l.prototype.getOwner=function(e,t){return this.registry.getOwner(e,t)},l.prototype.setOwner=function(e,t,r,n){return this.registry.setOwner(e,t,r,n)},l.prototype.getAddress=function(e,t){return this.resolverMethodHandler.method(e,"addr",[]).call(t)},l.prototype.setAddress=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setAddr",[t]).send(r,n)},l.prototype.getPubkey=function(e,t){return this.resolverMethodHandler.method(e,"pubkey",[],null,t).call(t)},l.prototype.setPubkey=function(e,t,r,n,a){return this.resolverMethodHandler.method(e,"setPubkey",[t,r]).send(n,a)},l.prototype.getContent=function(e,t){return this.resolverMethodHandler.method(e,"content",[]).call(t)},l.prototype.setContent=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setContent",[t]).send(r,n)},l.prototype.getContenthash=function(e,t){return this.resolverMethodHandler.method(e,"contenthash",[],d.decode).call(t)},l.prototype.setContenthash=function(e,t,r,n){var a;try{a=d.encode(t)}catch(e){var i=new Error("Could not encode "+t+". See docs for supported hash protocols.");if("function"==typeof n)return void n(i,null);throw i}return this.resolverMethodHandler.method(e,"setContenthash",[a]).send(r,n)},l.prototype.getMultihash=function(e,t){return this.resolverMethodHandler.method(e,"multihash",[]).call(t)},l.prototype.setMultihash=function(e,t,r,n){return this.resolverMethodHandler.method(e,"multihash",[t]).send(r,n)},l.prototype.checkNetwork=(0,i.default)(a.default.mark((function e(){var t,r,n,i,s;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=new Date/1e3,this._lastSyncCheck&&!(t-this._lastSyncCheck>3600)){e.next=9;break}return e.next=4,this.eth.getBlock("latest");case 4:if(r=e.sent,!((n=t-r.timestamp)>3600)){e.next=8;break}throw new Error("Network not synced; last block was "+n+" seconds ago");case 8:this._lastSyncCheck=t;case 9:if(!this.registryAddress){e.next=11;break}return e.abrupt("return",this.registryAddress);case 11:if(this._detectedAddress){e.next=20;break}return e.next=14,this.eth.net.getNetworkType();case 14:if(i=e.sent,void 0!==(s=o.addresses[i])){e.next=18;break}throw new Error("ENS is not supported on network "+i);case 18:return this._detectedAddress=s,e.abrupt("return",this._detectedAddress);case 20:return e.abrupt("return",this._detectedAddress);case 21:case"end":return e.stop()}}),e,this)}))),e.exports=l},5160:function(e){"use strict";e.exports={addresses:{main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",ropsten:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",rinkeby:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},interfaceIds:{addr:"0x3b3b57de",setAddr:"0x3b3b57de",pubkey:"0xc8690233",setPubkey:"0xc8690233",contenthash:"0xbc1c58d1",setContenthash:"0xbc1c58d1",content:"0xd8389dc5",setContent:"0xd8389dc5"}}},1841:function(e,t,r){"use strict";var n=r(8164),a=r(1006),i=r(282),o=r(1314).formatters,s=r(8161),c=r(3205),u=r(8384);function f(e){var t=this;this.ens=e,this.contract=e.checkNetwork().then((function(e){var r=new n(c,e);return r.setProvider(t.ens.eth.currentProvider),r}))}f.prototype.owner=function(e,t){return console.warn('Deprecated: Please use the "getOwner" method instead of "owner".'),this.getOwner(e,t)},f.prototype.getOwner=function(e,t){var r=new i(!0);return this.contract.then((function(t){return t.methods.owner(a.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},f.prototype.setOwner=function(e,t,r,n){var s=new i(!0);return this.contract.then((function(n){return n.methods.setOwner(a.hash(e),o.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},f.prototype.getTTL=function(e,t){var r=new i(!0);return this.contract.then((function(t){return t.methods.ttl(a.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},f.prototype.setTTL=function(e,t,r,n){var o=new i(!0);return this.contract.then((function(n){return n.methods.setTTL(a.hash(e),t).send(r)})).then((function(e){"function"!=typeof n?o.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?o.reject(e):n(e,null)})),o.eventEmitter},f.prototype.setSubnodeOwner=function(e,t,r,n,c){var u=new i(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(i){return i.methods.setSubnodeOwner(a.hash(e),t,o.inputAddressFormatter(r)).send(n)})).then((function(e){"function"!=typeof c?u.resolve(e):c(e,e)})).catch((function(e){"function"!=typeof c?u.reject(e):c(e,null)})),u.eventEmitter},f.prototype.setRecord=function(e,t,r,n,s,c){var u=new i(!0);return this.contract.then((function(i){return i.methods.setRecord(a.hash(e),o.inputAddressFormatter(t),o.inputAddressFormatter(r),n).send(s)})).then((function(e){"function"!=typeof c?u.resolve(e):c(e,e)})).catch((function(e){"function"!=typeof c?u.reject(e):c(e,null)})),u.eventEmitter},f.prototype.setSubnodeRecord=function(e,t,r,n,c,u,f){var d=new i(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(i){return i.methods.setSubnodeRecord(a.hash(e),t,o.inputAddressFormatter(r),o.inputAddressFormatter(n),c).send(u)})).then((function(e){"function"!=typeof f?d.resolve(e):f(e,e)})).catch((function(e){"function"!=typeof f?d.reject(e):f(e,null)})),d.eventEmitter},f.prototype.setApprovalForAll=function(e,t,r,n){var a=new i(!0);return this.contract.then((function(n){return n.methods.setApprovalForAll(o.inputAddressFormatter(e),t).send(r)})).then((function(e){"function"!=typeof n?a.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?a.reject(e):n(e,null)})),a.eventEmitter},f.prototype.isApprovedForAll=function(e,t,r){var n=new i(!0);return this.contract.then((function(r){return r.methods.isApprovedForAll(o.inputAddressFormatter(e),o.inputAddressFormatter(t)).call()})).then((function(e){"function"!=typeof r?n.resolve(e):r(e,e)})).catch((function(e){"function"!=typeof r?n.reject(e):r(e,null)})),n.eventEmitter},f.prototype.recordExists=function(e,t){var r=new i(!0);return this.contract.then((function(t){return t.methods.recordExists(a.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},f.prototype.resolver=function(e,t){return console.warn('Deprecated: Please use the "getResolver" method instead of "resolver".'),this.getResolver(e,t)},f.prototype.getResolver=function(e,t){var r=this;return this.contract.then((function(t){return t.methods.resolver(a.hash(e)).call()})).then((function(e){var a=new n(u,e);if(a.setProvider(r.ens.eth.currentProvider),"function"!=typeof t)return a;t(a,a)})).catch((function(e){if("function"!=typeof t)throw e;t(e,null)}))},f.prototype.setResolver=function(e,t,r,n){var s=new i(!0);return this.contract.then((function(n){return n.methods.setResolver(a.hash(e),o.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},e.exports=f},715:function(e,t,r){"use strict";var n=r(6764);e.exports=n},2867:function(e,t,r){"use strict";var n=r(8847),a=n(r(2247)),i=n(r(5698)),o=r(282),s=r(1006),c=r(1314).errors,u=r(5160).interfaceIds;function f(e){this.registry=e}f.prototype.method=function(e,t,r,n,a){return{call:this.call.bind({ensName:e,methodName:t,methodArguments:r,callback:a,parent:this,outputFormatter:n}),send:this.send.bind({ensName:e,methodName:t,methodArguments:r,callback:a,parent:this})}},f.prototype.call=function(e){var t=this,r=new o,n=this.parent.prepareArguments(this.ensName,this.methodArguments),s=this.outputFormatter||null;return this.parent.registry.getResolver(this.ensName).then(function(){var o=(0,i.default)(a.default.mark((function i(o){return a.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t.parent.checkInterfaceSupport(o,t.methodName);case 2:t.parent.handleCall(r,o.methods[t.methodName],n,s,e);case 3:case"end":return a.stop()}}),i)})));return function(e){return o.apply(this,arguments)}}()).catch((function(t){"function"!=typeof e?r.reject(t):e(t,null)})),r.eventEmitter},f.prototype.send=function(e,t){var r=this,n=new o,s=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.getResolver(this.ensName).then(function(){var o=(0,i.default)(a.default.mark((function i(o){return a.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,r.parent.checkInterfaceSupport(o,r.methodName);case 2:r.parent.handleSend(n,o.methods[r.methodName],s,e,t);case 3:case"end":return a.stop()}}),i)})));return function(e){return o.apply(this,arguments)}}()).catch((function(e){"function"!=typeof t?n.reject(e):t(e,null)})),n.eventEmitter},f.prototype.handleCall=function(e,t,r,n,a){return t.apply(this,r).call().then((function(t){n&&(t=n(t)),"function"!=typeof a?e.resolve(t):a(t,t)})).catch((function(t){"function"!=typeof a?e.reject(t):a(t,null)})),e},f.prototype.handleSend=function(e,t,r,n,a){return t.apply(this,r).send(n).on("sending",(function(){e.eventEmitter.emit("sending")})).on("sent",(function(){e.eventEmitter.emit("sent")})).on("transactionHash",(function(t){e.eventEmitter.emit("transactionHash",t)})).on("confirmation",(function(t,r){e.eventEmitter.emit("confirmation",t,r)})).on("receipt",(function(t){e.eventEmitter.emit("receipt",t),e.resolve(t),"function"==typeof a&&a(t,t)})).on("error",(function(t){e.eventEmitter.emit("error",t),"function"!=typeof a?e.reject(t):a(t,null)})),e},f.prototype.prepareArguments=function(e,t){var r=s.hash(e);return t.length>0?(t.unshift(r),t):[r]},f.prototype.checkInterfaceSupport=function(){var e=(0,i.default)(a.default.mark((function e(t,r){var n;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u[r]){e.next=2;break}return e.abrupt("return");case 2:return n=!1,e.prev=3,e.next=6,t.methods.supportsInterface(u[r]).call();case 6:n=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.warn('Could not verify interface of resolver contract at "'+t.options.address+'". ');case 12:if(n){e.next=14;break}throw c.ResolverMethodMissingError(t.options.address,r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,r){return e.apply(this,arguments)}}(),e.exports=f},2689:function(e,t,r){"use strict";var n=r(4308);e.exports={decode:function(e){var t=null,r=null,a=null;if(e&&e.error)return{protocolType:null,decoded:e.error};if(e)try{t=n.decode(e);var i=n.getCodec(e);"ipfs-ns"===i?r="ipfs":"swarm-ns"===i?r="bzz":"onion"===i?r="onion":"onion3"===i?r="onion3":t=e}catch(e){a=e.message}return{protocolType:r,decoded:t,error:a}},encode:function(e){var t,r,a=!1;if(e){var i=e.match(/^(ipfs|bzz|onion|onion3):\/\/(.*)/)||e.match(/\/(ipfs)\/(.*)/);i&&(r=i[1],t=i[2]);try{if("ipfs"===r)t.length>=4&&(a="0x"+n.fromIpfs(t));else if("bzz"===r)t.length>=4&&(a="0x"+n.fromSwarm(t));else if("onion"===r)16===t.length&&(a="0x"+n.encode("onion",t));else{if("onion3"!==r)throw new Error("Could not encode content hash: unsupported content type");56===t.length&&(a="0x"+n.encode("onion3",t))}}catch(e){throw e}}return a}}},3205:function(e){"use strict";e.exports=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setSubnodeRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},8384:function(e){"use strict";e.exports=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setMultihash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"multihash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"contenthash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setContenthash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},6:function(e,t,r){"use strict";var n=r(8847),a=n(r(9721)),i=n(r(8985)),o=r(8161),s=r(1734),c=function(e){var t="A".charCodeAt(0),r="Z".charCodeAt(0);return(e=(e=e.toUpperCase()).slice(4)+e.slice(0,4)).split("").map((function(e){var n=e.charCodeAt(0);return n>=t&&n<=r?n-t+10:e})).join("")},u=function(e){for(var t,r=e;r.length>2;)t=r.slice(0,9),r=parseInt(t,10)%97+r.slice(t.length);return parseInt(r,10)%97},f=function(){function e(t){(0,a.default)(this,e),this._iban=t}return(0,i.default)(e,[{key:"isValid",value:function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===u(c(this._iban))}},{key:"isDirect",value:function(){return 34===this._iban.length||35===this._iban.length}},{key:"isIndirect",value:function(){return 20===this._iban.length}},{key:"checksum",value:function(){return this._iban.slice(2,4)}},{key:"institution",value:function(){return this.isIndirect()?this._iban.slice(7,11):""}},{key:"client",value:function(){return this.isIndirect()?this._iban.slice(11):""}},{key:"toAddress",value:function(){if(this.isDirect()){var e=this._iban.slice(4),t=new s(e,36);return o.toChecksumAddress(t.toString(16,20))}return""}},{key:"toString",value:function(){return this._iban}}],[{key:"toAddress",value:function(t){if(!(t=new e(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()}},{key:"toIban",value:function(t){return e.fromAddress(t).toString()}},{key:"fromAddress",value:function(t){if(!o.isAddress(t))throw new Error("Provided address is not a valid address: "+t);t=t.replace("0x","").replace("0X","");var r=function(e,t){for(var r=e;r.length<30;)r="0"+r;return r}(new s(t,16).toString(36));return e.fromBban(r.toUpperCase())}},{key:"fromBban",value:function(t){return new e("XE"+("0"+(98-u(c("XE00"+t)))).slice(-2)+t)}},{key:"createIndirect",value:function(t){return e.fromBban("ETH"+t.institution+t.identifier)}},{key:"isValid",value:function(t){return new e(t).isValid()}}]),e}();e.exports=f},6306:function(e,t,r){"use strict";var n=r(606),a=r(3349),i=r(8161),o=r(473),s=r(1314).formatters,c=function(){var e=this;n.packageInit(this,arguments),this.net=new o(this);var t=null,r="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return t},set:function(e){return e&&(t=i.toChecksumAddress(s.inputAddressFormatter(e))),c.forEach((function(e){e.defaultAccount=t})),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return r},set:function(e){return r=e,c.forEach((function(e){e.defaultBlock=r})),e},enumerable:!0});var c=[new a({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:i.toChecksumAddress}),new a({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:i.toChecksumAddress}),new a({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[s.inputAddressFormatter,null,null]}),new a({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[s.inputAddressFormatter]}),new a({name:"importRawKey",call:"personal_importRawKey",params:2}),new a({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new a({name:"signTransaction",call:"personal_signTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new a({name:"sign",call:"personal_sign",params:3,inputFormatter:[s.inputSignFormatter,s.inputAddressFormatter,null]}),new a({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[s.inputSignFormatter,null]})];c.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount}))};n.addProviders(c),e.exports=c},8130:function(e){"use strict";e.exports=function(e){var t,r=this;return this.net.getId().then((function(e){return t=e,r.getBlock(0)})).then((function(r){var n="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===r.hash&&1===t&&(n="main"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===r.hash&&3===t&&(n="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===r.hash&&4===t&&(n="rinkeby"),"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a"===r.hash&&5===t&&(n="goerli"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===r.hash&&42===t&&(n="kovan"),"function"==typeof e&&e(null,n),n})).catch((function(t){if("function"!=typeof e)throw t;e(t)}))}},6748:function(e,t,r){"use strict";var n=r(606),a=r(1314),i=r(4178).subscriptions,o=r(3349),s=r(8161),c=r(473),u=r(715),f=r(6306),d=r(8164),l=r(6),h=r(9819),p=r(9901),b=r(8130),m=a.formatters,g=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},v=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},y=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},A=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},w=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},x=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),e.personal.setRequestManager(r),e.accounts.setRequestManager(r),e.Contract._requestManager=e._requestManager,e.Contract.currentProvider=e._provider,!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager),e.ens._detectedAddress=null,e.ens._lastSyncCheck=null};var a,x,E,_=!1,C=null,k="latest",B=50,I=24,S=750,O=1e3,M=10,D=100;Object.defineProperty(this,"handleRevert",{get:function(){return _},set:function(t){_=t,e.Contract.handleRevert=_,R.forEach((function(e){e.handleRevert=_}))},enumerable:!0}),Object.defineProperty(this,"defaultCommon",{get:function(){return E},set:function(t){E=t,e.Contract.defaultCommon=E,R.forEach((function(e){e.defaultCommon=E}))},enumerable:!0}),Object.defineProperty(this,"defaultHardfork",{get:function(){return x},set:function(t){x=t,e.Contract.defaultHardfork=x,R.forEach((function(e){e.defaultHardfork=x}))},enumerable:!0}),Object.defineProperty(this,"defaultChain",{get:function(){return a},set:function(t){a=t,e.Contract.defaultChain=a,R.forEach((function(e){e.defaultChain=a}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingTimeout",{get:function(){return S},set:function(t){S=t,e.Contract.transactionPollingTimeout=S,R.forEach((function(e){e.transactionPollingTimeout=S}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingInterval",{get:function(){return O},set:function(t){O=t,e.Contract.transactionPollingInterval=O,R.forEach((function(e){e.transactionPollingInterval=O}))},enumerable:!0}),Object.defineProperty(this,"transactionConfirmationBlocks",{get:function(){return I},set:function(t){I=t,e.Contract.transactionConfirmationBlocks=I,R.forEach((function(e){e.transactionConfirmationBlocks=I}))},enumerable:!0}),Object.defineProperty(this,"transactionBlockTimeout",{get:function(){return B},set:function(t){B=t,e.Contract.transactionBlockTimeout=B,R.forEach((function(e){e.transactionBlockTimeout=B}))},enumerable:!0}),Object.defineProperty(this,"blockHeaderTimeout",{get:function(){return M},set:function(t){M=t,e.Contract.blockHeaderTimeout=M,R.forEach((function(e){e.blockHeaderTimeout=M}))},enumerable:!0}),Object.defineProperty(this,"defaultAccount",{get:function(){return C},set:function(t){return t&&(C=s.toChecksumAddress(m.inputAddressFormatter(t))),e.Contract.defaultAccount=C,e.personal.defaultAccount=C,R.forEach((function(e){e.defaultAccount=C})),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return k},set:function(t){return k=t,e.Contract.defaultBlock=k,e.personal.defaultBlock=k,R.forEach((function(e){e.defaultBlock=k})),t},enumerable:!0}),Object.defineProperty(this,"maxListenersWarningThreshold",{get:function(){return D},set:function(t){e.currentProvider&&e.currentProvider.setMaxListeners&&(D=t,e.currentProvider.setMaxListeners(t))},enumerable:!0}),this.clearSubscriptions=e._requestManager.clearSubscriptions.bind(e._requestManager),this.removeSubscriptionById=e._requestManager.removeSubscription.bind(e._requestManager),this.net=new c(this),this.net.getNetworkType=b.bind(this),this.accounts=new h(this),this.personal=new f(this),this.personal.defaultAccount=this.defaultAccount,this.maxListenersWarningThreshold=D;var T=this,F=function(){d.apply(this,arguments);var e=this,t=T.setProvider;T.setProvider=function(){t.apply(T,arguments),n.packageInit(e,[T])}};F.setProvider=function(){d.setProvider.apply(this,arguments)},F.prototype=Object.create(d.prototype),F.prototype.constructor=F,this.Contract=F,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.transactionBlockTimeout=this.transactionBlockTimeout,this.Contract.transactionConfirmationBlocks=this.transactionConfirmationBlocks,this.Contract.transactionPollingTimeout=this.transactionPollingTimeout,this.Contract.transactionPollingInterval=this.transactionPollingInterval,this.Contract.blockHeaderTimeout=this.blockHeaderTimeout,this.Contract.handleRevert=this.handleRevert,this.Contract._requestManager=this._requestManager,this.Contract._ethAccounts=this.accounts,this.Contract.currentProvider=this._requestManager.provider,this.Iban=l,this.abi=p,this.ens=new u(this);var R=[new o({name:"getNodeInfo",call:"web3_clientVersion"}),new o({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new o({name:"getCoinbase",call:"eth_coinbase",params:0}),new o({name:"isMining",call:"eth_mining",params:0}),new o({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:s.hexToNumber}),new o({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:m.outputSyncingFormatter}),new o({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:m.outputBigNumberFormatter}),new o({name:"getFeeHistory",call:"eth_feeHistory",params:3,inputFormatter:[s.numberToHex,m.inputBlockNumberFormatter,null]}),new o({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:s.toChecksumAddress}),new o({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:s.hexToNumber}),new o({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputBigNumberFormatter}),new o({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[m.inputAddressFormatter,s.numberToHex,m.inputDefaultBlockNumberFormatter]}),new o({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter]}),new o({name:"getBlock",call:g,params:2,inputFormatter:[m.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:m.outputBlockFormatter}),new o({name:"getUncle",call:y,params:2,inputFormatter:[m.inputBlockNumberFormatter,s.numberToHex],outputFormatter:m.outputBlockFormatter}),new o({name:"getBlockTransactionCount",call:A,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new o({name:"getBlockUncleCount",call:w,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new o({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionFormatter}),new o({name:"getTransactionFromBlock",call:v,params:2,inputFormatter:[m.inputBlockNumberFormatter,s.numberToHex],outputFormatter:m.outputTransactionFormatter}),new o({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionReceiptFormatter}),new o({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:s.hexToNumber}),new o({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null],abiCoder:p}),new o({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[m.inputTransactionFormatter]}),new o({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[m.inputTransactionFormatter],abiCoder:p}),new o({name:"sign",call:"eth_sign",params:2,inputFormatter:[m.inputSignFormatter,m.inputAddressFormatter],transformPayload:function(e){return e.params.reverse(),e}}),new o({name:"call",call:"eth_call",params:2,inputFormatter:[m.inputCallFormatter,m.inputDefaultBlockNumberFormatter],abiCoder:p}),new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[m.inputCallFormatter],outputFormatter:s.hexToNumber}),new o({name:"submitWork",call:"eth_submitWork",params:3}),new o({name:"getWork",call:"eth_getWork",params:0}),new o({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter}),new o({name:"getChainId",call:"eth_chainId",params:0,outputFormatter:s.hexToNumber}),new o({name:"requestAccounts",call:"eth_requestAccounts",params:0,outputFormatter:s.toChecksumAddress}),new o({name:"getProof",call:"eth_getProof",params:3,inputFormatter:[m.inputAddressFormatter,m.inputStorageKeysFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputProofFormatter}),new o({name:"getPendingTransactions",call:"eth_pendingTransactions",params:0,outputFormatter:m.outputTransactionFormatter}),new o({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[m.inputTransactionFormatter,m.inputDefaultBlockNumberFormatter]}),new i({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:m.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter,subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},syncing:{params:0,outputFormatter:m.outputSyncingFormatter,subscriptionHandler:function(e){var t=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",t._isSyncing),"function"==typeof this.callback&&this.callback(null,t._isSyncing,this),setTimeout((function(){t.emit("data",e),"function"==typeof t.callback&&t.callback(null,e,t)}),0)):(this.emit("data",e),"function"==typeof t.callback&&this.callback(null,e,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout((function(){e.currentBlock>e.highestBlock-200&&(t._isSyncing=!1,t.emit("changed",t._isSyncing),"function"==typeof t.callback&&t.callback(null,t._isSyncing,t))}),500))}}}})];R.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager,e.accounts),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount,t.transactionBlockTimeout=e.transactionBlockTimeout,t.transactionConfirmationBlocks=e.transactionConfirmationBlocks,t.transactionPollingTimeout=e.transactionPollingTimeout,t.transactionPollingInterval=e.transactionPollingInterval,t.handleRevert=e.handleRevert}))};n.addProviders(x),e.exports=x},473:function(e,t,r){"use strict";var n=r(606),a=r(3349),i=r(8161),o=function(){var e=this;n.packageInit(this,arguments),[new a({name:"getId",call:"net_version",params:0,outputFormatter:parseInt}),new a({name:"isListening",call:"net_listening",params:0}),new a({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:i.hexToNumber})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};n.addProviders(o),e.exports=o},4565:function(e,t,r){"use strict";var n=r(1314).errors,a=r(9519),i=r(912);r(2439),r(4258).polyfill(),void 0===r.g||r.g.AbortController||r(3368);var o=function(e,t){t=t||{},this.withCredentials=t.withCredentials,this.timeout=t.timeout||0,this.headers=t.headers,this.agent=t.agent,this.connected=!1;var r=!1!==t.keepAlive;this.host=e||"http://localhost:8545",this.agent||("https"===this.host.substring(0,5)?this.httpsAgent=new i.Agent({keepAlive:r}):this.httpAgent=new a.Agent({keepAlive:r}))};o.prototype.send=function(e,t){var r,a={method:"POST",body:JSON.stringify(e)},i={};if("undefined"!=typeof AbortController?r=new AbortController:"undefined"!=typeof window&&void 0!==window.AbortController&&(r=new window.AbortController),void 0!==r&&(a.signal=r.signal),"undefined"==typeof XMLHttpRequest){var o={httpsAgent:this.httpsAgent,httpAgent:this.httpAgent};this.agent&&(o.httpsAgent=this.agent.https,o.httpAgent=this.agent.http),"https"===this.host.substring(0,5)?a.agent=o.httpsAgent:a.agent=o.httpAgent}this.headers&&this.headers.forEach((function(e){i[e.name]=e.value})),i["Content-Type"]||(i["Content-Type"]="application/json"),this.withCredentials?a.credentials="include":a.credentials="omit",a.headers=i,this.timeout>0&&void 0!==r&&(this.timeoutId=setTimeout((function(){r.abort()}),this.timeout)),fetch(this.host,a).then(function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),e.json().then((function(e){t(null,e)})).catch((function(r){t(n.InvalidResponse(e))}))}.bind(this)).catch(function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),"AbortError"===e.name&&t(n.ConnectionTimeout(this.timeout)),t(n.InvalidConnection(this.host))}.bind(this))},o.prototype.disconnect=function(){},o.prototype.supportsSubscriptions=function(){return!1},e.exports=o},2683:function(e,t,r){"use strict";var n=r(1314).errors,a=r(3150),i=function(e,t){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=e,this.connected=!1,this.connection=t.connect({path:this.path}),this.addDefaultEvents();var n=function(e){var t=null;Array.isArray(e)?e.forEach((function(e){r.responseCallbacks[e.id]&&(t=e.id)})):t=e.id,t||-1===e.method.indexOf("_subscription")?r.responseCallbacks[t]&&(r.responseCallbacks[t](null,e),delete r.responseCallbacks[t]):r.notificationCallbacks.forEach((function(t){"function"==typeof t&&t(e)}))};"Socket"===t.constructor.name?a(this.connection).done(n):this.connection.on("data",(function(e){r._parseResponse(e.toString()).forEach(n)}))};i.prototype.addDefaultEvents=function(){var e=this;this.connection.on("connect",(function(){e.connected=!0})),this.connection.on("close",(function(){e.connected=!1})),this.connection.on("error",(function(){e._timeout()})),this.connection.on("end",(function(){e._timeout()})),this.connection.on("timeout",(function(){e._timeout()}))},i.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var a=null;try{a=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){throw t._timeout(),n.InvalidResponse(e)}),15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,a&&r.push(a)})),r},i.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,n=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=n},i.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](n.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},i.prototype.reconnect=function(){this.connection.connect({path:this.path})},i.prototype.send=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},i.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");"data"===e?this.notificationCallbacks.push(t):this.connection.on(e,t)},i.prototype.once=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");this.connection.once(e,t)},i.prototype.removeListener=function(e,t){var r=this;"data"===e?this.notificationCallbacks.forEach((function(e,n){e===t&&r.notificationCallbacks.splice(n,1)})):this.connection.removeListener(e,t)},i.prototype.removeAllListeners=function(e){"data"===e?this.notificationCallbacks=[]:this.connection.removeAllListeners(e)},i.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},i.prototype.supportsSubscriptions=function(){return!0},e.exports=i},360:function(e,t,r){"use strict";var n=r(9142),a=r(9033).Buffer,i=r(8847)(r(3355)),o="[object process]"===Object.prototype.toString.call(void 0!==n?n:0),s="undefined"!=typeof navigator&&"ReactNative"===navigator.product,c=null,u=null;if(o||s){c=function(e){return a.from(e).toString("base64")};var f=r(1143);if(f.URL){var d=f.URL;u=function(e){return new d(e)}}else u=r(1143).parse}else c=btoa.bind("object"===("undefined"==typeof globalThis?"undefined":(0,i.default)(globalThis))?globalThis:self),u=function(e){return new URL(e)};e.exports={parseURL:u,btoa:c}},7651:function(e,t,r){"use strict";var n=r(8008),a=r(360),i=r(1314).errors,o=r(1158).w3cwebsocket,s=function(e,t){n.call(this),t=t||{},this.url=e,this._customTimeout=t.timeout||15e3,this.headers=t.headers||{},this.protocol=t.protocol||void 0,this.reconnectOptions=Object.assign({auto:!1,delay:5e3,maxAttempts:!1,onTimeout:!1},t.reconnect),this.clientConfig=t.clientConfig||void 0,this.requestOptions=t.requestOptions||void 0,this.DATA="data",this.CLOSE="close",this.ERROR="error",this.CONNECT="connect",this.RECONNECT="reconnect",this.connection=null,this.requestQueue=new Map,this.responseQueue=new Map,this.reconnectAttempts=0,this.reconnecting=!1;var r=a.parseURL(e);r.username&&r.password&&(this.headers.authorization="Basic "+a.btoa(r.username+":"+r.password)),r.auth&&(this.headers.authorization="Basic "+a.btoa(r.auth)),Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0}),this.connect()};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype.connect=function(){this.connection=new o(this.url,this.protocol,void 0,this.headers,this.requestOptions,this.clientConfig),this._addSocketListeners()},s.prototype._onMessage=function(e){var t=this;this._parseResponse("string"==typeof e.data?e.data:"").forEach((function(e){if(e.method&&-1!==e.method.indexOf("_subscription"))t.emit(t.DATA,e);else{var r=e.id;Array.isArray(e)&&(r=e[0].id),t.responseQueue.has(r)&&(void 0!==t.responseQueue.get(r).callback&&t.responseQueue.get(r).callback(!1,e),t.responseQueue.delete(r))}}))},s.prototype._onConnect=function(){if(this.emit(this.CONNECT),this.reconnectAttempts=0,this.reconnecting=!1,this.requestQueue.size>0){var e=this;this.requestQueue.forEach((function(t,r){e.send(t.payload,t.callback),e.requestQueue.delete(r)}))}},s.prototype._onClose=function(e){var t=this;!this.reconnectOptions.auto||[1e3,1001].includes(e.code)&&!1!==e.wasClean?(this.emit(this.CLOSE,e),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(i.ConnectionNotOpenError(e)),t.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(i.InvalidConnection("on WS",e)),t.responseQueue.delete(n)})),this._removeSocketListeners(),this.removeAllListeners()):this.reconnect()},s.prototype._addSocketListeners=function(){this.connection.addEventListener("message",this._onMessage.bind(this)),this.connection.addEventListener("open",this._onConnect.bind(this)),this.connection.addEventListener("close",this._onClose.bind(this))},s.prototype._removeSocketListeners=function(){this.connection.removeEventListener("message",this._onMessage),this.connection.removeEventListener("open",this._onConnect),this.connection.removeEventListener("close",this._onClose)},s.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var n=null;try{n=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){t.reconnectOptions.auto&&t.reconnectOptions.onTimeout?t.reconnect():(t.emit(t.ERROR,i.ConnectionTimeout(t._customTimeout)),t.requestQueue.size>0&&t.requestQueue.forEach((function(e,r){e.callback(i.ConnectionTimeout(t._customTimeout)),t.requestQueue.delete(r)})))}),t._customTimeout))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,n&&r.push(n)})),r},s.prototype.send=function(e,t){var r=e.id,n={payload:e,callback:t};if(Array.isArray(e)&&(r=e[0].id),this.connection.readyState===this.connection.CONNECTING||this.reconnecting)this.requestQueue.set(r,n);else{if(this.connection.readyState!==this.connection.OPEN)return this.requestQueue.delete(r),this.emit(this.ERROR,i.ConnectionNotOpenError()),void n.callback(i.ConnectionNotOpenError());this.responseQueue.set(r,n),this.requestQueue.delete(r);try{this.connection.send(JSON.stringify(n.payload))}catch(e){n.callback(e),this.responseQueue.delete(r)}}},s.prototype.reset=function(){this.responseQueue.clear(),this.requestQueue.clear(),this.removeAllListeners(),this._removeSocketListeners(),this._addSocketListeners()},s.prototype.disconnect=function(e,t){this._removeSocketListeners(),this.connection.close(e||1e3,t)},s.prototype.supportsSubscriptions=function(){return!0},s.prototype.reconnect=function(){var e=this;this.reconnecting=!0,this.responseQueue.size>0&&this.responseQueue.forEach((function(t,r){t.callback(i.PendingRequestsOnReconnectingError()),e.responseQueue.delete(r)})),!this.reconnectOptions.maxAttempts||this.reconnectAttempts0&&this.requestQueue.forEach((function(t,r){t.callback(i.MaxAttemptsReachedOnReconnectingError()),e.requestQueue.delete(r)})))},e.exports=s},2565:function(e,t,r){"use strict";var n=r(606),a=r(4178).subscriptions,i=r(3349),o=r(473),s=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager)},this.net=new o(this),[new a({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new i({name:"getVersion",call:"shh_version",params:0}),new i({name:"getInfo",call:"shh_info",params:0}),new i({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new i({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new i({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new i({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new i({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new i({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new i({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new i({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new i({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new i({name:"newSymKey",call:"shh_newSymKey",params:0}),new i({name:"addSymKey",call:"shh_addSymKey",params:1}),new i({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new i({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new i({name:"getSymKey",call:"shh_getSymKey",params:1}),new i({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new i({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new i({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new i({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new i({name:"post",call:"shh_post",params:1,inputFormatter:[null]}),new i({name:"unsubscribe",call:"shh_unsubscribe",params:1})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};s.prototype.clearSubscriptions=function(){this._requestManager.clearSubscriptions()},n.addProviders(s),e.exports=s},8161:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(7130),i=r(323),o=r(747),s=r(5010),c=r(1734),u=function e(t,r){var a=[];return r.forEach((function(r){if("object"===(0,n.default)(r.components)){if("tuple"!==r.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var i="",o=r.type.indexOf("[");o>=0&&(i=r.type.substring(o));var s=e(t,r.components);Array.isArray(s)&&t?a.push("tuple("+s.join(",")+")"+i):t?a.push("("+s+")"):a.push("("+s.join(",")+")"+i)}else a.push(r.type)})),a},f=function(e){if(!i.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r7?r+=e[n].toUpperCase():r+=e[n];return r},toHex:i.toHex,toBN:i.toBN,bytesToHex:i.bytesToHex,hexToBytes:i.hexToBytes,hexToNumberString:i.hexToNumberString,hexToNumber:i.hexToNumber,toDecimal:i.hexToNumber,numberToHex:i.numberToHex,fromDecimal:i.numberToHex,hexToUtf8:i.hexToUtf8,hexToString:i.hexToUtf8,toUtf8:i.hexToUtf8,stripHexPrefix:i.stripHexPrefix,utf8ToHex:i.utf8ToHex,stringToHex:i.utf8ToHex,fromUtf8:i.utf8ToHex,hexToAscii:f,toAscii:f,asciiToHex:d,fromAscii:d,unitMap:a.unitMap,toWei:function(e,t){if(t=l(t),!i.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return i.isBN(e)?a.toWei(e,t):a.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=l(t),!i.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return i.isBN(e)?a.fromWei(e,t):a.fromWei(e,t).toString(10)},padLeft:i.leftPad,leftPad:i.leftPad,padRight:i.rightPad,rightPad:i.rightPad,toTwosComplement:i.toTwosComplement,isBloom:i.isBloom,isUserEthereumAddressInBloom:i.isUserEthereumAddressInBloom,isContractAddressInBloom:i.isContractAddressInBloom,isTopic:i.isTopic,isTopicInBloom:i.isTopicInBloom,isInBloom:i.isInBloom,compareBlockNumbers:function(e,t){if(e===t)return 0;if("genesis"!==e&&"earliest"!==e&&0!==e||"genesis"!==t&&"earliest"!==t&&0!==t){if("genesis"===e||"earliest"===e||0===e)return-1;if("genesis"===t||"earliest"===t||0===t)return 1;if("latest"===e||"finalized"===e)return"pending"===t?-1:1;if("latest"===t||"finalized"===t)return"pending"===e?1:-1;if("pending"===e)return 1;if("pending"===t)return-1;if("safe"===e||"safe"===t)return;var r=new c(e),n=new c(t);return r.lt(n)?-1:r.eq(n)?0:1}return 0},toNumber:i.toNumber}},747:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(1734),i=r(323),o=function(e){var t=(0,n.default)(e);if("string"===t)return i.isHexStrict(e)?new a(e.replace(/0x/i,""),16):new a(e,10);if("number"===t)return new a(e);if(i.isBigNumber(e))return new a(e.toString(10));if(i.isBN(e))return e;throw new Error(e+" is not a number")},s=function(e,t,r){var n,s;if("bytes"===(e=function(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}(e))){if(t.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+t.length);return t}if("string"===e)return i.utf8ToHex(t);if("bool"===e)return t?"01":"00";if(e.startsWith("address")){if(n=r?64:40,!i.isAddress(t))throw new Error(t+" is not a valid address, or the checksum is invalid.");return i.leftPad(t.toLowerCase(),n)}if(n=function(e){var t=/^\D+(\d+).*$/.exec(e);return t?parseInt(t[1],10):null}(e),e.startsWith("bytes")){if(!n)throw new Error("bytes[] not yet supported in solidity");if(r&&(n=32),n<1||n>32||n256)throw new Error("Invalid uint"+n+" size");if((s=o(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s.lt(new a(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return n?i.leftPad(s.toString("hex"),n/8*2):s}if(e.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if((s=o(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.lt(new a(0))?s.toTwos(n).toString("hex"):n?i.leftPad(s.toString("hex"),n/8*2):s}throw new Error("Unsupported or invalid type: "+e)},c=function(e){if(Array.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,r,o="";if(e&&"object"===(0,n.default)(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,o=e.hasOwnProperty("v")?e.v:e.value):(t=i.toHex(e,!0),o=i.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof o||/^(-)?0x/i.test(o)||(o=new a(o)),Array.isArray(o)){if(r=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e);return t?parseInt(t[1],10):null}(t),r&&o.length!==r)throw new Error(t+" is not matching the given array "+JSON.stringify(o));r=o.length}return Array.isArray(o)?o.map((function(e){return s(t,e,r).toString("hex").replace("0x","")})).join(""):s(t,o,r).toString("hex").replace("0x","")};e.exports={soliditySha3:function(){var e=Array.prototype.slice.call(arguments).map(c);return i.sha3("0x"+e.join(""))},soliditySha3Raw:function(){return i.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(c).join(""))},encodePacked:function(){return"0x"+Array.prototype.slice.call(arguments).map(c).join("").toLowerCase()}}},323:function(e,t,r){"use strict";var n=r(9033).Buffer,a=r(8847),i=a(r(4519)),o=a(r(3355)),s=r(1734),c=r(7277),u=r(8632),f=r(3062),d=r(9313),l=function(e){return s.isBN(e)},h=function(e){return e&&e.constructor&&"BigNumber"===e.constructor.name},p=function(e){try{return c.apply(null,arguments)}catch(t){throw new Error(t+' Given value: "'+e+'"')}},b=function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(e)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(e))||m(e))},m=function(e){e=e.replace(/^0x/i,"");for(var t=_(e.toLowerCase()).replace(/^0x/i,""),r=0;r<40;r++)if(parseInt(t[r],16)>7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1;return!0},g=function(e){var t="";e=(e=(e=(e=(e=u.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x"+t.join("")},isHex:x,isHexStrict:w,stripHexPrefix:function(e){return 0!==e&&x(e)?e.replace(/^(-)?0x/i,"$1"):e},leftPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,a=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+new Array(a).join(r||"0")+e},rightPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,a=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(a).join(r||"0")},toTwosComplement:function(e){return"0x"+p(e).toTwos(256).toString(16,64)},sha3:_,sha3Raw:function(e){return null===(e=_(e))?E:e},toNumber:function(e){return"number"==typeof e?e:v(A(e))}}},7001:function(e,t,r){"use strict";var n=r(8920).i8,a=r(606),i=r(6748),o=r(473),s=r(6306),c=r(2565),u=r(2463),f=r(8161),d=function(){var e=this;a.packageInit(this,arguments),this.version=n,this.utils=f,this.eth=new i(this),this.shh=new c(this),this.bzz=new u(this);var t=this.setProvider;this.setProvider=function(r,n){return t.apply(e,arguments),e.eth.setRequestManager(e._requestManager),e.shh.setRequestManager(e._requestManager),e.bzz.setProvider(r),!0}};d.version=n,d.utils=f,d.modules={Eth:i,Net:o,Personal:s,Shh:c,Bzz:u},a.addProviders(d),e.exports=d},9214:function(){},2361:function(){},4616:function(){},8768:function(e){"use strict";e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--n){var a=this.tryEntries[n],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),B(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;B(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},8746:function(e){"use strict";function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4519:function(e,t,r){"use strict";var n=r(2338),a=r(1436),i=r(6906),o=r(2966);e.exports=function(e,t){return n(e)||a(e,t)||i(e,t)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},7460:function(e,t,r){"use strict";var n=r(1949);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},3106:function(e,t,r){"use strict";var n=r(7907),a=r(1642),i=r(6906),o=r(2344);e.exports=function(e){return n(e)||a(e)||i(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},9662:function(e,t,r){"use strict";var n=r(3355).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},2310:function(e,t,r){"use strict";var n=r(3355).default,a=r(9662);e.exports=function(e){var t=a(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},3355:function(e){"use strict";function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},6906:function(e,t,r){"use strict";var n=r(8768);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},2247:function(e,t,r){"use strict";var n=r(8847)(r(3355)),a=r(2028)();e.exports=a;try{regeneratorRuntime=a}catch(e){"object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))?globalThis.regeneratorRuntime=a:Function("r","regeneratorRuntime = r")(a)}},3604:function(e,t,r){"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],a="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]"u"&&e(3);var o=Promise;function s(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function c(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function u(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function f(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var d="local-forage-detect-blob-support",l=void 0,h={},p=Object.prototype.toString,b="readonly",m="readwrite";function g(e){return"boolean"==typeof l?o.resolve(l):function(e){return new o((function(t){var r=e.transaction(d,m),n=i([""]);r.objectStore(d).put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return l=e}))}function v(e){var t=h[e.name],r={};r.promise=new o((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function y(e){var t=h[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function A(e,t){var r=h[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function w(e,t){return new o((function(r,n){if(h[e.name]=h[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);v(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var o=a.open.apply(a,i);t&&(o.onupgradeneeded=function(t){var r=o.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore(d)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),o.onerror=function(e){e.preventDefault(),n(o.error)},o.onsuccess=function(){var t=o.result;t.onversionchange=function(e){e.target.close()},r(t),y(e)}}))}function x(e){return w(e,!1)}function E(e){return w(e,!0)}function _(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.versione.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),a||r){if(r){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function C(e){var t=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),a=0;a0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return o.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),E(e)})).then((function(){return function(e){v(e);for(var t=h[e.name],r=t.forages,n=0;n>4,f[c++]=(15&n)<<4|a>>2,f[c++]=(3&a)<<6|63&i;return u}function K(e){var t,r=new Uint8Array(e),n="";for(t=0;t>2],n+=O[(3&r[t])<<4|r[t+1]>>4],n+=O[(15&r[t+1])<<2|r[t+2]>>6],n+=O[63&r[t+2]];return r.length%3===2?n=n.substring(0,n.length-1)+"=":r.length%3===1&&(n=n.substring(0,n.length-2)+"=="),n}var V={serialize:function(e,t){var r="";if(e&&(r=z.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===z.call(e.buffer))){var n,a=D;e instanceof ArrayBuffer?(n=e,a+=T):(n=e.buffer,"[object Int8Array]"===r?a+=R:"[object Uint8Array]"===r?a+=P:"[object Uint8ClampedArray]"===r?a+=N:"[object Int16Array]"===r?a+=j:"[object Uint16Array]"===r?a+=U:"[object Int32Array]"===r?a+=L:"[object Uint32Array]"===r?a+=Q:"[object Float32Array]"===r?a+=G:"[object Float64Array]"===r?a+=H:t(new Error("Failed to get type for BinaryArray"))),t(a+K(n))}else if("[object Blob]"===r){var i=new FileReader;i.onload=function(){var r="~~local_forage_type~"+e.type+"~"+K(this.result);t(D+F+r)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(o){console.error("Couldn't convert value into a JSON string: ",e),t(null,o)}},deserialize:function(e){if(e.substring(0,9)!==D)return JSON.parse(e);var t,r=e.substring(13),n=e.substring(9,13);if(n===F&&M.test(r)){var a=r.match(M);t=a[1],r=r.substring(a[0].length)}var o=q(r);switch(n){case T:return o;case F:return i([o],{type:t});case R:return new Int8Array(o);case P:return new Uint8Array(o);case N:return new Uint8ClampedArray(o);case j:return new Int16Array(o);case U:return new Uint16Array(o);case L:return new Int32Array(o);case Q:return new Uint32Array(o);case G:return new Float32Array(o);case H:return new Float64Array(o);default:throw new Error("Unkown type: "+n)}},stringToBuffer:q,bufferToString:K};function W(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function Y(e,t,r,n,a,i){e.executeSql(r,n,a,(function(e,o){o.code===o.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,s){s.rows.length?i(e,o):W(e,t,(function(){e.executeSql(r,n,a,i)}),i)}),i):i(e,o)}),i)}function J(e,t,r,n){var a=this;e=u(e);var i=new o((function(i,o){a.ready().then((function(){void 0===t&&(t=null);var s=t,c=a._dbInfo;c.serializer.serialize(t,(function(t,u){u?o(u):c.db.transaction((function(r){Y(r,c,"INSERT OR REPLACE INTO "+c.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){i(s)}),(function(e,t){o(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void i(J.apply(a,[e,s,r,n-1]));o(t)}}))}))})).catch(o)}));return s(i,r),i}var X={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var a=new o((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(a){return n(a)}r.db.transaction((function(a){W(a,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=V,a},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new o((function(t,n){r.ready().then((function(){var a=r._dbInfo;a.db.transaction((function(r){Y(r,a,"SELECT * FROM "+a.storeName,[],(function(r,n){for(var i=n.rows,o=i.length,s=0;s '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var a=[],i=0;i0}var ee={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=Z(e,this._defaultConfig),$()?(this._dbInfo=t,t.serializer=V,o.resolve()):o.reject()},_support:function(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,a=n.length,i=localStorage.length,o=1,s=0;s=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(a){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],a=0;a=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):o.reject("Invalid arguments"),t),n}},te=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},re=function(e,t){for(var r=e.length,n=0;n"u"?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new o((function(t,r){try{var n=e._driver,a=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(a);for(var i=ue.concat("_initStorage"),c=0,u=i.length;c>4,a[o++]=(15&c)<<4|u>>2,a[o++]=(3&u)<<6|63&f}return n}function a(e){for(var t=new Uint8Array(e),r="",n=0;n>2],r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&t[n])<<4|t[n+1]>>4],r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&t[n+1])<<2|t[n+2]>>6],r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[63&t[n+2]];return t.length%3===2?r=r.substring(0,r.length-1)+"=":t.length%3===1&&(r=r.substring(0,r.length-2)+"=="),r}function i(e){var t,r;if(null===e||"object"!=typeof e||"isActiveClone"in e)return e;var n=e instanceof Date?new Date(e):e.constructor();try{for(var a=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}(Object.keys(e)),o=a.next();!o.done;o=a.next()){var s=o.value;Object.prototype.hasOwnProperty.call(e,s)&&(e.isActiveClone=null,n[s]=i(e[s]),delete e.isActiveClone)}}catch(c){t={error:c}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return n}function o(e,t){return(e.name||t.name)+"/"+(e.storeName||t.storeName)+"/"}function s(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function c(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:{};return Object(n.a)().mark((function r(){var a,i,o,s,c;return Object(n.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return d.config().put("accessNode.api",e.config.rpcUrl),r.next=3,e.request(e.utils.createJsonRpcRequestPayload("flow_getAccount",[]));case 3:if(i=r.sent,o=0,r.t0=null!=(a=null==t?void 0:t.role)&&a.proposer,!r.t0){r.next=11;break}return r.next=9,d.account(i);case 9:r.t1=o,s=r.sent.keys[r.t1].sequenceNumber;case 11:return c=function(t){return A(e,null,Object(n.a)().mark((function e(){var r;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.request({id:42,jsonrpc:"2.0",method:"flow_signTransaction",params:{message:t.message,cadence:t.cadence}});case 2:return r=e.sent,e.abrupt("return",{addr:i,keyId:o,signature:r});case 4:case"end":return e.stop()}}),e,this)})))},r.abrupt("return",(u=y({},t),h(u,p({addr:i,keyId:o,signingFunction:c,sequenceNum:s}))));case 13:case"end":return r.stop()}var u}),r)}))()}))},a.config={rpcUrl:e.rpcUrl,chainType:"FLOW",network:e.network},a}return Object(a.a)(r)}(f.d.Internal)},function(e,t,r){"use strict";r.r(t),r.d(t,"MagicOpenIdConnectPayloadMethod",(function(){return u})),r.d(t,"OpenIdExtension",(function(){return f}));var n,a=r(1),i=r(2),o=r(7),s=r(8),c=r(568),u=((n=u||{}).LoginWithOIDC="magic_auth_login_with_oidc",n),f=function(e){Object(o.a)(r,e);var t=Object(s.a)(r);function r(){var e;return Object(a.a)(this,r),(e=t.apply(this,arguments)).name="openid",e.config={},e}return Object(i.a)(r,[{key:"loginWithOIDC",value:function(e){var t=this.utils.createJsonRpcRequestPayload("magic_auth_login_with_oidc",[e]);return this.request(t)}}]),r}(c.d.Internal)},function(e,t,r){"use strict";r.r(t),r.d(t,"EthereumProvider",(function(){return D})),r.d(t,"OPTIONAL_EVENTS",(function(){return v})),r.d(t,"OPTIONAL_METHODS",(function(){return m})),r.d(t,"REQUIRED_EVENTS",(function(){return g})),r.d(t,"REQUIRED_METHODS",(function(){return b})),r.d(t,"default",(function(){return M}));var n=r(25),a=r(0),i=r(9),o=r(1),s=r(2),c=r(14),u=r(12),f=r(33),d=r(95),l=r(24),h=r(1664),p="".concat("wc","@2:").concat("ethereum_provider",":"),b=["eth_sendTransaction","personal_sign"],m=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],g=["chainChanged","accountsChanged"],v=["chainChanged","accountsChanged","message","disconnect","connect"],y=Object.defineProperty,A=Object.defineProperties,w=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,C=function(e,t,r){return t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},k=function(e,t){for(var r in t||(t={}))E.call(t,r)&&C(e,r,t[r]);if(x){var n,a=Object(f.a)(x(t));try{for(a.s();!(n=a.n()).done;){r=n.value;_.call(t,r)&&C(e,r,t[r])}}catch(i){a.e(i)}finally{a.f()}}return e},B=function(e,t){return A(e,w(t))};function I(e){return Number(e[0].split(":")[1])}function S(e){return"0x".concat(e.toString(16))}function O(e){var t=e.chains,r=e.optionalChains,n=e.methods,a=e.optionalMethods,i=e.events,o=e.optionalEvents,s=e.rpcMap;if(!Object(l.O)(t))throw new Error("Invalid chains");var f={chains:t,methods:n||b,events:i||g,rpcMap:k({},t.length?Object(u.a)({},I(t),s[I(t)]):{})},d=null===i||void 0===i?void 0:i.filter((function(e){return!g.includes(e)})),h=null===n||void 0===n?void 0:n.filter((function(e){return!b.includes(e)}));if(!r&&!o&&!a&&(null==d||!d.length)&&(null==h||!h.length))return{required:t.length?f:void 0};var p=(null===d||void 0===d?void 0:d.length)&&(null===h||void 0===h?void 0:h.length)||!r,y={chains:Object(c.a)(new Set(p?f.chains.concat(r||[]):r)),methods:Object(c.a)(new Set(f.methods.concat(null!=a&&a.length?a:m))),events:Object(c.a)(new Set(f.events.concat(null!=o&&o.length?o:v))),rpcMap:s};return{required:t.length?f:void 0,optional:r.length?y:void 0}}var M=function(){function e(){var t=this;Object(o.a)(this,e),this.events=new d.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=p,this.on=function(e,r){return t.events.on(e,r),t},this.once=function(e,r){return t.events.once(e,r),t},this.removeListener=function(e,r){return t.events.removeListener(e,r),t},this.off=function(e,r){return t.events.off(e,r),t},this.parseAccount=function(e){return t.isCompatibleChainId(e)?t.parseAccountId(e).address:e},this.signer={},this.rpc={}}return Object(s.a)(e,[{key:"request",value:function(){var e=Object(i.a)(Object(a.a)().mark((function e(t){return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.signer.request(t,this.formatChainId(this.chainId));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"sendAsync",value:function(e,t){this.signer.sendAsync(e,t,this.formatChainId(this.chainId))}},{key:"connected",get:function(){return!!this.signer.client&&this.signer.client.core.relayer.connected}},{key:"connecting",get:function(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}},{key:"enable",value:function(){var e=Object(i.a)(Object(a.a)().mark((function e(){return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.session,e.t0){e.next=4;break}return e.next=4,this.connect();case 4:return e.next=6,this.request({method:"eth_requestAccounts"});case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"connect",value:function(){var e=Object(i.a)(Object(a.a)().mark((function e(t){var r,n,o,s,c,f=this;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.signer.client){e.next=2;break}throw new Error("Provider not initialized. Call init() first");case 2:return this.loadConnectOpts(t),r=O(this.rpc),n=r.required,o=r.optional,e.prev=4,e.next=7,new Promise(function(){var e=Object(i.a)(Object(a.a)().mark((function e(r,i){var s;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f.rpc.showQrModal&&(null==(s=f.modal)||s.subscribeModal((function(e){!e.open&&!f.signer.session&&(f.signer.abortPairingAttempt(),i(new Error("Connection request reset. Please try again.")))}))),e.next=3,f.signer.connect(B(k({namespaces:k({},n&&Object(u.a)({},f.namespace,n))},o&&{optionalNamespaces:Object(u.a)({},f.namespace,o)}),{pairingTopic:null===t||void 0===t?void 0:t.pairingTopic})).then((function(e){r(e)})).catch((function(e){i(new Error(e.message))}));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 7:if(s=e.sent){e.next=10;break}return e.abrupt("return");case 10:c=Object(l.s)(s.namespaces,[this.namespace]),this.setChainIds(this.rpc.chains.length?this.rpc.chains:c),this.setAccounts(c),this.events.emit("connect",{chainId:S(this.chainId)}),e.next=17;break;case 14:throw e.prev=14,e.t0=e.catch(4),this.signer.logger.error(e.t0),e.t0;case 17:return e.prev=17,this.modal&&this.modal.closeModal(),e.finish(17);case 20:case"end":return e.stop()}}),e,this,[[4,14,17,20]])})));return function(t){return e.apply(this,arguments)}}()},{key:"disconnect",value:function(){var e=Object(i.a)(Object(a.a)().mark((function e(){return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.session,!e.t0){e.next=4;break}return e.next=4,this.signer.disconnect();case 4:this.reset();case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"isWalletConnect",get:function(){return!0}},{key:"session",get:function(){return this.signer.session}},{key:"registerEventListeners",value:function(){var e=this;this.signer.on("session_event",(function(t){var r=t.params.event;"accountsChanged"===r.name?(e.accounts=e.parseAccounts(r.data),e.events.emit("accountsChanged",e.accounts)):"chainChanged"===r.name?e.setChainId(e.formatChainId(r.data)):e.events.emit(r.name,r.data),e.events.emit("session_event",t)})),this.signer.on("chainChanged",(function(t){var r=parseInt(t);e.chainId=r,e.events.emit("chainChanged",S(e.chainId)),e.persist()})),this.signer.on("session_update",(function(t){e.events.emit("session_update",t)})),this.signer.on("session_delete",(function(t){e.reset(),e.events.emit("session_delete",t),e.events.emit("disconnect",B(k({},Object(l.y)("USER_DISCONNECTED")),{data:t.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(function(t){var r,n;e.rpc.showQrModal&&(null==(r=e.modal)||r.closeModal(),null==(n=e.modal)||n.openModal({uri:t})),e.events.emit("display_uri",t)}))}},{key:"switchEthereumChain",value:function(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}},{key:"isCompatibleChainId",value:function(e){return"string"==typeof e&&e.startsWith("".concat(this.namespace,":"))}},{key:"formatChainId",value:function(e){return"".concat(this.namespace,":").concat(e)}},{key:"parseChainId",value:function(e){return Number(e.split(":")[1])}},{key:"setChainIds",value:function(e){var t=this,r=e.filter((function(e){return t.isCompatibleChainId(e)})).map((function(e){return t.parseChainId(e)}));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",S(this.chainId)),this.persist())}},{key:"setChainId",value:function(e){if(this.isCompatibleChainId(e)){var t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}},{key:"parseAccountId",value:function(e){var t=e.split(":"),r=Object(n.a)(t,3),a=r[0],i=r[1],o=r[2];return{chainId:"".concat(a,":").concat(i),address:o}}},{key:"setAccounts",value:function(e){var t=this;this.accounts=e.filter((function(e){return t.parseChainId(t.parseAccountId(e).chainId)===t.chainId})).map((function(e){return t.parseAccountId(e).address})),this.events.emit("accountsChanged",this.accounts)}},{key:"getRpcConfig",value:function(e){var t,r,n=this,a=null!=(t=null===e||void 0===e?void 0:e.chains)?t:[],i=null!=(r=null===e||void 0===e?void 0:e.optionalChains)?r:[],o=a.concat(i);if(!o.length)throw new Error("No chains specified in either `chains` or `optionalChains`");var s=a.length?(null===e||void 0===e?void 0:e.methods)||b:[],c=a.length?(null===e||void 0===e?void 0:e.events)||g:[],u=(null===e||void 0===e?void 0:e.optionalMethods)||[],f=(null===e||void 0===e?void 0:e.optionalEvents)||[],d=(null===e||void 0===e?void 0:e.rpcMap)||this.buildRpcMap(o,e.projectId),l=(null===e||void 0===e?void 0:e.qrModalOptions)||void 0;return{chains:null===a||void 0===a?void 0:a.map((function(e){return n.formatChainId(e)})),optionalChains:i.map((function(e){return n.formatChainId(e)})),methods:s,events:c,optionalMethods:u,optionalEvents:f,rpcMap:d,showQrModal:!(null==e||!e.showQrModal),qrModalOptions:l,projectId:e.projectId,metadata:e.metadata}}},{key:"buildRpcMap",value:function(e,t){var r=this,n={};return e.forEach((function(e){n[e]=r.getRpcUrl(e,t)})),n}},{key:"initialize",value:function(){var e=Object(i.a)(Object(a.a)().mark((function e(t){var n,i,o;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?I(this.rpc.chains):I(this.rpc.optionalChains),e.next=4,h.a.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions});case 4:return this.signer=e.sent,this.registerEventListeners(),e.next=8,this.loadPersistedSession();case 8:if(!this.rpc.showQrModal){e.next=28;break}return e.prev=9,e.next=12,r.e(4).then(r.bind(null,3994));case 12:i=e.sent,o=i.WalletConnectModal,n=o,e.next=20;break;case 17:throw e.prev=17,e.t0=e.catch(9),new Error("To use QR modal, please install @walletconnect/modal package");case 20:if(!n){e.next=28;break}e.prev=21,this.modal=new n(k({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions)),e.next=28;break;case 25:throw e.prev=25,e.t1=e.catch(21),this.signer.logger.error(e.t1),new Error("Could not generate WalletConnectModal Instance");case 28:case"end":return e.stop()}}),e,this,[[9,17],[21,25]])})));return function(t){return e.apply(this,arguments)}}()},{key:"loadConnectOpts",value:function(e){var t=this;if(e){var r=e.chains,n=e.optionalChains,a=e.rpcMap;r&&Object(l.O)(r)&&(this.rpc.chains=r.map((function(e){return t.formatChainId(e)})),r.forEach((function(e){t.rpc.rpcMap[e]=(null===a||void 0===a?void 0:a[e])||t.getRpcUrl(e)}))),n&&Object(l.O)(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null===n||void 0===n?void 0:n.map((function(e){return t.formatChainId(e)})),n.forEach((function(e){t.rpc.rpcMap[e]=(null===a||void 0===a?void 0:a[e])||t.getRpcUrl(e)})))}}},{key:"getRpcUrl",value:function(e,t){var r;return(null==(r=this.rpc.rpcMap)?void 0:r[e])||"".concat("https://rpc.walletconnect.com/v1/","?chainId=eip155:").concat(e,"&projectId=").concat(t||this.rpc.projectId)}},{key:"loadPersistedSession",value:function(){var e=Object(i.a)(Object(a.a)().mark((function e(){var t,r;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.session){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.signer.client.core.storage.getItem("".concat(this.STORAGE_KEY,"/chainId"));case 4:t=e.sent,r=this.session.namespaces["".concat(this.namespace,":").concat(t)]?this.session.namespaces["".concat(this.namespace,":").concat(t)]:this.session.namespaces[this.namespace],this.setChainIds(t?[this.formatChainId(t)]:null===r||void 0===r?void 0:r.accounts),this.setAccounts(null===r||void 0===r?void 0:r.accounts);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"reset",value:function(){this.chainId=1,this.accounts=[]}},{key:"persist",value:function(){this.session&&this.signer.client.core.storage.setItem("".concat(this.STORAGE_KEY,"/chainId"),this.chainId)}},{key:"parseAccounts",value:function(e){var t=this;return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((function(e){return t.parseAccount(e)}))}}],[{key:"init",value:function(){var t=Object(i.a)(Object(a.a)().mark((function t(r){var n;return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new e,t.next=3,n.initialize(r);case 3:return t.abrupt("return",n);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),e}(),D=M},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return a})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return o})),r.d(t,"__decorate",(function(){return s})),r.d(t,"__param",(function(){return c})),r.d(t,"__metadata",(function(){return u})),r.d(t,"__awaiter",(function(){return f})),r.d(t,"__generator",(function(){return d})),r.d(t,"__createBinding",(function(){return l})),r.d(t,"__exportStar",(function(){return h})),r.d(t,"__values",(function(){return p})),r.d(t,"__read",(function(){return b})),r.d(t,"__spread",(function(){return m})),r.d(t,"__spreadArrays",(function(){return g})),r.d(t,"__await",(function(){return v})),r.d(t,"__asyncGenerator",(function(){return y})),r.d(t,"__asyncDelegator",(function(){return A})),r.d(t,"__asyncValues",(function(){return w})),r.d(t,"__makeTemplateObject",(function(){return x})),r.d(t,"__importStar",(function(){return E})),r.d(t,"__importDefault",(function(){return _})),r.d(t,"__classPrivateFieldGet",(function(){return C})),r.d(t,"__classPrivateFieldSet",(function(){return k}));var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function a(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}function m(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(r=a[e](t)).value instanceof v?Promise.resolve(r.value.v).then(c,u):f(i[0][2],r)}catch(n){f(i[0][3],n)}var r}function c(e){s("next",e)}function u(e){s("throw",e)}function f(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function A(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,a){t[n]=e[n]?function(t){return(r=!r)?{value:v(e[n](t)),done:"return"===n}:a?a(t):t}:a}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,a){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,a,(t=e[r](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function k(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,t,r){"use strict";var n=r(3634);e.exports=o;var a=function(){function e(e){return"undefined"!==typeof e&&e}try{return"undefined"!==typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},i={mapHttpRequest:l,mapHttpResponse:l,wrapRequestSerializer:h,wrapResponseSerializer:h,wrapErrorSerializer:h,req:l,res:l,err:function(e){var t={type:e.constructor.name,msg:e.message,stack:e.stack};for(var r in e)void 0===t[r]&&(t[r]=e[r]);return t}};function o(e){(e=e||{}).browser=e.browser||{};var t=e.browser.transmit;if(t&&"function"!==typeof t.send)throw Error("pino: transmit option must have a send function");var r=e.browser.write||a;e.browser.write&&(e.browser.asObject=!0);var n=e.serializers||{},i=function(e,t){return Array.isArray(e)?e.filter((function(e){return"!stdSerializers.err"!==e})):!0===e&&Object.keys(t)}(e.browser.serialize,n),l=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(l=!1);"function"===typeof r&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),!1===e.enabled&&(e.level="silent");var h=e.level||"info",b=Object.create(r);b.log||(b.log=p),Object.defineProperty(b,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(b,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,s(m,b,"error","log"),s(m,b,"fatal","error"),s(m,b,"warn","error"),s(m,b,"info","log"),s(m,b,"debug","log"),s(m,b,"trace","log")}});var m={transmit:t,serialize:i,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:d(e)};return b.levels=o.levels,b.level=h,b.setMaxListeners=b.getMaxListeners=b.emit=b.addListener=b.on=b.prependListener=b.once=b.prependOnceListener=b.removeListener=b.removeAllListeners=b.listeners=b.listenerCount=b.eventNames=b.write=b.flush=p,b.serializers=n,b._serialize=i,b._stdErrSerialize=l,b.child=function(r,a){if(!r)throw new Error("missing bindings for child Pino");a=a||{},i&&r.serializers&&(a.serializers=r.serializers);var o=a.serializers;if(i&&o){var s=Object.assign({},n,o),d=!0===e.browser.serialize?Object.keys(s):i;delete r.serializers,c([r],d,s,this._stdErrSerialize)}function l(e){this._childLevel=1+(0|e._childLevel),this.error=u(e,r,"error"),this.fatal=u(e,r,"fatal"),this.warn=u(e,r,"warn"),this.info=u(e,r,"info"),this.debug=u(e,r,"debug"),this.trace=u(e,r,"trace"),s&&(this.serializers=s,this._serialize=d),t&&(this._logEvent=f([].concat(e._logEvent.bindings,r)))}return l.prototype=this,new l(this)},t&&(b._logEvent=f()),b}function s(e,t,r,i){var s=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?p:s[r]?s[r]:a[r]||a[i]||p,function(e,t,r){if(!e.transmit&&t[r]===p)return;t[r]=(i=t[r],function(){for(var s=e.timestamp(),u=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===a?a:this,l=0;l-1&&i in r&&(e[a][i]=r[i](e[a][i]))}function u(e,t,r){return function(){var n=new Array(1+arguments.length);n[0]=t;for(var a=1;a-1?d:0,e.charCodeAt(h+1)){case 100:case 102:if(f>=c)break;if(null==t[f])break;d=c)break;if(null==t[f])break;d=c)break;if(void 0===t[f])break;d",d=h+2,h++;break}u+=a(t[f]),d=h+2,h++;break;case 115:if(f>=c)break;d1&&void 0!==arguments[1]?arguments[1]:n.PINO_CUSTOM_CONTEXT_KEY]||""}function i(e,t){return e[arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.PINO_CUSTOM_CONTEXT_KEY]=t,e}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.PINO_CUSTOM_CONTEXT_KEY;return"undefined"===typeof e.bindings?a(e,t):e.bindings().context||""}function s(e,t){var r=o(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.PINO_CUSTOM_CONTEXT_KEY);return r.trim()?"".concat(r,"/").concat(t):t}t.getDefaultLoggerOptions=function(e){return Object.assign(Object.assign({},e),{level:(null===e||void 0===e?void 0:e.level)||n.PINO_LOGGER_DEFAULTS.level})},t.getBrowserLoggerContext=a,t.setBrowserLoggerContext=i,t.getLoggerContext=o,t.formatChildLoggerContext=s,t.generateChildLogger=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.PINO_CUSTOM_CONTEXT_KEY,a=s(e,t,r);return i(e.child({context:a}),a,r)}},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return a})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return o})),r.d(t,"__decorate",(function(){return s})),r.d(t,"__param",(function(){return c})),r.d(t,"__metadata",(function(){return u})),r.d(t,"__awaiter",(function(){return f})),r.d(t,"__generator",(function(){return d})),r.d(t,"__createBinding",(function(){return l})),r.d(t,"__exportStar",(function(){return h})),r.d(t,"__values",(function(){return p})),r.d(t,"__read",(function(){return b})),r.d(t,"__spread",(function(){return m})),r.d(t,"__spreadArrays",(function(){return g})),r.d(t,"__await",(function(){return v})),r.d(t,"__asyncGenerator",(function(){return y})),r.d(t,"__asyncDelegator",(function(){return A})),r.d(t,"__asyncValues",(function(){return w})),r.d(t,"__makeTemplateObject",(function(){return x})),r.d(t,"__importStar",(function(){return E})),r.d(t,"__importDefault",(function(){return _})),r.d(t,"__classPrivateFieldGet",(function(){return C})),r.d(t,"__classPrivateFieldSet",(function(){return k}));var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function a(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}function m(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(r=a[e](t)).value instanceof v?Promise.resolve(r.value.v).then(c,u):f(i[0][2],r)}catch(n){f(i[0][3],n)}var r}function c(e){s("next",e)}function u(e){s("throw",e)}function f(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function A(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,a){t[n]=e[n]?function(t){return(r=!r)?{value:v(e[n](t)),done:"return"===n}:a?a(t):t}:a}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,a){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,a,(t=e[r](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function k(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,t,r){"use strict";(function(e){function r(){return(null===e||void 0===e?void 0:e.crypto)||(null===e||void 0===e?void 0:e.msCrypto)||{}}function n(){var e=r();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=r,t.getSubtleCrypto=n,t.isBrowserCryptoAvailable=function(){return!!r()&&!!n()}}).call(this,r(55))},function(e,t,r){"use strict";(function(e){function r(){return"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product}function n(){return"undefined"!==typeof e&&"undefined"!==typeof e.versions&&"undefined"!==typeof e.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=r,t.isNode=n,t.isBrowser=function(){return!r()&&!n()}}).call(this,r(80))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(423),a=r(231),i=20;function o(e,t,r){for(var a=1634760805,o=857760878,s=2036477234,c=1797285236,u=r[3]<<24|r[2]<<16|r[1]<<8|r[0],f=r[7]<<24|r[6]<<16|r[5]<<8|r[4],d=r[11]<<24|r[10]<<16|r[9]<<8|r[8],l=r[15]<<24|r[14]<<16|r[13]<<8|r[12],h=r[19]<<24|r[18]<<16|r[17]<<8|r[16],p=r[23]<<24|r[22]<<16|r[21]<<8|r[20],b=r[27]<<24|r[26]<<16|r[25]<<8|r[24],m=r[31]<<24|r[30]<<16|r[29]<<8|r[28],g=t[3]<<24|t[2]<<16|t[1]<<8|t[0],v=t[7]<<24|t[6]<<16|t[5]<<8|t[4],y=t[11]<<24|t[10]<<16|t[9]<<8|t[8],A=t[15]<<24|t[14]<<16|t[13]<<8|t[12],w=a,x=o,E=s,_=c,C=u,k=f,B=d,I=l,S=h,O=p,M=b,D=m,T=g,F=v,R=y,P=A,N=0;N>>16|T<<16)|0)>>>20|C<<12,k=(k^=O=O+(F=(F^=x=x+k|0)>>>16|F<<16)|0)>>>20|k<<12,B=(B^=M=M+(R=(R^=E=E+B|0)>>>16|R<<16)|0)>>>20|B<<12,I=(I^=D=D+(P=(P^=_=_+I|0)>>>16|P<<16)|0)>>>20|I<<12,B=(B^=M=M+(R=(R^=E=E+B|0)>>>24|R<<8)|0)>>>25|B<<7,I=(I^=D=D+(P=(P^=_=_+I|0)>>>24|P<<8)|0)>>>25|I<<7,k=(k^=O=O+(F=(F^=x=x+k|0)>>>24|F<<8)|0)>>>25|k<<7,C=(C^=S=S+(T=(T^=w=w+C|0)>>>24|T<<8)|0)>>>25|C<<7,k=(k^=M=M+(P=(P^=w=w+k|0)>>>16|P<<16)|0)>>>20|k<<12,B=(B^=D=D+(T=(T^=x=x+B|0)>>>16|T<<16)|0)>>>20|B<<12,I=(I^=S=S+(F=(F^=E=E+I|0)>>>16|F<<16)|0)>>>20|I<<12,C=(C^=O=O+(R=(R^=_=_+C|0)>>>16|R<<16)|0)>>>20|C<<12,I=(I^=S=S+(F=(F^=E=E+I|0)>>>24|F<<8)|0)>>>25|I<<7,C=(C^=O=O+(R=(R^=_=_+C|0)>>>24|R<<8)|0)>>>25|C<<7,B=(B^=D=D+(T=(T^=x=x+B|0)>>>24|T<<8)|0)>>>25|B<<7,k=(k^=M=M+(P=(P^=w=w+k|0)>>>24|P<<8)|0)>>>25|k<<7;n.writeUint32LE(w+a|0,e,0),n.writeUint32LE(x+o|0,e,4),n.writeUint32LE(E+s|0,e,8),n.writeUint32LE(_+c|0,e,12),n.writeUint32LE(C+u|0,e,16),n.writeUint32LE(k+f|0,e,20),n.writeUint32LE(B+d|0,e,24),n.writeUint32LE(I+l|0,e,28),n.writeUint32LE(S+h|0,e,32),n.writeUint32LE(O+p|0,e,36),n.writeUint32LE(M+b|0,e,40),n.writeUint32LE(D+m|0,e,44),n.writeUint32LE(T+g|0,e,48),n.writeUint32LE(F+v|0,e,52),n.writeUint32LE(R+y|0,e,56),n.writeUint32LE(P+A|0,e,60)}function s(e,t,r,n,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=s,t.stream=function(e,t,r,n){return void 0===n&&(n=0),a.wipe(r),s(e,t,r,r,n)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1059),a=r(231);t.DIGEST_LENGTH=16;var i=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=e[0]|e[1]<<8;this._r[0]=8191&r;var n=e[2]|e[3]<<8;this._r[1]=8191&(r>>>13|n<<3);var a=e[4]|e[5]<<8;this._r[2]=7939&(n>>>10|a<<6);var i=e[6]|e[7]<<8;this._r[3]=8191&(a>>>7|i<<9);var o=e[8]|e[9]<<8;this._r[4]=255&(i>>>4|o<<12),this._r[5]=o>>>1&8190;var s=e[10]|e[11]<<8;this._r[6]=8191&(o>>>14|s<<2);var c=e[12]|e[13]<<8;this._r[7]=8065&(s>>>11|c<<5);var u=e[14]|e[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,r){for(var n=this._fin?0:2048,a=this._h[0],i=this._h[1],o=this._h[2],s=this._h[3],c=this._h[4],u=this._h[5],f=this._h[6],d=this._h[7],l=this._h[8],h=this._h[9],p=this._r[0],b=this._r[1],m=this._r[2],g=this._r[3],v=this._r[4],y=this._r[5],A=this._r[6],w=this._r[7],x=this._r[8],E=this._r[9];r>=16;){var _=e[t+0]|e[t+1]<<8;a+=8191&_;var C=e[t+2]|e[t+3]<<8;i+=8191&(_>>>13|C<<3);var k=e[t+4]|e[t+5]<<8;o+=8191&(C>>>10|k<<6);var B=e[t+6]|e[t+7]<<8;s+=8191&(k>>>7|B<<9);var I=e[t+8]|e[t+9]<<8;c+=8191&(B>>>4|I<<12),u+=I>>>1&8191;var S=e[t+10]|e[t+11]<<8;f+=8191&(I>>>14|S<<2);var O=e[t+12]|e[t+13]<<8;d+=8191&(S>>>11|O<<5);var M=e[t+14]|e[t+15]<<8,D=0,T=D;T+=a*p,T+=i*(5*E),T+=o*(5*x),T+=s*(5*w),D=(T+=c*(5*A))>>>13,T&=8191,T+=u*(5*y),T+=f*(5*v),T+=d*(5*g),T+=(l+=8191&(O>>>8|M<<8))*(5*m);var F=D+=(T+=(h+=M>>>5|n)*(5*b))>>>13;F+=a*b,F+=i*p,F+=o*(5*E),F+=s*(5*x),D=(F+=c*(5*w))>>>13,F&=8191,F+=u*(5*A),F+=f*(5*y),F+=d*(5*v),F+=l*(5*g),D+=(F+=h*(5*m))>>>13,F&=8191;var R=D;R+=a*m,R+=i*b,R+=o*p,R+=s*(5*E),D=(R+=c*(5*x))>>>13,R&=8191,R+=u*(5*w),R+=f*(5*A),R+=d*(5*y),R+=l*(5*v);var P=D+=(R+=h*(5*g))>>>13;P+=a*g,P+=i*m,P+=o*b,P+=s*p,D=(P+=c*(5*E))>>>13,P&=8191,P+=u*(5*x),P+=f*(5*w),P+=d*(5*A),P+=l*(5*y);var N=D+=(P+=h*(5*v))>>>13;N+=a*v,N+=i*g,N+=o*m,N+=s*b,D=(N+=c*p)>>>13,N&=8191,N+=u*(5*E),N+=f*(5*x),N+=d*(5*w),N+=l*(5*A);var j=D+=(N+=h*(5*y))>>>13;j+=a*y,j+=i*v,j+=o*g,j+=s*m,D=(j+=c*b)>>>13,j&=8191,j+=u*p,j+=f*(5*E),j+=d*(5*x),j+=l*(5*w);var L=D+=(j+=h*(5*A))>>>13;L+=a*A,L+=i*y,L+=o*v,L+=s*g,D=(L+=c*m)>>>13,L&=8191,L+=u*b,L+=f*p,L+=d*(5*E),L+=l*(5*x);var U=D+=(L+=h*(5*w))>>>13;U+=a*w,U+=i*A,U+=o*y,U+=s*v,D=(U+=c*g)>>>13,U&=8191,U+=u*m,U+=f*b,U+=d*p,U+=l*(5*E);var Q=D+=(U+=h*(5*x))>>>13;Q+=a*x,Q+=i*w,Q+=o*A,Q+=s*y,D=(Q+=c*v)>>>13,Q&=8191,Q+=u*g,Q+=f*m,Q+=d*b,Q+=l*p;var G=D+=(Q+=h*(5*E))>>>13;G+=a*E,G+=i*x,G+=o*w,G+=s*A,D=(G+=c*y)>>>13,G&=8191,G+=u*v,G+=f*g,G+=d*m,G+=l*b,a=T=8191&(D=(D=((D+=(G+=h*p)>>>13)<<2)+D|0)+(T&=8191)|0),i=F+=D>>>=13,o=R&=8191,s=P&=8191,c=N&=8191,u=j&=8191,f=L&=8191,d=U&=8191,l=Q&=8191,h=G&=8191,t+=16,r-=16}this._h[0]=a,this._h[1]=i,this._h[2]=o,this._h[3]=s,this._h[4]=c,this._h[5]=u,this._h[6]=f,this._h[7]=d,this._h[8]=l,this._h[9]=h},e.prototype.finish=function(e,t){void 0===t&&(t=0);var r,n,a,i,o=new Uint16Array(10);if(this._leftover){for(i=this._leftover,this._buffer[i++]=1;i<16;i++)this._buffer[i]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(r=this._h[1]>>>13,this._h[1]&=8191,i=2;i<10;i++)this._h[i]+=r,r=this._h[i]>>>13,this._h[i]&=8191;for(this._h[0]+=5*r,r=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=r,r=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=r,o[0]=this._h[0]+5,r=o[0]>>>13,o[0]&=8191,i=1;i<10;i++)o[i]=this._h[i]+r,r=o[i]>>>13,o[i]&=8191;for(o[9]-=8192,n=(1^r)-1,i=0;i<10;i++)o[i]&=n;for(n=~n,i=0;i<10;i++)this._h[i]=this._h[i]&n|o[i];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),a=this._h[0]+this._pad[0],this._h[0]=65535&a,i=1;i<8;i++)a=(this._h[i]+this._pad[i]|0)+(a>>>16)|0,this._h[i]=65535&a;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,r=0,n=e.length;if(this._leftover){(t=16-this._leftover)>n&&(t=n);for(var a=0;a=16&&(t=n-n%16,this._blocks(e,r,t),r+=t,n-=t),n){for(a=0;athis.blockSize?this._inner.update(t).finish(r).clean():r.set(t);for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:t.defaultRandomSource).randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=o,t.randomUint32=function(){var e=o(4,arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.defaultRandomSource),r=(0,a.readUint32LE)(e);return(0,i.wipe)(e),r};var s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function c(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.defaultRandomSource;if(r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");for(var a="",c=r.length,u=256-256%c;e>0;){for(var f=o(Math.ceil(256*e/u),n),d=0;d0;d++){var l=f[d];l1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.defaultRandomSource;return c(Math.ceil(e/(Math.log(r.length)/Math.LN2)),r,n)}},function(e,t,r){"use strict";var n=r(21).default,a=r(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;var i=r(3649),o=r(3650),s=function(){function e(){return n(this,e),this.isAvailable=!1,this.name="",this._source=new i.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new o.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}return a(e,[{key:"randomBytes",value:function(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}]),e}();t.SystemRandomSource=s},function(e,t,r){"use strict";var n=r(21).default,a=r(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0;var i=function(){function e(){n(this,e),this.isAvailable=!1,this.isInstantiated=!1;var t="undefined"!==typeof self?self.crypto||self.msCrypto:null;t&&void 0!==t.getRandomValues&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}return a(e,[{key:"randomBytes",value:function(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");for(var t=new Uint8Array(e),r=0;rt[r])return 1}return e.byteLength>t.byteLength?1:e.byteLength=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,o=new Uint8Array(i);e[t];){var f=r[e.charCodeAt(t)];if(255===f)return;for(var d=0,l=i-1;(0!==f||d>>0,o[l]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");a=d,t++}if(" "!==e[t]){for(var h=i-a;h!==i&&0===o[h];)h++;for(var p=new Uint8Array(n+(i-h)),b=n;h!==i;)p[b++]=o[h++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,a=0,i=t.length;a!==i&&0===t[a];)a++,r++;for(var o=(i-a)*f+1>>>0,u=new Uint8Array(o);a!==i;){for(var d=t[a],l=0,h=o-1;(0!==d||l>>0,u[h]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");n=l,a++}for(var p=o-n;p!==o&&0===u[p];)p++;for(var b=c.repeat(r);p=o;)r[n++]=255&t|a,t/=128;for(;t&i;)r[n++]=255&t|a,t>>>=7;return r[n]=0|t,e.bytes=n-s+1,r},a=128,i=-128,o=Math.pow(2,31);var s=function e(t,r){var n,a=0,i=0,o=r=r||0,s=t.length;do{if(o>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[o++],a+=i<28?(n&u)<=c);return e.bytes=o-r,a},c=128,u=127;var f=Math.pow(2,7),d=Math.pow(2,14),l=Math.pow(2,21),h=Math.pow(2,28),p=Math.pow(2,35),b=Math.pow(2,42),m=Math.pow(2,49),g=Math.pow(2,56),v=Math.pow(2,63),y={encode:n,decode:s,encodingLength:function(e){return e4&&r.slice(0,4)===o&&s.test(t)&&("-"===t.charAt(4)?l=function(e){var t=e.slice(5).replace(c,d);return o+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(c.test(t))return e;t=t.replace(u,f),"-"!==t.charAt(0)&&(t="-"+t);return o+t}(t),h=a);return new h(l,t)};var s=/^data[-\w.:]+$/i,c=/-[a-z]/g,u=/[A-Z]/g;function f(e){return"-"+e.toLowerCase()}function d(e){return e.charAt(1).toUpperCase()}},function(e,t,r){"use strict";e.exports=function(e,t){var r,a,i,o=e||"",s=t||"div",c={},u=0;for(;u65535&&(q+=f((Q-=65536)>>>10|55296),Q=56320|1023&Q),Q=q+f(Q))):Y!==C&&H(T,$)),Q?(Ae(),X=ve(),le=ee-1,pe+=ee-W+1,ge.push(Q),(Z=ve()).offset++,ae&&ae.call(se,Q,{start:X,end:Z},e.slice(W-1,ee)),X=Z):(l=e.slice(W-1,ee),me+=l,pe+=l.length,le=ee-1)}else 10===U&&(be++,he++,pe=0),U===U?(me+=f(U),pe++):Ae();return ge.join("");function ve(){return{line:be,column:pe,offset:le+(ue.offset||0)}}function ye(e,t){var r=ve();r.column+=t,r.offset+=t,ie.call(ce,N[e],r,e)}function Ae(){me&&(ge.push(me),ne&&ne.call(oe,me,{start:X,end:ve()}),me="")}}(e,o)};var u={}.hasOwnProperty,f=String.fromCharCode,d=Function.prototype,l={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},h=9,p=10,b=12,m=32,g=38,v=59,y=60,A=61,w=35,x=88,E=120,_=65533,C="named",k="hexadecimal",B="decimal",I={};I[k]=16,I[B]=10;var S={};S[C]=s,S[B]=i,S[k]=o;var O=1,M=2,D=3,T=4,F=5,R=6,P=7,N={};function j(e){return e>=55296&&e<=57343||e>1114111}function L(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535===(65535&e)||65534===(65535&e)}N[O]="Named character references must be terminated by a semicolon",N[M]="Numeric character references must be terminated by a semicolon",N[D]="Named character references cannot be empty",N[T]="Numeric character references cannot be empty",N[F]="Named character references must be known",N[R]="Numeric character references cannot be disallowed",N[P]="Numeric character references cannot be outside the permissible Unicode range"},function(e){e.exports=JSON.parse('{"AElig":"\xc6","AMP":"&","Aacute":"\xc1","Acirc":"\xc2","Agrave":"\xc0","Aring":"\xc5","Atilde":"\xc3","Auml":"\xc4","COPY":"\xa9","Ccedil":"\xc7","ETH":"\xd0","Eacute":"\xc9","Ecirc":"\xca","Egrave":"\xc8","Euml":"\xcb","GT":">","Iacute":"\xcd","Icirc":"\xce","Igrave":"\xcc","Iuml":"\xcf","LT":"<","Ntilde":"\xd1","Oacute":"\xd3","Ocirc":"\xd4","Ograve":"\xd2","Oslash":"\xd8","Otilde":"\xd5","Ouml":"\xd6","QUOT":"\\"","REG":"\xae","THORN":"\xde","Uacute":"\xda","Ucirc":"\xdb","Ugrave":"\xd9","Uuml":"\xdc","Yacute":"\xdd","aacute":"\xe1","acirc":"\xe2","acute":"\xb4","aelig":"\xe6","agrave":"\xe0","amp":"&","aring":"\xe5","atilde":"\xe3","auml":"\xe4","brvbar":"\xa6","ccedil":"\xe7","cedil":"\xb8","cent":"\xa2","copy":"\xa9","curren":"\xa4","deg":"\xb0","divide":"\xf7","eacute":"\xe9","ecirc":"\xea","egrave":"\xe8","eth":"\xf0","euml":"\xeb","frac12":"\xbd","frac14":"\xbc","frac34":"\xbe","gt":">","iacute":"\xed","icirc":"\xee","iexcl":"\xa1","igrave":"\xec","iquest":"\xbf","iuml":"\xef","laquo":"\xab","lt":"<","macr":"\xaf","micro":"\xb5","middot":"\xb7","nbsp":"\xa0","not":"\xac","ntilde":"\xf1","oacute":"\xf3","ocirc":"\xf4","ograve":"\xf2","ordf":"\xaa","ordm":"\xba","oslash":"\xf8","otilde":"\xf5","ouml":"\xf6","para":"\xb6","plusmn":"\xb1","pound":"\xa3","quot":"\\"","raquo":"\xbb","reg":"\xae","sect":"\xa7","shy":"\xad","sup1":"\xb9","sup2":"\xb2","sup3":"\xb3","szlig":"\xdf","thorn":"\xfe","times":"\xd7","uacute":"\xfa","ucirc":"\xfb","ugrave":"\xf9","uml":"\xa8","uuml":"\xfc","yacute":"\xfd","yen":"\xa5","yuml":"\xff"}')},function(e){e.exports=JSON.parse('{"0":"\ufffd","128":"\u20ac","130":"\u201a","131":"\u0192","132":"\u201e","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02c6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017d","145":"\u2018","146":"\u2019","147":"\u201c","148":"\u201d","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02dc","153":"\u2122","154":"\u0161","155":"\u203a","156":"\u0153","158":"\u017e","159":"\u0178"}')},function(e,t,r){"use strict";e.exports=function(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}},function(e,t,r){"use strict";var n=r(3712),a=r(1555);e.exports=function(e){return n(e)||a(e)}},function(e,t,r){"use strict";e.exports=function(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}},function(e,t,r){"use strict";var n;e.exports=function(e){var t,r="&"+e+";";if((n=n||document.createElement("i")).innerHTML=r,59===(t=n.textContent).charCodeAt(t.length-1)&&"semi"!==e)return!1;return t!==r&&t}},function(e,t,r){(function(t){var r=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,r=0,n={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);E+=x.value.length,x=x.next){var _=x.value;if(t.length>e.length)return;if(!(_ instanceof i)){var C,k=1;if(v){if(!(C=o(w,E,e,g))||C.index>=e.length)break;var B=C.index,I=C.index+C[0].length,S=E;for(S+=x.value.length;B>=S;)S+=(x=x.next).value.length;if(E=S-=x.value.length,x.value instanceof i)continue;for(var O=x;O!==t.tail&&(Sd.reach&&(d.reach=F);var R=x.prev;if(D&&(R=u(t,R,D),E+=D.length),f(t,R,k),x=u(t,R,new i(l,m?a.tokenize(M,m):M,y,M)),T&&u(t,x,T),k>1){var P={cause:l+","+p,reach:F};s(e,t,r,x.prev,E,P),d&&P.reach>d.reach&&(d.reach=P.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,r){var n=t.next,a={value:r,prev:t,next:n};return t.next=a,n.prev=a,e.length++,a}function f(e,t,r){for(var n=t.next,a=0;a"+i.content+""},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var r=JSON.parse(t.data),n=r.language,i=r.code,o=r.immediateClose;e.postMessage(a.highlight(i,a.languages[n],n)),o&&e.close()}),!1),a):a;var d=a.util.currentScript();function l(){a.manual||a.highlightAll()}if(d&&(a.filename=d.src,d.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&d&&d.defer?document.addEventListener("DOMContentLoaded",l):window.requestAnimationFrame?window.requestAnimationFrame(l):window.setTimeout(l,16)}return a}("undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=r),"undefined"!==typeof t&&(t.Prism=r)}).call(this,r(55))},function(e,t,r){"use strict";function n(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&/,"&"))})),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,r){var n={};n["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[r]},n.cdata=/^$/i;var a={"included-cdata":{pattern://i,inside:n}};a["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var i={};i[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:a},e.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,r){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:e.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}e.exports=n,n.displayName="markup",n.aliases=["html","mathml","svg","xml","ssml","atom","rss"]},function(e,t,r){"use strict";function n(e){!function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))}(e)}e.exports=n,n.displayName="css",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}e.exports=n,n.displayName="clike",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}e.exports=n,n.displayName="javascript",n.aliases=["js"]},function(e,t,r){"use strict";function n(e){e.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:SCIENTIFIC_WITH_LEADING_ZERO|SCALE_PRESERVING_SCIENTIFIC|RMC_COMMUNICATION_FAILURE|END-ENHANCEMENT-SECTION|MULTIPLY-CORRESPONDING|SUBTRACT-CORRESPONDING|VERIFICATION-MESSAGE|DIVIDE-CORRESPONDING|ENHANCEMENT-SECTION|CURRENCY_CONVERSION|RMC_SYSTEM_FAILURE|START-OF-SELECTION|MOVE-CORRESPONDING|RMC_INVALID_STATUS|CUSTOMER-FUNCTION|END-OF-DEFINITION|ENHANCEMENT-POINT|SYSTEM-EXCEPTIONS|ADD-CORRESPONDING|SCALE_PRESERVING|SELECTION-SCREEN|CURSOR-SELECTION|END-OF-SELECTION|LOAD-OF-PROGRAM|SCROLL-BOUNDARY|SELECTION-TABLE|EXCEPTION-TABLE|IMPLEMENTATIONS|PARAMETER-TABLE|RIGHT-JUSTIFIED|UNIT_CONVERSION|AUTHORITY-CHECK|LIST-PROCESSING|SIGN_AS_POSTFIX|COL_BACKGROUND|IMPLEMENTATION|INTERFACE-POOL|TRANSFORMATION|IDENTIFICATION|ENDENHANCEMENT|LINE-SELECTION|INITIALIZATION|LEFT-JUSTIFIED|SELECT-OPTIONS|SELECTION-SETS|COMMUNICATION|CORRESPONDING|DECIMAL_SHIFT|PRINT-CONTROL|VALUE-REQUEST|CHAIN-REQUEST|FUNCTION-POOL|FIELD-SYMBOLS|FUNCTIONALITY|INVERTED-DATE|SELECTION-SET|CLASS-METHODS|OUTPUT-LENGTH|CLASS-CODING|COL_NEGATIVE|ERRORMESSAGE|FIELD-GROUPS|HELP-REQUEST|NO-EXTENSION|NO-TOPOFPAGE|REDEFINITION|DISPLAY-MODE|ENDINTERFACE|EXIT-COMMAND|FIELD-SYMBOL|NO-SCROLLING|SHORTDUMP-ID|ACCESSPOLICY|CLASS-EVENTS|COL_POSITIVE|DECLARATIONS|ENHANCEMENTS|FILTER-TABLE|SWITCHSTATES|SYNTAX-CHECK|TRANSPORTING|ASYNCHRONOUS|SYNTAX-TRACE|TOKENIZATION|USER-COMMAND|WITH-HEADING|ABAP-SOURCE|BREAK-POINT|CHAIN-INPUT|COMPRESSION|FIXED-POINT|NEW-SECTION|NON-UNICODE|OCCURRENCES|RESPONSIBLE|SYSTEM-CALL|TRACE-TABLE|ABBREVIATED|CHAR-TO-HEX|END-OF-FILE|ENDFUNCTION|ENVIRONMENT|ASSOCIATION|COL_HEADING|EDITOR-CALL|END-OF-PAGE|ENGINEERING|IMPLEMENTED|INTENSIFIED|RADIOBUTTON|SYSTEM-EXIT|TOP-OF-PAGE|TRANSACTION|APPLICATION|CONCATENATE|DESTINATION|ENHANCEMENT|IMMEDIATELY|NO-GROUPING|PRECOMPILED|REPLACEMENT|TITLE-LINES|ACTIVATION|BYTE-ORDER|CLASS-POOL|CONNECTION|CONVERSION|DEFINITION|DEPARTMENT|EXPIRATION|INHERITING|MESSAGE-ID|NO-HEADING|PERFORMING|QUEUE-ONLY|RIGHTSPACE|SCIENTIFIC|STATUSINFO|STRUCTURES|SYNCPOINTS|WITH-TITLE|ATTRIBUTES|BOUNDARIES|CLASS-DATA|COL_NORMAL|DD\/MM\/YYYY|DESCENDING|INTERFACES|LINE-COUNT|MM\/DD\/YYYY|NON-UNIQUE|PRESERVING|SELECTIONS|STATEMENTS|SUBROUTINE|TRUNCATION|TYPE-POOLS|ARITHMETIC|BACKGROUND|ENDPROVIDE|EXCEPTIONS|IDENTIFIER|INDEX-LINE|OBLIGATORY|PARAMETERS|PERCENTAGE|PUSHBUTTON|RESOLUTION|COMPONENTS|DEALLOCATE|DISCONNECT|DUPLICATES|FIRST-LINE|HEAD-LINES|NO-DISPLAY|OCCURRENCE|RESPECTING|RETURNCODE|SUBMATCHES|TRACE-FILE|ASCENDING|BYPASSING|ENDMODULE|EXCEPTION|EXCLUDING|EXPORTING|INCREMENT|MATCHCODE|PARAMETER|PARTIALLY|PREFERRED|REFERENCE|REPLACING|RETURNING|SELECTION|SEPARATED|SPECIFIED|STATEMENT|TIMESTAMP|TYPE-POOL|ACCEPTING|APPENDAGE|ASSIGNING|COL_GROUP|COMPARING|CONSTANTS|DANGEROUS|IMPORTING|INSTANCES|LEFTSPACE|LOG-POINT|QUICKINFO|READ-ONLY|SCROLLING|SQLSCRIPT|STEP-LOOP|TOP-LINES|TRANSLATE|APPENDING|AUTHORITY|CHARACTER|COMPONENT|CONDITION|DIRECTORY|DUPLICATE|MESSAGING|RECEIVING|SUBSCREEN|ACCORDING|COL_TOTAL|END-LINES|ENDMETHOD|ENDSELECT|EXPANDING|EXTENSION|INCLUDING|INFOTYPES|INTERFACE|INTERVALS|LINE-SIZE|PF-STATUS|PROCEDURE|PROTECTED|REQUESTED|RESUMABLE|RIGHTPLUS|SAP-SPOOL|SECONDARY|STRUCTURE|SUBSTRING|TABLEVIEW|NUMOFCHAR|ADJACENT|ANALYSIS|ASSIGNED|BACKWARD|CHANNELS|CHECKBOX|CONTINUE|CRITICAL|DATAINFO|DD\/MM\/YY|DURATION|ENCODING|ENDCLASS|FUNCTION|LEFTPLUS|LINEFEED|MM\/DD\/YY|OVERFLOW|RECEIVED|SKIPPING|SORTABLE|STANDARD|SUBTRACT|SUPPRESS|TABSTRIP|TITLEBAR|TRUNCATE|UNASSIGN|WHENEVER|ANALYZER|COALESCE|COMMENTS|CONDENSE|DECIMALS|DEFERRED|ENDWHILE|EXPLICIT|KEYWORDS|MESSAGES|POSITION|PRIORITY|RECEIVER|RENAMING|TIMEZONE|TRAILING|ALLOCATE|CENTERED|CIRCULAR|CONTROLS|CURRENCY|DELETING|DESCRIBE|DISTANCE|ENDCATCH|EXPONENT|EXTENDED|GENERATE|IGNORING|INCLUDES|INTERNAL|MAJOR-ID|MODIFIER|NEW-LINE|OPTIONAL|PROPERTY|ROLLBACK|STARTING|SUPPLIED|ABSTRACT|CHANGING|CONTEXTS|CREATING|CUSTOMER|DATABASE|DAYLIGHT|DEFINING|DISTINCT|DIVISION|ENABLING|ENDCHAIN|ESCAPING|HARMLESS|IMPLICIT|INACTIVE|LANGUAGE|MINOR-ID|MULTIPLY|NEW-PAGE|NO-TITLE|POS_HIGH|SEPARATE|TEXTPOOL|TRANSFER|SELECTOR|DBMAXLEN|ITERATOR|ARCHIVE|BIT-XOR|BYTE-CO|COLLECT|COMMENT|CURRENT|DEFAULT|DISPLAY|ENDFORM|EXTRACT|LEADING|LISTBOX|LOCATOR|MEMBERS|METHODS|NESTING|POS_LOW|PROCESS|PROVIDE|RAISING|RESERVE|SECONDS|SUMMARY|VISIBLE|BETWEEN|BIT-AND|BYTE-CS|CLEANUP|COMPUTE|CONTROL|CONVERT|DATASET|ENDCASE|FORWARD|HEADERS|HOTSPOT|INCLUDE|INVERSE|KEEPING|NO-ZERO|OBJECTS|OVERLAY|PADDING|PATTERN|PROGRAM|REFRESH|SECTION|SUMMING|TESTING|VERSION|WINDOWS|WITHOUT|BIT-NOT|BYTE-CA|BYTE-NA|CASTING|CONTEXT|COUNTRY|DYNAMIC|ENABLED|ENDLOOP|EXECUTE|FRIENDS|HANDLER|HEADING|INITIAL|\*-INPUT|LOGFILE|MAXIMUM|MINIMUM|NO-GAPS|NO-SIGN|PRAGMAS|PRIMARY|PRIVATE|REDUCED|REPLACE|REQUEST|RESULTS|UNICODE|WARNING|ALIASES|BYTE-CN|BYTE-NS|CALLING|COL_KEY|COLUMNS|CONNECT|ENDEXEC|ENTRIES|EXCLUDE|FILTERS|FURTHER|HELP-ID|LOGICAL|MAPPING|MESSAGE|NAMETAB|OPTIONS|PACKAGE|PERFORM|RECEIVE|STATICS|VARYING|BINDING|CHARLEN|GREATER|XSTRLEN|ACCEPT|APPEND|DETAIL|ELSEIF|ENDING|ENDTRY|FORMAT|FRAMES|GIVING|HASHED|HEADER|IMPORT|INSERT|MARGIN|MODULE|NATIVE|OBJECT|OFFSET|REMOTE|RESUME|SAVING|SIMPLE|SUBMIT|TABBED|TOKENS|UNIQUE|UNPACK|UPDATE|WINDOW|YELLOW|ACTUAL|ASPECT|CENTER|CURSOR|DELETE|DIALOG|DIVIDE|DURING|ERRORS|EVENTS|EXTEND|FILTER|HANDLE|HAVING|IGNORE|LITTLE|MEMORY|NO-GAP|OCCURS|OPTION|PERSON|PLACES|PUBLIC|REDUCE|REPORT|RESULT|SINGLE|SORTED|SWITCH|SYNTAX|TARGET|VALUES|WRITER|ASSERT|BLOCKS|BOUNDS|BUFFER|CHANGE|COLUMN|COMMIT|CONCAT|COPIES|CREATE|DDMMYY|DEFINE|ENDIAN|ESCAPE|EXPAND|KERNEL|LAYOUT|LEGACY|LEVELS|MMDDYY|NUMBER|OUTPUT|RANGES|READER|RETURN|SCREEN|SEARCH|SELECT|SHARED|SOURCE|STABLE|STATIC|SUBKEY|SUFFIX|TABLES|UNWIND|YYMMDD|ASSIGN|BACKUP|BEFORE|BINARY|BIT-OR|BLANKS|CLIENT|CODING|COMMON|DEMAND|DYNPRO|EXCEPT|EXISTS|EXPORT|FIELDS|GLOBAL|GROUPS|LENGTH|LOCALE|MEDIUM|METHOD|MODIFY|NESTED|OTHERS|REJECT|SCROLL|SUPPLY|SYMBOL|ENDFOR|STRLEN|ALIGN|BEGIN|BOUND|ENDAT|ENTRY|EVENT|FINAL|FLUSH|GRANT|INNER|SHORT|USING|WRITE|AFTER|BLACK|BLOCK|CLOCK|COLOR|COUNT|DUMMY|EMPTY|ENDDO|ENDON|GREEN|INDEX|INOUT|LEAVE|LEVEL|LINES|MODIF|ORDER|OUTER|RANGE|RESET|RETRY|RIGHT|SMART|SPLIT|STYLE|TABLE|THROW|UNDER|UNTIL|UPPER|UTF-8|WHERE|ALIAS|BLANK|CLEAR|CLOSE|EXACT|FETCH|FIRST|FOUND|GROUP|LLANG|LOCAL|OTHER|REGEX|SPOOL|TITLE|TYPES|VALID|WHILE|ALPHA|BOXED|CATCH|CHAIN|CHECK|CLASS|COVER|ENDIF|EQUIV|FIELD|FLOOR|FRAME|INPUT|LOWER|MATCH|NODES|PAGES|PRINT|RAISE|ROUND|SHIFT|SPACE|SPOTS|STAMP|STATE|TASKS|TIMES|TRMAC|ULINE|UNION|VALUE|WIDTH|EQUAL|LOG10|TRUNC|BLOB|CASE|CEIL|CLOB|COND|EXIT|FILE|GAPS|HOLD|INCL|INTO|KEEP|KEYS|LAST|LINE|LONG|LPAD|MAIL|MODE|OPEN|PINK|READ|ROWS|TEST|THEN|ZERO|AREA|BACK|BADI|BYTE|CAST|EDIT|EXEC|FAIL|FIND|FKEQ|FONT|FREE|GKEQ|HIDE|INIT|ITNO|LATE|LOOP|MAIN|MARK|MOVE|NEXT|NULL|RISK|ROLE|UNIT|WAIT|ZONE|BASE|CALL|CODE|DATA|DATE|FKGE|GKGE|HIGH|KIND|LEFT|LIST|MASK|MESH|NAME|NODE|PACK|PAGE|POOL|SEND|SIGN|SIZE|SOME|STOP|TASK|TEXT|TIME|USER|VARY|WITH|WORD|BLUE|CONV|COPY|DEEP|ELSE|FORM|FROM|HINT|ICON|JOIN|LIKE|LOAD|ONLY|PART|SCAN|SKIP|SORT|TYPE|UNIX|VIEW|WHEN|WORK|ACOS|ASIN|ATAN|COSH|EACH|FRAC|LESS|RTTI|SINH|SQRT|TANH|AVG|BIT|DIV|ISO|LET|OUT|PAD|SQL|ALL|CI_|CPI|END|LOB|LPI|MAX|MIN|NEW|OLE|RUN|SET|\?TO|YES|ABS|ADD|AND|BIG|FOR|HDB|JOB|LOW|NOT|SAP|TRY|VIA|XML|ANY|GET|IDS|KEY|MOD|OFF|PUT|RAW|RED|REF|SUM|TAB|XSD|CNT|COS|EXP|LOG|SIN|TAN|XOR|AT|CO|CP|DO|GT|ID|IF|NS|OR|BT|CA|CS|GE|NA|NB|EQ|IN|LT|NE|NO|OF|ON|PF|TO|AS|BY|CN|IS|LE|NP|UP|E|I|M|O|Z|C|X)\b/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}e.exports=n,n.displayName="abap",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t="(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)";e.languages.abnf={comment:/;.*/,string:{pattern:/(?:%[is])?"[^"\n\r]*"/,greedy:!0,inside:{punctuation:/^%[is]/}},range:{pattern:/%(?:b[01]+-[01]+|d\d+-\d+|x[A-F\d]+-[A-F\d]+)/i,alias:"number"},terminal:{pattern:/%(?:b[01]+(?:\.[01]+)*|d\d+(?:\.\d+)*|x[A-F\d]+(?:\.[A-F\d]+)*)/i,alias:"number"},repetition:{pattern:/(^|[^\w-])(?:\d*\*\d*|\d+)/,lookbehind:!0,alias:"operator"},definition:{pattern:/(^[ \t]*)(?:[a-z][\w-]*|<[^<>\r\n]*>)(?=\s*=)/m,lookbehind:!0,alias:"keyword",inside:{punctuation:/<|>/}},"core-rule":{pattern:RegExp("(?:(^|[^<\\w-])"+t+"|<"+t+">)(?![\\w-])","i"),lookbehind:!0,alias:["rule","constant"],inside:{punctuation:/<|>/}},rule:{pattern:/(^|[^<\w-])[a-z][\w-]*|<[^<>\r\n]*>/i,lookbehind:!0,inside:{punctuation:/<|>/}},operator:/=\/?|\//,punctuation:/[()\[\]]/}}(e)}e.exports=n,n.displayName="abnf",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.actionscript=e.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),e.languages.actionscript["class-name"].alias="function",delete e.languages.actionscript.parameter,delete e.languages.actionscript["literal-property"],e.languages.markup&&e.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:e.languages.markup}})}e.exports=n,n.displayName="actionscript",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.ada={comment:/--.*/,string:/"(?:""|[^"\r\f\n])*"/,number:[{pattern:/\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i},{pattern:/\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i}],"attr-name":/\b'\w+/,keyword:/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,boolean:/\b(?:false|true)\b/i,operator:/<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,punctuation:/\.\.?|[,;():]/,char:/'.'/,variable:/\b[a-z](?:\w)*\b/i}}e.exports=n,n.displayName="ada",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.agda={comment:/\{-[\s\S]*?(?:-\}|$)|--.*/,string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},punctuation:/[(){}\u2983\u2984.;@]/,"class-name":{pattern:/((?:data|record) +)\S+/,lookbehind:!0},function:{pattern:/(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,lookbehind:!0},operator:{pattern:/(^\s*|\s)(?:[=|:\u2200\u2192\u03bb\\?_]|->)(?=\s)/,lookbehind:!0},keyword:/\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/}}(e)}e.exports=n,n.displayName="agda",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.al={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},function:{pattern:/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,lookbehind:!0},keyword:[/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i],number:/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,boolean:/\b(?:false|true)\b/i,variable:/\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,"class-name":/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,operator:/\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,punctuation:/[()\[\]{}:.;,]/}}e.exports=n,n.displayName="al",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.antlr4={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,string:{pattern:/'(?:\\.|[^\\'\r\n])*'/,greedy:!0},"character-class":{pattern:/\[(?:\\.|[^\\\]\r\n])*\]/,greedy:!0,alias:"regex",inside:{range:{pattern:/([^[]|(?:^|[^\\])(?:\\\\)*\\\[)-(?!\])/,lookbehind:!0,alias:"punctuation"},escape:/\\(?:u(?:[a-fA-F\d]{4}|\{[a-fA-F\d]+\})|[pP]\{[=\w-]+\}|[^\r\nupP])/,punctuation:/[\[\]]/}},action:{pattern:/\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\}/,greedy:!0,inside:{content:{pattern:/(\{)[\s\S]+(?=\})/,lookbehind:!0},punctuation:/[{}]/}},command:{pattern:/(->\s*(?!\s))(?:\s*(?:,\s*)?\b[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i,lookbehind:!0,inside:{function:/\b\w+(?=\s*(?:[,(]|$))/,punctuation:/[,()]/}},annotation:{pattern:/@\w+(?:::\w+)*/,alias:"keyword"},label:{pattern:/#[ \t]*\w+/,alias:"punctuation"},keyword:/\b(?:catch|channels|finally|fragment|grammar|import|lexer|locals|mode|options|parser|returns|throws|tokens)\b/,definition:[{pattern:/\b[a-z]\w*(?=\s*:)/,alias:["rule","class-name"]},{pattern:/\b[A-Z]\w*(?=\s*:)/,alias:["token","constant"]}],constant:/\b[A-Z][A-Z_]*\b/,operator:/\.\.|->|[|~]|[*+?]\??/,punctuation:/[;:()=]/},e.languages.g4=e.languages.antlr4}e.exports=n,n.displayName="antlr4",n.aliases=["g4"]},function(e,t,r){"use strict";function n(e){e.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|Type|UserFile|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|Limit(?:InternalRecursion|Request(?:Body|Fields|FieldSize|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|SRPUnknownUserSeed|SRPVerifierFile|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UserName|UseStapling|VerifyClient|VerifyDepth)|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}}e.exports=n,n.displayName="apacheconf",n.aliases=[]},function(e,t,r){"use strict";var n=r(1065);function a(e){e.register(n),function(e){var t=/\b(?:(?:after|before)(?=\s+[a-z])|abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|get(?=\s*[{};])|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|(?:inherited|with|without)\s+sharing)\b/i,r=/\b(?:(?=[a-z_]\w*\s*[<\[])|(?!))[A-Z_]\w*(?:\s*\.\s*[A-Z_]\w*)*\b(?:\s*(?:\[\s*\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*/.source.replace(//g,(function(){return t.source}));function n(e){return RegExp(e.replace(//g,(function(){return r})),"i")}var a={keyword:t,punctuation:/[()\[\]{};,:.<>]/};e.languages.apex={comment:e.languages.clike.comment,string:e.languages.clike.string,sql:{pattern:/((?:[=,({:]|\breturn)\s*)\[[^\[\]]*\]/i,lookbehind:!0,greedy:!0,alias:"language-sql",inside:e.languages.sql},annotation:{pattern:/@\w+\b/,alias:"punctuation"},"class-name":[{pattern:n(/(\b(?:class|enum|extends|implements|instanceof|interface|new|trigger\s+\w+\s+on)\s+)/.source),lookbehind:!0,inside:a},{pattern:n(/(\(\s*)(?=\s*\)\s*[\w(])/.source),lookbehind:!0,inside:a},{pattern:n(/(?=\s*\w+\s*[;=,(){:])/.source),inside:a}],trigger:{pattern:/(\btrigger\s+)\w+\b/i,lookbehind:!0,alias:"class-name"},keyword:t,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/(?:\B\.\d+|\b\d+(?:\.\d+|L)?)\b/i,operator:/[!=](?:==?)?|\?\.?|&&|\|\||--|\+\+|[-+*/^&|]=?|:|<{1,3}=?/,punctuation:/[()\[\]{};,.]/}}(e)}e.exports=a,a.displayName="apex",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.apl={comment:/(?:\u235d|#[! ]).*$/m,string:{pattern:/'(?:[^'\r\n]|'')*'/,greedy:!0},number:/\xaf?(?:\d*\.?\b\d+(?:e[+\xaf]?\d+)?|\xaf|\u221e)(?:j\xaf?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+\xaf]?\d+)?|\xaf|\u221e))?/i,statement:/:[A-Z][a-z][A-Za-z]*\b/,"system-function":{pattern:/\u2395[A-Z]+/i,alias:"function"},constant:/[\u236c\u233e#\u2395\u235e]/,function:/[-+\xd7\xf7\u2308\u230a\u2223|\u2373\u2378?*\u235f\u25cb!\u2339<\u2264=>\u2265\u2260\u2261\u2262\u220a\u2377\u222a\u2229~\u2228\u2227\u2371\u2372\u2374,\u236a\u233d\u2296\u2349\u2191\u2193\u2282\u2283\u2286\u2287\u2337\u234b\u2352\u22a4\u22a5\u2355\u234e\u22a3\u22a2\u2341\u2342\u2248\u236f\u2197\xa4\u2192]/,"monadic-operator":{pattern:/[\\\/\u233f\u2340\xa8\u2368\u2336&\u2225]/,alias:"operator"},"dyadic-operator":{pattern:/[.\u2363\u2360\u2364\u2218\u2338@\u233a\u2365]/,alias:"operator"},assignment:{pattern:/\u2190/,alias:"keyword"},punctuation:/[\[;\]()\u25c7\u22c4]/,dfn:{pattern:/[{}\u237a\u2375\u2376\u2379\u2207\u236b:]/,alias:"builtin"}}}e.exports=n,n.displayName="apl",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=\u2260\u2264\u2265*+\-\/\xf7^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class-name":/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,punctuation:/[{}():,\xac\xab\xbb\u300a\u300b]/}}e.exports=n,n.displayName="applescript",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'\xb4`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},identifier:{pattern:/([\xb4`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:false|true)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}}e.exports=n,n.displayName="aql",n.aliases=[]},function(e,t,r){"use strict";var n=r(1066);function a(e){e.register(n),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}e.exports=a,a.displayName="arduino",a.aliases=["ino"]},function(e,t,r){"use strict";function n(e){e.languages.arff={comment:/%.*/,string:{pattern:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/@(?:attribute|data|end|relation)\b/i,number:/\b\d+(?:\.\d+)?\b/,punctuation:/[{},]/}}e.exports=n,n.displayName="arff",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},r=e.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:t,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:t.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:t,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|R|TM)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function n(e){for(var t={},n=0,a=(e=e.split(" ")).length;n>=?|<<=?|&&?|\|\|?|[-+*/%&|^!=<>?]=?/,punctuation:/[(),:]/}}e.exports=n,n.displayName="asmatmel",n.aliases=[]},function(e,t,r){"use strict";var n=r(812);function a(e){e.register(n),e.languages.aspnet=e.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:e.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/,alias:"tag"},rest:e.languages.csharp}}}),e.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,e.languages.insertBefore("inside","punctuation",{directive:e.languages.aspnet.directive},e.languages.aspnet.tag.inside["attr-value"]),e.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),e.languages.insertBefore("aspnet",e.languages.javascript?"script":"tag",{"asp-script":{pattern:/(]*>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,alias:["asp","script"],inside:e.languages.csharp||{}}})}e.exports=a,a.displayName="aspnet",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.autohotkey={comment:[{pattern:/(^|\s);.*/,lookbehind:!0},{pattern:/(^[\t ]*)\/\*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m,lookbehind:!0,greedy:!0}],tag:{pattern:/^([ \t]*)[^\s,`":]+(?=:[ \t]*$)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,boolean:/\b(?:false|true)\b/,selector:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guicontrol|a_guicontrolevent|a_guievent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|isfunc|islabel|IsObject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|numget|numput|onmessage|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strlen|strreplace|strsplit|substr|tan|tv_add|tv_delete|tv_get|tv_getchild|tv_getcount|tv_getnext|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__Call|__Get|__New|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,important:/#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i,keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/,punctuation:/[{}[\]():,]/}}e.exports=n,n.displayName="autohotkey",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.autoit={comment:[/;.*/,{pattern:/(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:ce|comments-end)/m,lookbehind:!0}],url:{pattern:/(^[\t ]*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,lookbehind:!0},string:{pattern:/(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,greedy:!0,inside:{variable:/([%$@])\w+\1/}},directive:{pattern:/(^[\t ]*)#[\w-]+/m,lookbehind:!0,alias:"keyword"},function:/\b\w+(?=\()/,variable:/[$@]\w+/,keyword:/\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,boolean:/\b(?:False|True)\b/i,operator:/<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Not|Or)\b/i,punctuation:/[\[\]().,:]/}}e.exports=n,n.displayName="autoit",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){function t(e,t,r){return RegExp(function(e,t){return e.replace(/<<(\d+)>>/g,(function(e,r){return t[+r]}))}(e,t),r||"")}var r=/bool|clip|float|int|string|val/.source,n=[[/is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/.source,/apply|assert|default|eval|import|nop|select|undefined/.source,/opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/.source,/hex(?:value)?|value/.source,/abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/.source,/a?sinh?|a?cosh?|a?tan[2h]?/.source,/(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/.source,/average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/.source,/getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/.source,/chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/.source,/isversionorgreater|version(?:number|string)/.source,/buildpixeltype|colorspacenametopixeltype/.source,/addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source].join("|"),[/has(?:audio|video)/.source,/height|width/.source,/frame(?:count|rate)|framerate(?:denominator|numerator)/.source,/getparity|is(?:field|frame)based/.source,/bitspercomponent|componentsize|hasalpha|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:va?|y2))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|numcomponents|pixeltype/.source,/audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/.source].join("|"),[/avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/.source,/coloryuv|convertbacktoyuy2|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:411|420|422|444)|YUY2)|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:chroma|luma)|rgbadjust|show(?:alpha|blue|green|red)|swapuv|tweak|[uv]toy8?|ytouv/.source,/(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source,/addborders|(?:bicubic|bilinear|blackman|gauss|lanczos4|lanczos|point|sinc|spline(?:16|36|64))resize|crop(?:bottom)?|flip(?:horizontal|vertical)|(?:horizontal|vertical)?reduceby2|letterbox|skewrows|turn(?:180|left|right)/.source,/blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/.source,/trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|io|out)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/.source,/assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/.source,/amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|ssrc|supereq|timestretch/.source,/animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/.source,/imagewriter/.source,/blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/.source].join("|")].join("|");e.languages.avisynth={comment:[{pattern:/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],argument:{pattern:t(/\b(?:<<0>>)\s+("?)\w+\1/.source,[r],"i"),inside:{keyword:/^\w+/}},"argument-label":{pattern:/([,(][\s\\]*)\w+\s*=(?!=)/,lookbehind:!0,inside:{"argument-name":{pattern:/^\w+/,alias:"punctuation"},punctuation:/=$/}},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0,inside:{constant:{pattern:/\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/}}}],variable:/\b(?:last)\b/i,boolean:/\b(?:false|no|true|yes)\b/i,keyword:/\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,constant:/\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,"builtin-function":{pattern:t(/\b(?:<<0>>)\b/.source,[n],"i"),alias:"function"},"type-cast":{pattern:t(/\b(?:<<0>>)(?=\s*\()/.source,[r],"i"),alias:"keyword"},function:{pattern:/\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,lookbehind:!0},"line-continuation":{pattern:/(^[ \t]*)\\|\\(?=[ \t]*$)/m,lookbehind:!0,alias:"punctuation"},number:/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,operator:/\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,punctuation:/[{}\[\]();,.]/},e.languages.avs=e.languages.avisynth}(e)}e.exports=n,n.displayName="avisynth",n.aliases=["avs"]},function(e,t,r){"use strict";function n(e){e.languages["avro-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0},annotation:{pattern:/@(?:[$\w.-]|`[^\r\n`]+`)+/,greedy:!0,alias:"function"},"function-identifier":{pattern:/`[^\r\n`]+`(?=\s*\()/,greedy:!0,alias:"function"},identifier:{pattern:/`[^\r\n`]+`/,greedy:!0},"class-name":{pattern:/(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,lookbehind:!0,greedy:!0},keyword:/\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:[{pattern:/(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,lookbehind:!0},/-?\b(?:Infinity|NaN)\b/],operator:/=/,punctuation:/[()\[\]{}<>.:,;-]/},e.languages.avdl=e.languages["avro-idl"]}e.exports=n,n.displayName="avroIdl",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/%%?[~:\w]+%?|!\S+!/,r={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},n=/"(?:[\\"]"|[^"])*"(?!")/,a=/(?:\b|-)\d+\b/;e.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:n,parameter:r,variable:t,number:a,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:n,parameter:r,variable:t,number:a,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:n,parameter:r,variable:[t,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:a,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:n,parameter:r,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:t,number:a,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(e)}e.exports=n,n.displayName="batch",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.bbcode={tag:{pattern:/\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/,inside:{tag:{pattern:/^\[\/?[^\s=\]]+/,inside:{punctuation:/^\[\/?/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\]/,"attr-name":/[^\s=\]]+/}}},e.languages.shortcode=e.languages.bbcode}e.exports=n,n.displayName="bbcode",n.aliases=["shortcode"]},function(e,t,r){"use strict";function n(e){e.languages.bicep={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],property:[{pattern:/([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,lookbehind:!0},{pattern:/([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,lookbehind:!0,greedy:!0}],string:[{pattern:/'''[^'][\s\S]*?'''/,greedy:!0},{pattern:/(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0}],"interpolated-string":{pattern:/(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}\r\n]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0},punctuation:/^\$\{|\}$/}},string:/[\s\S]+/}},datatype:{pattern:/(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,lookbehind:!0,alias:"class-name"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/,decorator:/@\w+\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,punctuation:/[{}[\];(),.:]/},e.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside=e.languages.bicep}e.exports=n,n.displayName="bicep",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.birb=e.languages.extend("clike",{string:{pattern:/r?("|')(?:\\.|(?!\1)[^\\])*\1/,greedy:!0},"class-name":[/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,/\b(?:[A-Z]\w*|(?!(?:var|void)\b)[a-z]\w*)(?=\s+\w+\s*[;,=()])/],keyword:/\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,operator:/\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,variable:/\b[a-z_]\w*\b/}),e.languages.insertBefore("birb","function",{metadata:{pattern:/<\w+>/,greedy:!0,alias:"symbol"}})}e.exports=n,n.displayName="birb",n.aliases=[]},function(e,t,r){"use strict";var n=r(476);function a(e){e.register(n),e.languages.bison=e.languages.extend("c",{}),e.languages.insertBefore("bison","comment",{bison:{pattern:/^(?:[^%]|%(?!%))*%%[\s\S]*?%%/,inside:{c:{pattern:/%\{[\s\S]*?%\}|\{(?:\{[^}]*\}|[^{}])*\}/,inside:{delimiter:{pattern:/^%?\{|%?\}$/,alias:"punctuation"},"bison-variable":{pattern:/[$@](?:<[^\s>]+>)?[\w$]+/,alias:"variable",inside:{punctuation:/<|>/}},rest:e.languages.c}},comment:e.languages.c.comment,string:e.languages.c.string,property:/\S+(?=:)/,keyword:/%\w+/,number:{pattern:/(^|[^@])\b(?:0x[\da-f]+|\d+)/i,lookbehind:!0},punctuation:/%[%?]|[|:;\[\]<>]/}}})}e.exports=a,a.displayName="bison",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.bnf={string:{pattern:/"[^\r\n"]*"|'[^\r\n']*'/},definition:{pattern:/<[^<>\r\n\t]+>(?=\s*::=)/,alias:["rule","keyword"],inside:{punctuation:/^<|>$/}},rule:{pattern:/<[^<>\r\n\t]+>/,inside:{punctuation:/^<|>$/}},operator:/::=|[|()[\]{}*+?]|\.{3}/},e.languages.rbnf=e.languages.bnf}e.exports=n,n.displayName="bnf",n.aliases=["rbnf"]},function(e,t,r){"use strict";function n(e){e.languages.brainfuck={pointer:{pattern:/<|>/,alias:"keyword"},increment:{pattern:/\+/,alias:"inserted"},decrement:{pattern:/-/,alias:"deleted"},branching:{pattern:/\[|\]/,alias:"important"},operator:/[.,]/,comment:/\S+/}}e.exports=n,n.displayName="brainfuck",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.brightscript={comment:/(?:\brem|').*/i,"directive-statement":{pattern:/(^[\t ]*)#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if).*/im,lookbehind:!0,alias:"property",inside:{"error-message":{pattern:/(^#error).+/,lookbehind:!0},directive:{pattern:/^#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if)/,alias:"keyword"},expression:{pattern:/[\s\S]+/,inside:null}}},property:{pattern:/([\r\n{,][\t ]*)(?:(?!\d)\w+|"(?:[^"\r\n]|"")*"(?!"))(?=[ \t]*:)/,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},"class-name":{pattern:/(\bAs[\t ]+)\w+/i,lookbehind:!0},keyword:/\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?!\d)\w+(?=[\t ]*\()/,number:/(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i,operator:/--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i,punctuation:/[.,;()[\]{}]/,constant:/\b(?:LINE_NUM)\b/i},e.languages.brightscript["directive-statement"].inside.expression.inside=e.languages.brightscript}e.exports=n,n.displayName="brightscript",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.bro={comment:{pattern:/(^|[^\\$])#.*/,lookbehind:!0,inside:{italic:/\b(?:FIXME|TODO|XXX)\b/}},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},boolean:/\b[TF]\b/,function:{pattern:/(\b(?:event|function|hook)[ \t]+)\w+(?:::\w+)?/,lookbehind:!0},builtin:/(?:@(?:load(?:-(?:plugin|sigs))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:add_func|create_expire|default|delete_func|encrypt|error_handler|expire_func|group|log|mergeable|optional|persistent|priority|raw_output|read_expire|redef|rotate_interval|rotate_size|synchronized|type_column|write_expire))/,constant:{pattern:/(\bconst[ \t]+)\w+/i,lookbehind:!0},keyword:/\b(?:add|addr|alarm|any|bool|break|const|continue|count|delete|double|else|enum|event|export|file|for|function|global|hook|if|in|int|interval|local|module|next|of|opaque|pattern|port|print|record|return|schedule|set|string|subnet|table|time|timeout|using|vector|when)\b/,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,punctuation:/[{}[\];(),.:]/}}e.exports=n,n.displayName="bro",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.bsl={comment:/\/\/.*/,string:[{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},{pattern:/'(?:[^'\r\n\\]|\\.)*'/}],keyword:[{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\u043f\u043e\u043a\u0430|\u0434\u043b\u044f|\u043d\u043e\u0432\u044b\u0439|\u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c|\u043f\u043e\u043f\u044b\u0442\u043a\u0430|\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435|\u0432\u044b\u0437\u0432\u0430\u0442\u044c\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435|\u0438\u043d\u0430\u0447\u0435|\u043a\u043e\u043d\u0435\u0446\u043f\u043e\u043f\u044b\u0442\u043a\u0438|\u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e|\u0444\u0443\u043d\u043a\u0446\u0438\u044f|\u043f\u0435\u0440\u0435\u043c|\u0432\u043e\u0437\u0432\u0440\u0430\u0442|\u043a\u043e\u043d\u0435\u0446\u0444\u0443\u043d\u043a\u0446\u0438\u0438|\u0435\u0441\u043b\u0438|\u0438\u043d\u0430\u0447\u0435\u0435\u0441\u043b\u0438|\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430|\u043a\u043e\u043d\u0435\u0446\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b|\u0442\u043e\u0433\u0434\u0430|\u0437\u043d\u0430\u0447|\u044d\u043a\u0441\u043f\u043e\u0440\u0442|\u043a\u043e\u043d\u0435\u0446\u0435\u0441\u043b\u0438|\u0438\u0437|\u043a\u0430\u0436\u0434\u043e\u0433\u043e|\u0438\u0441\u0442\u0438\u043d\u0430|\u043b\u043e\u0436\u044c|\u043f\u043e|\u0446\u0438\u043a\u043b|\u043a\u043e\u043d\u0435\u0446\u0446\u0438\u043a\u043b\u0430|\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:break|do|each|else|elseif|enddo|endfunction|endif|endprocedure|endtry|except|execute|export|false|for|function|if|in|new|null|procedure|raise|return|then|to|true|try|undefined|val|var|while)\b/i}],number:{pattern:/(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?/i,lookbehind:!0},operator:[/[<>+\-*/]=?|[%=]/,{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\u0438|\u0438\u043b\u0438|\u043d\u0435)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:and|not|or)\b/i}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/,directive:[{pattern:/^([ \t]*)&.*/m,lookbehind:!0,greedy:!0,alias:"important"},{pattern:/^([ \t]*)#.*/gm,lookbehind:!0,greedy:!0,alias:"important"}]},e.languages.oscript=e.languages.bsl}e.exports=n,n.displayName="bsl",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.cfscript=e.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,inside:{annotation:{pattern:/(?:^|[^.])@[\w\.]+/,alias:"punctuation"}}},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],keyword:/\b(?:abstract|break|catch|component|continue|default|do|else|extends|final|finally|for|function|if|in|include|package|private|property|public|remote|required|rethrow|return|static|switch|throw|try|var|while|xml)\b(?!\s*=)/,operator:[/\+\+|--|&&|\|\||::|=>|[!=]==|<=?|>=?|[-+*/%&|^!=<>]=?|\?(?:\.|:)?|[?:]/,/\b(?:and|contains|eq|equal|eqv|gt|gte|imp|is|lt|lte|mod|not|or|xor)\b/],scope:{pattern:/\b(?:application|arguments|cgi|client|cookie|local|session|super|this|variables)\b/,alias:"global"},type:{pattern:/\b(?:any|array|binary|boolean|date|guid|numeric|query|string|struct|uuid|void|xml)\b/,alias:"builtin"}}),e.languages.insertBefore("cfscript","keyword",{"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"}}),delete e.languages.cfscript["class-name"],e.languages.cfc=e.languages.cfscript}e.exports=n,n.displayName="cfscript",n.aliases=[]},function(e,t,r){"use strict";var n=r(1066);function a(e){e.register(n),e.languages.chaiscript=e.languages.extend("clike",{string:{pattern:/(^|[^\\])'(?:[^'\\]|\\[\s\S])*'/,lookbehind:!0,greedy:!0},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},{pattern:/(\b(?:attr|def)\s+)\w+(?=\s*::)/,lookbehind:!0}],keyword:/\b(?:attr|auto|break|case|catch|class|continue|def|default|else|finally|for|fun|global|if|return|switch|this|try|var|while)\b/,number:[e.languages.cpp.number,/\b(?:Infinity|NaN)\b/],operator:/>>=?|<<=?|\|\||&&|:[:=]?|--|\+\+|[=!<>+\-*/%|&^]=?|[?~]|`[^`\r\n]{1,4}`/}),e.languages.insertBefore("chaiscript","operator",{"parameter-type":{pattern:/([,(]\s*)\w+(?=\s+\w)/,lookbehind:!0,alias:"class-name"}}),e.languages.insertBefore("chaiscript","string",{"string-interpolation":{pattern:/(^|[^\\])"(?:[^"$\\]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\}/,lookbehind:!0,inside:{"interpolation-expression":{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.chaiscript},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"}}},string:/[\s\S]+/}}})}e.exports=a,a.displayName="chaiscript",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}}e.exports=n,n.displayName="cil",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},char:/\\\w+/,symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}}e.exports=n,n.displayName="clojure",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_(?:BINARY_DIR|DESCRIPTION|HOMEPAGE_URL|NAME|SOURCE_DIR|VERSION|VERSION_(?:MAJOR|MINOR|PATCH|TWEAK))|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE|XCODE_VERSION))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|GLOBAL_KEYWORD|GLOBAL_PROJECT_TYPES|GLOBAL_ROOTNAMESPACE|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}}e.exports=n,n.displayName="cmake",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}}e.exports=n,n.displayName="cobol",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/#(?!\{).+/,r={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:r}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:r}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:r}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(e)}e.exports=n,n.displayName="coffeescript",n.aliases=["coffee"]},function(e,t,r){"use strict";function n(e){e.languages.concurnas={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,lookbehind:!0,greedy:!0},langext:{pattern:/\b\w+\s*\|\|[\s\S]+?\|\|/,greedy:!0,inside:{"class-name":/^\w+/,string:{pattern:/(^\s*\|\|)[\s\S]+(?=\|\|$)/,lookbehind:!0},punctuation:/\|\|/}},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,lookbehind:!0},keyword:/\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,boolean:/\b(?:false|true)\b/,number:/\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,punctuation:/[{}[\];(),.:]/,operator:/<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,annotation:{pattern:/@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,alias:"builtin"}},e.languages.insertBefore("concurnas","langext",{"regex-literal":{pattern:/\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:e.languages.concurnas},regex:/[\s\S]+/}},"string-literal":{pattern:/(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:e.languages.concurnas},string:/[\s\S]+/}}}),e.languages.conc=e.languages.concurnas}e.exports=n,n.displayName="concurnas",n.aliases=["conc"]},function(e,t,r){"use strict";function n(e){!function(e){for(var t=/\(\*(?:[^(*]|\((?!\*)|\*(?!\))|)*\*\)/.source,r=0;r<2;r++)t=t.replace(//g,(function(){return t}));t=t.replace(//g,"[]"),e.languages.coq={comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp(/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|)*\]/.source.replace(//g,(function(){return t}))),greedy:!0,alias:"attr-name",inside:{comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}(e)}e.exports=n,n.displayName="coq",n.aliases=[]},function(e,t,r){"use strict";var n=r(813);function a(e){e.register(n),function(e){e.languages.crystal=e.languages.extend("ruby",{keyword:[/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,operator:[/->/,e.languages.ruby.operator],punctuation:/[(){}[\].,;\\]/}),e.languages.insertBefore("crystal","string-literal",{attribute:{pattern:/@\[.*?\]/,inside:{delimiter:{pattern:/^@\[|\]$/,alias:"punctuation"},attribute:{pattern:/^(\s*)\w+/,lookbehind:!0,alias:"class-name"},args:{pattern:/\S(?:[\s\S]*\S)?/,inside:e.languages.crystal}}},expansion:{pattern:/\{(?:\{.*?\}|%.*?%)\}/,inside:{content:{pattern:/^(\{.)[\s\S]+(?=.\}$)/,lookbehind:!0,inside:e.languages.crystal},delimiter:{pattern:/^\{[\{%]|[\}%]\}$/,alias:"operator"}}},char:{pattern:/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,greedy:!0}})}(e)}e.exports=a,a.displayName="crystal",a.aliases=[]},function(e,t,r){"use strict";var n=r(812);function a(e){e.register(n),function(e){var t=/\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//.source,r=/@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source+"|"+/'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;function n(e,n){for(var a=0;a/g,(function(){return"(?:"+e+")"}));return e.replace(//g,"[^\\s\\S]").replace(//g,"(?:"+r+")").replace(//g,"(?:"+t+")")}var a=n(/\((?:[^()'"@/]|||)*\)/.source,2),i=n(/\[(?:[^\[\]'"@/]|||)*\]/.source,2),o=n(/\{(?:[^{}'"@/]|||)*\}/.source,2),s=n(/<(?:[^<>'"@/]|||)*>/.source,2),c=/(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?/.source,u=/(?!\d)[^\s>\/=$<%]+/.source+c+/\s*\/?>/.source,f=/\B@?/.source+"(?:"+/<([a-zA-Z][\w:]*)/.source+c+/\s*>/.source+"(?:"+/[^<]/.source+"|"+/<\/?(?!\1\b)/.source+u+"|"+n(/<\1/.source+c+/\s*>/.source+"(?:"+/[^<]/.source+"|"+/<\/?(?!\1\b)/.source+u+"|)*"+/<\/\1\s*>/.source,2)+")*"+/<\/\1\s*>/.source+"|"+/|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var n={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,number:a})}(e)}e.exports=n,n.displayName="cssExtras",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}}e.exports=n,n.displayName="csv",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.cypher={comment:/\/\/.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,greedy:!0},"class-name":{pattern:/(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,lookbehind:!0,greedy:!0},relationship:{pattern:/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,lookbehind:!0,greedy:!0,alias:"property"},identifier:{pattern:/`(?:[^`\\\r\n])*`/,greedy:!0},variable:/\$\w+/,keyword:/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,function:/\b\w+\b(?=\s*\()/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,operator:/:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,punctuation:/[()[\]{},;.]/}}e.exports=n,n.displayName="cypher",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.d=e.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp(/(^|[^\\])/.source+"(?:"+[/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,/\/\/.*/.source,/\/\*[\s\S]*?\*\//.source].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp([/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,/\bq"(.)[\s\S]*?\2"/.source,/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),e.languages.insertBefore("d","string",{char:/'(?:\\(?:\W|\w+)|[^\\])'/}),e.languages.insertBefore("d","keyword",{property:/\B@\w*/}),e.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}})}e.exports=n,n.displayName="d",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],r=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,n={pattern:RegExp(r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[n,{pattern:RegExp(r+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:n.inside}],keyword:t,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":n,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(e)}e.exports=n,n.displayName="dart",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.dataweave={url:/\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,property:{pattern:/(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,greedy:!0},string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},"mime-type":/\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,date:{pattern:/\|[\w:+-]+\|/,greedy:!0},comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],regex:{pattern:/\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,greedy:!0},keyword:/\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/,function:/\b[A-Z_]\w*(?=\s*\()/i,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\];(),.:@]/,operator:/<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,boolean:/\b(?:false|true)\b/}}(e)}e.exports=n,n.displayName="dataweave",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.dax={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,lookbehind:!0},"data-field":{pattern:/'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,alias:"symbol"},measure:{pattern:/\[[ \w\xA0-\uFFFF]+\]/,alias:"constant"},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},function:/\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,keyword:/\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,boolean:{pattern:/\b(?:FALSE|NULL|TRUE)\b/i,alias:"constant"},number:/\b\d+(?:\.\d*)?|\B\.\d+\b/,operator:/:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,punctuation:/[;\[\](){}`,.]/}}e.exports=n,n.displayName="dax",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.dhall={comment:/--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,string:{pattern:/"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,alias:"language-dhall",inside:null},punctuation:/\$\{|\}/}}}},label:{pattern:/`[^`]*`/,greedy:!0},url:{pattern:/\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,greedy:!0},env:{pattern:/\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,greedy:!0,inside:{function:/^env/,operator:/^:/,variable:/[\s\S]+/}},hash:{pattern:/\bsha256:[\da-fA-F]{64}\b/,inside:{function:/sha256/,operator:/:/,number:/[\da-fA-F]{64}/}},keyword:/\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,builtin:/\b(?:None|Some)\b/,boolean:/\b(?:False|True)\b/,number:/\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,operator:/\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,punctuation:/\.\.|[{}\[\](),./]/,"class-name":/\b[A-Z]\w*\b/},e.languages.dhall.string.inside.interpolation.inside.expression.inside=e.languages.dhall}e.exports=n,n.displayName="dhall",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(r){var n=t[r],a=[];/^\w+$/.test(r)||a.push(/\w+/.exec(r)[0]),"diff"===r&&a.push("bold"),e.languages.diff[r]={pattern:RegExp("^(?:["+n+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(e)}e.exports=n,n.displayName="diff",n.aliases=[]},function(e,t,r){"use strict";var n=r(256);function a(e){e.register(n),function(e){e.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var t=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,r=e.languages["markup-templating"];e.hooks.add("before-tokenize",(function(e){r.buildPlaceholders(e,"django",t)})),e.hooks.add("after-tokenize",(function(e){r.tokenizePlaceholders(e,"django")})),e.languages.jinja2=e.languages.django,e.hooks.add("before-tokenize",(function(e){r.buildPlaceholders(e,"jinja2",t)})),e.hooks.add("after-tokenize",(function(e){r.tokenizePlaceholders(e,"jinja2")}))}(e)}e.exports=a,a.displayName="django",a.aliases=["jinja2"]},function(e,t,r){"use strict";function n(e){e.languages["dns-zone-file"]={comment:/;.*/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},variable:[{pattern:/(^\$ORIGIN[ \t]+)\S+/m,lookbehind:!0},{pattern:/(^|\s)@(?=\s|$)/,lookbehind:!0}],keyword:/^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,class:{pattern:/(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,lookbehind:!0,alias:"keyword"},punctuation:/[()]/},e.languages["dns-zone"]=e.languages["dns-zone-file"]}e.exports=n,n.displayName="dnsZoneFile",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,r=/(?:[ \t]+(?![ \t])(?:)?|)/.source.replace(//g,(function(){return t})),n=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,a=/--[\w-]+=(?:|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(//g,(function(){return n})),i={pattern:RegExp(n),greedy:!0},o={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function s(e,t){return e=e.replace(//g,(function(){return a})).replace(//g,(function(){return r})),RegExp(e,t)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:s(/(^(?:ONBUILD)?\w+)(?:)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[i,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:s(/(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:s(/(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\]+)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:s(/(^ONBUILD)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:o,string:i,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:o},e.languages.dockerfile=e.languages.docker}(e)}e.exports=n,n.displayName="docker",n.aliases=["dockerfile"]},function(e,t,r){"use strict";function n(e){!function(e){var t="(?:"+[/[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source,/-?(?:\.\d+|\d+(?:\.\d*)?)/.source,/"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source,/<(?:[^<>]|(?!)*>/.source].join("|")+")",r={markup:{pattern:/(^<)[\s\S]+(?=>$)/,lookbehind:!0,alias:["language-markup","language-html","language-xml"],inside:e.languages.markup}};function n(e,r){return RegExp(e.replace(//g,(function(){return t})),r)}e.languages.dot={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,greedy:!0},"graph-name":{pattern:n(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)/.source,"i"),lookbehind:!0,greedy:!0,alias:"class-name",inside:r},"attr-value":{pattern:n(/(=[ \t\r\n]*)/.source),lookbehind:!0,greedy:!0,inside:r},"attr-name":{pattern:n(/([\[;, \t\r\n])(?=[ \t\r\n]*=)/.source),lookbehind:!0,greedy:!0,inside:r},keyword:/\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,"compass-point":{pattern:/(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,lookbehind:!0,alias:"builtin"},node:{pattern:n(/(^|[^-.\w\x80-\uFFFF\\])/.source),lookbehind:!0,greedy:!0,inside:r},operator:/[=:]|-[->]/,punctuation:/[\[\]{};,]/},e.languages.gv=e.languages.dot}(e)}e.exports=n,n.displayName="dot",n.aliases=["gv"]},function(e,t,r){"use strict";function n(e){e.languages.ebnf={comment:/\(\*[\s\S]*?\*\)/,string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},special:{pattern:/\?[^?\r\n]*\?/,greedy:!0,alias:"class-name"},definition:{pattern:/^([\t ]*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im,lookbehind:!0,alias:["rule","keyword"]},rule:/\b[a-z]\w*(?:[ \t]+[a-z]\w*)*\b/i,punctuation:/\([:/]|[:/]\)|[.,;()[\]{}]/,operator:/[-=|*/!]/}}e.exports=n,n.displayName="ebnf",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.editorconfig={comment:/[;#].*/,section:{pattern:/(^[ \t]*)\[.+\]/m,lookbehind:!0,alias:"selector",inside:{regex:/\\\\[\[\]{},!?.*]/,operator:/[!?]|\.\.|\*{1,2}/,punctuation:/[\[\]{},]/}},key:{pattern:/(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/=.*/,alias:"attr-value",inside:{punctuation:/^=/}}}}e.exports=n,n.displayName="editorconfig",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}e.exports=n,n.displayName="eiffel",n.aliases=[]},function(e,t,r){"use strict";var n=r(256);function a(e){e.register(n),function(e){e.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:e.languages.javascript}},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"ejs",/<%(?!%)[\s\S]+?%>/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"ejs")})),e.languages.eta=e.languages.ejs}(e)}e.exports=a,a.displayName="ejs",a.aliases=["eta"]},function(e,t,r){"use strict";function n(e){e.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},e.languages.elixir.string.forEach((function(t){t.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.elixir}}}}))}e.exports=n,n.displayName="elixir",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}}e.exports=n,n.displayName="elm",n.aliases=[]},function(e,t,r){"use strict";var n=r(813),a=r(256);function i(e){e.register(n),e.register(a),function(e){e.languages.erb={delimiter:{pattern:/^(\s*)<%=?|%>(?=\s*$)/,lookbehind:!0,alias:"punctuation"},ruby:{pattern:/\s*\S[\s\S]*/,alias:"language-ruby",inside:e.languages.ruby}},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"erb",/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"erb")}))}(e)}e.exports=i,i.displayName="erb",i.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}}e.exports=n,n.displayName="erlang",n.aliases=[]},function(e,t,r){"use strict";var n=r(1558),a=r(256);function i(e){e.register(n),e.register(a),function(e){e.languages.etlua={delimiter:{pattern:/^<%[-=]?|-?%>$/,alias:"punctuation"},"language-lua":{pattern:/[\s\S]+/,inside:e.languages.lua}},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"etlua",/<%[\s\S]+?%>/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"etlua")}))}(e)}e.exports=i,i.displayName="etlua",i.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages["excel-formula"]={comment:{pattern:/(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},reference:{pattern:/(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,greedy:!0,alias:"string",inside:{operator:/!$/,punctuation:/'/,sheet:{pattern:/[^[\]]+$/,alias:"function"},file:{pattern:/\[[^[\]]+\]$/,inside:{punctuation:/[[\]]/}},path:/[\s\S]+/}},"function-name":{pattern:/\b[A-Z]\w*(?=\()/i,alias:"keyword"},range:{pattern:/\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,alias:"property",inside:{operator:/:/,cell:/\$?[A-Z]+\$?\d+/i,column:/\$?[A-Z]+/i,row:/\$?\d+/}},cell:{pattern:/\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,alias:"property"},number:/(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,boolean:/\b(?:FALSE|TRUE)\b/i,operator:/[-+*/^%=&,]|<[=>]?|>=?/,punctuation:/[[\]();{}|]/},e.languages.xlsx=e.languages.xls=e.languages["excel-formula"]}e.exports=n,n.displayName="excelFormula",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t={function:/\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/},r={number:/\\[^\s']|%\w/},n={comment:[{pattern:/(^|\s)(?:! .*|!$)/,lookbehind:!0,inside:t},{pattern:/(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,inside:t}],number:[{pattern:/(^|\s)[+-]?\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)-\d+-\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,lookbehind:!0}],regexp:{pattern:/(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,lookbehind:!0,alias:"number",inside:{variable:/\\\S/,keyword:/[+?*\[\]^$(){}.|]/,operator:{pattern:/(\/)[idmsr]+(?:-[idmsr]+)?/,lookbehind:!0}}},boolean:{pattern:/(^|\s)[tf](?=\s|$)/,lookbehind:!0},"custom-string":{pattern:/(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:/\\\S|%\w|\//}},"multiline-string":[{pattern:/(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:r.number,"semicolon-or-setlocal":{pattern:/([\r\n][ \t]*);(?=\s|$)/,lookbehind:!0,alias:"function"}}},{pattern:/(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:r},{pattern:/(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:r}],"special-using":{pattern:/(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,lookbehind:!0,alias:"function",inside:{string:{pattern:/(\s)[^:\s]+/,lookbehind:!0}}},"stack-effect-delimiter":[{pattern:/(^|\s)(?:call|eval|execute)?\((?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)--(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\)(?=\s|$)/,lookbehind:!0,alias:"operator"}],combinators:{pattern:null,lookbehind:!0,alias:"keyword"},"kernel-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"sequences-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"math-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"constructor-word":{pattern:/(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,lookbehind:!0,alias:"keyword"},"other-builtin-syntax":{pattern:null,lookbehind:!0,alias:"operator"},"conventionally-named-word":{pattern:/(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,lookbehind:!0,alias:"keyword"},"colon-syntax":{pattern:/(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"function"},"semicolon-or-setlocal":{pattern:/(\s)(?:;|:>)(?=\s|$)/,lookbehind:!0,alias:"function"},"curly-brace-literal-delimiter":[{pattern:/(^|\s)[a-z]*\{(?=\s)/i,lookbehind:!0,alias:"operator"},{pattern:/(\s)\}(?=\s|$)/,lookbehind:!0,alias:"operator"}],"quotation-delimiter":[{pattern:/(^|\s)\[(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\](?=\s|$)/,lookbehind:!0,alias:"operator"}],"normal-word":{pattern:/(^|\s)[^"\s]\S*(?=\s|$)/,lookbehind:!0},string:{pattern:/"(?:\\\S|[^"\\])*"/,greedy:!0,inside:r}},a=function(e){return(e+"").replace(/([.?*+\^$\[\]\\(){}|\-])/g,"\\$1")},i=function(e){return new RegExp("(^|\\s)(?:"+e.map(a).join("|")+")(?=\\s|$)")},o={"kernel-builtin":["or","2nipd","4drop","tuck","wrapper","nip","wrapper?","callstack>array","die","dupd","callstack","callstack?","3dup","hashcode","pick","4nip","build",">boolean","nipd","clone","5nip","eq?","?","=","swapd","2over","clear","2dup","get-retainstack","not","tuple?","dup","3nipd","call","-rotd","object","drop","assert=","assert?","-rot","execute","boa","get-callstack","curried?","3drop","pickd","overd","over","roll","3nip","swap","and","2nip","rotd","throw","(clone)","hashcode*","spin","reach","4dup","equal?","get-datastack","assert","2drop","","boolean?","identity-hashcode","identity-tuple?","null","composed?","new","5drop","rot","-roll","xor","identity-tuple","boolean"],"other-builtin-syntax":["=======","recursive","flushable",">>","<<<<<<","M\\","B","PRIVATE>","\\","======","final","inline","delimiter","deprecated",">>>>>","<<<<<<<","parse-complex","malformed-complex","read-only",">>>>>>>","call-next-method","<<","foldable","$","$[","${"],"sequences-builtin":["member-eq?","mismatch","append","assert-sequence=","longer","repetition","clone-like","3sequence","assert-sequence?","last-index-from","reversed","index-from","cut*","pad-tail","join-as","remove-eq!","concat-as","but-last","snip","nths","nth","sequence","longest","slice?","","remove-nth","tail-slice","empty?","tail*","member?","virtual-sequence?","set-length","drop-prefix","iota","unclip","bounds-error?","unclip-last-slice","non-negative-integer-expected","non-negative-integer-expected?","midpoint@","longer?","?set-nth","?first","rest-slice","prepend-as","prepend","fourth","sift","subseq-start","new-sequence","?last","like","first4","1sequence","reverse","slice","virtual@","repetition?","set-last","index","4sequence","max-length","set-second","immutable-sequence","first2","first3","supremum","unclip-slice","suffix!","insert-nth","tail","3append","short","suffix","concat","flip","immutable?","reverse!","2sequence","sum","delete-all","indices","snip-slice","","check-slice","sequence?","head","append-as","halves","sequence=","collapse-slice","?second","slice-error?","product","bounds-check?","bounds-check","immutable","virtual-exemplar","harvest","remove","pad-head","last","set-fourth","cartesian-product","remove-eq","shorten","shorter","reversed?","shorter?","shortest","head-slice","pop*","tail-slice*","but-last-slice","iota?","append!","cut-slice","new-resizable","head-slice*","sequence-hashcode","pop","set-nth","?nth","second","join","immutable-sequence?","","3append-as","virtual-sequence","subseq?","remove-nth!","length","last-index","lengthen","assert-sequence","copy","move","third","first","tail?","set-first","prefix","bounds-error","","exchange","surround","cut","min-length","set-third","push-all","head?","subseq-start-from","delete-slice","rest","sum-lengths","head*","infimum","remove!","glue","slice-error","subseq","push","replace-slice","subseq-as","unclip-last"],"math-builtin":["number=","next-power-of-2","?1+","fp-special?","imaginary-part","float>bits","number?","fp-infinity?","bignum?","fp-snan?","denominator","gcd","*","+","fp-bitwise=","-","u>=","/",">=","bitand","power-of-2?","log2-expects-positive","neg?","<","log2",">","integer?","number","bits>double","2/","zero?","bits>float","float?","shift","ratio?","rect>","even?","ratio","fp-sign","bitnot",">fixnum","complex?","/i","integer>fixnum","/f","sgn",">bignum","next-float","u<","u>","mod","recip","rational",">float","2^","integer","fixnum?","neg","fixnum","sq","bignum",">rect","bit?","fp-qnan?","simple-gcd","complex","","real",">fraction","double>bits","bitor","rem","fp-nan-payload","real-part","log2-expects-positive?","prev-float","align","unordered?","float","fp-nan?","abs","bitxor","integer>fixnum-strict","u<=","odd?","<=","/mod",">integer","real?","rational?","numerator"]};Object.keys(o).forEach((function(e){n[e].pattern=i(o[e])}));n.combinators.pattern=i(["2bi","while","2tri","bi*","4dip","both?","same?","tri@","curry","prepose","3bi","?if","tri*","2keep","3keep","curried","2keepd","when","2bi*","2tri*","4keep","bi@","keepdd","do","unless*","tri-curry","if*","loop","bi-curry*","when*","2bi@","2tri@","with","2with","either?","bi","until","3dip","3curry","tri-curry*","tri-curry@","bi-curry","keepd","compose","2dip","if","3tri","unless","tuple","keep","2curry","tri","most","while*","dip","composed","bi-curry@","find-last-from","trim-head-slice","map-as","each-from","none?","trim-tail","partition","if-empty","accumulate*","reject!","find-from","accumulate-as","collector-for-as","reject","map","map-sum","accumulate!","2each-from","follow","supremum-by","map!","unless-empty","collector","padding","reduce-index","replicate-as","infimum-by","trim-tail-slice","count","find-index","filter","accumulate*!","reject-as","map-integers","map-find","reduce","selector","interleave","2map","filter-as","binary-reduce","map-index-as","find","produce","filter!","replicate","cartesian-map","cartesian-each","find-index-from","map-find-last","3map-as","3map","find-last","selector-as","2map-as","2map-reduce","accumulate","each","each-index","accumulate*-as","when-empty","all?","collector-as","push-either","new-like","collector-for","2selector","push-if","2all?","map-reduce","3each","any?","trim-slice","2reduce","change-nth","produce-as","2each","trim","trim-head","cartesian-find","map-index","if-zero","each-integer","unless-zero","(find-integer)","when-zero","find-last-integer","(all-integers?)","times","(each-integer)","find-integer","all-integers?","unless-negative","if-positive","when-positive","when-negative","unless-positive","if-negative","case","2cleave","cond>quot","case>quot","3cleave","wrong-values","to-fixed-point","alist>quot","cond","cleave","call-effect","recursive-hashcode","spread","deep-spread>quot","2||","0||","n||","0&&","2&&","3||","1||","1&&","n&&","3&&","smart-unless*","keep-inputs","reduce-outputs","smart-when*","cleave>array","smart-with","smart-apply","smart-if","inputs/outputs","output>sequence-n","map-outputs","map-reduce-outputs","dropping","output>array","smart-map-reduce","smart-2map-reduce","output>array-n","nullary","inputsequence"]),e.languages.factor=n}(e)}e.exports=n,n.displayName="factor",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.false={comment:{pattern:/\{[^}]*\}/},string:{pattern:/"[^"]*"/,greedy:!0},"character-code":{pattern:/'(?:[^\r]|\r\n?)/,alias:"number"},"assembler-code":{pattern:/\d+`/,alias:"important"},number:/\d+/,operator:/[-!#$%&'*+,./:;=>?@\\^_`|~\xdf\xf8]/,punctuation:/\[|\]/,variable:/[a-z]/,"non-standard":{pattern:/[()!=]=?|[-+*/%]|\b(?:in|is)\b/}),delete e.languages["firestore-security-rules"]["class-name"],e.languages.insertBefore("firestore-security-rules","keyword",{path:{pattern:/(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,inside:{operator:/=/,keyword:/\*\*/,punctuation:/[.$(){}]/}},punctuation:/\//}},method:{pattern:/(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,lookbehind:!0,alias:"builtin",inside:{punctuation:/,/}}})}e.exports=n,n.displayName="firestoreSecurityRules",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,alias:"tag"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(e)}e.exports=n,n.displayName="flow",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}}e.exports=n,n.displayName="fortran",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.fsharp=e.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),e.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),e.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),e.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,greedy:!0,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:e.languages.fsharp}}},char:{pattern:/'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0}})}e.exports=n,n.displayName="fsharp",n.aliases=[]},function(e,t,r){"use strict";var n=r(256);function a(e){e.register(n),function(e){for(var t=/[^<()"']|\((?:)*\)|<(?!#--)|<#--(?:[^-]|-(?!->))*-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/.source,r=0;r<2;r++)t=t.replace(//g,(function(){return t}));t=t.replace(//g,/[^\s\S]/.source);var n={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp(/("|')(?:(?!\1|\$\{)[^\\]|\\.|\$\{(?:(?!\})(?:))*\})*\1/.source.replace(//g,(function(){return t}))),greedy:!0,inside:{interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\\\)*)\$\{(?:(?!\})(?:))*\}/.source.replace(//g,(function(){return t}))),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\b\w+(?=\s*\()/,number:/\b\d+(?:\.\d+)?\b/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};n.string[1].inside.interpolation.inside.rest=n,e.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:n}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:n}}}},e.hooks.add("before-tokenize",(function(r){var n=RegExp(/<#--[\s\S]*?-->|<\/?[#@][a-zA-Z](?:)*?>|\$\{(?:)*?\}/.source.replace(//g,(function(){return t})),"gi");e.languages["markup-templating"].buildPlaceholders(r,"ftl",n)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"ftl")}))}(e)}e.exports=a,a.displayName="ftl",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.gap={shell:{pattern:/^gap>[\s\S]*?(?=^gap>|$(?![\s\S]))/m,greedy:!0,inside:{gap:{pattern:/^(gap>).+(?:(?:\r(?:\n|(?!\n))|\n)>.*)*/,lookbehind:!0,inside:null},punctuation:/^gap>/}},comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(^|[^\\'"])(?:'(?:[^\r\n\\']|\\.){1,10}'|"(?:[^\r\n\\"]|\\.)*"(?!")|"""[\s\S]*?""")/,lookbehind:!0,greedy:!0,inside:{continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"}}},keyword:/\b(?:Assert|Info|IsBound|QUIT|TryNextMethod|Unbind|and|atomic|break|continue|do|elif|else|end|fi|for|function|if|in|local|mod|not|od|or|quit|readonly|readwrite|rec|repeat|return|then|until|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"},operator:/->|[-+*/^~=!]|<>|[<>]=?|:=|\.\./,punctuation:/[()[\]{},;.:]/},e.languages.gap.shell.inside.gap.inside=e.languages.gap}e.exports=n,n.displayName="gap",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.gcode={comment:/;.*|\B\(.*?\)\B/,string:{pattern:/"(?:""|[^"])*"/,greedy:!0},keyword:/\b[GM]\d+(?:\.\d+)?\b/,property:/\b[A-Z]/,checksum:{pattern:/(\*)\d+/,lookbehind:!0,alias:"number"},punctuation:/[:*]/}}e.exports=n,n.displayName="gcode",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.gdscript={comment:/#.*/,string:{pattern:/@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,greedy:!0},"class-name":{pattern:/(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,lookbehind:!0},keyword:/\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,variable:/\$\w+/,number:[/\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,/\b(?:INF|NAN|PI|TAU)\b/],constant:/\b[A-Z][A-Z_\d]*\b/,boolean:/\b(?:false|true)\b/,operator:/->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,punctuation:/[.:,;()[\]{}]/}}e.exports=n,n.displayName="gdscript",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.gedcom={"line-value":{pattern:/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,lookbehind:!0,inside:{pointer:{pattern:/^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,alias:"variable"}}},tag:{pattern:/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,lookbehind:!0,alias:"string"},level:{pattern:/(^[\t ]*)\d+/m,lookbehind:!0,alias:"number"},pointer:{pattern:/@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,alias:"variable"}}}e.exports=n,n.displayName="gedcom",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/(?:\r?\n|\r)[ \t]*\|.+\|(?:(?!\|).)*/.source;e.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Caracter\xedstica|Egenskab|Egenskap|Eiginleiki|Feature|F\u012b\u010da|Fitur|Fonctionnalit\xe9|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Func\u0163ionalitate|Func\u021bionalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalit\u0101te|Funkcionalnost|Funkcja|Funksie|Funktionalit\xe4t|Funktionalit\xe9it|Funzionalit\xe0|Hwaet|Hw\xe6t|Jellemz\u0151|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogu\u0107nost|Moznosti|Mo\u017enosti|OH HAI|Omadus|Ominaisuus|Osobina|\xd6zellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Po\u017eadavek|Po\u017eiadavka|Pretty much|Qap|Qu'meH 'ut|Savyb\u0117|T\xednh n\u0103ng|Trajto|Vermo\xeb|Vlastnos\u0165|W\u0142a\u015bciwo\u015b\u0107|Zna\u010dilnost|\u0394\u03c5\u03bd\u03b1\u03c4\u03cc\u03c4\u03b7\u03c4\u03b1|\u039b\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1|\u041c\u043e\u0433\u0443\u045b\u043d\u043e\u0441\u0442|\u041c\u04e9\u043c\u043a\u0438\u043d\u043b\u0435\u043a|\u041e\u0441\u043e\u0431\u0438\u043d\u0430|\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e|\u04ae\u0437\u0435\u043d\u0447\u04d9\u043b\u0435\u043a\u043b\u0435\u043b\u0435\u043a|\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b|\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043d\u043e\u0441\u0442|\u0424\u0443\u043d\u043a\u0446\u0438\u044f|\u0424\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b|\u05ea\u05db\u05d5\u05e0\u05d4|\u062e\u0627\u0635\u064a\u0629|\u062e\u0635\u0648\u0635\u06cc\u062a|\u0635\u0644\u0627\u062d\u06cc\u062a|\u06a9\u0627\u0631\u0648\u0628\u0627\u0631 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a|\u0648\u0650\u06cc\u0698\u06af\u06cc|\u0930\u0942\u092a \u0932\u0947\u0916|\u0a16\u0a3e\u0a38\u0a40\u0a05\u0a24|\u0a28\u0a15\u0a36 \u0a28\u0a41\u0a39\u0a3e\u0a30|\u0a2e\u0a41\u0a39\u0a3e\u0a02\u0a26\u0a30\u0a3e|\u0c17\u0c41\u0c23\u0c2e\u0c41|\u0cb9\u0cc6\u0c9a\u0ccd\u0c9a\u0cb3|\u0e04\u0e27\u0e32\u0e21\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e17\u0e32\u0e07\u0e18\u0e38\u0e23\u0e01\u0e34\u0e08|\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16|\u0e42\u0e04\u0e23\u0e07\u0e2b\u0e25\u0e31\u0e01|\uae30\ub2a5|\u30d5\u30a3\u30fc\u30c1\u30e3|\u529f\u80fd|\u6a5f\u80fd):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|\xc6r|Agtergrond|All y'all|Antecedentes|Antecedents|Atbur\xf0ar\xe1s|Atbur\xf0ar\xe1sir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|B\u1ed1i c\u1ea3nh|Cefndir|Cenario|Cen\xe1rio|Cenario de Fundo|Cen\xe1rio de Fundo|Cenarios|Cen\xe1rios|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|D\xe6mi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delinea\xe7\xe3o do Cen\xe1rio|Dis is what went down|D\u1eef li\u1ec7u|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cen\xe1rio|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgat\xf3k\xf6nyv|Forgat\xf3k\xf6nyv v\xe1zlat|Fundo|Ge\xe7mi\u015f|Grundlage|Hannergrond|ghantoH|H\xe1tt\xe9r|Heave to|Istorik|Juhtumid|Keadaan|Khung k\u1ecbch b\u1ea3n|Khung t\xecnh hu\u1ed1ng|K\u1ecbch b\u1ea3n|Koncept|Konsep skenario|Kont\xe8ks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|L\xfdsing Atbur\xf0ar\xe1sar|L\xfdsing D\xe6ma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|N\xe1\u010drt Scen\xe1ra|N\xe1\u010drt Sc\xe9n\xe1\u0159e|N\xe1\u010drt Scen\xe1ru|Oris scenarija|\xd6rnekler|Osnova|Osnova Scen\xe1ra|Osnova sc\xe9n\xe1\u0159e|Osnutek|Ozadje|Paraugs|Pavyzd\u017eiai|P\xe9ld\xe1k|Piem\u0113ri|Plan du sc\xe9nario|Plan du Sc\xe9nario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozad\xed|Pozadie|Pozadina|Pr\xedklady|P\u0159\xedklady|Primer|Primeri|Primjeri|Przyk\u0142ady|Raamstsenaarium|Reckon it's like|Rerefons|Scen\xe1r|Sc\xe9n\xe1\u0159|Scenarie|Scenarij|Scenarijai|Scenarijaus \u0161ablonas|Scenariji|Scen\u0101rijs|Scen\u0101rijs p\u0113c parauga|Scenarijus|Scenario|Sc\xe9nario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se \xf0e|Se the|Se \xfee|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo tasla\u011f\u0131|Shiver me timbers|Situ\u0101cija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structur\u0103 scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hw\xe6r swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|T\xecnh hu\u1ed1ng|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Za\u0142o\u017cenia|\u03a0\u03b1\u03c1\u03b1\u03b4\u03b5\u03af\u03b3\u03bc\u03b1\u03c4\u03b1|\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03a3\u03b5\u03bd\u03b1\u03c1\u03af\u03bf\u03c5|\u03a3\u03b5\u03bd\u03ac\u03c1\u03b9\u03b1|\u03a3\u03b5\u03bd\u03ac\u03c1\u03b9\u03bf|\u03a5\u03c0\u03cc\u03b2\u03b1\u03b8\u03c1\u03bf|\u041a\u0435\u0440\u0435\u0448|\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442|\u041a\u043e\u043d\u0446\u0435\u043f\u0442|\u041c\u0438\u0441\u0430\u043b\u043b\u0430\u0440|\u041c\u0438\u0441\u043e\u043b\u043b\u0430\u0440|\u041e\u0441\u043d\u043e\u0432\u0430|\u041f\u0435\u0440\u0435\u0434\u0443\u043c\u043e\u0432\u0430|\u041f\u043e\u0437\u0430\u0434\u0438\u043d\u0430|\u041f\u0440\u0435\u0434\u0438\u0441\u0442\u043e\u0440\u0438\u044f|\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f|\u041f\u0440\u0438\u043a\u043b\u0430\u0434\u0438|\u041f\u0440\u0438\u043c\u0435\u0440|\u041f\u0440\u0438\u043c\u0435\u0440\u0438|\u041f\u0440\u0438\u043c\u0435\u0440\u044b|\u0420\u0430\u043c\u043a\u0430 \u043d\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439|\u0421\u043a\u0438\u0446\u0430|\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0458\u0430|\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f|\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e|\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439|\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0441\u0438|\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439\u043d\u044b\u04a3 \u0442\u04e9\u0437\u0435\u043b\u0435\u0448\u0435|\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0458\u0438|\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u043e|\u0421\u0446\u0435\u043d\u0430\u0440\u0456\u0439|\u0422\u0430\u0440\u0438\u0445|\u04ae\u0440\u043d\u04d9\u043a\u043b\u04d9\u0440|\u05d3\u05d5\u05d2\u05de\u05d0\u05d5\u05ea|\u05e8\u05e7\u05e2|\u05ea\u05d1\u05e0\u05d9\u05ea \u05ea\u05e8\u05d7\u05d9\u05e9|\u05ea\u05e8\u05d7\u05d9\u05e9|\u0627\u0644\u062e\u0644\u0641\u064a\u0629|\u0627\u0644\u06af\u0648\u06cc \u0633\u0646\u0627\u0631\u06cc\u0648|\u0627\u0645\u062b\u0644\u0629|\u067e\u0633 \u0645\u0646\u0638\u0631|\u0632\u0645\u06cc\u0646\u0647|\u0633\u0646\u0627\u0631\u06cc\u0648|\u0633\u064a\u0646\u0627\u0631\u064a\u0648|\u0633\u064a\u0646\u0627\u0631\u064a\u0648 \u0645\u062e\u0637\u0637|\u0645\u062b\u0627\u0644\u06cc\u06ba|\u0645\u0646\u0638\u0631 \u0646\u0627\u0645\u06d2 \u06a9\u0627 \u062e\u0627\u06a9\u06c1|\u0645\u0646\u0638\u0631\u0646\u0627\u0645\u06c1|\u0646\u0645\u0648\u0646\u0647 \u0647\u0627|\u0909\u0926\u093e\u0939\u0930\u0923|\u092a\u0930\u093f\u0926\u0943\u0936\u094d\u092f|\u092a\u0930\u093f\u0926\u0943\u0936\u094d\u092f \u0930\u0942\u092a\u0930\u0947\u0916\u093e|\u092a\u0943\u0937\u094d\u0920\u092d\u0942\u092e\u093f|\u0a09\u0a26\u0a3e\u0a39\u0a30\u0a28\u0a3e\u0a02|\u0a2a\u0a1f\u0a15\u0a25\u0a3e|\u0a2a\u0a1f\u0a15\u0a25\u0a3e \u0a22\u0a3e\u0a02\u0a1a\u0a3e|\u0a2a\u0a1f\u0a15\u0a25\u0a3e \u0a30\u0a42\u0a2a \u0a30\u0a47\u0a16\u0a3e|\u0a2a\u0a3f\u0a1b\u0a4b\u0a15\u0a5c|\u0c09\u0c26\u0c3e\u0c39\u0c30\u0c23\u0c32\u0c41|\u0c15\u0c25\u0c28\u0c02|\u0c28\u0c47\u0c2a\u0c25\u0c4d\u0c2f\u0c02|\u0c38\u0c28\u0c4d\u0c28\u0c3f\u0c35\u0c47\u0c36\u0c02|\u0c89\u0ca6\u0cbe\u0cb9\u0cb0\u0ca3\u0cc6\u0c97\u0cb3\u0cc1|\u0c95\u0ca5\u0cbe\u0cb8\u0cbe\u0cb0\u0cbe\u0c82\u0cb6|\u0cb5\u0cbf\u0cb5\u0cb0\u0ca3\u0cc6|\u0cb9\u0cbf\u0ca8\u0ccd\u0ca8\u0cc6\u0cb2\u0cc6|\u0e42\u0e04\u0e23\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e02\u0e2d\u0e07\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c|\u0e0a\u0e38\u0e14\u0e02\u0e2d\u0e07\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07|\u0e0a\u0e38\u0e14\u0e02\u0e2d\u0e07\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c|\u0e41\u0e19\u0e27\u0e04\u0e34\u0e14|\u0e2a\u0e23\u0e38\u0e1b\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c|\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c|\ubc30\uacbd|\uc2dc\ub098\ub9ac\uc624|\uc2dc\ub098\ub9ac\uc624 \uac1c\uc694|\uc608|\u30b5\u30f3\u30d7\u30eb|\u30b7\u30ca\u30ea\u30aa|\u30b7\u30ca\u30ea\u30aa\u30a2\u30a6\u30c8\u30e9\u30a4\u30f3|\u30b7\u30ca\u30ea\u30aa\u30c6\u30f3\u30d7\u30ec|\u30b7\u30ca\u30ea\u30aa\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8|\u30c6\u30f3\u30d7\u30ec|\u4f8b|\u4f8b\u5b50|\u5267\u672c|\u5267\u672c\u5927\u7eb2|\u5287\u672c|\u5287\u672c\u5927\u7db1|\u573a\u666f|\u573a\u666f\u5927\u7eb2|\u5834\u666f|\u5834\u666f\u5927\u7db1|\u80cc\u666f):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+t+")(?:"+t+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(t),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'a|'ach|'ej|7|a|A tak\xe9|A taktie\u017e|A tie\u017e|A z\xe1rove\u0148|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|At\xe8s|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Bi\u1ebft|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|C\xe2nd|Cand|Cando|Ce|Cuando|\u010ce|\xd0a \xf0e|\xd0a|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Da\u0163i fiind|Da\u021bi fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donita\u0135o|Do|Dun|Duota|\xd0urh|Eeldades|Ef|E\u011fer ki|Entao|Ent\xe3o|Ent\xf3n|E|En|Entonces|Epi|\xc9s|Etant donn\xe9e|Etant donn\xe9|Et|\xc9tant donn\xe9es|\xc9tant donn\xe9e|\xc9tant donn\xe9|Etant donn\xe9es|Etant donn\xe9s|\xc9tant donn\xe9s|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Je\u015bli|Je\u017celi|Kad|Kada|Kadar|Kai|Kaj|Kdy\u017e|Ke\u010f|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|L\xe8 sa a|L\xe8|Logo|Lorsqu'<|Lorsque|m\xe4|Maar|Mais|Maj\u0105c|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|N\xe5r|N\xe4r|Nato|Nh\u01b0ng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Per\xf2|Podano|Pokia\u013e|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|S\xe5|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|\u015ei|\u0218i|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Th\xec|Thurh|Toda|Too right|Un|Und|ugeholl|V\xe0|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za p\u0159edpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zak\u0142adaj\u0105c|Zaradi|Zatati|\xdea \xfee|\xdea|\xde\xe1|\xdeegar|\xdeurh|\u0391\u03bb\u03bb\u03ac|\u0394\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03bf\u03c5|\u039a\u03b1\u03b9|\u038c\u03c4\u03b1\u03bd|\u03a4\u03cc\u03c4\u03b5|\u0410 \u0442\u0430\u043a\u043e\u0436|\u0410\u0433\u0430\u0440|\u0410\u043b\u0435|\u0410\u043b\u0438|\u0410\u043c\u043c\u043e|\u0410|\u04d8\u0433\u04d9\u0440|\u04d8\u0439\u0442\u0438\u043a|\u04d8\u043c\u043c\u0430|\u0411\u0438\u0440\u043e\u043a|\u0412\u0430|\u0412\u04d9|\u0414\u0430\u0434\u0435\u043d\u043e|\u0414\u0430\u043d\u043e|\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c|\u0415\u0441\u043b\u0438|\u0417\u0430\u0434\u0430\u0442\u0435|\u0417\u0430\u0434\u0430\u0442\u0438|\u0417\u0430\u0434\u0430\u0442\u043e|\u0418|\u0406|\u041a \u0442\u043e\u043c\u0443 \u0436\u0435|\u041a\u0430\u0434\u0430|\u041a\u0430\u0434|\u041a\u043e\u0433\u0430\u0442\u043e|\u041a\u043e\u0433\u0434\u0430|\u041a\u043e\u043b\u0438|\u041b\u04d9\u043a\u0438\u043d|\u041b\u0435\u043a\u0438\u043d|\u041d\u04d9\u0442\u0438\u0497\u04d9\u0434\u04d9|\u041d\u0435\u0445\u0430\u0439|\u041d\u043e|\u041e\u043d\u0434\u0430|\u041f\u0440\u0438\u043f\u0443\u0441\u0442\u0438\u043c\u043e, \u0449\u043e|\u041f\u0440\u0438\u043f\u0443\u0441\u0442\u0438\u043c\u043e|\u041f\u0443\u0441\u0442\u044c|\u0422\u0430\u043a\u0436\u0435|\u0422\u0430|\u0422\u043e\u0433\u0434\u0430|\u0422\u043e\u0434\u0456|\u0422\u043e|\u0423\u043d\u0434\u0430|\u04ba\u04d9\u043c|\u042f\u043a\u0449\u043e|\u05d0\u05d1\u05dc|\u05d0\u05d6\u05d9|\u05d0\u05d6|\u05d1\u05d4\u05d9\u05e0\u05ea\u05df|\u05d5\u05d2\u05dd|\u05db\u05d0\u05e9\u05e8|\u0622\u0646\u06af\u0627\u0647|\u0627\u0630\u0627\u064b|\u0627\u06af\u0631|\u0627\u0645\u0627|\u0627\u0648\u0631|\u0628\u0627 \u0641\u0631\u0636|\u0628\u0627\u0644\u0641\u0631\u0636|\u0628\u0641\u0631\u0636|\u067e\u06be\u0631|\u062a\u0628|\u062b\u0645|\u062c\u0628|\u0639\u0646\u062f\u0645\u0627|\u0641\u0631\u0636 \u06a9\u06cc\u0627|\u0644\u0643\u0646|\u0644\u06cc\u06a9\u0646|\u0645\u062a\u0649|\u0647\u0646\u06af\u0627\u0645\u06cc|\u0648|\u0905\u0917\u0930|\u0914\u0930|\u0915\u0926\u093e|\u0915\u093f\u0928\u094d\u0924\u0941|\u091a\u0942\u0902\u0915\u093f|\u091c\u092c|\u0924\u0925\u093e|\u0924\u0926\u093e|\u0924\u092c|\u092a\u0930\u0928\u094d\u0924\u0941|\u092a\u0930|\u092f\u0926\u093f|\u0a05\u0a24\u0a47|\u0a1c\u0a26\u0a4b\u0a02|\u0a1c\u0a3f\u0a35\u0a47\u0a02 \u0a15\u0a3f|\u0a1c\u0a47\u0a15\u0a30|\u0a24\u0a26|\u0a2a\u0a30|\u0c05\u0c2a\u0c4d\u0c2a\u0c41\u0c21\u0c41|\u0c08 \u0c2a\u0c30\u0c3f\u0c38\u0c4d\u0c25\u0c3f\u0c24\u0c3f\u0c32\u0c4b|\u0c15\u0c3e\u0c28\u0c3f|\u0c1a\u0c46\u0c2a\u0c4d\u0c2a\u0c2c\u0c21\u0c3f\u0c28\u0c26\u0c3f|\u0c2e\u0c30\u0c3f\u0c2f\u0c41|\u0c86\u0ca6\u0cb0\u0cc6|\u0ca8\u0c82\u0ca4\u0cb0|\u0ca8\u0cbf\u0cd5\u0ca1\u0cbf\u0ca6|\u0cae\u0ca4\u0ccd\u0ca4\u0cc1|\u0cb8\u0ccd\u0ca5\u0cbf\u0ca4\u0cbf\u0caf\u0ca8\u0ccd\u0ca8\u0cc1|\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e43\u0e2b\u0e49|\u0e14\u0e31\u0e07\u0e19\u0e31\u0e49\u0e19|\u0e41\u0e15\u0e48|\u0e40\u0e21\u0e37\u0e48\u0e2d|\u0e41\u0e25\u0e30|\uadf8\ub7ec\uba74<|\uadf8\ub9ac\uace0<|\ub2e8<|\ub9cc\uc57d<|\ub9cc\uc77c<|\uba3c\uc800<|\uc870\uac74<|\ud558\uc9c0\ub9cc<|\u304b\u3064<|\u3057\u304b\u3057<|\u305f\u3060\u3057<|\u306a\u3089\u3070<|\u3082\u3057<|\u4e26\u4e14<|\u4f46\u3057<|\u4f46\u662f<|\u5047\u5982<|\u5047\u5b9a<|\u5047\u8a2d<|\u5047\u8bbe<|\u524d\u63d0<|\u540c\u65f6<|\u540c\u6642<|\u5e76\u4e14<|\u5f53<|\u7576<|\u800c\u4e14<|\u90a3\u4e48<|\u90a3\u9ebc<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"}}},outline:{pattern:/<[^>]+>/,alias:"variable"}}}(e)}e.exports=n,n.displayName="gherkin",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}}e.exports=n,n.displayName="git",n.aliases=[]},function(e,t,r){"use strict";var n=r(476);function a(e){e.register(n),e.languages.glsl=e.languages.extend("c",{keyword:/\b(?:active|asm|atomic_uint|attribute|[ibdu]?vec[234]|bool|break|buffer|case|cast|centroid|class|coherent|common|const|continue|d?mat[234](?:x[234])?|default|discard|do|double|else|enum|extern|external|false|filter|fixed|flat|float|for|fvec[234]|goto|half|highp|hvec[234]|[iu]?sampler2DMS(?:Array)?|[iu]?sampler2DRect|[iu]?samplerBuffer|[iu]?samplerCube|[iu]?samplerCubeArray|[iu]?sampler[123]D|[iu]?sampler[12]DArray|[iu]?image2DMS(?:Array)?|[iu]?image2DRect|[iu]?imageBuffer|[iu]?imageCube|[iu]?imageCubeArray|[iu]?image[123]D|[iu]?image[12]DArray|if|in|inline|inout|input|int|interface|invariant|layout|long|lowp|mediump|namespace|noinline|noperspective|out|output|partition|patch|precise|precision|public|readonly|resource|restrict|return|sample|sampler[12]DArrayShadow|sampler[12]DShadow|sampler2DRectShadow|sampler3DRect|samplerCubeArrayShadow|samplerCubeShadow|shared|short|sizeof|smooth|static|struct|subroutine|superp|switch|template|this|true|typedef|uint|uniform|union|unsigned|using|varying|void|volatile|while|writeonly)\b/})}e.exports=a,a.displayName="glsl",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.gamemakerlanguage=e.languages.gml=e.languages.extend("clike",{keyword:/\b(?:break|case|continue|default|do|else|enum|exit|for|globalvar|if|repeat|return|switch|until|var|while)\b/,number:/(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i,operator:/--|\+\+|[-+%/=]=?|!=|\*\*?=?|<[<=>]?|>[=>]?|&&?|\^\^?|\|\|?|~|\b(?:and|at|not|or|with|xor)\b/,constant:/\b(?:GM_build_date|GM_version|action_(?:continue|restart|reverse|stop)|all|gamespeed_(?:fps|microseconds)|global|local|noone|other|pi|pointer_(?:invalid|null)|self|timezone_(?:local|utc)|undefined|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|post|pre)|keypress|keyrelease|trigger|(?:left|middle|no|right)_button|(?:left|middle|right)_press|(?:left|middle|right)_release|mouse_(?:enter|leave|wheel_down|wheel_up)|global_(?:left|middle|right)_button|global_(?:left|middle|right)_press|global_(?:left|middle|right)_release|joystick(?:1|2)_(?:button1|button2|button3|button4|button5|button6|button7|button8|down|left|right|up)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|gui|gui_begin|gui_end|step_(?:begin|end|normal))|vk_(?:alt|anykey|backspace|control|delete|down|end|enter|escape|home|insert|left|nokey|pagedown|pageup|pause|printscreen|return|right|shift|space|tab|up|f\d|numpad\d|add|decimal|divide|lalt|lcontrol|lshift|multiply|ralt|rcontrol|rshift|subtract)|achievement_(?:filter_(?:all_players|favorites_only|friends_only)|friends_info|info|leaderboard_info|our_info|pic_loaded|show_(?:achievement|bank|friend_picker|leaderboard|profile|purchase_prompt|ui)|type_challenge|type_score_challenge)|asset_(?:font|object|path|room|script|shader|sound|sprite|tiles|timeline|unknown)|audio_(?:3d|falloff_(?:exponent_distance|exponent_distance_clamped|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|none)|mono|new_system|old_system|stereo)|bm_(?:add|complex|dest_alpha|dest_color|dest_colour|inv_dest_alpha|inv_dest_color|inv_dest_colour|inv_src_alpha|inv_src_color|inv_src_colour|max|normal|one|src_alpha|src_alpha_sat|src_color|src_colour|subtract|zero)|browser_(?:chrome|firefox|ie|ie_mobile|not_a_browser|opera|safari|safari_mobile|tizen|unknown|windows_store)|buffer_(?:bool|f16|f32|f64|fast|fixed|generalerror|grow|invalidtype|network|outofbounds|outofspace|s16|s32|s8|seek_end|seek_relative|seek_start|string|text|u16|u32|u64|u8|vbuffer|wrap)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)|cmpfunc_(?:always|equal|greater|greaterequal|less|lessequal|never|notequal)|cr_(?:appstart|arrow|beam|cross|default|drag|handpoint|hourglass|none|size_all|size_nesw|size_ns|size_nwse|size_we|uparrow)|cull_(?:clockwise|counterclockwise|noculling)|device_(?:emulator|tablet)|device_ios_(?:ipad|ipad_retina|iphone|iphone5|iphone6|iphone6plus|iphone_retina|unknown)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|dll_(?:cdecl|cdel|stdcall)|ds_type_(?:grid|list|map|priority|queue|stack)|ef_(?:cloud|ellipse|explosion|firework|flare|rain|ring|smoke|smokeup|snow|spark|star)|fa_(?:archive|bottom|center|directory|hidden|left|middle|readonly|right|sysfile|top|volumeid)|fb_login_(?:default|fallback_to_webview|forcing_safari|forcing_webview|no_fallback_to_webview|use_system_account)|iap_(?:available|canceled|ev_consume|ev_product|ev_purchase|ev_restore|ev_storeload|failed|purchased|refunded|status_available|status_loading|status_processing|status_restoring|status_unavailable|status_uninitialised|storeload_failed|storeload_ok|unavailable)|leaderboard_type_(?:number|time_mins_secs)|lighttype_(?:dir|point)|matrix_(?:projection|view|world)|mb_(?:any|left|middle|none|right)|network_(?:config_(?:connect_timeout|disable_reliable_udp|enable_reliable_udp|use_non_blocking_socket)|socket_(?:bluetooth|tcp|udp)|type_(?:connect|data|disconnect|non_blocking_connect))|of_challenge_(?:lose|tie|win)|os_(?:android|ios|linux|macosx|ps3|ps4|psvita|unknown|uwp|win32|win8native|windows|winphone|xboxone)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|angle|angle_limits|damping_ratio|frequency|length_1|length_2|lower_angle_limit|max_force|max_length|max_motor_force|max_motor_torque|max_torque|motor_force|motor_speed|motor_torque|reaction_force_x|reaction_force_y|reaction_torque|speed|translation|upper_angle_limit)|phy_particle_data_flag_(?:category|color|colour|position|typeflags|velocity)|phy_particle_flag_(?:colormixing|colourmixing|elastic|powder|spring|tensile|viscous|wall|water|zombie)|phy_particle_group_flag_(?:rigid|solid)|pr_(?:linelist|linestrip|pointlist|trianglefan|trianglelist|trianglestrip)|ps_(?:distr|shape)_(?:diamond|ellipse|gaussian|invgaussian|line|linear|rectangle)|pt_shape_(?:circle|cloud|disk|explosion|flare|line|pixel|ring|smoke|snow|spark|sphere|square|star)|ty_(?:real|string)|gp_(?:face\d|axislh|axislv|axisrh|axisrv|padd|padl|padr|padu|select|shoulderl|shoulderlb|shoulderr|shoulderrb|start|stickl|stickr)|lb_disp_(?:none|numeric|time_ms|time_sec)|lb_sort_(?:ascending|descending|none)|ov_(?:achievements|community|friends|gamegroup|players|settings)|ugc_(?:filetype_(?:community|microtrans)|list_(?:Favorited|Followed|Published|Subscribed|UsedOrPlayed|VotedDown|VotedOn|VotedUp|WillVoteLater)|match_(?:AllGuides|Artwork|Collections|ControllerBindings|IntegratedGuides|Items|Items_Mtx|Items_ReadyToUse|Screenshots|UsableInGame|Videos|WebGuides)|query_(?:AcceptedForGameRankedByAcceptanceDate|CreatedByFriendsRankedByPublicationDate|FavoritedByFriendsRankedByPublicationDate|NotYetRated)|query_RankedBy(?:NumTimesReported|PublicationDate|TextSearch|TotalVotesAsc|Trend|Vote|VotesUp)|result_success|sortorder_CreationOrder(?:Asc|Desc)|sortorder_(?:ForModeration|LastUpdatedDesc|SubscriptionDateDesc|TitleAsc|VoteScoreDesc)|visibility_(?:friends_only|private|public))|vertex_usage_(?:binormal|blendindices|blendweight|color|colour|depth|fog|normal|position|psize|sample|tangent|texcoord|textcoord)|vertex_type_(?:float\d|color|colour|ubyte4)|input_type|layerelementtype_(?:background|instance|oldtilemap|particlesystem|sprite|tile|tilemap|undefined)|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|tile_(?:flip|index_mask|mirror|rotate)|(?:obj|rm|scr|spr)\w+)\b/,variable:/\b(?:alarm|application_surface|async_load|background_(?:alpha|blend|color|colour|foreground|height|hspeed|htiled|index|showcolor|showcolour|visible|vspeed|vtiled|width|x|xscale|y|yscale)|bbox_(?:bottom|left|right|top)|browser_(?:height|width)|caption_(?:health|lives|score)|current_(?:day|hour|minute|month|second|time|weekday|year)|cursor_sprite|debug_mode|delta_time|direction|display_aa|error_(?:last|occurred)|event_(?:action|number|object|type)|fps|fps_real|friction|game_(?:display|project|save)_(?:id|name)|gamemaker_(?:pro|registered|version)|gravity|gravity_direction|(?:h|v)speed|health|iap_data|id|image_(?:alpha|angle|blend|depth|index|number|speed|xscale|yscale)|instance_(?:count|id)|keyboard_(?:key|lastchar|lastkey|string)|layer|lives|mask_index|mouse_(?:button|lastbutton|x|y)|object_index|os_(?:browser|device|type|version)|path_(?:endaction|index|orientation|position|positionprevious|scale|speed)|persistent|phy_(?:rotation|(?:col_normal|collision|com|linear_velocity|position|speed)_(?:x|y)|angular_(?:damping|velocity)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|pointer_(?:invalid|null)|room|room_(?:caption|first|height|last|persistent|speed|width)|score|secure_mode|show_(?:health|lives|score)|solid|speed|sprite_(?:height|index|width|xoffset|yoffset)|temp_directory|timeline_(?:index|loop|position|running|speed)|transition_(?:color|kind|steps)|undefined|view_(?:angle|current|enabled|(?:h|v)(?:border|speed)|(?:h|w|x|y)port|(?:h|w|x|y)view|object|surface_id|visible)|visible|webgl_enabled|working_directory|(?:x|y)(?:previous|start)|x|y|argument(?:_relitive|_count|\d)|argument|global|local|other|self)\b/})}e.exports=n,n.displayName="gml",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.gn={comment:{pattern:/#.*/,greedy:!0},"string-literal":{pattern:/(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,lookbehind:!0,inside:{number:/^\$0x[\s\S]{2}$/,variable:/^\$\w+$/,"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},keyword:/\b(?:else|if)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,alias:"keyword"},function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/,number:/-?\b\d+\b/,operator:/[-+!=<>]=?|&&|\|\|/,punctuation:/[(){}[\],.]/},e.languages.gn["string-literal"].inside.interpolation.inside.expression.inside=e.languages.gn,e.languages.gni=e.languages.gn}e.exports=n,n.displayName="gn",n.aliases=["gni"]},function(e,t,r){"use strict";function n(e){e.languages["go-mod"]=e.languages["go-module"]={comment:{pattern:/\/\/.*/,greedy:!0},version:{pattern:/(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,lookbehind:!0,alias:"number"},"go-version":{pattern:/((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,lookbehind:!0,alias:"number"},keyword:{pattern:/^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,lookbehind:!0},operator:/=>/,punctuation:/[()[\],]/}}e.exports=n,n.displayName="goModule",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}e.exports=n,n.displayName="go",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:e.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},e.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!==typeof e&&"comment"!==e.type&&"scalar"!==e.type})),r=0;r0)){var s=l(/^\{$/,/^\}$/);if(-1===s)continue;for(var c=r;c=0&&h(u,"variable-input")}}}}function f(e){return t[r+e]}function d(e,t){t=t||0;for(var r=0;r]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),e.hooks.add("wrap",(function(t){if("groovy"===t.language&&"string"===t.type){var r=t.content.value[0];if("'"!=r){var n=/([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;"$"===r&&(n=/([^\$])(?:\$(?:\{.*?\}|[\w.]+))/),t.content.value=t.content.value.replace(/</g,"<").replace(/&/g,"&"),t.content=e.highlight(t.content.value,{expression:{pattern:n,lookbehind:!0,inside:e.languages.groovy}}),t.classes.push("/"===r?"regex":"gstring")}}}))}e.exports=n,n.displayName="groovy",n.aliases=[]},function(e,t,r){"use strict";var n=r(813);function a(e){e.register(n),function(e){e.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,lookbehind:!0,inside:e.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,lookbehind:!0,inside:e.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:e.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:e.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:e.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},ruby:{pattern:/[\s\S]+/,inside:e.languages.ruby}}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],r={},n=0,a=t.length;n@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(e)}e.exports=a,a.displayName="handlebars",a.aliases=["hbs"]},function(e,t,r){"use strict";function n(e){e.languages.haxe=e.languages.extend("clike",{string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},"class-name":[{pattern:/(\b(?:abstract|class|enum|extends|implements|interface|new|typedef)\s+)[A-Z_]\w*/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|final|for|from|function|if|implements|import|in|inline|interface|macro|new|null|operator|overload|override|package|private|public|return|static|super|switch|throw|to|try|typedef|untyped|using|var|while)(?!\.)\b/,function:{pattern:/\b[a-z_]\w*(?=\s*(?:<[^<>]*>\s*)?\()/i,greedy:!0},operator:/\.{3}|\+\+|--|&&|\|\||->|=>|(?:<{1,3}|[-+*/%!=&|^])=?|[?:~]/}),e.languages.insertBefore("haxe","string",{"string-interpolation":{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{interpolation:{pattern:/(^|[^\\])\$(?:\w+|\{[^{}]+\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.haxe}}},string:/[\s\S]+/}}}),e.languages.insertBefore("haxe","class-name",{regex:{pattern:/~\/(?:[^\/\\\r\n]|\\.)+\/[a-z]*/,greedy:!0,inside:{"regex-flags":/\b[a-z]+$/,"regex-source":{pattern:/^(~\/)[\s\S]+(?=\/$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^~\/|\/$/}}}),e.languages.insertBefore("haxe","keyword",{preprocessor:{pattern:/#(?:else|elseif|end|if)\b.*/,alias:"property"},metadata:{pattern:/@:?[\w.]+/,alias:"symbol"},reification:{pattern:/\$(?:\w+|(?=\{))/,alias:"important"}})}e.exports=n,n.displayName="haxe",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:count|data|local|module|path|self|terraform|var)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:false|true)\b/i,punctuation:/[=\[\]{}]/}}e.exports=n,n.displayName="hcl",n.aliases=[]},function(e,t,r){"use strict";var n=r(476);function a(e){e.register(n),e.languages.hlsl=e.languages.extend("c",{"class-name":[e.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/})}e.exports=a,a.displayName="hlsl",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.hoon={comment:{pattern:/::.*/,greedy:!0},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},constant:/%(?:\.[ny]|[\w-]+)/,"class-name":/@(?:[a-z0-9-]*[a-z0-9])?|\*/i,function:/(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,keyword:/\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/}}e.exports=n,n.displayName="hoon",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.hpkp={directive:{pattern:/\b(?:includeSubDomains|max-age|pin-sha256|preload|report-to|report-uri|strict)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/}}e.exports=n,n.displayName="hpkp",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.hsts={directive:{pattern:/\b(?:includeSubDomains|max-age|preload)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/}}e.exports=n,n.displayName="hsts",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){function t(e){return RegExp("(^(?:"+e+"):[ \t]*(?![ \t]))[^]+","i")}e.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:e.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:t(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:e.languages.csp},{pattern:t(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:e.languages.hpkp},{pattern:t(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:e.languages.hsts},{pattern:t(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var r,n=e.languages,a={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css,"text/plain":n.plain},i={"application/json":!0,"application/xml":!0};function o(e){var t=e.replace(/^[a-z]+\//,"");return"(?:"+e+"|"+("\\w+/(?:[\\w.-]+\\+)+"+t+"(?![+\\w.-])")+")"}for(var s in a)if(a[s]){r=r||{};var c=i[s]?o(s):s;r[s.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+c+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:a[s]}}r&&e.languages.insertBefore("http","header",r)}(e)}e.exports=n,n.displayName="http",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.ichigojam={comment:/(?:\B'|REM)(?:[^\n\r]*)/i,string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,function:/\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,label:/(?:\B@\S+)/,operator:/<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,punctuation:/[\[,;:()\]]/}}e.exports=n,n.displayName="ichigojam",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.icon={comment:/#.*/,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n_]|\\.|_(?!\1)(?:\r\n|[\s\S]))*\1/,greedy:!0},number:/\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,"builtin-keyword":{pattern:/&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,alias:"variable"},directive:{pattern:/\$\w+/,alias:"builtin"},keyword:/\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,function:/\b(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,operator:/[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,punctuation:/[\[\](){},;]/}}e.exports=n,n.displayName="icon",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){function t(e,r){return r<=0?/[]/.source:e.replace(//g,(function(){return t(e,r-1)}))}var r=/'[{}:=,](?:[^']|'')*'(?!')/,n={pattern:/''/,greedy:!0,alias:"operator"},a={pattern:r,greedy:!0,inside:{escape:n}},i=t(/\{(?:[^{}']|'(?![{},'])|''||)*\}/.source.replace(//g,(function(){return r.source})),8),o={pattern:RegExp(i),inside:{message:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:null},"message-delimiter":{pattern:/./,alias:"punctuation"}}};e.languages["icu-message-format"]={argument:{pattern:RegExp(i),greedy:!0,inside:{content:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:{"argument-name":{pattern:/^(\s*)[^{}:=,\s]+/,lookbehind:!0},"choice-style":{pattern:/^(\s*,\s*choice\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{punctuation:/\|/,range:{pattern:/^(\s*)[+-]?(?:\d+(?:\.\d*)?|\u221e)\s*[<#\u2264]/,lookbehind:!0,inside:{operator:/[<#\u2264]/,number:/\S+/}},rest:null}},"plural-style":{pattern:/^(\s*,\s*(?:plural|selectordinal)\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{offset:/^offset:\s*\d+/,"nested-message":o,selector:{pattern:/=\d+|[^{}:=,\s]+/,inside:{keyword:/^(?:few|many|one|other|two|zero)$/}}}},"select-style":{pattern:/^(\s*,\s*select\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{"nested-message":o,selector:{pattern:/[^{}:=,\s]+/,inside:{keyword:/^other$/}}}},keyword:/\b(?:choice|plural|select|selectordinal)\b/,"arg-type":{pattern:/\b(?:date|duration|number|ordinal|spellout|time)\b/,alias:"keyword"},"arg-skeleton":{pattern:/(,\s*)::[^{}:=,\s]+/,lookbehind:!0},"arg-style":{pattern:/(,\s*)(?:currency|full|integer|long|medium|percent|short)(?=\s*$)/,lookbehind:!0},"arg-style-text":{pattern:RegExp(/(^\s*,\s*(?=\S))/.source+t(/(?:[^{}']|'[^']*'|\{(?:)?\})+/.source,8)+"$"),lookbehind:!0,alias:"string"},punctuation:/,/}},"argument-delimiter":{pattern:/./,alias:"operator"}}},escape:n,string:a},o.inside.message.inside=e.languages["icu-message-format"],e.languages["icu-message-format"].argument.inside.content.inside["choice-style"].inside.rest=e.languages["icu-message-format"]}(e)}e.exports=n,n.displayName="icuMessageFormat",n.aliases=[]},function(e,t,r){"use strict";var n=r(1067);function a(e){e.register(n),e.languages.idris=e.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,builtin:void 0}),e.languages.insertBefore("idris","keyword",{"import-statement":{pattern:/(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.idr=e.languages.idris}e.exports=a,a.displayName="idris",a.aliases=["idr"]},function(e,t,r){"use strict";function n(e){e.languages.iecst={comment:[{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:[/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:ACCESS|CONFIG|EXTERNAL|GLOBAL|INPUT|IN_OUT|OUTPUT|TEMP)|VAR|METHOD|PROPERTY)\b/i,/\b(?:AT|BY|(?:END_)?(?:CASE|FOR|IF|REPEAT|WHILE)|CONSTANT|CONTINUE|DO|ELSE|ELSIF|EXIT|EXTENDS|FROM|GET|GOTO|IMPLEMENTS|JMP|NON_RETAIN|OF|PRIVATE|PROTECTED|PUBLIC|RETAIN|RETURN|SET|TASK|THEN|TO|UNTIL|USING|WITH|__CATCH|__ENDTRY|__FINALLY|__TRY)\b/],"class-name":/\b(?:ANY|ARRAY|BOOL|BYTE|U?(?:D|L|S)?INT|(?:D|L)?WORD|DATE(?:_AND_TIME)?|DT|L?REAL|POINTER|STRING|TIME(?:_OF_DAY)?|TOD)\b/,address:{pattern:/%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,alias:"symbol"},number:/\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:D|DT|T|TOD)#[\d_shmd:]*|\b[A-Z]*#[\d.,_]*|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/,operator:/S?R?:?=>?|&&?|\*\*?|<[=>]?|>=?|[-:^/+#]|\b(?:AND|EQ|EXPT|GE|GT|LE|LT|MOD|NE|NOT|OR|XOR)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,punctuation:/[()[\].,;]/}}e.exports=n,n.displayName="iecst",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},e.languages.gitignore=e.languages.ignore,e.languages.hgignore=e.languages.ignore,e.languages.npmignore=e.languages.ignore}(e)}e.exports=n,n.displayName="ignore",n.aliases=["gitignore","hgignore","npmignore"]},function(e,t,r){"use strict";function n(e){e.languages.inform7={string:{pattern:/"[^"]*"/,inside:{substitution:{pattern:/\[[^\[\]]+\]/,inside:{delimiter:{pattern:/\[|\]/,alias:"punctuation"}}}}},comment:{pattern:/\[[^\[\]]+\]/,greedy:!0},title:{pattern:/^[ \t]*(?:book|chapter|part(?! of)|section|table|volume)\b.+/im,alias:"important"},number:{pattern:/(^|[^-])(?:\b\d+(?:\.\d+)?(?:\^\d+)?(?:(?!\d)\w+)?|\b(?:eight|eleven|five|four|nine|one|seven|six|ten|three|twelve|two))\b(?!-)/i,lookbehind:!0},verb:{pattern:/(^|[^-])\b(?:answering|applying to|are|asking|attacking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:ing|s)?|consulting|contain(?:ing|s)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:s|ve|ving)|hold(?:ing|s)?|impl(?:ies|y)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:ing|s)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:ing|s)?|setting|showing|singing|sleeping|smelling|squeezing|support(?:ing|s)?|swearing|switching|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:ing|s)?|var(?:ies|y|ying)|waiting|waking|waving|wear(?:ing|s)?)\b(?!-)/i,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|the story|unless)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,lookbehind:!0},property:{pattern:/(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: off| on)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,lookbehind:!0,alias:"symbol"},position:{pattern:/(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|[^-])\b(?:actions?|activit(?:ies|y)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,lookbehind:!0,alias:"variable"},punctuation:/[.,:;(){}]/},e.languages.inform7.string.inside.substitution.inside.rest=e.languages.inform7,e.languages.inform7.string.inside.substitution.inside.rest.text={pattern:/\S(?:\s*\S)*/,alias:"comment"}}e.exports=n,n.displayName="inform7",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}e.exports=n,n.displayName="ini",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.io={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*|#.*)/,lookbehind:!0,greedy:!0},"triple-quoted-string":{pattern:/"""(?:\\[\s\S]|(?!""")[^\\])*"""/,greedy:!0,alias:"string"},string:{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},keyword:/\b(?:activate|activeCoroCount|asString|block|break|call|catch|clone|collectGarbage|compileString|continue|do|doFile|doMessage|doString|else|elseif|exit|for|foreach|forward|getEnvironmentVariable|getSlot|hasSlot|if|ifFalse|ifNil|ifNilEval|ifTrue|isActive|isNil|isResumable|list|message|method|parent|pass|pause|perform|performWithArgList|print|println|proto|raise|raiseResumable|removeSlot|resend|resume|schedulerSleepSeconds|self|sender|setSchedulerSleepSeconds|setSlot|shallowCopy|slotNames|super|system|then|thisBlock|thisContext|try|type|uniqueId|updateSlot|wait|while|write|yield)\b/,builtin:/\b(?:Array|AudioDevice|AudioMixer|BigNum|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Random|Regex|SGML|SGMLElement|SGMLParser|SQLite|Sequence|Server|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink)\b/,boolean:/\b(?:false|nil|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?/i,operator:/[=!*/%+\-^&|]=|>>?=?|<+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,alias:"keyword"},number:/\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:ad|ar|[ejpx])_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/,adverb:{pattern:/[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,alias:"builtin"},operator:/[=a][.:]|_\./,conjunction:{pattern:/&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,alias:"variable"},punctuation:/[()]/}}e.exports=n,n.displayName="j",n.aliases=[]},function(e,t,r){"use strict";var n=r(1068),a=r(814);function i(e){e.register(n),e.register(a),function(e){var t=/(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m,r=/#\s*\w+(?:\s*\([^()]*\))?/.source,n=/(?:\b[a-zA-Z]\w+\s*\.\s*)*\b[A-Z]\w*(?:\s*)?|/.source.replace(//g,(function(){return r}));e.languages.javadoc=e.languages.extend("javadoclike",{}),e.languages.insertBefore("javadoc","keyword",{reference:{pattern:RegExp(/(@(?:exception|link|linkplain|see|throws|value)\s+(?:\*\s*)?)/.source+"(?:"+n+")"),lookbehind:!0,inside:{function:{pattern:/(#\s*)\w+(?=\s*\()/,lookbehind:!0},field:{pattern:/(#\s*)\w+/,lookbehind:!0},namespace:{pattern:/\b(?:[a-z]\w*\s*\.\s*)+/,inside:{punctuation:/\./}},"class-name":/\b[A-Z]\w*/,keyword:e.languages.java.keyword,punctuation:/[#()[\],.]/}},"class-name":{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}},"code-section":[{pattern:/(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,lookbehind:!0,inside:{code:{pattern:t,lookbehind:!0,inside:e.languages.java,alias:"language-java"}}},{pattern:/(<(code|pre|tt)>(?!)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,lookbehind:!0,inside:{line:{pattern:t,lookbehind:!0,inside:{tag:e.languages.markup.tag,entity:e.languages.markup.entity,code:{pattern:/.+/,inside:e.languages.java,alias:"language-java"}}}}}],tag:e.languages.markup.tag,entity:e.languages.markup.entity}),e.languages.javadoclike.addSupport("java",e.languages.javadoc)}(e)}e.exports=i,i.displayName="javadoc",i.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.javastacktrace={summary:{pattern:/^([\t ]*)(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,lookbehind:!0,inside:{keyword:{pattern:/^([\t ]*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+$/,namespace:/\b[a-z]\w*\b/,punctuation:/\./}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/:/}},"stack-frame":{pattern:/^([\t ]*)at (?:[\w$./]|@[\w$.+-]*\/)+(?:)?\([^()]*\)/m,lookbehind:!0,inside:{keyword:{pattern:/^(\s*)at(?= )/,lookbehind:!0},source:[{pattern:/(\()\w+\.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\b\d+\b/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Native Method|Unknown Source)$/}}],"class-name":/[\w$]+(?=\.(?:|[\w$]+)\()/,function:/(?:|[\w$]+)(?=\()/,"class-loader":{pattern:/(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,lookbehind:!0,alias:"namespace",inside:{punctuation:/\./}},module:{pattern:/([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,lookbehind:!0,inside:{version:{pattern:/(@)[\s\S]+/,lookbehind:!0,alias:"number"},punctuation:/[@.]/}},namespace:{pattern:/(?:\b[a-z]\w*\.)+/,inside:{punctuation:/\./}},punctuation:/[()/.]/}},more:{pattern:/^([\t ]*)\.{3} \d+ [a-z]+(?: [a-z]+)*/m,lookbehind:!0,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}}e.exports=n,n.displayName="javastacktrace",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.jexl={string:/(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,transform:{pattern:/(\|\s*)[a-zA-Z\u0430-\u044f\u0410-\u042f_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\w\u0430-\u044f\u0410-\u042f\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/,alias:"function",lookbehind:!0},function:/[a-zA-Z\u0430-\u044f\u0410-\u042f_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\w\u0430-\u044f\u0410-\u042f\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/,number:/\b\d+(?:\.\d+)?\b|\B\.\d+\b/,operator:/[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/,boolean:/\b(?:false|true)\b/,keyword:/\bin\b/,punctuation:/[{}[\](),.]/}}e.exports=n,n.displayName="jexl",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.jolie=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,lookbehind:!0,greedy:!0},"class-name":{pattern:/((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,lookbehind:!0},keyword:/\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,function:/\b[a-z_]\w*(?=[ \t]*[@(])/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,punctuation:/[()[\]{},;.:]/,builtin:/\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/}),e.languages.insertBefore("jolie","keyword",{aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{keyword:/\bwith\b/,"class-name":/\w+/,punctuation:/,/}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:/,/,"class-name":/\w+/,operator:/=>/}},property:{pattern:/\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/}})}e.exports=n,n.displayName="jolie",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\\\((?:[^()]|\([^()]*\))*\)/.source,r=RegExp(/(^|[^\\])"(?:[^"\r\n\\]|\\[^\r\n(]|__)*"/.source.replace(/__/g,(function(){return t}))),n={interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+t),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},a=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(r.source+/(?=\s*:(?!:))/.source),lookbehind:!0,greedy:!0,inside:n},string:{pattern:r,lookbehind:!0,greedy:!0,inside:n},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/\b[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};n.interpolation.inside.content.inside=a}(e)}e.exports=n,n.displayName="jq",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var r=["function","function-variable","method","method-variable","property-access"],n=0;n=l.length)return;var n=t[r];if("string"===typeof n||"string"===typeof n.content){var a=l[o],i="string"===typeof n?n:n.content,s=i.indexOf(a);if(-1!==s){++o;var c=i.substring(0,s),d=u(f[a]),h=i.substring(s+a.length),p=[];if(c&&p.push(c),p.push(d),h){var b=[h];e(b),p.push.apply(p,b)}"string"===typeof n?(t.splice.apply(t,[r,1].concat(p)),r+=p.length-1):n.content=p}}else{var m=n.content;Array.isArray(m)?e(m):e([m])}}}(d),new e.Token(n,d,"language-"+n,t)}e.languages.javascript["template-string"]=[o("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),o("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),o("svg",/\bsvg/.source),o("markdown",/\b(?:markdown|md)/.source),o("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),o("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function l(e){return"string"===typeof e?e:Array.isArray(e)?e.map(l).join(""):l(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(r){for(var n=0,a=r.length;n\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(//g,(function(){return r}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+r),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(e)}e.exports=i,i.displayName="jsdoc",i.aliases=[]},function(e,t,r){"use strict";var n=r(1070);function a(e){e.register(n),function(e){var t=/("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;e.languages.json5=e.languages.extend("json",{property:[{pattern:RegExp(t.source+"(?=\\s*:)"),greedy:!0},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/,alias:"unquoted"}],string:{pattern:t,greedy:!0},number:/[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/})}(e)}e.exports=a,a.displayName="json5",a.aliases=[]},function(e,t,r){"use strict";var n=r(1070);function a(e){e.register(n),e.languages.jsonp=e.languages.extend("json",{punctuation:/[{}[\]();,.]/}),e.languages.insertBefore("jsonp","punctuation",{function:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*\()/})}e.exports=a,a.displayName="jsonp",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/(^[ \t]+)at[ \t].*/m,lookbehind:!0,inside:{"not-my-code":{pattern:/^at[ \t]+(?!\s)(?:node\.js||.*(?:node_modules|\(\)|\(|$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:\d+(?::\d+)?\b/,alias:"number",inside:{punctuation:/:/}}}}}}e.exports=n,n.displayName="jsstacktrace",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|(?:\b\w+)?"(?:\\.|[^"\\\r\n])*"|`(?:[^\\`\r\n]|\\.)*`/,greedy:!0},char:{pattern:/(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%\xf7\u22bb&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~\u2260\u2264\u2265'\u221a\u221b]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:Inf|NaN)(?:16|32|64)?|im|pi)\b|[\u03c0\u212f]/}}e.exports=n,n.displayName="julia",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.keepalived={comment:{pattern:/[#!].*/,greedy:!0},string:{pattern:/(^|[^\\])(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,lookbehind:!0,greedy:!0},ip:{pattern:RegExp(/\b(?:(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){5}:(?:[\da-f]{1,4}:)?[\da-f]{1,4}|(?:[\da-f]{1,4}:){4}:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4}|(?:[\da-f]{1,4}:){3}:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4}|(?:[\da-f]{1,4}:){2}:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}|(?:[\da-f]{1,4}:){0,5}:|::(?:[\da-f]{1,4}:){0,5}|[\da-f]{1,4}::(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4}|::(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:)(?:\/\d{1,3})?|(?:\/\d{1,2})?)\b/.source.replace(//g,(function(){return/(?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d))/.source})),"i"),alias:"number"},path:{pattern:/(\s)\/(?:[^\/\s]+\/)*[^\/\s]*|\b[a-zA-Z]:\\(?:[^\\\s]+\\)*[^\\\s]*/,lookbehind:!0,alias:"string"},variable:/\$\{?\w+\}?/,email:{pattern:/[\w-]+@[\w-]+(?:\.[\w-]{2,3}){1,2}/,alias:"string"},"conditional-configuration":{pattern:/@\^?[\w-]+/,alias:"variable"},operator:/=/,property:/\b(?:BFD_CHECK|DNS_CHECK|FILE_CHECK|HTTP_GET|MISC_CHECK|NAME|PING_CHECK|SCRIPTS|SMTP_CHECK|SSL|SSL_GET|TCP_CHECK|UDP_CHECK|accept|advert_int|alpha|auth_pass|auth_type|authentication|bfd_cpu_affinity|bfd_instance|bfd_no_swap|bfd_priority|bfd_process_name|bfd_rlimit_rttime|bfd_rt_priority|bind_if|bind_port|bindto|ca|certificate|check_unicast_src|checker|checker_cpu_affinity|checker_log_all_failures|checker_no_swap|checker_priority|checker_rlimit_rttime|checker_rt_priority|child_wait_time|connect_ip|connect_port|connect_timeout|dbus_service_name|debug|default_interface|delay|delay_before_retry|delay_loop|digest|dont_track_primary|dynamic|dynamic_interfaces|enable_(?:dbus|script_security|sni|snmp_checker|snmp_rfc|snmp_rfcv2|snmp_rfcv3|snmp_vrrp|traps)|end|fall|fast_recovery|file|flag-[123]|fork_delay|full_command|fwmark|garp_group|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|global_defs|global_tracking|gna_interval|group|ha_suspend|hashed|helo_name|higher_prio_send_advert|hoplimit|http_protocol|hysteresis|idle_tx|include|inhibit_on_failure|init_fail|init_file|instance|interface|interfaces|interval|ip_family|ipvs_process_name|keepalived.conf|kernel_rx_buf_size|key|linkbeat_interfaces|linkbeat_use_polling|log_all_failures|log_unknown_vrids|lower_prio_no_advert|lthreshold|lvs_flush|lvs_flush_onstop|lvs_method|lvs_netlink_cmd_rcv_bufs|lvs_netlink_cmd_rcv_bufs_force|lvs_netlink_monitor_rcv_bufs|lvs_netlink_monitor_rcv_bufs_force|lvs_notify_fifo|lvs_notify_fifo_script|lvs_sched|lvs_sync_daemon|max_auto_priority|max_hops|mcast_src_ip|mh-fallback|mh-port|min_auto_priority_delay|min_rx|min_tx|misc_dynamic|misc_path|misc_timeout|multiplier|name|namespace_with_ipsets|native_ipv6|neighbor_ip|net_namespace|net_namespace_ipvs|nftables|nftables_counters|nftables_ifindex|nftables_priority|no_accept|no_checker_emails|no_email_faults|nopreempt|notification_email|notification_email_from|notify|notify_backup|notify_deleted|notify_down|notify_fault|notify_fifo|notify_fifo_script|notify_master|notify_master_rx_lower_pri|notify_priority_changes|notify_stop|notify_up|old_unicast_checksum|omega|ops|param_match|passive|password|path|persistence_engine|persistence_granularity|persistence_timeout|preempt|preempt_delay|priority|process|process_monitor_rcv_bufs|process_monitor_rcv_bufs_force|process_name|process_names|promote_secondaries|protocol|proxy_arp|proxy_arp_pvlan|quorum|quorum_down|quorum_max|quorum_up|random_seed|real_server|regex|regex_max_offset|regex_min_offset|regex_no_match|regex_options|regex_stack|reload_repeat|reload_time_file|require_reply|retry|rise|router_id|rs_init_notifies|script|script_user|sh-fallback|sh-port|shutdown_script|shutdown_script_timeout|skip_check_adv_addr|smtp_alert|smtp_alert_checker|smtp_alert_vrrp|smtp_connect_timeout|smtp_helo_name|smtp_server|snmp_socket|sorry_server|sorry_server_inhibit|sorry_server_lvs_method|source_ip|start|startup_script|startup_script_timeout|state|static_ipaddress|static_routes|static_rules|status_code|step|strict_mode|sync_group_tracking_weight|terminate_delay|timeout|track_bfd|track_file|track_group|track_interface|track_process|track_script|track_src_ip|ttl|type|umask|unicast_peer|unicast_src_ip|unicast_ttl|url|use_ipvlan|use_pid_dir|use_vmac|user|uthreshold|val[123]|version|virtual_ipaddress|virtual_ipaddress_excluded|virtual_router_id|virtual_routes|virtual_rules|virtual_server|virtual_server_group|virtualhost|vmac_xmit_base|vrrp|vrrp_(?:check_unicast_src|cpu_affinity|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|gna_interval|higher_prio_send_advert|instance|ipsets|iptables|lower_prio_no_advert|mcast_group4|mcast_group6|min_garp|netlink_cmd_rcv_bufs|netlink_cmd_rcv_bufs_force|netlink_monitor_rcv_bufs|netlink_monitor_rcv_bufs_force|no_swap|notify_fifo|notify_fifo_script|notify_priority_changes|priority|process_name|rlimit_rttime|rt_priority|rx_bufs_multiplier|rx_bufs_policy|script|skip_check_adv_addr|startup_delay|strict|sync_group|track_process|version)|warmup|weight)\b/,constant:/\b(?:A|AAAA|AH|BACKUP|CNAME|DR|MASTER|MX|NAT|NS|PASS|SCTP|SOA|TCP|TUN|TXT|UDP|dh|fo|lblc|lblcr|lc|mh|nq|ovf|rr|sed|sh|wlc|wrr)\b/,number:{pattern:/(^|[^\w.-])-?\d+(?:\.\d+)?/,lookbehind:!0},boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\{\}]/}}e.exports=n,n.displayName="keepalived",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.keyman={comment:{pattern:/\bc .*/i,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},"virtual-key":{pattern:/\[\s*(?:(?:ALT|CAPS|CTRL|LALT|LCTRL|NCAPS|RALT|RCTRL|SHIFT)\s+)*(?:[TKU]_[\w?]+|[A-E]\d\d?|"[^"\r\n]*"|'[^'\r\n]*')\s*\]/i,greedy:!0,alias:"function"},"header-keyword":{pattern:/&\w+/,alias:"bold"},"header-statement":{pattern:/\b(?:bitmap|bitmaps|caps always off|caps on only|copyright|hotkey|language|layout|message|name|shift frees caps|version)\b/i,alias:"bold"},"rule-keyword":{pattern:/\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|reset|return|save|set|store|use)\b/i,alias:"keyword"},"structural-keyword":{pattern:/\b(?:ansi|begin|group|match|nomatch|unicode|using keys)\b/i,alias:"keyword"},"compile-target":{pattern:/\$(?:keyman|keymanonly|keymanweb|kmfl|weaver):/i,alias:"property"},number:/\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i,operator:/[+>\\$]|\.\./,punctuation:/[()=,]/}}e.exports=n,n.displayName="keyman",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(e)}e.exports=n,n.displayName="kotlin",n.aliases=["kt","kts"]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\s\x00-\x1f\x22-\x2f\x3a-\x3f\x5b-\x5e\x60\x7b-\x7e/.source;function r(e,r){return RegExp(e.replace(//g,t),r)}e.languages.kumir={comment:{pattern:/\|.*/},prolog:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^\n\r"]*"|'[^\n\r']*'/,greedy:!0},boolean:{pattern:r(/(^|[])(?:\u0434\u0430|\u043d\u0435\u0442)(?=[]|$)/.source),lookbehind:!0},"operator-word":{pattern:r(/(^|[])(?:\u0438|\u0438\u043b\u0438|\u043d\u0435)(?=[]|$)/.source),lookbehind:!0,alias:"keyword"},"system-variable":{pattern:r(/(^|[])\u0437\u043d\u0430\u0447(?=[]|$)/.source),lookbehind:!0,alias:"keyword"},type:[{pattern:r(/(^|[])(?:\u0432\u0435\u0449|\u043b\u0438\u0442|\u043b\u043e\u0433|\u0441\u0438\u043c|\u0446\u0435\u043b)(?:\x20*\u0442\u0430\u0431)?(?=[]|$)/.source),lookbehind:!0,alias:"builtin"},{pattern:r(/(^|[])(?:\u043a\u043e\u043c\u043f\u043b|\u0441\u043a\u0430\u043d\u043a\u043e\u0434|\u0444\u0430\u0439\u043b|\u0446\u0432\u0435\u0442)(?=[]|$)/.source),lookbehind:!0,alias:"important"}],keyword:{pattern:r(/(^|[])(?:\u0430\u043b\u0433|\u0430\u0440\u0433(?:\x20*\u0440\u0435\u0437)?|\u0432\u0432\u043e\u0434|\u0412\u041a\u041b\u042e\u0427\u0418\u0422\u042c|\u0432\u0441[\u0435\u0451]|\u0432\u044b\u0431\u043e\u0440|\u0432\u044b\u0432\u043e\u0434|\u0432\u044b\u0445\u043e\u0434|\u0434\u0430\u043d\u043e|\u0434\u043b\u044f|\u0434\u043e|\u0434\u0441|\u0435\u0441\u043b\u0438|\u0438\u043d\u0430\u0447\u0435|\u0438\u0441\u043f|\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c|\u043a\u043e\u043d(?:(?:\x20+|_)\u0438\u0441\u043f)?|\u043a\u0446(?:(?:\x20+|_)\u043f\u0440\u0438)?|\u043d\u0430\u0434\u043e|\u043d\u0430\u0447|\u043d\u0441|\u043d\u0446|\u043e\u0442|\u043f\u0430\u0443\u0437\u0430|\u043f\u043e\u043a\u0430|\u043f\u0440\u0438|\u0440\u0430\u0437\u0430?|\u0440\u0435\u0437|\u0441\u0442\u043e\u043f|\u0442\u0430\u0431|\u0442\u043e|\u0443\u0442\u0432|\u0448\u0430\u0433)(?=[]|$)/.source),lookbehind:!0},name:{pattern:r(/(^|[])[^\d][^]*(?:\x20+[^]+)*(?=[]|$)/.source),lookbehind:!0},number:{pattern:r(/(^|[])(?:\B\$[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?=[]|$)/.source,"i"),lookbehind:!0},punctuation:/:=|[(),:;\[\]]/,"operator-char":{pattern:/\*\*?|<[=>]?|>=?|[-+/=]/,alias:"operator"}},e.languages.kum=e.languages.kumir}(e)}e.exports=n,n.displayName="kumir",n.aliases=["kum"]},function(e,t,r){"use strict";function n(e){e.languages.kusto={comment:{pattern:/\/\/.*/,greedy:!0},string:{pattern:/```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,greedy:!0},verb:{pattern:/(\|\s*)[a-z][\w-]*/i,lookbehind:!0,alias:"keyword"},command:{pattern:/\.[a-z][a-z\d-]*\b/,alias:"keyword"},"class-name":/\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,keyword:/\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,boolean:/\b(?:false|null|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/,datetime:[{pattern:/\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/,alias:"number"},{pattern:/[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,alias:"number"}],number:/\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mn\xb5]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/,operator:/=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,punctuation:/[()\[\]{},;.:]/}}e.exports=n,n.displayName="kusto",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\\(?:[^a-z()[\]]|[a-z*]+)/i,r={"equation-command":{pattern:t,alias:"regex"}};e.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:r,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:r,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:t,alias:"selector"},punctuation:/[[\]{}&]/},e.languages.tex=e.languages.latex,e.languages.context=e.languages.latex}(e)}e.exports=n,n.displayName="latex",n.aliases=["tex","context"]},function(e,t,r){"use strict";var n=r(256),a=r(815);function i(e){e.register(n),e.register(a),function(e){e.languages.latte={comment:/^\{\*[\s\S]*/,"latte-tag":{pattern:/(^\{(?:\/(?=[a-z]))?)(?:[=_]|[a-z]\w*\b(?!\())/i,lookbehind:!0,alias:"important"},delimiter:{pattern:/^\{\/?|\}$/,alias:"punctuation"},php:{pattern:/\S(?:[\s\S]*\S)?/,alias:"language-php",inside:e.languages.php}};var t=e.languages.extend("markup",{});e.languages.insertBefore("inside","attr-value",{"n-attr":{pattern:/n:[\w-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+))?/,inside:{"attr-name":{pattern:/^[^\s=]+/,alias:"important"},"attr-value":{pattern:/=[\s\S]+/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}],php:{pattern:/\S(?:[\s\S]*\S)?/,inside:e.languages.php}}}}}},t.tag),e.hooks.add("before-tokenize",(function(r){if("latte"===r.language){e.languages["markup-templating"].buildPlaceholders(r,"latte",/\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*(?:[^*]|\*(?!\/))*\*\/)*\}/g),r.grammar=t}})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"latte")}))}(e)}e.exports=i,i.displayName="latte",i.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}e.exports=n,n.displayName="less",n.aliases=[]},function(e,t,r){"use strict";var n=r(1071);function a(e){e.register(n),function(e){for(var t=/\((?:[^();"#\\]|\\[\s\S]|;.*(?!.)|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|)*\)/.source,r=0;r<5;r++)t=t.replace(//g,(function(){return t}));t=t.replace(//g,/[^\s\S]/.source);var n=e.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp(/(^|[=\s])#(?:"(?:[^"\\]|\\.)*"|[^\s()"]*(?:[^\s()]|))/.source.replace(//g,(function(){return t})),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:e.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};n["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=n,e.languages.ly=n}(e)}e.exports=a,a.displayName="lilypond",a.aliases=[]},function(e,t,r){"use strict";var n=r(256);function a(e){e.register(n),e.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},e.hooks.add("before-tokenize",(function(t){var r=!1;e.languages["markup-templating"].buildPlaceholders(t,"liquid",/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,(function(e){var t=/^\{%-?\s*(\w+)/.exec(e);if(t){var n=t[1];if("raw"===n&&!r)return r=!0,!0;if("endraw"===n)return r=!1,!0}return!r}))})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"liquid")}))}e.exports=a,a.displayName="liquid",a.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){function t(e){return RegExp(/(\()/.source+"(?:"+e+")"+/(?=[\s\)])/.source)}function r(e){return RegExp(/([\s([])/.source+"(?:"+e+")"+/(?=[\s)])/.source)}var n=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,a="&"+n,i="(\\()",o="(?=\\s)",s=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,c={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+n+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+n),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+n),alias:"property"},splice:{pattern:RegExp(",@?"+n),alias:["symbol","variable"]},keyword:[{pattern:RegExp(i+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+o),lookbehind:!0},{pattern:RegExp(i+"(?:append|by|collect|concat|do|finally|for|in|return)"+o),lookbehind:!0}],declare:{pattern:t(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:t(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:r(/nil|t/.source),lookbehind:!0},number:{pattern:r(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(i+"def(?:const|custom|group|var)\\s+"+n),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(n)}},defun:{pattern:RegExp(i+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+n+/\s+\(/.source+s+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+n),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(i+"lambda\\s+\\(\\s*(?:&?"+n+"(?:\\s+&?"+n+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(i+n),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},u={"lisp-marker":RegExp(a),varform:{pattern:RegExp(/\(/.source+n+/\s+(?=\S)/.source+s+/\)/.source),inside:c},argument:{pattern:RegExp(/(^|[\s(])/.source+n),lookbehind:!0,alias:"variable"},rest:c},f="\\S+(?:\\s+\\S+)*",d={pattern:RegExp(i+s+"(?=\\))"),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+f),inside:u},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+f),inside:u},keys:{pattern:RegExp("&key\\s+"+f+"(?:\\s+&allow-other-keys)?"),inside:u},argument:{pattern:RegExp(n),alias:"variable"},punctuation:/[()]/}};c.lambda.inside.arguments=d,c.defun.inside.arguments=e.util.clone(d),c.defun.inside.arguments.inside.sublist=d,e.languages.lisp=c,e.languages.elisp=c,e.languages.emacs=c,e.languages["emacs-lisp"]=c}(e)}e.exports=n,n.displayName="lisp",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.livescript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\])#.*/,lookbehind:!0}],"interpolated-string":{pattern:/(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,lookbehind:!0},interpolation:{pattern:/(^|[^\\])#\{[^}]+\}/m,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^#\{|\}$/,alias:"variable"}}},string:/[\s\S]+/}},string:[{pattern:/('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/<\[[\s\S]*?\]>/,greedy:!0},/\\[^\s,;\])}]+/],regex:[{pattern:/\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/,greedy:!0,inside:{comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0}}},{pattern:/\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/,greedy:!0}],keyword:{pattern:/(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,lookbehind:!0},"keyword-operator":{pattern:/(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?: not|nt)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,lookbehind:!0,alias:"operator"},boolean:{pattern:/(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,lookbehind:!0},argument:{pattern:/(^|(?!\.&\.)[^&])&(?!&)\d*/m,lookbehind:!0,alias:"variable"},number:/\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,identifier:/[a-z_](?:-?[a-z]|[\d_])*/i,operator:[{pattern:/( )\.(?= )/,lookbehind:!0},/\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/],punctuation:/[(){}\[\]|.,:;`]/},e.languages.livescript["interpolated-string"].inside.interpolation.inside.rest=e.languages.livescript}e.exports=n,n.displayName="livescript",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.llvm={comment:/;.*/,string:{pattern:/"[^"]*"/,greedy:!0},boolean:/\b(?:false|true)\b/,variable:/[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,label:/(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,type:{pattern:/\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,alias:"class-name"},keyword:/\b[a-z_][a-z_0-9]*\b/,number:/[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,punctuation:/[{}[\];(),.!*=<>]/}}(e)}e.exports=n,n.displayName="llvm",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},exception:{pattern:/(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,lookbehind:!0,greedy:!0,alias:["javastacktrace","language-javastacktrace"],inside:e.languages.javastacktrace||{keyword:/\bat\b/,function:/[a-z_][\w$]*(?=\()/,punctuation:/[.:()]/}},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING|WRN)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DBG|DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp(/\b\d{4}[-/]\d{2}[-/]\d{2}(?:T(?=\d{1,2}:)|(?=\s\d{1,2}:))/.source+"|"+/\b\d{1,4}[-/ ](?:\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\d{2,4}T?\b/.source+"|"+/\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\s{1,2}\d{1,2}\b/.source,"i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:false|null|true)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/}}e.exports=n,n.displayName="log",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.lolcode={comment:[/\bOBTW\s[\s\S]*?\sTLDR\b/,/\bBTW.+/],string:{pattern:/"(?::.|[^":])*"/,inside:{variable:/:\{[^}]+\}/,symbol:[/:\([a-f\d]+\)/i,/:\[[^\]]+\]/,/:[)>o":]/]},greedy:!0},number:/(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/,symbol:{pattern:/(^|\s)(?:A )?(?:BUKKIT|NOOB|NUMBAR|NUMBR|TROOF|YARN)(?=\s|,|$)/,lookbehind:!0,inside:{keyword:/A(?=\s)/}},label:{pattern:/((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,lookbehind:!0,alias:"string"},function:{pattern:/((?:^|\s)(?:HOW IZ I|I IZ|IZ) )[a-zA-Z]\w*/,lookbehind:!0},keyword:[{pattern:/(^|\s)(?:AN|FOUND YR|GIMMEH|GTFO|HAI|HAS A|HOW IZ I|I HAS A|I IZ|IF U SAY SO|IM IN YR|IM OUTTA YR|IS NOW(?: A)?|ITZ(?: A)?|IZ|KTHX|KTHXBYE|LIEK(?: A)?|MAEK|MEBBE|MKAY|NERFIN|NO WAI|O HAI IM|O RLY\?|OIC|OMG|OMGWTF|R|SMOOSH|SRS|TIL|UPPIN|VISIBLE|WILE|WTF\?|YA RLY|YR)(?=\s|,|$)/,lookbehind:!0},/'Z(?=\s|,|$)/],boolean:{pattern:/(^|\s)(?:FAIL|WIN)(?=\s|,|$)/,lookbehind:!0},variable:{pattern:/(^|\s)IT(?=\s|,|$)/,lookbehind:!0},operator:{pattern:/(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:ALL|ANY|BIGGR|BOTH|DIFF|EITHER|MOD|PRODUKT|QUOSHUNT|SMALLR|SUM|WON) OF)(?=\s|,|$)/,lookbehind:!0},punctuation:/\.{3}|\u2026|,|!/}}e.exports=n,n.displayName="lolcode",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.magma={output:{pattern:/^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/,lookbehind:!0,greedy:!0},keyword:/\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/,boolean:/\b(?:false|true)\b/,generator:{pattern:/\b[a-z_]\w*(?=\s*<)/i,alias:"class-name"},function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},operator:/->|[-+*/^~!|#=]|:=|\.\./,punctuation:/[()[\]{}<>,;.:]/}}e.exports=n,n.displayName="magma",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}e.exports=n,n.displayName="makefile",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var n=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return n})),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+i+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+i+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(n),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(n),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(r){t!==r&&(e.languages.markdown[t].inside.content.inside[r]=e.languages.markdown[r])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!==typeof t)for(var r=0,n=t.length;r",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(e)}e.exports=n,n.displayName="markdown",n.aliases=["md"]},function(e,t,r){"use strict";function n(e){e.languages.matlab={comment:[/%\{[\s\S]*?\}%/,/%.+/],string:{pattern:/\B'(?:''|[^'\r\n])*'/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,keyword:/\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,function:/\b(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/}}e.exports=n,n.displayName="matlab",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i;e.languages.maxscript={comment:{pattern:/\/\*[\s\S]*?(?:\*\/|$)|--.*/,greedy:!0},string:{pattern:/(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,lookbehind:!0,greedy:!0},path:{pattern:/\$(?:[\w/\\.*?]|'[^']*')*/,greedy:!0,alias:"string"},"function-call":{pattern:RegExp("((?:"+/^/.source+"|"+/[;=<>+\-*/^({\[]/.source+"|"+/\b(?:and|by|case|catch|collect|do|else|if|in|not|or|return|then|to|try|where|while|with)\b/.source+")[ \t]*)(?!"+t.source+")"+/[a-z_]\w*\b/.source+"(?=[ \t]*(?:(?!"+t.source+")"+/[a-z_]/.source+"|"+/\d|-\.?\d/.source+"|"+/[({'"$@#?]/.source+"))","im"),lookbehind:!0,greedy:!0,alias:"function"},"function-definition":{pattern:/(\b(?:fn|function)\s+)\w+\b/i,lookbehind:!0,alias:"function"},argument:{pattern:/\b[a-z_]\w*(?=:)/i,alias:"attr-name"},keyword:t,boolean:/\b(?:false|true)\b/,time:{pattern:/(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,lookbehind:!0,alias:"number"},number:[{pattern:/(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,lookbehind:!0},/\b(?:e|pi)\b/],constant:/\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/,color:{pattern:/\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/i,alias:"constant"},operator:/[-+*/<>=!]=?|[&^?]|#(?!\()/,punctuation:/[()\[\]{}.:,;]|#(?=\()|\\$/m}}(e)}e.exports=n,n.displayName="maxscript",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.mel={comment:/\/\/.*/,code:{pattern:/`(?:\\.|[^\\`\r\n])*`/,greedy:!0,alias:"italic",inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},variable:/\$\w+/,number:/\b0x[\da-fA-F]+\b|\b\d+(?:\.\d*)?|\B\.\d+/,flag:{pattern:/-[^\d\W]\w*/,alias:"operator"},keyword:/\b(?:break|case|continue|default|do|else|float|for|global|if|in|int|matrix|proc|return|string|switch|vector|while)\b/,function:/\b\w+(?=\()|\b(?:CBG|HfAddAttractorToAS|HfAssignAS|HfBuildEqualMap|HfBuildFurFiles|HfBuildFurImages|HfCancelAFR|HfConnectASToHF|HfCreateAttractor|HfDeleteAS|HfEditAS|HfPerformCreateAS|HfRemoveAttractorFromAS|HfSelectAttached|HfSelectAttractors|HfUnAssignAS|Mayatomr|about|abs|addAttr|addAttributeEditorNodeHelp|addDynamic|addNewShelfTab|addPP|addPanelCategory|addPrefixToName|advanceToNextDrivenKey|affectedNet|affects|aimConstraint|air|alias|aliasAttr|align|alignCtx|alignCurve|alignSurface|allViewFit|ambientLight|angle|angleBetween|animCone|animCurveEditor|animDisplay|animView|annotate|appendStringArray|applicationName|applyAttrPreset|applyTake|arcLenDimContext|arcLengthDimension|arclen|arrayMapper|art3dPaintCtx|artAttrCtx|artAttrPaintVertexCtx|artAttrSkinPaintCtx|artAttrTool|artBuildPaintMenu|artFluidAttrCtx|artPuttyCtx|artSelectCtx|artSetPaintCtx|artUserPaintCtx|assignCommand|assignInputDevice|assignViewportFactories|attachCurve|attachDeviceAttr|attachSurface|attrColorSliderGrp|attrCompatibility|attrControlGrp|attrEnumOptionMenu|attrEnumOptionMenuGrp|attrFieldGrp|attrFieldSliderGrp|attrNavigationControlGrp|attrPresetEditWin|attributeExists|attributeInfo|attributeMenu|attributeQuery|autoKeyframe|autoPlace|bakeClip|bakeFluidShading|bakePartialHistory|bakeResults|bakeSimulation|basename|basenameEx|batchRender|bessel|bevel|bevelPlus|binMembership|bindSkin|blend2|blendShape|blendShapeEditor|blendShapePanel|blendTwoAttr|blindDataType|boneLattice|boundary|boxDollyCtx|boxZoomCtx|bufferCurve|buildBookmarkMenu|buildKeyframeMenu|button|buttonManip|cacheFile|cacheFileCombine|cacheFileMerge|cacheFileTrack|camera|cameraView|canCreateManip|canvas|capitalizeString|catch|catchQuiet|ceil|changeSubdivComponentDisplayLevel|changeSubdivRegion|channelBox|character|characterMap|characterOutlineEditor|characterize|chdir|checkBox|checkBoxGrp|checkDefaultRenderGlobals|choice|circle|circularFillet|clamp|clear|clearCache|clip|clipEditor|clipEditorCurrentTimeCtx|clipSchedule|clipSchedulerOutliner|clipTrimBefore|closeCurve|closeSurface|cluster|cmdFileOutput|cmdScrollFieldExecuter|cmdScrollFieldReporter|cmdShell|coarsenSubdivSelectionList|collision|color|colorAtPoint|colorEditor|colorIndex|colorIndexSliderGrp|colorSliderButtonGrp|colorSliderGrp|columnLayout|commandEcho|commandLine|commandPort|compactHairSystem|componentEditor|compositingInterop|computePolysetVolume|condition|cone|confirmDialog|connectAttr|connectControl|connectDynamic|connectJoint|connectionInfo|constrain|constrainValue|constructionHistory|container|containsMultibyte|contextInfo|control|convertFromOldLayers|convertIffToPsd|convertLightmap|convertSolidTx|convertTessellation|convertUnit|copyArray|copyFlexor|copyKey|copySkinWeights|cos|cpButton|cpCache|cpClothSet|cpCollision|cpConstraint|cpConvClothToMesh|cpForces|cpGetSolverAttr|cpPanel|cpProperty|cpRigidCollisionFilter|cpSeam|cpSetEdit|cpSetSolverAttr|cpSolver|cpSolverTypes|cpTool|cpUpdateClothUVs|createDisplayLayer|createDrawCtx|createEditor|createLayeredPsdFile|createMotionField|createNewShelf|createNode|createRenderLayer|createSubdivRegion|cross|crossProduct|ctxAbort|ctxCompletion|ctxEditMode|ctxTraverse|currentCtx|currentTime|currentTimeCtx|currentUnit|curve|curveAddPtCtx|curveCVCtx|curveEPCtx|curveEditorCtx|curveIntersect|curveMoveEPCtx|curveOnSurface|curveSketchCtx|cutKey|cycleCheck|cylinder|dagPose|date|defaultLightListCheckBox|defaultNavigation|defineDataServer|defineVirtualDevice|deformer|deg_to_rad|delete|deleteAttr|deleteShadingGroupsAndMaterials|deleteShelfTab|deleteUI|deleteUnusedBrushes|delrandstr|detachCurve|detachDeviceAttr|detachSurface|deviceEditor|devicePanel|dgInfo|dgdirty|dgeval|dgtimer|dimWhen|directKeyCtx|directionalLight|dirmap|dirname|disable|disconnectAttr|disconnectJoint|diskCache|displacementToPoly|displayAffected|displayColor|displayCull|displayLevelOfDetail|displayPref|displayRGBColor|displaySmoothness|displayStats|displayString|displaySurface|distanceDimContext|distanceDimension|doBlur|dolly|dollyCtx|dopeSheetEditor|dot|dotProduct|doubleProfileBirailSurface|drag|dragAttrContext|draggerContext|dropoffLocator|duplicate|duplicateCurve|duplicateSurface|dynCache|dynControl|dynExport|dynExpression|dynGlobals|dynPaintEditor|dynParticleCtx|dynPref|dynRelEdPanel|dynRelEditor|dynamicLoad|editAttrLimits|editDisplayLayerGlobals|editDisplayLayerMembers|editRenderLayerAdjustment|editRenderLayerGlobals|editRenderLayerMembers|editor|editorTemplate|effector|emit|emitter|enableDevice|encodeString|endString|endsWith|env|equivalent|equivalentTol|erf|error|eval|evalDeferred|evalEcho|event|exactWorldBoundingBox|exclusiveLightCheckBox|exec|executeForEachObject|exists|exp|expression|expressionEditorListen|extendCurve|extendSurface|extrude|fcheck|fclose|feof|fflush|fgetline|fgetword|file|fileBrowserDialog|fileDialog|fileExtension|fileInfo|filetest|filletCurve|filter|filterCurve|filterExpand|filterStudioImport|findAllIntersections|findAnimCurves|findKeyframe|findMenuItem|findRelatedSkinCluster|finder|firstParentOf|fitBspline|flexor|floatEq|floatField|floatFieldGrp|floatScrollBar|floatSlider|floatSlider2|floatSliderButtonGrp|floatSliderGrp|floor|flow|fluidCacheInfo|fluidEmitter|fluidVoxelInfo|flushUndo|fmod|fontDialog|fopen|formLayout|format|fprint|frameLayout|fread|freeFormFillet|frewind|fromNativePath|fwrite|gamma|gauss|geometryConstraint|getApplicationVersionAsFloat|getAttr|getClassification|getDefaultBrush|getFileList|getFluidAttr|getInputDeviceRange|getMayaPanelTypes|getModifiers|getPanel|getParticleAttr|getPluginResource|getenv|getpid|glRender|glRenderEditor|globalStitch|gmatch|goal|gotoBindPose|grabColor|gradientControl|gradientControlNoAttr|graphDollyCtx|graphSelectContext|graphTrackCtx|gravity|grid|gridLayout|group|groupObjectsByName|hardenPointCurve|hardware|hardwareRenderPanel|headsUpDisplay|headsUpMessage|help|helpLine|hermite|hide|hilite|hitTest|hotBox|hotkey|hotkeyCheck|hsv_to_rgb|hudButton|hudSlider|hudSliderButton|hwReflectionMap|hwRender|hwRenderLoad|hyperGraph|hyperPanel|hyperShade|hypot|iconTextButton|iconTextCheckBox|iconTextRadioButton|iconTextRadioCollection|iconTextScrollList|iconTextStaticLabel|ikHandle|ikHandleCtx|ikHandleDisplayScale|ikSolver|ikSplineHandleCtx|ikSystem|ikSystemInfo|ikfkDisplayMethod|illustratorCurves|image|imfPlugins|inheritTransform|insertJoint|insertJointCtx|insertKeyCtx|insertKnotCurve|insertKnotSurface|instance|instanceable|instancer|intField|intFieldGrp|intScrollBar|intSlider|intSliderGrp|interToUI|internalVar|intersect|iprEngine|isAnimCurve|isConnected|isDirty|isParentOf|isSameObject|isTrue|isValidObjectName|isValidString|isValidUiName|isolateSelect|itemFilter|itemFilterAttr|itemFilterRender|itemFilterType|joint|jointCluster|jointCtx|jointDisplayScale|jointLattice|keyTangent|keyframe|keyframeOutliner|keyframeRegionCurrentTimeCtx|keyframeRegionDirectKeyCtx|keyframeRegionDollyCtx|keyframeRegionInsertKeyCtx|keyframeRegionMoveKeyCtx|keyframeRegionScaleKeyCtx|keyframeRegionSelectKeyCtx|keyframeRegionSetKeyCtx|keyframeRegionTrackCtx|keyframeStats|lassoContext|lattice|latticeDeformKeyCtx|launch|launchImageEditor|layerButton|layeredShaderPort|layeredTexturePort|layout|layoutDialog|lightList|lightListEditor|lightListPanel|lightlink|lineIntersection|linearPrecision|linstep|listAnimatable|listAttr|listCameras|listConnections|listDeviceAttachments|listHistory|listInputDeviceAxes|listInputDeviceButtons|listInputDevices|listMenuAnnotation|listNodeTypes|listPanelCategories|listRelatives|listSets|listTransforms|listUnselected|listerEditor|loadFluid|loadNewShelf|loadPlugin|loadPluginLanguageResources|loadPrefObjects|localizedPanelLabel|lockNode|loft|log|longNameOf|lookThru|ls|lsThroughFilter|lsType|lsUI|mag|makeIdentity|makeLive|makePaintable|makeRoll|makeSingleSurface|makeTubeOn|makebot|manipMoveContext|manipMoveLimitsCtx|manipOptions|manipRotateContext|manipRotateLimitsCtx|manipScaleContext|manipScaleLimitsCtx|marker|match|max|memory|menu|menuBarLayout|menuEditor|menuItem|menuItemToShelf|menuSet|menuSetPref|messageLine|min|minimizeApp|mirrorJoint|modelCurrentTimeCtx|modelEditor|modelPanel|mouse|movIn|movOut|move|moveIKtoFK|moveKeyCtx|moveVertexAlongDirection|multiProfileBirailSurface|mute|nParticle|nameCommand|nameField|namespace|namespaceInfo|newPanelItems|newton|nodeCast|nodeIconButton|nodeOutliner|nodePreset|nodeType|noise|nonLinear|normalConstraint|normalize|nurbsBoolean|nurbsCopyUVSet|nurbsCube|nurbsEditUV|nurbsPlane|nurbsSelect|nurbsSquare|nurbsToPoly|nurbsToPolygonsPref|nurbsToSubdiv|nurbsToSubdivPref|nurbsUVSet|nurbsViewDirectionVector|objExists|objectCenter|objectLayer|objectType|objectTypeUI|obsoleteProc|oceanNurbsPreviewPlane|offsetCurve|offsetCurveOnSurface|offsetSurface|openGLExtension|openMayaPref|optionMenu|optionMenuGrp|optionVar|orbit|orbitCtx|orientConstraint|outlinerEditor|outlinerPanel|overrideModifier|paintEffectsDisplay|pairBlend|palettePort|paneLayout|panel|panelConfiguration|panelHistory|paramDimContext|paramDimension|paramLocator|parent|parentConstraint|particle|particleExists|particleInstancer|particleRenderInfo|partition|pasteKey|pathAnimation|pause|pclose|percent|performanceOptions|pfxstrokes|pickWalk|picture|pixelMove|planarSrf|plane|play|playbackOptions|playblast|plugAttr|plugNode|pluginInfo|pluginResourceUtil|pointConstraint|pointCurveConstraint|pointLight|pointMatrixMult|pointOnCurve|pointOnSurface|pointPosition|poleVectorConstraint|polyAppend|polyAppendFacetCtx|polyAppendVertex|polyAutoProjection|polyAverageNormal|polyAverageVertex|polyBevel|polyBlendColor|polyBlindData|polyBoolOp|polyBridgeEdge|polyCacheMonitor|polyCheck|polyChipOff|polyClipboard|polyCloseBorder|polyCollapseEdge|polyCollapseFacet|polyColorBlindData|polyColorDel|polyColorPerVertex|polyColorSet|polyCompare|polyCone|polyCopyUV|polyCrease|polyCreaseCtx|polyCreateFacet|polyCreateFacetCtx|polyCube|polyCut|polyCutCtx|polyCylinder|polyCylindricalProjection|polyDelEdge|polyDelFacet|polyDelVertex|polyDuplicateAndConnect|polyDuplicateEdge|polyEditUV|polyEditUVShell|polyEvaluate|polyExtrudeEdge|polyExtrudeFacet|polyExtrudeVertex|polyFlipEdge|polyFlipUV|polyForceUV|polyGeoSampler|polyHelix|polyInfo|polyInstallAction|polyLayoutUV|polyListComponentConversion|polyMapCut|polyMapDel|polyMapSew|polyMapSewMove|polyMergeEdge|polyMergeEdgeCtx|polyMergeFacet|polyMergeFacetCtx|polyMergeUV|polyMergeVertex|polyMirrorFace|polyMoveEdge|polyMoveFacet|polyMoveFacetUV|polyMoveUV|polyMoveVertex|polyNormal|polyNormalPerVertex|polyNormalizeUV|polyOptUvs|polyOptions|polyOutput|polyPipe|polyPlanarProjection|polyPlane|polyPlatonicSolid|polyPoke|polyPrimitive|polyPrism|polyProjection|polyPyramid|polyQuad|polyQueryBlindData|polyReduce|polySelect|polySelectConstraint|polySelectConstraintMonitor|polySelectCtx|polySelectEditCtx|polySeparate|polySetToFaceNormal|polySewEdge|polyShortestPathCtx|polySmooth|polySoftEdge|polySphere|polySphericalProjection|polySplit|polySplitCtx|polySplitEdge|polySplitRing|polySplitVertex|polyStraightenUVBorder|polySubdivideEdge|polySubdivideFacet|polyToSubdiv|polyTorus|polyTransfer|polyTriangulate|polyUVSet|polyUnite|polyWedgeFace|popen|popupMenu|pose|pow|preloadRefEd|print|progressBar|progressWindow|projFileViewer|projectCurve|projectTangent|projectionContext|projectionManip|promptDialog|propModCtx|propMove|psdChannelOutliner|psdEditTextureFile|psdExport|psdTextureFile|putenv|pwd|python|querySubdiv|quit|rad_to_deg|radial|radioButton|radioButtonGrp|radioCollection|radioMenuItemCollection|rampColorPort|rand|randomizeFollicles|randstate|rangeControl|readTake|rebuildCurve|rebuildSurface|recordAttr|recordDevice|redo|reference|referenceEdit|referenceQuery|refineSubdivSelectionList|refresh|refreshAE|registerPluginResource|rehash|reloadImage|removeJoint|removeMultiInstance|removePanelCategory|rename|renameAttr|renameSelectionList|renameUI|render|renderGlobalsNode|renderInfo|renderLayerButton|renderLayerParent|renderLayerPostProcess|renderLayerUnparent|renderManip|renderPartition|renderQualityNode|renderSettings|renderThumbnailUpdate|renderWindowEditor|renderWindowSelectContext|renderer|reorder|reorderDeformers|requires|reroot|resampleFluid|resetAE|resetPfxToPolyCamera|resetTool|resolutionNode|retarget|reverseCurve|reverseSurface|revolve|rgb_to_hsv|rigidBody|rigidSolver|roll|rollCtx|rootOf|rot|rotate|rotationInterpolation|roundConstantRadius|rowColumnLayout|rowLayout|runTimeCommand|runup|sampleImage|saveAllShelves|saveAttrPreset|saveFluid|saveImage|saveInitialState|saveMenu|savePrefObjects|savePrefs|saveShelf|saveToolSettings|scale|scaleBrushBrightness|scaleComponents|scaleConstraint|scaleKey|scaleKeyCtx|sceneEditor|sceneUIReplacement|scmh|scriptCtx|scriptEditorInfo|scriptJob|scriptNode|scriptTable|scriptToShelf|scriptedPanel|scriptedPanelType|scrollField|scrollLayout|sculpt|searchPathArray|seed|selLoadSettings|select|selectContext|selectCurveCV|selectKey|selectKeyCtx|selectKeyframeRegionCtx|selectMode|selectPref|selectPriority|selectType|selectedNodes|selectionConnection|separator|setAttr|setAttrEnumResource|setAttrMapping|setAttrNiceNameResource|setConstraintRestPosition|setDefaultShadingGroup|setDrivenKeyframe|setDynamic|setEditCtx|setEditor|setFluidAttr|setFocus|setInfinity|setInputDeviceMapping|setKeyCtx|setKeyPath|setKeyframe|setKeyframeBlendshapeTargetWts|setMenuMode|setNodeNiceNameResource|setNodeTypeFlag|setParent|setParticleAttr|setPfxToPolyCamera|setPluginResource|setProject|setStampDensity|setStartupMessage|setState|setToolTo|setUITemplate|setXformManip|sets|shadingConnection|shadingGeometryRelCtx|shadingLightRelCtx|shadingNetworkCompare|shadingNode|shapeCompare|shelfButton|shelfLayout|shelfTabLayout|shellField|shortNameOf|showHelp|showHidden|showManipCtx|showSelectionInTitle|showShadingGroupAttrEditor|showWindow|sign|simplify|sin|singleProfileBirailSurface|size|sizeBytes|skinCluster|skinPercent|smoothCurve|smoothTangentSurface|smoothstep|snap2to2|snapKey|snapMode|snapTogetherCtx|snapshot|soft|softMod|softModCtx|sort|sound|soundControl|source|spaceLocator|sphere|sphrand|spotLight|spotLightPreviewPort|spreadSheetEditor|spring|sqrt|squareSurface|srtContext|stackTrace|startString|startsWith|stitchAndExplodeShell|stitchSurface|stitchSurfacePoints|strcmp|stringArrayCatenate|stringArrayContains|stringArrayCount|stringArrayInsertAtIndex|stringArrayIntersector|stringArrayRemove|stringArrayRemoveAtIndex|stringArrayRemoveDuplicates|stringArrayRemoveExact|stringArrayToString|stringToStringArray|strip|stripPrefixFromName|stroke|subdAutoProjection|subdCleanTopology|subdCollapse|subdDuplicateAndConnect|subdEditUV|subdListComponentConversion|subdMapCut|subdMapSewMove|subdMatchTopology|subdMirror|subdToBlind|subdToPoly|subdTransferUVsToCache|subdiv|subdivCrease|subdivDisplaySmoothness|substitute|substituteAllString|substituteGeometry|substring|surface|surfaceSampler|surfaceShaderList|swatchDisplayPort|switchTable|symbolButton|symbolCheckBox|sysFile|system|tabLayout|tan|tangentConstraint|texLatticeDeformContext|texManipContext|texMoveContext|texMoveUVShellContext|texRotateContext|texScaleContext|texSelectContext|texSelectShortestPathCtx|texSmudgeUVContext|texWinToolCtx|text|textCurves|textField|textFieldButtonGrp|textFieldGrp|textManip|textScrollList|textToShelf|textureDisplacePlane|textureHairColor|texturePlacementContext|textureWindow|threadCount|threePointArcCtx|timeControl|timePort|timerX|toNativePath|toggle|toggleAxis|toggleWindowVisibility|tokenize|tokenizeList|tolerance|tolower|toolButton|toolCollection|toolDropped|toolHasOptions|toolPropertyWindow|torus|toupper|trace|track|trackCtx|transferAttributes|transformCompare|transformLimits|translator|trim|trunc|truncateFluidCache|truncateHairCache|tumble|tumbleCtx|turbulence|twoPointArcCtx|uiRes|uiTemplate|unassignInputDevice|undo|undoInfo|ungroup|uniform|unit|unloadPlugin|untangleUV|untitledFileName|untrim|upAxis|updateAE|userCtx|uvLink|uvSnapshot|validateShelfName|vectorize|view2dToolCtx|viewCamera|viewClipPlane|viewFit|viewHeadOn|viewLookAt|viewManip|viewPlace|viewSet|visor|volumeAxis|vortex|waitCursor|warning|webBrowser|webBrowserPrefs|whatIs|window|windowPref|wire|wireContext|workspace|wrinkle|wrinkleContext|writeTake|xbmLangPathList|xform)\b/,operator:[/\+[+=]?|-[-=]?|&&|\|\||[<>]=|[*\/!=]=?|[%^]/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,:;?\[\](){}]/},e.languages.mel.code.inside.rest=e.languages.mel}e.exports=n,n.displayName="mel",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.mermaid={comment:{pattern:/%%.*/,greedy:!0},style:{pattern:/^([ \t]*(?:classDef|linkStyle|style)[ \t]+[\w$-]+[ \t]+)\w.*[^\s;]/m,lookbehind:!0,inside:{property:/\b\w[\w-]*(?=[ \t]*:)/,operator:/:/,punctuation:/,/}},"inter-arrow-label":{pattern:/([^<>ox.=-])(?:-[-.]|==)(?![<>ox.=-])[ \t]*(?:"[^"\r\n]*"|[^\s".=-](?:[^\r\n.=-]*[^\s.=-])?)[ \t]*(?:\.+->?|--+[->]|==+[=>])(?![<>ox.=-])/,lookbehind:!0,greedy:!0,inside:{arrow:{pattern:/(?:\.+->?|--+[->]|==+[=>])$/,alias:"operator"},label:{pattern:/^([\s\S]{2}[ \t]*)\S(?:[\s\S]*\S)?/,lookbehind:!0,alias:"property"},"arrow-head":{pattern:/^\S+/,alias:["arrow","operator"]}}},arrow:[{pattern:/(^|[^{}|o.-])[|}][|o](?:--|\.\.)[|o][|{](?![{}|o.-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>ox.=-])(?:[ox]?|(?:==+|--+|-\.*-)[>ox]|===+|---+|-\.+-)(?![<>ox.=-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>()x-])(?:--?(?:>>|[x>)])(?![<>()x])|(?:<<|[x<(])--?(?!-))/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>|*o.-])(?:[*o]--|--[*o]|<\|?(?:--|\.\.)|(?:--|\.\.)\|?>|--|\.\.)(?![<>|*o.-])/,lookbehind:!0,alias:"operator"}],label:{pattern:/(^|[^|<])\|(?:[^\r\n"|]|"[^"\r\n]*")+\|/,lookbehind:!0,greedy:!0,alias:"property"},text:{pattern:/(?:[(\[{]+|\b>)(?:[^\r\n"()\[\]{}]|"[^"\r\n]*")+(?:[)\]}]+|>)/,alias:"string"},string:{pattern:/"[^"\r\n]*"/,greedy:!0},annotation:{pattern:/<<(?:abstract|choice|enumeration|fork|interface|join|service)>>|\[\[(?:choice|fork|join)\]\]/i,alias:"important"},keyword:[{pattern:/(^[ \t]*)(?:action|callback|class|classDef|classDiagram|click|direction|erDiagram|flowchart|gantt|gitGraph|graph|journey|link|linkStyle|pie|requirementDiagram|sequenceDiagram|stateDiagram|stateDiagram-v2|style|subgraph)(?![\w$-])/m,lookbehind:!0,greedy:!0},{pattern:/(^[ \t]*)(?:activate|alt|and|as|autonumber|deactivate|else|end(?:[ \t]+note)?|loop|opt|par|participant|rect|state|note[ \t]+(?:over|(?:left|right)[ \t]+of))(?![\w$-])/im,lookbehind:!0,greedy:!0}],entity:/#[a-z0-9]+;/,operator:{pattern:/(\w[ \t]*)&(?=[ \t]*\w)|:::|:/,lookbehind:!0},punctuation:/[(){};]/}}e.exports=n,n.displayName="mermaid",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.mizar={comment:/::.+/,keyword:/@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,parameter:{pattern:/\$(?:10|\d)/,alias:"variable"},variable:/\b\w+(?=:)/,number:/(?:\b|-)\d+\b/,operator:/\.\.\.|->|&|\.?=/,punctuation:/\(#|#\)|[,:;\[\](){}]/}}e.exports=n,n.displayName="mizar",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$setWindowFields","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$count","$dateAdd","$dateDiff","$dateSubtract","$dateTrunc","$getField","$rand","$sampleRate","$setField","$unsetField","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"],r="(?:"+(t=t.map((function(e){return e.replace("$","\\$")}))).join("|")+")\\b";e.languages.mongodb=e.languages.extend("javascript",{}),e.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp("^(['\"])?"+r+"(?:\\1)?$")}}}),e.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d\d?|2[0-4]\d|25[0-5])\b/,greedy:!0}},e.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:"+["ObjectId","Code","BinData","DBRef","Timestamp","NumberLong","NumberDecimal","MaxKey","MinKey","RegExp","ISODate","UUID"].join("|")+")\\b"),alias:"keyword"}})}(e)}e.exports=n,n.displayName="mongodb",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.monkey={comment:{pattern:/^#Rem\s[\s\S]*?^#End|'.+/im,greedy:!0},string:{pattern:/"[^"\r\n]*"/,greedy:!0},preprocessor:{pattern:/(^[ \t]*)#.+/m,lookbehind:!0,greedy:!0,alias:"property"},function:/\b\w+(?=\()/,"type-char":{pattern:/\b[?%#$]/,alias:"class-name"},number:{pattern:/((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,lookbehind:!0},keyword:/\b(?:Abstract|Array|Bool|Case|Catch|Class|Const|Continue|Default|Eachin|Else|ElseIf|End|EndIf|Exit|Extends|Extern|False|Field|Final|Float|For|Forever|Function|Global|If|Implements|Import|Inline|Int|Interface|Local|Method|Module|New|Next|Null|Object|Private|Property|Public|Repeat|Return|Select|Self|Step|Strict|String|Super|Then|Throw|To|True|Try|Until|Void|Wend|While)\b/i,operator:/\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i,punctuation:/[.,:;()\[\]]/}}e.exports=n,n.displayName="monkey",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.moonscript={comment:/--.*/,string:[{pattern:/'[^']*'|\[(=*)\[[\s\S]*?\]\1\]/,greedy:!0},{pattern:/"[^"]*"/,greedy:!0,inside:{interpolation:{pattern:/#\{[^{}]*\}/,inside:{moonscript:{pattern:/(^#\{)[\s\S]+(?=\})/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/#\{|\}/,alias:"punctuation"}}}}}],"class-name":[{pattern:/(\b(?:class|extends)[ \t]+)\w+/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\b(?:class|continue|do|else|elseif|export|extends|for|from|if|import|in|local|nil|return|self|super|switch|then|unless|using|when|while|with)\b/,variable:/@@?\w*/,property:{pattern:/\b(?!\d)\w+(?=:)|(:)(?!\d)\w+/,lookbehind:!0},function:{pattern:/\b(?:_G|_VERSION|assert|collectgarbage|coroutine\.(?:create|resume|running|status|wrap|yield)|debug\.(?:debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)|dofile|error|getfenv|getmetatable|io\.(?:close|flush|input|lines|open|output|popen|read|stderr|stdin|stdout|tmpfile|type|write)|ipairs|load|loadfile|loadstring|math\.(?:abs|acos|asin|atan|atan2|ceil|cos|cosh|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pi|pow|rad|random|randomseed|sin|sinh|sqrt|tan|tanh)|module|next|os\.(?:clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(?:cpath|loaded|loadlib|path|preload|seeall)|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|string\.(?:byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\.(?:concat|insert|maxn|remove|sort)|tonumber|tostring|type|unpack|xpcall)\b/,inside:{punctuation:/\./}},boolean:/\b(?:false|true)\b/,number:/(?:\B\.\d+|\b\d+\.\d+|\b\d+(?=[eE]))(?:[eE][-+]?\d+)?\b|\b(?:0x[a-fA-F\d]+|\d+)(?:U?LL)?\b/,operator:/\.{3}|[-=]>|~=|(?:[-+*/%<>!=]|\.\.)=?|[:#^]|\b(?:and|or)\b=?|\b(?:not)\b/,punctuation:/[.,()[\]{}\\]/},e.languages.moonscript.string[1].inside.interpolation.inside.moonscript.inside=e.languages.moonscript,e.languages.moon=e.languages.moonscript}e.exports=n,n.displayName="moonscript",n.aliases=["moon"]},function(e,t,r){"use strict";function n(e){e.languages.n1ql={comment:{pattern:/\/\*[\s\S]*?(?:$|\*\/)|--.*/,greedy:!0},string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,greedy:!0},identifier:{pattern:/`(?:\\[\s\S]|[^\\`]|``)*`/,greedy:!0},parameter:/\$[\w.]+/,keyword:/\b(?:ADVISE|ALL|ALTER|ANALYZE|AS|ASC|AT|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|COMMITTED|CONNECT|CONTINUE|CORRELATE|CORRELATED|COVER|CREATE|CURRENT|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FILTER|FLATTEN|FLUSH|FOLLOWING|FOR|FORCE|FROM|FTS|FUNCTION|GOLANG|GRANT|GROUP|GROUPS|GSI|HASH|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|ISOLATION|JAVASCRIPT|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LANGUAGE|LAST|LEFT|LET|LETTING|LEVEL|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NL|NO|NTH_VALUE|NULL|NULLS|NUMBER|OBJECT|OFFSET|ON|OPTION|OPTIONS|ORDER|OTHERS|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PRECEDING|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROBE|PROCEDURE|PUBLIC|RANGE|RAW|REALM|REDUCE|RENAME|RESPECT|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|ROW|ROWS|SATISFIES|SAVEPOINT|SCHEMA|SCOPE|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TIES|TO|TRAN|TRANSACTION|TRIGGER|TRUNCATE|UNBOUNDED|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WINDOW|WITH|WORK|XOR)\b/i,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:FALSE|TRUE)\b/i,number:/(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,punctuation:/[;[\](),.{}:]/}}e.exports=n,n.displayName="n1ql",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.n4js=e.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),e.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),e.languages.n4jsd=e.languages.n4js}e.exports=n,n.displayName="n4js",n.aliases=["n4jsd"]},function(e,t,r){"use strict";function n(e){e.languages["nand2tetris-hdl"]={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,keyword:/\b(?:BUILTIN|CHIP|CLOCKED|IN|OUT|PARTS)\b/,boolean:/\b(?:false|true)\b/,function:/\b[A-Za-z][A-Za-z0-9]*(?=\()/,number:/\b\d+\b/,operator:/=|\.\./,punctuation:/[{}[\];(),:]/}}e.exports=n,n.displayName="nand2tetrisHdl",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\{[^\r\n\[\]{}]*\}/,r={"quoted-string":{pattern:/"(?:[^"\\]|\\.)*"/,alias:"operator"},"command-param-id":{pattern:/(\s)\w+:/,lookbehind:!0,alias:"property"},"command-param-value":[{pattern:t,alias:"selector"},{pattern:/([\t ])\S+/,lookbehind:!0,greedy:!0,alias:"operator"},{pattern:/\S(?:.*\S)?/,alias:"operator"}]};function n(e){return"string"===typeof e?e:Array.isArray(e)?e.map(n).join(""):n(e.content)}e.languages.naniscript={comment:{pattern:/^([\t ]*);.*/m,lookbehind:!0},define:{pattern:/^>.+/m,alias:"tag",inside:{value:{pattern:/(^>\w+[\t ]+)(?!\s)[^{}\r\n]+/,lookbehind:!0,alias:"operator"},key:{pattern:/(^>)\w+/,lookbehind:!0}}},label:{pattern:/^([\t ]*)#[\t ]*\w+[\t ]*$/m,lookbehind:!0,alias:"regex"},command:{pattern:/^([\t ]*)@\w+(?=[\t ]|$).*/m,lookbehind:!0,alias:"function",inside:{"command-name":/^@\w+/,expression:{pattern:t,greedy:!0,alias:"selector"},"command-params":{pattern:/\s*\S[\s\S]*/,inside:r}}},"generic-text":{pattern:/(^[ \t]*)[^#@>;\s].*/m,lookbehind:!0,alias:"punctuation",inside:{"escaped-char":/\\[{}\[\]"]/,expression:{pattern:t,greedy:!0,alias:"selector"},"inline-command":{pattern:/\[[\t ]*\w[^\r\n\[\]]*\]/,greedy:!0,alias:"function",inside:{"command-params":{pattern:/(^\[[\t ]*\w+\b)[\s\S]+(?=\]$)/,lookbehind:!0,inside:r},"command-param-name":{pattern:/^(\[[\t ]*)\w+/,lookbehind:!0,alias:"name"},"start-stop-char":/[\[\]]/}}}}},e.languages.nani=e.languages.naniscript,e.hooks.add("after-tokenize",(function(e){e.tokens.forEach((function(e){if("string"!==typeof e&&"generic-text"===e.type){var t=n(e);(function(e){for(var t="[]{}",r=[],n=0;n=&|$!]/}}e.exports=n,n.displayName="nasm",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"atrule"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+(?:\.\d*)?|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:false|no|true|yes)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"',:=[\]{}()\s`-]|[:-][^"',=[\]{}()\s])(?:[^,:=\]})(\s]|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}}e.exports=n,n.displayName="neon",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.nevod={comment:/\/\/.*|(?:\/\*[\s\S]*?(?:\*\/|$))/,string:{pattern:/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))!?\*?/,greedy:!0,inside:{"string-attrs":/!$|!\*$|\*$/}},namespace:{pattern:/(@namespace\s+)[a-zA-Z0-9\-.]+(?=\s*\{)/,lookbehind:!0},pattern:{pattern:/(@pattern\s+)?#?[a-zA-Z0-9\-.]+(?:\s*\(\s*(?:~\s*)?[a-zA-Z0-9\-.]+\s*(?:,\s*(?:~\s*)?[a-zA-Z0-9\-.]*)*\))?(?=\s*=)/,lookbehind:!0,inside:{"pattern-name":{pattern:/^#?[a-zA-Z0-9\-.]+/,alias:"class-name"},fields:{pattern:/\(.*\)/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},punctuation:/[,()]/,operator:{pattern:/~/,alias:"field-hidden-mark"}}}}},search:{pattern:/(@search\s+|#)[a-zA-Z0-9\-.]+(?:\.\*)?(?=\s*;)/,alias:"function",lookbehind:!0},keyword:/@(?:having|inside|namespace|outside|pattern|require|search|where)\b/,"standard-pattern":{pattern:/\b(?:Alpha|AlphaNum|Any|Blank|End|LineBreak|Num|NumAlpha|Punct|Space|Start|Symbol|Word|WordBreak)\b(?:\([a-zA-Z0-9\-.,\s+]*\))?/,inside:{"standard-pattern-name":{pattern:/^[a-zA-Z0-9\-.]+/,alias:"builtin"},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},"standard-pattern-attr":{pattern:/[a-zA-Z0-9\-.]+/,alias:"builtin"},punctuation:/[,()]/}},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},operator:[{pattern:/=/,alias:"pattern-def"},{pattern:/&/,alias:"conjunction"},{pattern:/~/,alias:"exception"},{pattern:/\?/,alias:"optionality"},{pattern:/[[\]]/,alias:"repetition"},{pattern:/[{}]/,alias:"variation"},{pattern:/[+_]/,alias:"sequence"},{pattern:/\.{2,3}/,alias:"span"}],"field-capture":[{pattern:/([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/,lookbehind:!0,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}},{pattern:/[a-zA-Z0-9\-.]+\s*:/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}}],punctuation:/[:;,()]/,name:/[a-zA-Z0-9\-.]+/}}e.exports=n,n.displayName="nevod",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i;e.languages.nginx={comment:{pattern:/(^|[\s{};])#.*/,lookbehind:!0,greedy:!0},directive:{pattern:/(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:{string:{pattern:/((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,lookbehind:!0,greedy:!0,inside:{escape:{pattern:/\\["'\\nrt]/,alias:"entity"},variable:t}},comment:{pattern:/(\s)#.*/,lookbehind:!0,greedy:!0},keyword:{pattern:/^\S+/,greedy:!0},boolean:{pattern:/(\s)(?:off|on)(?!\S)/,lookbehind:!0},number:{pattern:/(\s)\d+[a-z]*(?!\S)/i,lookbehind:!0},variable:t}},punctuation:/[{};]/}}(e)}e.exports=n,n.displayName="nginx",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.nim={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(?:\b(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")/,greedy:!0},char:{pattern:/'(?:\\(?:\d+|x[\da-fA-F]{0,2}|.)|[^'])'/,greedy:!0},function:{pattern:/(?:(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,greedy:!0,inside:{operator:/\*$/}},identifier:{pattern:/`[^`\r\n]+`/,greedy:!0,inside:{punctuation:/`/}},number:/\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,keyword:/\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,operator:{pattern:/(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,lookbehind:!0},punctuation:/[({\[]\.|\.[)}\]]|[`(){}\[\],:]/}}e.exports=n,n.displayName="nim",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.nix={comment:{pattern:/\/\*[\s\S]*?\*\/|#.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:null}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"important"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},e.languages.nix.string.inside.interpolation.inside=e.languages.nix}e.exports=n,n.displayName="nix",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.nsis={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|[#;].*)/,lookbehind:!0,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:{pattern:/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,lookbehind:!0},property:/\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/,constant:/\$\{[!\w\.:\^-]+\}|\$\([!\w\.:\^-]+\)/,variable:/\$\w[\w\.]*/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/,punctuation:/[{}[\];(),.:]/,important:{pattern:/(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im,lookbehind:!0}}}e.exports=n,n.displayName="nsis",n.aliases=[]},function(e,t,r){"use strict";var n=r(476);function a(e){e.register(n),e.languages.objectivec=e.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}e.exports=a,a.displayName="objectivec",a.aliases=["objc"]},function(e,t,r){"use strict";function n(e){e.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/}}e.exports=n,n.displayName="ocaml",n.aliases=[]},function(e,t,r){"use strict";var n=r(476);function a(e){e.register(n),function(e){e.languages.opencl=e.languages.extend("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:/\b(?:false|true)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:2|10)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),e.languages.insertBefore("opencl","class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/,alias:"keyword"}});var t={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};e.languages.insertBefore("c","keyword",t),e.languages.cpp&&(t["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|Sampler|UserEvent)\b/,alias:"keyword"},e.languages.insertBefore("cpp","keyword",t))}(e)}e.exports=a,a.displayName="opencl",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.openqasm={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"[^"\r\n\t]*"|'[^'\r\n\t]*'/,greedy:!0},keyword:/\b(?:CX|OPENQASM|U|barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while)\b|#pragma\b/,"class-name":/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,function:/\b(?:cos|exp|ln|popcount|rotl|rotr|sin|sqrt|tan)\b(?=\s*\()/,constant:/\b(?:euler|pi|tau)\b|\u03c0|\ud835\udf0f|\u2107/,number:{pattern:/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|\xb5s|ms|s)?/i,lookbehind:!0},operator:/->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,punctuation:/[(){}\[\];,:.]/},e.languages.qasm=e.languages.openqasm}e.exports=n,n.displayName="openqasm",n.aliases=["qasm"]},function(e,t,r){"use strict";function n(e){e.languages.oz={comment:{pattern:/\/\*[\s\S]*?\*\/|%.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},atom:{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,alias:"builtin"},keyword:/\$|\[\]|\b(?:_|at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/,function:[/\b[a-z][A-Za-z\d]*(?=\()/,{pattern:/(\{)[A-Z][A-Za-z\d]*\b/,lookbehind:!0}],number:/\b(?:0[bx][\da-f]+|\d+(?:\.\d*)?(?:e~?\d+)?)\b|&(?:[^\\]|\\(?:\d{3}|.))/i,variable:/`(?:[^`\\]|\\.)+`/,"attr-name":/\b\w+(?=[ \t]*:(?![:=]))/,operator:/:(?:=|::?)|<[-:=]?|=(?:=|=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/,punctuation:/[\[\](){}.:;?]/}}e.exports=n,n.displayName="oz",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.parigp={comment:/\/\*[\s\S]*?\*\/|\\\\.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"/,greedy:!0},keyword:function(){var e=["breakpoint","break","dbg_down","dbg_err","dbg_up","dbg_x","forcomposite","fordiv","forell","forpart","forprime","forstep","forsubgroup","forvec","for","iferr","if","local","my","next","return","until","while"];return e=e.map((function(e){return e.split("").join(" *")})).join("|"),RegExp("\\b(?:"+e+")\\b")}(),function:/\b\w(?:[\w ]*\w)?(?= *\()/,number:{pattern:/((?:\. *\. *)?)(?:\b\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *(?:[+-] *)?\d(?: *\d)*)?/i,lookbehind:!0},operator:/\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?: *>|(?: *<)?(?: *=)?)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/,punctuation:/[\[\]{}().,:;|]/}}e.exports=n,n.displayName="parigp",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});t=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:t.keyword,variable:t.variable,function:t.function,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:t.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:t.punctuation}}}),e.languages.insertBefore("inside","punctuation",{expression:t.expression,keyword:t.keyword,variable:t.variable,function:t.function,escape:t.escape,"parser-punctuation":{pattern:t.punctuation,alias:"punctuation"}},t.tag.inside["attr-value"])}(e)}e.exports=n,n.displayName="parser",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.pascal={directive:{pattern:/\{\$[\s\S]*?\}/,greedy:!0,alias:["marco","property"]},comment:{pattern:/\(\*[\s\S]*?\*\)|\{[\s\S]*?\}|\/\/.*/,greedy:!0},string:{pattern:/(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},asm:{pattern:/(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i,lookbehind:!0,greedy:!0,inside:null},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},e.languages.pascal.asm.inside=e.languages.extend("pascal",{asm:void 0,keyword:void 0,operator:void 0}),e.languages.objectpascal=e.languages.pascal}e.exports=n,n.displayName="pascal",n.aliases=["objectpascal"]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source,r=/(?:\b\w+(?:)?|)/.source.replace(//g,(function(){return t})),n=e.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp(/(\btype\s+\w+\s+is\s+)/.source.replace(//g,(function(){return r})),"i"),lookbehind:!0,inside:null},{pattern:RegExp(/(?=\s+is\b)/.source.replace(//g,(function(){return r})),"i"),inside:null},{pattern:RegExp(/(:\s*)/.source.replace(//g,(function(){return r}))),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:False|True)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\b\w+(?=\s*\()/,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},a=["comment","keyword","builtin","operator","punctuation"].reduce((function(e,t){return e[t]=n[t],e}),{});n["class-name"].forEach((function(e){e.inside=a}))}(e)}e.exports=n,n.displayName="pascaligo",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.pcaxis={string:/"[^"]*"/,keyword:{pattern:/((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,lookbehind:!0,greedy:!0,inside:{keyword:/^[-A-Z\d]+/,language:{pattern:/^(\s*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/^\[|\]$/,property:/[-\w]+/}},"sub-key":{pattern:/^(\s*)\S[\s\S]*/,lookbehind:!0,inside:{parameter:{pattern:/"[^"]*"/,alias:"property"},punctuation:/^\(|\)$|,/}}}},operator:/=/,tlist:{pattern:/TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,greedy:!0,inside:{function:/^TLIST/,property:{pattern:/^(\s*\(\s*)\w+/,lookbehind:!0},string:/"[^"]*"/,punctuation:/[(),]/,operator:/-/}},punctuation:/[;,]/,number:{pattern:/(^|\s)\d+(?:\.\d+)?(?!\S)/,lookbehind:!0},boolean:/NO|YES/},e.languages.px=e.languages.pcaxis}e.exports=n,n.displayName="pcaxis",n.aliases=["px"]},function(e,t,r){"use strict";function n(e){e.languages.peoplecode={comment:RegExp([/\/\*[\s\S]*?\*\//.source,/\bREM[^;]*;/.source,/<\*(?:[^<*]|\*(?!>)|<(?!\*)|<\*(?:(?!\*>)[\s\S])*\*>)*\*>/.source,/\/\+[\s\S]*?\+\//.source].join("|")),string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},variable:/%\w+/,"function-definition":{pattern:/((?:^|[^\w-])(?:function|method)\s+)\w+/i,lookbehind:!0,alias:"function"},"class-name":{pattern:/((?:^|[^-\w])(?:as|catch|class|component|create|extends|global|implements|instance|local|of|property|returns)\s+)\w+(?::\w+)*/i,lookbehind:!0,inside:{punctuation:/:/}},keyword:/\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|if|implements|import|instance|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i,"operator-keyword":{pattern:/\b(?:and|not|or)\b/i,alias:"operator"},function:/[_a-z]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/\b\d+(?:\.\d+)?\b/,operator:/<>|[<>]=?|!=|\*\*|[-+*/|=@]/,punctuation:/[:.;,()[\]]/},e.languages.pcode=e.languages.peoplecode}e.exports=n,n.displayName="peoplecode",n.aliases=["pcode"]},function(e,t,r){"use strict";function n(e){!function(e){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(e)}e.exports=n,n.displayName="perl",n.aliases=[]},function(e,t,r){"use strict";var n=r(815);function a(e){e.register(n),e.languages.insertBefore("php","variable",{this:{pattern:/\$this\b/,alias:"keyword"},global:/\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/,scope:{pattern:/\b[\w\\]+::/,inside:{keyword:/\b(?:parent|self|static)\b/,punctuation:/::|\\/}}})}e.exports=a,a.displayName="phpExtras",a.aliases=[]},function(e,t,r){"use strict";var n=r(815),a=r(814);function i(e){e.register(n),e.register(a),function(e){var t=/(?:\b[a-zA-Z]\w*|[|\\[\]])+/.source;e.languages.phpdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:"+t+"\\s+)?)\\$\\w+"),lookbehind:!0}}),e.languages.insertBefore("phpdoc","keyword",{"class-name":[{pattern:RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)"+t),lookbehind:!0,inside:{keyword:/\b(?:array|bool|boolean|callback|double|false|float|int|integer|mixed|null|object|resource|self|string|true|void)\b/,punctuation:/[|\\[\]()]/}}]}),e.languages.javadoclike.addSupport("php",e.languages.phpdoc)}(e)}e.exports=i,i.displayName="phpdoc",i.aliases=[]},function(e,t,r){"use strict";var n=r(1065);function a(e){e.register(n),e.languages.plsql=e.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),e.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}e.exports=a,a.displayName="plsql",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.powerquery={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},"quoted-identifier":{pattern:/#"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},string:{pattern:/(?:#!)?"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},constant:[/\bDay\.(?:Friday|Monday|Saturday|Sunday|Thursday|Tuesday|Wednesday)\b/,/\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/,/\bOccurrence\.(?:All|First|Last)\b/,/\bOrder\.(?:Ascending|Descending)\b/,/\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/,/\bMissingField\.(?:Error|Ignore|UseNull)\b/,/\bQuoteStyle\.(?:Csv|None)\b/,/\bJoinKind\.(?:FullOuter|Inner|LeftAnti|LeftOuter|RightAnti|RightOuter)\b/,/\bGroupKind\.(?:Global|Local)\b/,/\bExtraValues\.(?:Error|Ignore|List)\b/,/\bJoinAlgorithm\.(?:Dynamic|LeftHash|LeftIndex|PairwiseHash|RightHash|RightIndex|SortMerge)\b/,/\bJoinSide\.(?:Left|Right)\b/,/\bPrecision\.(?:Decimal|Double)\b/,/\bRelativePosition\.From(?:End|Start)\b/,/\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf16|Utf8|Windows)\b/,/\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Function|Int16|Int32|Int64|Int8|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/,/\bnull\b/],boolean:/\b(?:false|true)\b/,keyword:/\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/,function:{pattern:/(^|[^#\w.])[a-z_][\w.]*(?=\s*\()/i,lookbehind:!0},"data-type":{pattern:/\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time)\b/,alias:"class-name"},number:{pattern:/\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i,lookbehind:!0},operator:/[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/,punctuation:/[,;\[\](){}]/},e.languages.pq=e.languages.powerquery,e.languages.mscript=e.languages.powerquery}e.exports=n,n.displayName="powerquery",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}}(e)}e.exports=n,n.displayName="powershell",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.processing=e.languages.extend("clike",{keyword:/\b(?:break|case|catch|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,function:/\b\w+(?=\s*\()/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),e.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"class-name"}})}e.exports=n,n.displayName="processing",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.prolog={comment:{pattern:/\/\*[\s\S]*?\*\/|%.*/,greedy:!0},string:{pattern:/(["'])(?:\1\1|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1(?!\1)/,greedy:!0},builtin:/\b(?:fx|fy|xf[xy]?|yfx?)\b/,function:/\b[a-z]\w*(?:(?=\()|\/\d+)/,number:/\b\d+(?:\.\d*)?/,operator:/[:\\=><\-?*@\/;+^|!$.]+|\b(?:is|mod|not|xor)\b/,punctuation:/[(){}\[\],]/}}e.exports=n,n.displayName="prolog",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=["on","ignoring","group_right","group_left","by","without"],r=["sum","min","max","avg","group","stddev","stdvar","count","count_values","bottomk","topk","quantile"].concat(t,["offset"]);e.languages.promql={comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},"vector-match":{pattern:new RegExp("((?:"+t.join("|")+")\\s*)\\([^)]*\\)"),lookbehind:!0,inside:{"label-key":{pattern:/\b[^,]+\b/,alias:"attr-name"},punctuation:/[(),]/}},"context-labels":{pattern:/\{[^{}]*\}/,inside:{"label-key":{pattern:/\b[a-z_]\w*(?=\s*(?:=|![=~]))/,alias:"attr-name"},"label-value":{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0,alias:"attr-value"},punctuation:/\{|\}|=~?|![=~]|,/}},"context-range":[{pattern:/\[[\w\s:]+\]/,inside:{punctuation:/\[|\]|:/,"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}},{pattern:/(\boffset\s+)\w+/,lookbehind:!0,inside:{"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}}],keyword:new RegExp("\\b(?:"+r.join("|")+")\\b","i"),function:/\b[a-z_]\w*(?=\s*\()/i,number:/[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i,operator:/[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|or|unless)\b/i,punctuation:/[{};()`,.[\]]/}}(e)}e.exports=n,n.displayName="promql",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.properties={comment:/^[ \t]*[#!].*$/m,"attr-value":{pattern:/(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?: *[=:] *(?! )| ))(?:\\(?:\r\n|[\s\S])|[^\\\r\n])+/m,lookbehind:!0},"attr-name":/^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?= *[=:]| )/m,punctuation:/[=:]/}}e.exports=n,n.displayName="properties",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:t}},builtin:t,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}(e)}e.exports=n,n.displayName="protobuf",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.psl={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,inside:{symbol:/\\[ntrbA-Z"\\]/}},"heredoc-string":{pattern:/<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/,alias:"string",greedy:!0},keyword:/\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/,constant:/\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SEP_HORIZ|R_SEP_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|VOID|WARN)\b/,boolean:/\b(?:FALSE|False|NO|No|TRUE|True|YES|Yes|false|no|true|yes)\b/,variable:/\b(?:PslDebug|errno|exit_status)\b/,builtin:{pattern:/\b(?:PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|_snmp_debug|acos|add_diary|annotate|annotate_get|ascii_to_ebcdic|asctime|asin|atan|atexit|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|date|dcget_text|destroy|destroy_lock|dget_text|difference|dump_hist|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|file|floor|fmod|fopen|fseek|ftell|full_discovery|get|get_chan_info|get_ranges|get_text|get_vars|getenv|gethostinfo|getpid|getpname|grep|history|history_get_retention|in_transition|index|int|internal|intersection|is_var|isnumber|join|kill|length|lines|lock|lock_info|log|log10|loge|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|nthargf|nthline|nthlinef|num_bytes|num_consoles|pconfig|popen|poplines|pow|print|printf|proc_exists|process|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|snmp_agent_config|snmp_agent_start|snmp_agent_stop|snmp_close|snmp_config|snmp_get|snmp_get_next|snmp_h_get|snmp_h_get_next|snmp_h_set|snmp_open|snmp_set|snmp_trap_ignore|snmp_trap_listen|snmp_trap_raise_std_trap|snmp_trap_receive|snmp_trap_register_im|snmp_trap_send|snmp_walk|sopen|sort|splitline|sprintf|sqrt|srandom|str_repeat|strcasecmp|subset|substr|system|tail|tan|tanh|text_domain|time|tmpnam|tolower|toupper|trace_psl_process|trim|union|unique|unlock|unset|va_arg|va_start|write)\b/,alias:"builtin-function"},"foreach-variable":{pattern:/(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/,lookbehind:!0,greedy:!0},function:/\b[_a-z]\w*\b(?=\s*\()/i,number:/\b(?:0x[0-9a-f]+|\d+(?:\.\d+)?)\b/i,operator:/--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/,punctuation:/[(){}\[\];,]/}}e.exports=n,n.displayName="psl",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.pug={comment:{pattern:/(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,lookbehind:!0},"multiline-script":{pattern:/(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:e.languages.javascript},filter:{pattern:/(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},text:/\S[\s\S]*/}},"multiline-plain-text":{pattern:/(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0},markup:{pattern:/(^[\t ]*)<.+/m,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\n)[\t ]*)doctype(?: .+)?/,lookbehind:!0},"flow-control":{pattern:/(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m,lookbehind:!0,inside:{each:{pattern:/^each .+? in\b/,inside:{keyword:/\b(?:each|in)\b/,punctuation:/,/}},branch:{pattern:/^(?:case|default|else|if|unless|when|while)\b/,alias:"keyword"},rest:e.languages.javascript}},keyword:{pattern:/(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m,lookbehind:!0},mixin:[{pattern:/(^[\t ]*)mixin .+/m,lookbehind:!0,inside:{keyword:/^mixin/,function:/\w+(?=\s*\(|\s*$)/,punctuation:/[(),.]/}},{pattern:/(^[\t ]*)\+.+/m,lookbehind:!0,inside:{name:{pattern:/^\+\w+/,alias:"function"},rest:e.languages.javascript}}],script:{pattern:/(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,lookbehind:!0,inside:e.languages.javascript},"plain-text":{pattern:/(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,lookbehind:!0},tag:{pattern:/(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,lookbehind:!0,inside:{attributes:[{pattern:/&[^(]+\([^)]+\)/,inside:e.languages.javascript},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,lookbehind:!0,inside:e.languages.javascript},"attr-name":/[\w-]+(?=\s*!?=|\s*[,)])/,punctuation:/[!=(),]+/}}],punctuation:/:/,"attr-id":/#[\w\-]+/,"attr-class":/\.[\w\-]+/}},code:[{pattern:/(^[\t ]*(?:-|!?=)).+/m,lookbehind:!0,inside:e.languages.javascript}],punctuation:/[.\-!=|]+/};for(var t=/(^([\t ]*)):(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/.source,r=[{filter:"atpl",language:"twig"},{filter:"coffee",language:"coffeescript"},"ejs","handlebars","less","livescript","markdown",{filter:"sass",language:"scss"},"stylus"],n={},a=0,i=r.length;a",(function(){return o.filter})),"m"),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},text:{pattern:/\S[\s\S]*/,alias:[o.language,"language-"+o.language],inside:e.languages[o.language]}}})}e.languages.insertBefore("pug","filter",n)}(e)}e.exports=n,n.displayName="pug",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,greedy:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,greedy:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|\$(?!\{)|(?!\1)[^\\$]|\\[\s\S])*\1/,greedy:!0,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\b\w+|\*)(?=\s*=>)/,function:[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,boolean:/\b(?:false|true)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/};var t=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:e.languages.puppet}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}];e.languages.puppet.heredoc[0].inside.interpolation=t,e.languages.puppet.string.inside["double-quoted"].inside.interpolation=t}(e)}e.exports=n,n.displayName="puppet",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:NULL|ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,function:/\b(?:abs|add_(?:addr|constdef|(?:fundef|interface|macdef|typedef)(?:_at)?|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_c?string(?:_pointer)?|byte_(?:matrix|pointer)|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|sentry|short|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?:[!"#$%&'*+,\-.\/:<=>?@\\^`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]|\b_+\b)+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/};var t=/%< *-\*- *\d* *-\*-[\s\S]+?%>/.source;["c",{lang:"c++",alias:"cpp"},"fortran"].forEach((function(r){var n=r;if("string"!==typeof r&&(n=r.alias,r=r.lang),e.languages[n]){var a={};a["inline-lang-"+n]={pattern:RegExp(t.replace("",r.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:e.util.clone(e.languages.pure["inline-lang"].inside)},a["inline-lang-"+n].inside.rest=e.util.clone(e.languages[n]),e.languages.insertBefore("pure","inline-lang",a)}})),e.languages.c&&(e.languages.pure["inline-lang"].inside.rest=e.util.clone(e.languages.c))}(e)}e.exports=n,n.displayName="pure",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.purebasic=e.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|forever|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*/@]/}),e.languages.insertBefore("purebasic","keyword",{tag:/#\w+\$?/,asm:{pattern:/(^[\t ]*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},keyword:[/\b(?:extern|global)\b[^;\r\n]*/i,/\b(?:CPU|DEFAULT|FLOAT)\b.*/],function:{pattern:/^([\t ]*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^([\t ]*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete e.languages.purebasic["class-name"],delete e.languages.purebasic.boolean,e.languages.pbfasm=e.languages.purebasic}e.exports=n,n.displayName="purebasic",n.aliases=[]},function(e,t,r){"use strict";var n=r(1067);function a(e){e.register(n),e.languages.purescript=e.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|\u2200/,"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import)\b/,punctuation:/\./}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/,operator:[e.languages.haskell.operator[0],e.languages.haskell.operator[2],/[\xa2-\xa6\xa8\xa9\xac\xae-\xb1\xb4\xb8\xd7\xf7\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u03f6\u0482\u058d-\u058f\u0606-\u0608\u060b\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u07fe\u07ff\u09f2\u09f3\u09fa\u09fb\u0af1\u0b70\u0bf3-\u0bfa\u0c7f\u0d4f\u0d79\u0e3f\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u166d\u17db\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u2052\u207a-\u207c\u208a-\u208c\u20a0-\u20bf\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u2140-\u2144\u214a-\u214d\u214f\u218a\u218b\u2190-\u2307\u230c-\u2328\u232b-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b73\u2b76-\u2b95\u2b97-\u2bff\u2ce5-\u2cea\u2e50\u2e51\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua700-\ua716\ua720\ua721\ua789\ua78a\ua828-\ua82b\ua836-\ua839\uaa77-\uaa79\uab5b\uab6a\uab6b\ufb29\ufbb2-\ufbc1\ufdfc\ufdfd\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd]/]}),e.languages.purs=e.languages.purescript}e.exports=a,a.displayName="purescript",a.aliases=["purs"]},function(e,t,r){"use strict";function n(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}e.exports=n,n.displayName="python",n.aliases=["py"]},function(e,t,r){"use strict";function n(e){e.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}}e.exports=n,n.displayName="q",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){for(var t=/"(?:\\.|[^\\"\r\n])*"|'(?:\\.|[^\\'\r\n])*'/.source,r=/\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))*\*\//.source,n=/(?:[^\\()[\]{}"'/]||\/(?![*/])||\(*\)|\[*\]|\{*\}|\\[\s\S])/.source.replace(//g,(function(){return t})).replace(//g,(function(){return r})),a=0;a<2;a++)n=n.replace(//g,(function(){return n}));n=n.replace(//g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp(/((?:^|;)[ \t]*)function\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*\(*\)\s*\{*\}/.source.replace(//g,(function(){return n})),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp(/(:[ \t]*)(?![\s;}[])(?:(?!$|[;}]))+/.source.replace(//g,(function(){return n})),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(e)}e.exports=n,n.displayName="qml",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.qore=e.languages.extend("clike",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,lookbehind:!0},string:{pattern:/("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:bool|date|float|int|list|number|string)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,boolean:/\b(?:false|true)\b/i,function:/\$?\b(?!\d)\w+(?=\()/,number:/\b(?:0b[01]+|0x(?:[\da-f]*\.)?[\da-fp\-]+|(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?[df]|(?:\d+(?:\.\d+)?|\.\d+))\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,lookbehind:!0},variable:/\$(?!\d)\w+\b/})}e.exports=n,n.displayName="qore",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,r){return"(?:"+t[+r]+")"}))}function r(e,r,n){return RegExp(t(e,r),n||"")}var n=RegExp("\\b(?:"+("Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero"+" "+"Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within").trim().replace(/ /g,"|")+")\\b"),a=t(/<<0>>(?:\s*\.\s*<<0>>)*/.source,[/\b[A-Za-z_]\w*\b/.source]),i={keyword:n,punctuation:/[<>()?,.:[\]]/},o=/"(?:\\.|[^\\"])*"/.source;e.languages.qsharp=e.languages.extend("clike",{comment:/\/\/.*/,string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[o]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\b(?:as|open)\s+)<<0>>(?=\s*(?:;|as\b))/.source,[a]),lookbehind:!0,inside:i},{pattern:r(/(\bnamespace\s+)<<0>>(?=\s*\{)/.source,[a]),lookbehind:!0,inside:i}],keyword:n,number:/(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i,operator:/\band=|\bor=|\band\b|\bnot\b|\bor\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/,punctuation:/::|[{}[\];(),.:]/}),e.languages.insertBefore("qsharp","number",{range:{pattern:/\.\./,alias:"operator"}});var s=function(e,t){for(var r=0;r>/g,(function(){return"(?:"+e+")"}));return e.replace(/<>/g,"[^\\s\\S]")}(t(/\{(?:[^"{}]|<<0>>|<>)*\}/.source,[o]),2);e.languages.insertBefore("qsharp","string",{"interpolation-string":{pattern:r(/\$"(?:\\.|<<0>>|[^\\"{])*"/.source,[s]),greedy:!0,inside:{interpolation:{pattern:r(/((?:^|[^\\])(?:\\\\)*)<<0>>/.source,[s]),lookbehind:!0,inside:{punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-qsharp",inside:e.languages.qsharp}}},string:/[\s\S]+/}}})}(e),e.languages.qs=e.languages.qsharp}e.exports=n,n.displayName="qsharp",n.aliases=["qs"]},function(e,t,r){"use strict";function n(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}e.exports=n,n.displayName="r",n.aliases=[]},function(e,t,r){"use strict";var n=r(1071);function a(e){e.register(n),e.languages.racket=e.languages.extend("scheme",{"lambda-parameter":{pattern:/([(\[]lambda\s+[(\[])[^()\[\]'\s]+/,lookbehind:!0}}),e.languages.insertBefore("racket","string",{lang:{pattern:/^#lang.+/m,greedy:!0,alias:"keyword"}}),e.languages.rkt=e.languages.racket}e.exports=a,a.displayName="racket",a.aliases=["rkt"]},function(e,t,r){"use strict";function n(e){e.languages.reason=e.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),e.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete e.languages.reason.function}e.exports=n,n.displayName="reason",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,n="(?:[^\\\\-]|"+r.source+")",a=RegExp(n+"-"+n),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:a,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:r}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|:=]=?|!=|\b_\b/,punctuation:/[,;.\[\]{}()]/}}e.exports=n,n.displayName="rego",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.renpy={comment:{pattern:/(^|[^\\])#.+/,lookbehind:!0},string:{pattern:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m,greedy:!0},function:/\b[a-z_]\w*(?=\()/i,property:/\b(?:Update|UpdateVersion|action|activate_sound|adv_nvl_transition|after_load_transition|align|alpha|alt|anchor|antialias|area|auto|background|bar_invert|bar_resizing|bar_vertical|black_color|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_reverse|box_wrap|can_update|caret|child|color|crop|default_afm_enable|default_afm_time|default_fullscreen|default_text_cps|developer|directory_name|drag_handle|drag_joined|drag_name|drag_raise|draggable|dragged|drop_shadow|drop_shadow_color|droppable|dropped|easein|easeout|edgescroll|end_game_transition|end_splash_transition|enter_replay_transition|enter_sound|enter_transition|enter_yesno_transition|executable_name|exit_replay_transition|exit_sound|exit_transition|exit_yesno_transition|fadein|fadeout|first_indent|first_spacing|fit_first|focus|focus_mask|font|foreground|game_main_transition|get_installed_packages|google_play_key|google_play_salt|ground|has_music|has_sound|has_voice|height|help|hinting|hover|hover_background|hover_color|hover_sound|hovered|hyperlink_functions|idle|idle_color|image_style|include_update|insensitive|insensitive_background|insensitive_color|inside|intra_transition|italic|justify|kerning|keyboard_focus|language|layer_clipping|layers|layout|left_bar|left_gutter|left_margin|left_padding|length|line_leading|line_overlap_split|line_spacing|linear|main_game_transition|main_menu_music|maximum|min_width|minimum|minwidth|modal|mouse|mousewheel|name|narrator_menu|newline_indent|nvl_adv_transition|offset|order_reverse|outlines|overlay_functions|pos|position|prefix|radius|range|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|sample_sound|save_directory|say_attribute_transition|screen_height|screen_width|scrollbars|selected_hover|selected_hover_color|selected_idle|selected_idle_color|selected_insensitive|show_side_image|show_two_window|side_spacing|side_xpos|side_ypos|size|size_group|slow_cps|slow_cps_multiplier|spacing|strikethrough|subpixel|text_align|text_style|text_xpos|text_y_fudge|text_ypos|thumb|thumb_offset|thumb_shadow|thumbnail_height|thumbnail_width|time|top_bar|top_gutter|top_margin|top_padding|translations|underline|unscrollable|update|value|version|version_name|version_tuple|vertical|width|window_hide_transition|window_icon|window_left_padding|window_show_transition|window_title|windows_icon|xadjustment|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xinitial|xmargin|xmaximum|xminimum|xoffset|xofsset|xpadding|xpos|xsize|xzoom|yadjustment|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yinitial|ymargin|ymaximum|yminimum|yoffset|ypadding|ypos|ysize|ysizexysize|yzoom|zoom|zorder)\b/,tag:/\b(?:bar|block|button|buttoscreenn|drag|draggroup|fixed|frame|grid|[hv]box|hotbar|hotspot|image|imagebutton|imagemap|input|key|label|menu|mm_menu_frame|mousearea|nvl|parallel|screen|self|side|tag|text|textbutton|timer|vbar|viewport|window)\b|\$/,keyword:/\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|yield)\b/,boolean:/\b(?:[Ff]alse|[Tt]rue)\b/,number:/(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?)|\B\.\d+)(?:e[+-]?\d+)?j?/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with)\b/,punctuation:/[{}[\];(),.:]/},e.languages.rpy=e.languages.renpy}e.exports=n,n.displayName="renpy",n.aliases=["rpy"]},function(e,t,r){"use strict";function n(e){e.languages.rest={table:[{pattern:/(^[\t ]*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1[+|].+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/m,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(^[\t ]*)=+ [ =]*=(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1=+ [ =]*=(?=(?:\r?\n|\r){2}|\s*$)/m,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^[\t ]*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( )(?! )[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^[\t ]*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^[\t ]*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^[\t ]*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^[\t ]*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^[\t ]*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^[\t ]*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+)(?![ \t]).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^[\t ]*)(?:[*+\-\u2022\u2023\u2043]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^[\t ]*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s)(?:(?!\2).)*\S\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\[\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^[\t ]*)(?:\|(?= |$)|(?:---?|\u2014|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}}}e.exports=n,n.displayName="rest",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.rip={comment:{pattern:/#.*/,greedy:!0},char:{pattern:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},regex:{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},keyword:/(?:=>|->)|\b(?:case|catch|class|else|exit|finally|if|raise|return|switch|try)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:false|true)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,number:/[+-]?\b(?:\d+\.\d+|\d+)\b/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}}e.exports=n,n.displayName="rip",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.roboconf={comment:/#.*/,keyword:{pattern:/(^|\s)(?:(?:external|import)\b|(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{))/,lookbehind:!0},component:{pattern:/[\w-]+(?=[ \t]*\{)/,alias:"variable"},property:/[\w.-]+(?=[ \t]*:)/,value:{pattern:/(=[ \t]*(?![ \t]))[^,;]+/,lookbehind:!0,alias:"attr-value"},optional:{pattern:/\(optional\)/,alias:"builtin"},wildcard:{pattern:/(\.)\*/,lookbehind:!0,alias:"operator"},punctuation:/[{},.;:=]/}}e.exports=n,n.displayName="roboconf",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},r={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function n(e,n){var a={"section-header":{pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"}};for(var i in n)a[i]=n[i];return a.tag={pattern:/([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},a.variable=r,a.comment=t,{pattern:RegExp(/^ ?\*{3}[ \t]*[ \t]*\*{3}(?:.|[\r\n](?!\*{3}))*/.source.replace(//g,(function(){return e})),"im"),alias:"section",inside:a}}var a={pattern:/(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},i={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:r}},o={pattern:/([\r\n](?: {2}|\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:r}};e.languages.robotframework={settings:n("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:n("Variables"),"test-cases":n("Test Cases",{"test-name":i,documentation:a,property:o}),keywords:n("Keywords",{"keyword-name":i,documentation:a,property:o}),tasks:n("Tasks",{"task-name":i,documentation:a,property:o}),comment:t},e.languages.robot=e.languages.robotframework}(e)}e.exports=n,n.displayName="robotframework",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)t=t.replace(//g,(function(){return t}));t=t.replace(//g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(e)}e.exports=n,n.displayName="rust",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))/.source,r=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},a={pattern:/&[a-z_]\w*/i},i={pattern:/((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},o={pattern:/(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i,alias:"keyword",lookbehind:!0},s=[/\/\*[\s\S]*?\*\//,{pattern:/(^[ \t]*|;\s*)\*[^;]*;/m,lookbehind:!0}],c={pattern:RegExp(t),greedy:!0},u=/[$%@.(){}\[\];,\\]/,f={pattern:/%?\b\w+(?=\()/,alias:"keyword"},d={function:f,"arg-value":{pattern:/(=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":a,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:r,"numeric-constant":n,punctuation:u,string:c},l={pattern:/\b(?:format|put)\b=?[\w'$.]+/i,inside:{keyword:/^(?:format|put)(?==)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/,alias:"number"}}},h={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},p={pattern:/((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},b={pattern:/(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},m=/aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce/.source,g={pattern:RegExp(/(^|\s)(?:action\s+)?(?:)\.[a-z]+\b[^;]+/.source.replace(//g,(function(){return m})),"i"),lookbehind:!0,inside:{keyword:RegExp(/(?:)\.[a-z]+\b/.source.replace(//g,(function(){return m})),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},comment:s,function:f,"arg-value":d["arg-value"],operator:d.operator,argument:d.arg,number:r,"numeric-constant":n,punctuation:u,string:c}},v={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i,lookbehind:!0};e.languages.sas={datalines:{pattern:/^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:cards|(?:data)?lines)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp(/^[ \t]*(?:select|alter\s+table|(?:create|describe|drop)\s+(?:index|table(?:\s+constraints)?|view)|create\s+unique\s+index|insert\s+into|update)(?:|[^;"'])+;/.source.replace(//g,(function(){return t})),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":p,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i,lookbehind:!0,alias:"keyword"},number:r,"numeric-constant":n,punctuation:u,string:c}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,groovy:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g,(function(){return t})),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},keyword:v,"submit-statement":b,"global-statements":p,number:r,"numeric-constant":n,punctuation:u,string:c}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,lua:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g,(function(){return t})),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},keyword:v,"submit-statement":b,"global-statements":p,number:r,"numeric-constant":n,punctuation:u,string:c}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,"statement-var":{pattern:/((?:^|\s)=?)saveresult\s[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:d}},"cas-actions":g,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:d},step:o,keyword:v,function:f,format:l,altformat:h,"global-statements":p,number:r,"numeric-constant":n,punctuation:u,string:c}},"proc-args":{pattern:RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|)+;/.source.replace(//g,(function(){return t})),"im"),lookbehind:!0,inside:d},"macro-keyword":i,"macro-variable":a,"macro-string-functions":{pattern:/((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i,lookbehind:!0,inside:{function:{pattern:/%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i,alias:"keyword"},"macro-keyword":i,"macro-variable":a,"escaped-char":{pattern:/%['"()<>=\xac^~;,#]/},punctuation:u}},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:s,number:r,"numeric-constant":n}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:d},"cas-actions":g,comment:s,function:f,format:l,altformat:h,"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:c,step:o,keyword:v,"operator-keyword":{pattern:/\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i,alias:"operator"},number:r,operator:/\*\*?|\|\|?|!!?|\xa6\xa6?|<[>=]?|>[<=]?|[-+\/=&]|[~\xac^]=?/,punctuation:u}}(e)}e.exports=n,n.displayName="sas",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:r,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(e)}e.exports=n,n.displayName="sass",n.aliases=[]},function(e,t,r){"use strict";var n=r(1068);function a(e){e.register(n),e.languages.scala=e.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),e.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.scala}}},string:/[\s\S]+/}}}),delete e.languages.scala["class-name"],delete e.languages.scala.function}e.exports=a,a.displayName="scala",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}e.exports=n,n.displayName="scss",n.aliases=[]},function(e,t,r){"use strict";var n=r(1556);function a(e){e.register(n),function(e){var t=[/"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/.source,/'[^']*'/.source,/\$'(?:[^'\\]|\\[\s\S])*'/.source,/<<-?\s*(["']?)(\w+)\1\s[\s\S]*?[\r\n]\2/.source].join("|");e.languages["shell-session"]={command:{pattern:RegExp(/^/.source+"(?:"+/[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+(?::[^\0-\x1F$#%*?"<>:;|]+)?/.source+"|"+/[/~.][^\0-\x1F$#%*?"<>@:;|]*/.source+")?"+/[$#%](?=\s)/.source+/(?:[^\\\r\n \t'"<$]|[ \t](?:(?!#)|#.*$)|\\(?:[^\r]|\r\n?)|\$(?!')|<(?!<)|<>)+/.source.replace(/<>/g,(function(){return t})),"m"),greedy:!0,inside:{info:{pattern:/^[^#$%]+/,alias:"punctuation",inside:{user:/^[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#%]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:e.languages.bash},"shell-symbol":{pattern:/^[$#%]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},e.languages["sh-session"]=e.languages.shellsession=e.languages["shell-session"]}(e)}e.exports=a,a.displayName="shellSession",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.smali={comment:/#.*/,string:{pattern:/"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\(?:.|u[\da-fA-F]{4}))'/,greedy:!0},"class-name":{pattern:/(^|[^L])L(?:(?:\w+|`[^`\r\n]*`)\/)*(?:[\w$]+|`[^`\r\n]*`)(?=\s*;)/,lookbehind:!0,inside:{"class-name":{pattern:/(^L|\/)(?:[\w$]+|`[^`\r\n]*`)$/,lookbehind:!0},namespace:{pattern:/^(L)(?:(?:\w+|`[^`\r\n]*`)\/)+/,lookbehind:!0,inside:{punctuation:/\//}},builtin:/^L/}},builtin:[{pattern:/([();\[])[BCDFIJSVZ]+/,lookbehind:!0},{pattern:/([\w$>]:)[BCDFIJSVZ]/,lookbehind:!0}],keyword:[{pattern:/(\.end\s+)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])\.(?!\d)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])(?:abstract|annotation|bridge|constructor|enum|final|interface|private|protected|public|runtime|static|synthetic|system|transient)(?![\w.-])/,lookbehind:!0}],function:{pattern:/(^|[^\w.-])(?:\w+|<[\w$-]+>)(?=\()/,lookbehind:!0},field:{pattern:/[\w$]+(?=:)/,alias:"variable"},register:{pattern:/(^|[^\w.-])[vp]\d(?![\w.-])/,lookbehind:!0,alias:"variable"},boolean:{pattern:/(^|[^\w.-])(?:false|true)(?![\w.-])/,lookbehind:!0},number:{pattern:/(^|[^/\w.-])-?(?:NAN|INFINITY|0x(?:[\dA-F]+(?:\.[\dA-F]*)?|\.[\dA-F]+)(?:p[+-]?[\dA-F]+)?|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)[dflst]?(?![\w.-])/i,lookbehind:!0},label:{pattern:/(:)\w+/,lookbehind:!0,alias:"property"},operator:/->|\.\.|[\[=]/,punctuation:/[{}(),;:]/}}e.exports=n,n.displayName="smali",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.smalltalk={comment:{pattern:/"(?:""|[^"])*"/,greedy:!0},char:{pattern:/\$./,greedy:!0},string:{pattern:/'(?:''|[^'])*'/,greedy:!0},symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}}e.exports=n,n.displayName="smalltalk",n.aliases=[]},function(e,t,r){"use strict";var n=r(256);function a(e){e.register(n),function(e){e.languages.smarty={comment:{pattern:/^\{\*[\s\S]*?\*\}/,greedy:!0},"embedded-php":{pattern:/^\{php\}[\s\S]*?\{\/php\}/,greedy:!0,inside:{smarty:{pattern:/^\{php\}|\{\/php\}$/,inside:null},php:{pattern:/[\s\S]+/,alias:"language-php",inside:e.languages.php}}},string:[{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0,inside:{interpolation:{pattern:/\{[^{}]*\}|`[^`]*`/,inside:{"interpolation-punctuation":{pattern:/^[{`]|[`}]$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},variable:/\$\w+/}},{pattern:/'(?:\\.|[^'\\\r\n])*'/,greedy:!0}],keyword:{pattern:/(^\{\/?)[a-z_]\w*\b(?!\()/i,lookbehind:!0,greedy:!0},delimiter:{pattern:/^\{\/?|\}$/,greedy:!0,alias:"punctuation"},number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,variable:[/\$(?!\d)\w+/,/#(?!\d)\w+#/,{pattern:/(\.|->|\w\s*=)(?!\d)\w+\b(?!\()/,lookbehind:!0},{pattern:/(\[)(?!\d)\w+(?=\])/,lookbehind:!0}],function:{pattern:/(\|\s*)@?[a-z_]\w*|\b[a-z_]\w*(?=\()/i,lookbehind:!0},"attr-name":/\b[a-z_]\w*(?=\s*=)/i,boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\[\](){}.,:`]|->/,operator:[/[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/,/\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/,/\b(?:and|eq|gt?e|gt|lt?e|lt|mod|neq?|not|or)\b/]},e.languages.smarty["embedded-php"].inside.smarty.inside=e.languages.smarty,e.languages.smarty.string[0].inside.interpolation.inside.expression.inside=e.languages.smarty;var t=/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,r=RegExp(/\{\*[\s\S]*?\*\}/.source+"|"+/\{php\}[\s\S]*?\{\/php\}/.source+"|"+/\{(?:[^{}"']||\{(?:[^{}"']||\{(?:[^{}"']|)*\})*\})*\}/.source.replace(//g,(function(){return t.source})),"g");e.hooks.add("before-tokenize",(function(t){var n=!1;e.languages["markup-templating"].buildPlaceholders(t,"smarty",r,(function(e){return"{/literal}"===e&&(n=!1),!n&&("{literal}"===e&&(n=!0),!0)}))})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"smarty")}))}(e)}e.exports=a,a.displayName="smarty",a.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\b(?:abstype|and|andalso|as|case|datatype|do|else|end|eqtype|exception|fn|fun|functor|handle|if|in|include|infix|infixr|let|local|nonfix|of|op|open|orelse|raise|rec|sharing|sig|signature|struct|structure|then|type|val|where|while|with|withtype)\b/i;e.languages.sml={comment:/\(\*(?:[^*(]|\*(?!\))|\((?!\*)|\(\*(?:[^*(]|\*(?!\))|\((?!\*))*\*\))*\*\)/,string:{pattern:/#?"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":[{pattern:RegExp(/((?:^|[^:]):\s*)(?:\s*(?:(?:\*|->)\s*|,\s*(?:(?=)|(?!)\s+)))*/.source.replace(//g,(function(){return/\s*(?:[*,]|->)/.source})).replace(//g,(function(){return/(?:'[\w']*||\((?:[^()]|\([^()]*\))*\)|\{(?:[^{}]|\{[^{}]*\})*\})(?:\s+)*/.source})).replace(//g,(function(){return/(?!)[a-z\d_][\w'.]*/.source})).replace(//g,(function(){return t.source})),"i"),lookbehind:!0,greedy:!0,inside:null},{pattern:/((?:^|[^\w'])(?:datatype|exception|functor|signature|structure|type)\s+)[a-z_][\w'.]*/i,lookbehind:!0}],function:{pattern:/((?:^|[^\w'])fun\s+)[a-z_][\w'.]*/i,lookbehind:!0},keyword:t,variable:{pattern:/(^|[^\w'])'[\w']*/,lookbehind:!0},number:/~?\b(?:\d+(?:\.\d+)?(?:e~?\d+)?|0x[\da-f]+)\b/i,word:{pattern:/\b0w(?:\d+|x[\da-f]+)\b/i,alias:"constant"},boolean:/\b(?:false|true)\b/i,operator:/\.\.\.|:[>=:]|=>?|->|[<>]=?|[!+\-*/^#|@~]/,punctuation:/[(){}\[\].:,;]/},e.languages.sml["class-name"][0].inside=e.languages.sml,e.languages.smlnj=e.languages.sml}(e)}e.exports=n,n.displayName="sml",n.aliases=["smlnj"]},function(e,t,r){"use strict";function n(e){e.languages.solidity=e.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),e.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),e.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),e.languages.sol=e.languages.solidity}e.exports=n,n.displayName="solidity",n.aliases=["sol"]},function(e,t,r){"use strict";function n(e){!function(e){var t={pattern:/\{[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}\}/i,alias:"constant",inside:{punctuation:/[{}]/}};e.languages["solution-file"]={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0,inside:{guid:t}},object:{pattern:/^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m,lookbehind:!0,greedy:!0,alias:"keyword"},property:{pattern:/^([ \t]*)(?!\s)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m,lookbehind:!0,inside:{guid:t}},guid:t,number:/\b\d+(?:\.\d+)*\b/,boolean:/\b(?:FALSE|TRUE)\b/,operator:/=/,punctuation:/[(),]/},e.languages.sln=e.languages["solution-file"]}(e)}e.exports=n,n.displayName="solutionFile",n.aliases=[]},function(e,t,r){"use strict";var n=r(256);function a(e){e.register(n),function(e){var t=/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,r=/\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-F]+\b/;e.languages.soy={comment:[/\/\*[\s\S]*?\*\//,{pattern:/(\s)\/\/.*/,lookbehind:!0,greedy:!0}],"command-arg":{pattern:/(\{+\/?\s*(?:alias|call|delcall|delpackage|deltemplate|namespace|template)\s+)\.?[\w.]+/,lookbehind:!0,alias:"string",inside:{punctuation:/\./}},parameter:{pattern:/(\{+\/?\s*@?param\??\s+)\.?[\w.]+/,lookbehind:!0,alias:"variable"},keyword:[{pattern:/(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/,lookbehind:!0},/\b(?:any|as|attributes|bool|css|float|html|in|int|js|list|map|null|number|string|uri)\b/],delimiter:{pattern:/^\{+\/?|\/?\}+$/,alias:"punctuation"},property:/\w+(?==)/,variable:{pattern:/\$[^\W\d]\w*(?:\??(?:\.\w+|\[[^\]]+\]))*/,inside:{string:{pattern:t,greedy:!0},number:r,punctuation:/[\[\].?]/}},string:{pattern:t,greedy:!0},function:[/\w+(?=\()/,{pattern:/(\|[^\S\r\n]*)\w+/,lookbehind:!0}],boolean:/\b(?:false|true)\b/,number:r,operator:/\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,punctuation:/[{}()\[\]|.,:]/},e.hooks.add("before-tokenize",(function(t){var r=!1;e.languages["markup-templating"].buildPlaceholders(t,"soy",/\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g,(function(e){return"{/literal}"===e&&(r=!1),!r&&("{literal}"===e&&(r=!0),!0)}))})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"soy")}))}(e)}e.exports=a,a.displayName="soy",a.aliases=[]},function(e,t,r){"use strict";var n=r(1560);function a(e){e.register(n),e.languages.sparql=e.languages.extend("turtle",{boolean:/\b(?:false|true)\b/i,variable:{pattern:/[?$]\w+/,greedy:!0}}),e.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:BASE|GRAPH|PREFIX)\b/i]}),e.languages.rq=e.languages.sparql}e.exports=a,a.displayName="sparql",a.aliases=["rq"]},function(e,t,r){"use strict";function n(e){e.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\b\w+(?=\s*\()/,property:/\b\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/}}e.exports=n,n.displayName="splunkSpl",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.sqf=e.languages.extend("clike",{string:{pattern:/"(?:(?:"")?[^"])*"(?!")|'(?:[^'])*'/,greedy:!0},keyword:/\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execFSM|execVM|exitWith|for|forEach|forEachMember|forEachMemberAgent|forEachMemberTeam|from|goto|if|nil|preprocessFile|preprocessFileLineNumbers|private|scopeName|spawn|step|switch|then|throw|to|try|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?:abs|accTime|acos|action|actionIDs|actionKeys|actionKeysImages|actionKeysNames|actionKeysNamesArray|actionName|actionParams|activateAddons|activatedAddons|activateKey|add3DENConnection|add3DENEventHandler|add3DENLayer|addAction|addBackpack|addBackpackCargo|addBackpackCargoGlobal|addBackpackGlobal|addCamShake|addCuratorAddons|addCuratorCameraArea|addCuratorEditableObjects|addCuratorEditingArea|addCuratorPoints|addEditorObject|addEventHandler|addForce|addForceGeneratorRTD|addGoggles|addGroupIcon|addHandgunItem|addHeadgear|addItem|addItemCargo|addItemCargoGlobal|addItemPool|addItemToBackpack|addItemToUniform|addItemToVest|addLiveStats|addMagazine|addMagazineAmmoCargo|addMagazineCargo|addMagazineCargoGlobal|addMagazineGlobal|addMagazinePool|addMagazines|addMagazineTurret|addMenu|addMenuItem|addMissionEventHandler|addMPEventHandler|addMusicEventHandler|addOwnedMine|addPlayerScores|addPrimaryWeaponItem|addPublicVariableEventHandler|addRating|addResources|addScore|addScoreSide|addSecondaryWeaponItem|addSwitchableUnit|addTeamMember|addToRemainsCollector|addTorque|addUniform|addVehicle|addVest|addWaypoint|addWeapon|addWeaponCargo|addWeaponCargoGlobal|addWeaponGlobal|addWeaponItem|addWeaponPool|addWeaponTurret|admin|agent|agents|AGLToASL|aimedAtTarget|aimPos|airDensityCurveRTD|airDensityRTD|airplaneThrottle|airportSide|AISFinishHeal|alive|all3DENEntities|allAirports|allControls|allCurators|allCutLayers|allDead|allDeadMen|allDisplays|allGroups|allMapMarkers|allMines|allMissionObjects|allow3DMode|allowCrewInImmobile|allowCuratorLogicIgnoreAreas|allowDamage|allowDammage|allowFileOperations|allowFleeing|allowGetIn|allowSprint|allPlayers|allSimpleObjects|allSites|allTurrets|allUnits|allUnitsUAV|allVariables|ammo|ammoOnPylon|animate|animateBay|animateDoor|animatePylon|animateSource|animationNames|animationPhase|animationSourcePhase|animationState|append|apply|armoryPoints|arrayIntersect|asin|ASLToAGL|ASLToATL|assert|assignAsCargo|assignAsCargoIndex|assignAsCommander|assignAsDriver|assignAsGunner|assignAsTurret|assignCurator|assignedCargo|assignedCommander|assignedDriver|assignedGunner|assignedItems|assignedTarget|assignedTeam|assignedVehicle|assignedVehicleRole|assignItem|assignTeam|assignToAirport|atan|atan2|atg|ATLToASL|attachedObject|attachedObjects|attachedTo|attachObject|attachTo|attackEnabled|backpack|backpackCargo|backpackContainer|backpackItems|backpackMagazines|backpackSpaceFor|behaviour|benchmark|binocular|blufor|boundingBox|boundingBoxReal|boundingCenter|briefingName|buildingExit|buildingPos|buldozer_EnableRoadDiag|buldozer_IsEnabledRoadDiag|buldozer_LoadNewRoads|buldozer_reloadOperMap|buttonAction|buttonSetAction|cadetMode|callExtension|camCommand|camCommit|camCommitPrepared|camCommitted|camConstuctionSetParams|camCreate|camDestroy|cameraEffect|cameraEffectEnableHUD|cameraInterest|cameraOn|cameraView|campaignConfigFile|camPreload|camPreloaded|camPrepareBank|camPrepareDir|camPrepareDive|camPrepareFocus|camPrepareFov|camPrepareFovRange|camPreparePos|camPrepareRelPos|camPrepareTarget|camSetBank|camSetDir|camSetDive|camSetFocus|camSetFov|camSetFovRange|camSetPos|camSetRelPos|camSetTarget|camTarget|camUseNVG|canAdd|canAddItemToBackpack|canAddItemToUniform|canAddItemToVest|cancelSimpleTaskDestination|canFire|canMove|canSlingLoad|canStand|canSuspend|canTriggerDynamicSimulation|canUnloadInCombat|canVehicleCargo|captive|captiveNum|cbChecked|cbSetChecked|ceil|channelEnabled|cheatsEnabled|checkAIFeature|checkVisibility|civilian|className|clear3DENAttribute|clear3DENInventory|clearAllItemsFromBackpack|clearBackpackCargo|clearBackpackCargoGlobal|clearForcesRTD|clearGroupIcons|clearItemCargo|clearItemCargoGlobal|clearItemPool|clearMagazineCargo|clearMagazineCargoGlobal|clearMagazinePool|clearOverlay|clearRadio|clearVehicleInit|clearWeaponCargo|clearWeaponCargoGlobal|clearWeaponPool|clientOwner|closeDialog|closeDisplay|closeOverlay|collapseObjectTree|collect3DENHistory|collectiveRTD|combatMode|commandArtilleryFire|commandChat|commander|commandFire|commandFollow|commandFSM|commandGetOut|commandingMenu|commandMove|commandRadio|commandStop|commandSuppressiveFire|commandTarget|commandWatch|comment|commitOverlay|compile|compileFinal|completedFSM|composeText|configClasses|configFile|configHierarchy|configName|configNull|configProperties|configSourceAddonList|configSourceMod|configSourceModList|confirmSensorTarget|connectTerminalToUAV|controlNull|controlsGroupCtrl|copyFromClipboard|copyToClipboard|copyWaypoints|cos|count|countEnemy|countFriendly|countSide|countType|countUnknown|create3DENComposition|create3DENEntity|createAgent|createCenter|createDialog|createDiaryLink|createDiaryRecord|createDiarySubject|createDisplay|createGearDialog|createGroup|createGuardedPoint|createLocation|createMarker|createMarkerLocal|createMenu|createMine|createMissionDisplay|createMPCampaignDisplay|createSimpleObject|createSimpleTask|createSite|createSoundSource|createTask|createTeam|createTrigger|createUnit|createVehicle|createVehicleCrew|createVehicleLocal|crew|ctAddHeader|ctAddRow|ctClear|ctCurSel|ctData|ctFindHeaderRows|ctFindRowHeader|ctHeaderControls|ctHeaderCount|ctRemoveHeaders|ctRemoveRows|ctrlActivate|ctrlAddEventHandler|ctrlAngle|ctrlAutoScrollDelay|ctrlAutoScrollRewind|ctrlAutoScrollSpeed|ctrlChecked|ctrlClassName|ctrlCommit|ctrlCommitted|ctrlCreate|ctrlDelete|ctrlEnable|ctrlEnabled|ctrlFade|ctrlHTMLLoaded|ctrlIDC|ctrlIDD|ctrlMapAnimAdd|ctrlMapAnimClear|ctrlMapAnimCommit|ctrlMapAnimDone|ctrlMapCursor|ctrlMapMouseOver|ctrlMapScale|ctrlMapScreenToWorld|ctrlMapWorldToScreen|ctrlModel|ctrlModelDirAndUp|ctrlModelScale|ctrlParent|ctrlParentControlsGroup|ctrlPosition|ctrlRemoveAllEventHandlers|ctrlRemoveEventHandler|ctrlScale|ctrlSetActiveColor|ctrlSetAngle|ctrlSetAutoScrollDelay|ctrlSetAutoScrollRewind|ctrlSetAutoScrollSpeed|ctrlSetBackgroundColor|ctrlSetChecked|ctrlSetDisabledColor|ctrlSetEventHandler|ctrlSetFade|ctrlSetFocus|ctrlSetFont|ctrlSetFontH1|ctrlSetFontH1B|ctrlSetFontH2|ctrlSetFontH2B|ctrlSetFontH3|ctrlSetFontH3B|ctrlSetFontH4|ctrlSetFontH4B|ctrlSetFontH5|ctrlSetFontH5B|ctrlSetFontH6|ctrlSetFontH6B|ctrlSetFontHeight|ctrlSetFontHeightH1|ctrlSetFontHeightH2|ctrlSetFontHeightH3|ctrlSetFontHeightH4|ctrlSetFontHeightH5|ctrlSetFontHeightH6|ctrlSetFontHeightSecondary|ctrlSetFontP|ctrlSetFontPB|ctrlSetFontSecondary|ctrlSetForegroundColor|ctrlSetModel|ctrlSetModelDirAndUp|ctrlSetModelScale|ctrlSetPixelPrecision|ctrlSetPosition|ctrlSetScale|ctrlSetStructuredText|ctrlSetText|ctrlSetTextColor|ctrlSetTextColorSecondary|ctrlSetTextSecondary|ctrlSetTooltip|ctrlSetTooltipColorBox|ctrlSetTooltipColorShade|ctrlSetTooltipColorText|ctrlShow|ctrlShown|ctrlText|ctrlTextHeight|ctrlTextSecondary|ctrlTextWidth|ctrlType|ctrlVisible|ctRowControls|ctRowCount|ctSetCurSel|ctSetData|ctSetHeaderTemplate|ctSetRowTemplate|ctSetValue|ctValue|curatorAddons|curatorCamera|curatorCameraArea|curatorCameraAreaCeiling|curatorCoef|curatorEditableObjects|curatorEditingArea|curatorEditingAreaType|curatorMouseOver|curatorPoints|curatorRegisteredObjects|curatorSelected|curatorWaypointCost|current3DENOperation|currentChannel|currentCommand|currentMagazine|currentMagazineDetail|currentMagazineDetailTurret|currentMagazineTurret|currentMuzzle|currentNamespace|currentTask|currentTasks|currentThrowable|currentVisionMode|currentWaypoint|currentWeapon|currentWeaponMode|currentWeaponTurret|currentZeroing|cursorObject|cursorTarget|customChat|customRadio|cutFadeOut|cutObj|cutRsc|cutText|damage|date|dateToNumber|daytime|deActivateKey|debriefingText|debugFSM|debugLog|deg|delete3DENEntities|deleteAt|deleteCenter|deleteCollection|deleteEditorObject|deleteGroup|deleteGroupWhenEmpty|deleteIdentity|deleteLocation|deleteMarker|deleteMarkerLocal|deleteRange|deleteResources|deleteSite|deleteStatus|deleteTeam|deleteVehicle|deleteVehicleCrew|deleteWaypoint|detach|detectedMines|diag_activeMissionFSMs|diag_activeScripts|diag_activeSQFScripts|diag_activeSQSScripts|diag_captureFrame|diag_captureFrameToFile|diag_captureSlowFrame|diag_codePerformance|diag_drawMode|diag_dynamicSimulationEnd|diag_enable|diag_enabled|diag_fps|diag_fpsMin|diag_frameNo|diag_lightNewLoad|diag_list|diag_log|diag_logSlowFrame|diag_mergeConfigFile|diag_recordTurretLimits|diag_setLightNew|diag_tickTime|diag_toggle|dialog|diarySubjectExists|didJIP|didJIPOwner|difficulty|difficultyEnabled|difficultyEnabledRTD|difficultyOption|direction|directSay|disableAI|disableCollisionWith|disableConversation|disableDebriefingStats|disableMapIndicators|disableNVGEquipment|disableRemoteSensors|disableSerialization|disableTIEquipment|disableUAVConnectability|disableUserInput|displayAddEventHandler|displayCtrl|displayNull|displayParent|displayRemoveAllEventHandlers|displayRemoveEventHandler|displaySetEventHandler|dissolveTeam|distance|distance2D|distanceSqr|distributionRegion|do3DENAction|doArtilleryFire|doFire|doFollow|doFSM|doGetOut|doMove|doorPhase|doStop|doSuppressiveFire|doTarget|doWatch|drawArrow|drawEllipse|drawIcon|drawIcon3D|drawLine|drawLine3D|drawLink|drawLocation|drawPolygon|drawRectangle|drawTriangle|driver|drop|dynamicSimulationDistance|dynamicSimulationDistanceCoef|dynamicSimulationEnabled|dynamicSimulationSystemEnabled|east|edit3DENMissionAttributes|editObject|editorSetEventHandler|effectiveCommander|emptyPositions|enableAI|enableAIFeature|enableAimPrecision|enableAttack|enableAudioFeature|enableAutoStartUpRTD|enableAutoTrimRTD|enableCamShake|enableCaustics|enableChannel|enableCollisionWith|enableCopilot|enableDebriefingStats|enableDiagLegend|enableDynamicSimulation|enableDynamicSimulationSystem|enableEndDialog|enableEngineArtillery|enableEnvironment|enableFatigue|enableGunLights|enableInfoPanelComponent|enableIRLasers|enableMimics|enablePersonTurret|enableRadio|enableReload|enableRopeAttach|enableSatNormalOnDetail|enableSaving|enableSentences|enableSimulation|enableSimulationGlobal|enableStamina|enableStressDamage|enableTeamSwitch|enableTraffic|enableUAVConnectability|enableUAVWaypoints|enableVehicleCargo|enableVehicleSensor|enableWeaponDisassembly|endl|endLoadingScreen|endMission|engineOn|enginesIsOnRTD|enginesPowerRTD|enginesRpmRTD|enginesTorqueRTD|entities|environmentEnabled|estimatedEndServerTime|estimatedTimeLeft|evalObjectArgument|everyBackpack|everyContainer|exec|execEditorScript|exp|expectedDestination|exportJIPMessages|eyeDirection|eyePos|face|faction|fadeMusic|fadeRadio|fadeSound|fadeSpeech|failMission|fillWeaponsFromPool|find|findCover|findDisplay|findEditorObject|findEmptyPosition|findEmptyPositionReady|findIf|findNearestEnemy|finishMissionInit|finite|fire|fireAtTarget|firstBackpack|flag|flagAnimationPhase|flagOwner|flagSide|flagTexture|fleeing|floor|flyInHeight|flyInHeightASL|fog|fogForecast|fogParams|forceAddUniform|forceAtPositionRTD|forcedMap|forceEnd|forceFlagTexture|forceFollowRoad|forceGeneratorRTD|forceMap|forceRespawn|forceSpeed|forceWalk|forceWeaponFire|forceWeatherChange|forgetTarget|format|formation|formationDirection|formationLeader|formationMembers|formationPosition|formationTask|formatText|formLeader|freeLook|fromEditor|fuel|fullCrew|gearIDCAmmoCount|gearSlotAmmoCount|gearSlotData|get3DENActionState|get3DENAttribute|get3DENCamera|get3DENConnections|get3DENEntity|get3DENEntityID|get3DENGrid|get3DENIconsVisible|get3DENLayerEntities|get3DENLinesVisible|get3DENMissionAttribute|get3DENMouseOver|get3DENSelected|getAimingCoef|getAllEnvSoundControllers|getAllHitPointsDamage|getAllOwnedMines|getAllSoundControllers|getAmmoCargo|getAnimAimPrecision|getAnimSpeedCoef|getArray|getArtilleryAmmo|getArtilleryComputerSettings|getArtilleryETA|getAssignedCuratorLogic|getAssignedCuratorUnit|getBackpackCargo|getBleedingRemaining|getBurningValue|getCameraViewDirection|getCargoIndex|getCenterOfMass|getClientState|getClientStateNumber|getCompatiblePylonMagazines|getConnectedUAV|getContainerMaxLoad|getCursorObjectParams|getCustomAimCoef|getDammage|getDescription|getDir|getDirVisual|getDLCAssetsUsage|getDLCAssetsUsageByName|getDLCs|getDLCUsageTime|getEditorCamera|getEditorMode|getEditorObjectScope|getElevationOffset|getEngineTargetRpmRTD|getEnvSoundController|getFatigue|getFieldManualStartPage|getForcedFlagTexture|getFriend|getFSMVariable|getFuelCargo|getGroupIcon|getGroupIconParams|getGroupIcons|getHideFrom|getHit|getHitIndex|getHitPointDamage|getItemCargo|getMagazineCargo|getMarkerColor|getMarkerPos|getMarkerSize|getMarkerType|getMass|getMissionConfig|getMissionConfigValue|getMissionDLCs|getMissionLayerEntities|getMissionLayers|getModelInfo|getMousePosition|getMusicPlayedTime|getNumber|getObjectArgument|getObjectChildren|getObjectDLC|getObjectMaterials|getObjectProxy|getObjectTextures|getObjectType|getObjectViewDistance|getOxygenRemaining|getPersonUsedDLCs|getPilotCameraDirection|getPilotCameraPosition|getPilotCameraRotation|getPilotCameraTarget|getPlateNumber|getPlayerChannel|getPlayerScores|getPlayerUID|getPlayerUIDOld|getPos|getPosASL|getPosASLVisual|getPosASLW|getPosATL|getPosATLVisual|getPosVisual|getPosWorld|getPylonMagazines|getRelDir|getRelPos|getRemoteSensorsDisabled|getRepairCargo|getResolution|getRotorBrakeRTD|getShadowDistance|getShotParents|getSlingLoad|getSoundController|getSoundControllerResult|getSpeed|getStamina|getStatValue|getSuppression|getTerrainGrid|getTerrainHeightASL|getText|getTotalDLCUsageTime|getTrimOffsetRTD|getUnitLoadout|getUnitTrait|getUserMFDText|getUserMFDValue|getVariable|getVehicleCargo|getWeaponCargo|getWeaponSway|getWingsOrientationRTD|getWingsPositionRTD|getWPPos|glanceAt|globalChat|globalRadio|goggles|group|groupChat|groupFromNetId|groupIconSelectable|groupIconsVisible|groupId|groupOwner|groupRadio|groupSelectedUnits|groupSelectUnit|grpNull|gunner|gusts|halt|handgunItems|handgunMagazine|handgunWeapon|handsHit|hasInterface|hasPilotCamera|hasWeapon|hcAllGroups|hcGroupParams|hcLeader|hcRemoveAllGroups|hcRemoveGroup|hcSelected|hcSelectGroup|hcSetGroup|hcShowBar|hcShownBar|headgear|hideBody|hideObject|hideObjectGlobal|hideSelection|hint|hintC|hintCadet|hintSilent|hmd|hostMission|htmlLoad|HUDMovementLevels|humidity|image|importAllGroups|importance|in|inArea|inAreaArray|incapacitatedState|independent|inflame|inflamed|infoPanel|infoPanelComponentEnabled|infoPanelComponents|infoPanels|inGameUISetEventHandler|inheritsFrom|initAmbientLife|inPolygon|inputAction|inRangeOfArtillery|insertEditorObject|intersect|is3DEN|is3DENMultiplayer|isAbleToBreathe|isAgent|isAimPrecisionEnabled|isArray|isAutoHoverOn|isAutonomous|isAutoStartUpEnabledRTD|isAutotest|isAutoTrimOnRTD|isBleeding|isBurning|isClass|isCollisionLightOn|isCopilotEnabled|isDamageAllowed|isDedicated|isDLCAvailable|isEngineOn|isEqualTo|isEqualType|isEqualTypeAll|isEqualTypeAny|isEqualTypeArray|isEqualTypeParams|isFilePatchingEnabled|isFlashlightOn|isFlatEmpty|isForcedWalk|isFormationLeader|isGroupDeletedWhenEmpty|isHidden|isInRemainsCollector|isInstructorFigureEnabled|isIRLaserOn|isKeyActive|isKindOf|isLaserOn|isLightOn|isLocalized|isManualFire|isMarkedForCollection|isMultiplayer|isMultiplayerSolo|isNil|isNull|isNumber|isObjectHidden|isObjectRTD|isOnRoad|isPipEnabled|isPlayer|isRealTime|isRemoteExecuted|isRemoteExecutedJIP|isServer|isShowing3DIcons|isSimpleObject|isSprintAllowed|isStaminaEnabled|isSteamMission|isStreamFriendlyUIEnabled|isStressDamageEnabled|isText|isTouchingGround|isTurnedOut|isTutHintsEnabled|isUAVConnectable|isUAVConnected|isUIContext|isUniformAllowed|isVehicleCargo|isVehicleRadarOn|isVehicleSensorEnabled|isWalking|isWeaponDeployed|isWeaponRested|itemCargo|items|itemsWithMagazines|join|joinAs|joinAsSilent|joinSilent|joinString|kbAddDatabase|kbAddDatabaseTargets|kbAddTopic|kbHasTopic|kbReact|kbRemoveTopic|kbTell|kbWasSaid|keyImage|keyName|knowsAbout|land|landAt|landResult|language|laserTarget|lbAdd|lbClear|lbColor|lbColorRight|lbCurSel|lbData|lbDelete|lbIsSelected|lbPicture|lbPictureRight|lbSelection|lbSetColor|lbSetColorRight|lbSetCurSel|lbSetData|lbSetPicture|lbSetPictureColor|lbSetPictureColorDisabled|lbSetPictureColorSelected|lbSetPictureRight|lbSetPictureRightColor|lbSetPictureRightColorDisabled|lbSetPictureRightColorSelected|lbSetSelectColor|lbSetSelectColorRight|lbSetSelected|lbSetText|lbSetTextRight|lbSetTooltip|lbSetValue|lbSize|lbSort|lbSortByValue|lbText|lbTextRight|lbValue|leader|leaderboardDeInit|leaderboardGetRows|leaderboardInit|leaderboardRequestRowsFriends|leaderboardRequestRowsGlobal|leaderboardRequestRowsGlobalAroundUser|leaderboardsRequestUploadScore|leaderboardsRequestUploadScoreKeepBest|leaderboardState|leaveVehicle|libraryCredits|libraryDisclaimers|lifeState|lightAttachObject|lightDetachObject|lightIsOn|lightnings|limitSpeed|linearConversion|lineBreak|lineIntersects|lineIntersectsObjs|lineIntersectsSurfaces|lineIntersectsWith|linkItem|list|listObjects|listRemoteTargets|listVehicleSensors|ln|lnbAddArray|lnbAddColumn|lnbAddRow|lnbClear|lnbColor|lnbColorRight|lnbCurSelRow|lnbData|lnbDeleteColumn|lnbDeleteRow|lnbGetColumnsPosition|lnbPicture|lnbPictureRight|lnbSetColor|lnbSetColorRight|lnbSetColumnsPos|lnbSetCurSelRow|lnbSetData|lnbSetPicture|lnbSetPictureColor|lnbSetPictureColorRight|lnbSetPictureColorSelected|lnbSetPictureColorSelectedRight|lnbSetPictureRight|lnbSetText|lnbSetTextRight|lnbSetValue|lnbSize|lnbSort|lnbSortByValue|lnbText|lnbTextRight|lnbValue|load|loadAbs|loadBackpack|loadFile|loadGame|loadIdentity|loadMagazine|loadOverlay|loadStatus|loadUniform|loadVest|local|localize|locationNull|locationPosition|lock|lockCameraTo|lockCargo|lockDriver|locked|lockedCargo|lockedDriver|lockedTurret|lockIdentity|lockTurret|lockWP|log|logEntities|logNetwork|logNetworkTerminate|lookAt|lookAtPos|magazineCargo|magazines|magazinesAllTurrets|magazinesAmmo|magazinesAmmoCargo|magazinesAmmoFull|magazinesDetail|magazinesDetailBackpack|magazinesDetailUniform|magazinesDetailVest|magazinesTurret|magazineTurretAmmo|mapAnimAdd|mapAnimClear|mapAnimCommit|mapAnimDone|mapCenterOnCamera|mapGridPosition|markAsFinishedOnSteam|markerAlpha|markerBrush|markerColor|markerDir|markerPos|markerShape|markerSize|markerText|markerType|max|members|menuAction|menuAdd|menuChecked|menuClear|menuCollapse|menuData|menuDelete|menuEnable|menuEnabled|menuExpand|menuHover|menuPicture|menuSetAction|menuSetCheck|menuSetData|menuSetPicture|menuSetValue|menuShortcut|menuShortcutText|menuSize|menuSort|menuText|menuURL|menuValue|min|mineActive|mineDetectedBy|missionConfigFile|missionDifficulty|missionName|missionNamespace|missionStart|missionVersion|modelToWorld|modelToWorldVisual|modelToWorldVisualWorld|modelToWorldWorld|modParams|moonIntensity|moonPhase|morale|move|move3DENCamera|moveInAny|moveInCargo|moveInCommander|moveInDriver|moveInGunner|moveInTurret|moveObjectToEnd|moveOut|moveTime|moveTo|moveToCompleted|moveToFailed|musicVolume|name|nameSound|nearEntities|nearestBuilding|nearestLocation|nearestLocations|nearestLocationWithDubbing|nearestObject|nearestObjects|nearestTerrainObjects|nearObjects|nearObjectsReady|nearRoads|nearSupplies|nearTargets|needReload|netId|netObjNull|newOverlay|nextMenuItemIndex|nextWeatherChange|nMenuItems|numberOfEnginesRTD|numberToDate|objectCurators|objectFromNetId|objectParent|objNull|objStatus|onBriefingGear|onBriefingGroup|onBriefingNotes|onBriefingPlan|onBriefingTeamSwitch|onCommandModeChanged|onDoubleClick|onEachFrame|onGroupIconClick|onGroupIconOverEnter|onGroupIconOverLeave|onHCGroupSelectionChanged|onMapSingleClick|onPlayerConnected|onPlayerDisconnected|onPreloadFinished|onPreloadStarted|onShowNewObject|onTeamSwitch|openCuratorInterface|openDLCPage|openDSInterface|openMap|openSteamApp|openYoutubeVideo|opfor|orderGetIn|overcast|overcastForecast|owner|param|params|parseNumber|parseSimpleArray|parseText|parsingNamespace|particlesQuality|pi|pickWeaponPool|pitch|pixelGrid|pixelGridBase|pixelGridNoUIScale|pixelH|pixelW|playableSlotsNumber|playableUnits|playAction|playActionNow|player|playerRespawnTime|playerSide|playersNumber|playGesture|playMission|playMove|playMoveNow|playMusic|playScriptedMission|playSound|playSound3D|position|positionCameraToWorld|posScreenToWorld|posWorldToScreen|ppEffectAdjust|ppEffectCommit|ppEffectCommitted|ppEffectCreate|ppEffectDestroy|ppEffectEnable|ppEffectEnabled|ppEffectForceInNVG|precision|preloadCamera|preloadObject|preloadSound|preloadTitleObj|preloadTitleRsc|primaryWeapon|primaryWeaponItems|primaryWeaponMagazine|priority|processDiaryLink|processInitCommands|productVersion|profileName|profileNamespace|profileNameSteam|progressLoadingScreen|progressPosition|progressSetPosition|publicVariable|publicVariableClient|publicVariableServer|pushBack|pushBackUnique|putWeaponPool|queryItemsPool|queryMagazinePool|queryWeaponPool|rad|radioChannelAdd|radioChannelCreate|radioChannelRemove|radioChannelSetCallSign|radioChannelSetLabel|radioVolume|rain|rainbow|random|rank|rankId|rating|rectangular|registeredTasks|registerTask|reload|reloadEnabled|remoteControl|remoteExec|remoteExecCall|remoteExecutedOwner|remove3DENConnection|remove3DENEventHandler|remove3DENLayer|removeAction|removeAll3DENEventHandlers|removeAllActions|removeAllAssignedItems|removeAllContainers|removeAllCuratorAddons|removeAllCuratorCameraAreas|removeAllCuratorEditingAreas|removeAllEventHandlers|removeAllHandgunItems|removeAllItems|removeAllItemsWithMagazines|removeAllMissionEventHandlers|removeAllMPEventHandlers|removeAllMusicEventHandlers|removeAllOwnedMines|removeAllPrimaryWeaponItems|removeAllWeapons|removeBackpack|removeBackpackGlobal|removeCuratorAddons|removeCuratorCameraArea|removeCuratorEditableObjects|removeCuratorEditingArea|removeDrawIcon|removeDrawLinks|removeEventHandler|removeFromRemainsCollector|removeGoggles|removeGroupIcon|removeHandgunItem|removeHeadgear|removeItem|removeItemFromBackpack|removeItemFromUniform|removeItemFromVest|removeItems|removeMagazine|removeMagazineGlobal|removeMagazines|removeMagazinesTurret|removeMagazineTurret|removeMenuItem|removeMissionEventHandler|removeMPEventHandler|removeMusicEventHandler|removeOwnedMine|removePrimaryWeaponItem|removeSecondaryWeaponItem|removeSimpleTask|removeSwitchableUnit|removeTeamMember|removeUniform|removeVest|removeWeapon|removeWeaponAttachmentCargo|removeWeaponCargo|removeWeaponGlobal|removeWeaponTurret|reportRemoteTarget|requiredVersion|resetCamShake|resetSubgroupDirection|resistance|resize|resources|respawnVehicle|restartEditorCamera|reveal|revealMine|reverse|reversedMouseY|roadAt|roadsConnectedTo|roleDescription|ropeAttachedObjects|ropeAttachedTo|ropeAttachEnabled|ropeAttachTo|ropeCreate|ropeCut|ropeDestroy|ropeDetach|ropeEndPosition|ropeLength|ropes|ropeUnwind|ropeUnwound|rotorsForcesRTD|rotorsRpmRTD|round|runInitScript|safeZoneH|safeZoneW|safeZoneWAbs|safeZoneX|safeZoneXAbs|safeZoneY|save3DENInventory|saveGame|saveIdentity|saveJoysticks|saveOverlay|saveProfileNamespace|saveStatus|saveVar|savingEnabled|say|say2D|say3D|score|scoreSide|screenshot|screenToWorld|scriptDone|scriptName|scriptNull|scudState|secondaryWeapon|secondaryWeaponItems|secondaryWeaponMagazine|select|selectBestPlaces|selectDiarySubject|selectedEditorObjects|selectEditorObject|selectionNames|selectionPosition|selectLeader|selectMax|selectMin|selectNoPlayer|selectPlayer|selectRandom|selectRandomWeighted|selectWeapon|selectWeaponTurret|sendAUMessage|sendSimpleCommand|sendTask|sendTaskResult|sendUDPMessage|serverCommand|serverCommandAvailable|serverCommandExecutable|serverName|serverTime|set|set3DENAttribute|set3DENAttributes|set3DENGrid|set3DENIconsVisible|set3DENLayer|set3DENLinesVisible|set3DENLogicType|set3DENMissionAttribute|set3DENMissionAttributes|set3DENModelsVisible|set3DENObjectType|set3DENSelected|setAccTime|setActualCollectiveRTD|setAirplaneThrottle|setAirportSide|setAmmo|setAmmoCargo|setAmmoOnPylon|setAnimSpeedCoef|setAperture|setApertureNew|setArmoryPoints|setAttributes|setAutonomous|setBehaviour|setBleedingRemaining|setBrakesRTD|setCameraInterest|setCamShakeDefParams|setCamShakeParams|setCamUseTI|setCaptive|setCenterOfMass|setCollisionLight|setCombatMode|setCompassOscillation|setConvoySeparation|setCuratorCameraAreaCeiling|setCuratorCoef|setCuratorEditingAreaType|setCuratorWaypointCost|setCurrentChannel|setCurrentTask|setCurrentWaypoint|setCustomAimCoef|setCustomWeightRTD|setDamage|setDammage|setDate|setDebriefingText|setDefaultCamera|setDestination|setDetailMapBlendPars|setDir|setDirection|setDrawIcon|setDriveOnPath|setDropInterval|setDynamicSimulationDistance|setDynamicSimulationDistanceCoef|setEditorMode|setEditorObjectScope|setEffectCondition|setEngineRpmRTD|setFace|setFaceAnimation|setFatigue|setFeatureType|setFlagAnimationPhase|setFlagOwner|setFlagSide|setFlagTexture|setFog|setForceGeneratorRTD|setFormation|setFormationTask|setFormDir|setFriend|setFromEditor|setFSMVariable|setFuel|setFuelCargo|setGroupIcon|setGroupIconParams|setGroupIconsSelectable|setGroupIconsVisible|setGroupId|setGroupIdGlobal|setGroupOwner|setGusts|setHideBehind|setHit|setHitIndex|setHitPointDamage|setHorizonParallaxCoef|setHUDMovementLevels|setIdentity|setImportance|setInfoPanel|setLeader|setLightAmbient|setLightAttenuation|setLightBrightness|setLightColor|setLightDayLight|setLightFlareMaxDistance|setLightFlareSize|setLightIntensity|setLightnings|setLightUseFlare|setLocalWindParams|setMagazineTurretAmmo|setMarkerAlpha|setMarkerAlphaLocal|setMarkerBrush|setMarkerBrushLocal|setMarkerColor|setMarkerColorLocal|setMarkerDir|setMarkerDirLocal|setMarkerPos|setMarkerPosLocal|setMarkerShape|setMarkerShapeLocal|setMarkerSize|setMarkerSizeLocal|setMarkerText|setMarkerTextLocal|setMarkerType|setMarkerTypeLocal|setMass|setMimic|setMousePosition|setMusicEffect|setMusicEventHandler|setName|setNameSound|setObjectArguments|setObjectMaterial|setObjectMaterialGlobal|setObjectProxy|setObjectTexture|setObjectTextureGlobal|setObjectViewDistance|setOvercast|setOwner|setOxygenRemaining|setParticleCircle|setParticleClass|setParticleFire|setParticleParams|setParticleRandom|setPilotCameraDirection|setPilotCameraRotation|setPilotCameraTarget|setPilotLight|setPiPEffect|setPitch|setPlateNumber|setPlayable|setPlayerRespawnTime|setPos|setPosASL|setPosASL2|setPosASLW|setPosATL|setPosition|setPosWorld|setPylonLoadOut|setPylonsPriority|setRadioMsg|setRain|setRainbow|setRandomLip|setRank|setRectangular|setRepairCargo|setRotorBrakeRTD|setShadowDistance|setShotParents|setSide|setSimpleTaskAlwaysVisible|setSimpleTaskCustomData|setSimpleTaskDescription|setSimpleTaskDestination|setSimpleTaskTarget|setSimpleTaskType|setSimulWeatherLayers|setSize|setSkill|setSlingLoad|setSoundEffect|setSpeaker|setSpeech|setSpeedMode|setStamina|setStaminaScheme|setStatValue|setSuppression|setSystemOfUnits|setTargetAge|setTaskMarkerOffset|setTaskResult|setTaskState|setTerrainGrid|setText|setTimeMultiplier|setTitleEffect|setToneMapping|setToneMappingParams|setTrafficDensity|setTrafficDistance|setTrafficGap|setTrafficSpeed|setTriggerActivation|setTriggerArea|setTriggerStatements|setTriggerText|setTriggerTimeout|setTriggerType|setType|setUnconscious|setUnitAbility|setUnitLoadout|setUnitPos|setUnitPosWeak|setUnitRank|setUnitRecoilCoefficient|setUnitTrait|setUnloadInCombat|setUserActionText|setUserMFDText|setUserMFDValue|setVariable|setVectorDir|setVectorDirAndUp|setVectorUp|setVehicleAmmo|setVehicleAmmoDef|setVehicleArmor|setVehicleCargo|setVehicleId|setVehicleInit|setVehicleLock|setVehiclePosition|setVehicleRadar|setVehicleReceiveRemoteTargets|setVehicleReportOwnPosition|setVehicleReportRemoteTargets|setVehicleTIPars|setVehicleVarName|setVelocity|setVelocityModelSpace|setVelocityTransformation|setViewDistance|setVisibleIfTreeCollapsed|setWantedRpmRTD|setWaves|setWaypointBehaviour|setWaypointCombatMode|setWaypointCompletionRadius|setWaypointDescription|setWaypointForceBehaviour|setWaypointFormation|setWaypointHousePosition|setWaypointLoiterRadius|setWaypointLoiterType|setWaypointName|setWaypointPosition|setWaypointScript|setWaypointSpeed|setWaypointStatements|setWaypointTimeout|setWaypointType|setWaypointVisible|setWeaponReloadingTime|setWind|setWindDir|setWindForce|setWindStr|setWingForceScaleRTD|setWPPos|show3DIcons|showChat|showCinemaBorder|showCommandingMenu|showCompass|showCuratorCompass|showGPS|showHUD|showLegend|showMap|shownArtilleryComputer|shownChat|shownCompass|shownCuratorCompass|showNewEditorObject|shownGPS|shownHUD|shownMap|shownPad|shownRadio|shownScoretable|shownUAVFeed|shownWarrant|shownWatch|showPad|showRadio|showScoretable|showSubtitles|showUAVFeed|showWarrant|showWatch|showWaypoint|showWaypoints|side|sideAmbientLife|sideChat|sideEmpty|sideEnemy|sideFriendly|sideLogic|sideRadio|sideUnknown|simpleTasks|simulationEnabled|simulCloudDensity|simulCloudOcclusion|simulInClouds|simulWeatherSync|sin|size|sizeOf|skill|skillFinal|skipTime|sleep|sliderPosition|sliderRange|sliderSetPosition|sliderSetRange|sliderSetSpeed|sliderSpeed|slingLoadAssistantShown|soldierMagazines|someAmmo|sort|soundVolume|speaker|speed|speedMode|splitString|sqrt|squadParams|stance|startLoadingScreen|stop|stopEngineRTD|stopped|str|sunOrMoon|supportInfo|suppressFor|surfaceIsWater|surfaceNormal|surfaceType|swimInDepth|switchableUnits|switchAction|switchCamera|switchGesture|switchLight|switchMove|synchronizedObjects|synchronizedTriggers|synchronizedWaypoints|synchronizeObjectsAdd|synchronizeObjectsRemove|synchronizeTrigger|synchronizeWaypoint|systemChat|systemOfUnits|tan|targetKnowledge|targets|targetsAggregate|targetsQuery|taskAlwaysVisible|taskChildren|taskCompleted|taskCustomData|taskDescription|taskDestination|taskHint|taskMarkerOffset|taskNull|taskParent|taskResult|taskState|taskType|teamMember|teamMemberNull|teamName|teams|teamSwitch|teamSwitchEnabled|teamType|terminate|terrainIntersect|terrainIntersectASL|terrainIntersectAtASL|text|textLog|textLogFormat|tg|time|timeMultiplier|titleCut|titleFadeOut|titleObj|titleRsc|titleText|toArray|toFixed|toLower|toString|toUpper|triggerActivated|triggerActivation|triggerArea|triggerAttachedVehicle|triggerAttachObject|triggerAttachVehicle|triggerDynamicSimulation|triggerStatements|triggerText|triggerTimeout|triggerTimeoutCurrent|triggerType|turretLocal|turretOwner|turretUnit|tvAdd|tvClear|tvCollapse|tvCollapseAll|tvCount|tvCurSel|tvData|tvDelete|tvExpand|tvExpandAll|tvPicture|tvPictureRight|tvSetColor|tvSetCurSel|tvSetData|tvSetPicture|tvSetPictureColor|tvSetPictureColorDisabled|tvSetPictureColorSelected|tvSetPictureRight|tvSetPictureRightColor|tvSetPictureRightColorDisabled|tvSetPictureRightColorSelected|tvSetSelectColor|tvSetText|tvSetTooltip|tvSetValue|tvSort|tvSortByValue|tvText|tvTooltip|tvValue|type|typeName|typeOf|UAVControl|uiNamespace|uiSleep|unassignCurator|unassignItem|unassignTeam|unassignVehicle|underwater|uniform|uniformContainer|uniformItems|uniformMagazines|unitAddons|unitAimPosition|unitAimPositionVisual|unitBackpack|unitIsUAV|unitPos|unitReady|unitRecoilCoefficient|units|unitsBelowHeight|unlinkItem|unlockAchievement|unregisterTask|updateDrawIcon|updateMenuItem|updateObjectTree|useAIOperMapObstructionTest|useAISteeringComponent|useAudioTimeForMoves|userInputDisabled|vectorAdd|vectorCos|vectorCrossProduct|vectorDiff|vectorDir|vectorDirVisual|vectorDistance|vectorDistanceSqr|vectorDotProduct|vectorFromTo|vectorMagnitude|vectorMagnitudeSqr|vectorModelToWorld|vectorModelToWorldVisual|vectorMultiply|vectorNormalized|vectorUp|vectorUpVisual|vectorWorldToModel|vectorWorldToModelVisual|vehicle|vehicleCargoEnabled|vehicleChat|vehicleRadio|vehicleReceiveRemoteTargets|vehicleReportOwnPosition|vehicleReportRemoteTargets|vehicles|vehicleVarName|velocity|velocityModelSpace|verifySignature|vest|vestContainer|vestItems|vestMagazines|viewDistance|visibleCompass|visibleGPS|visibleMap|visiblePosition|visiblePositionASL|visibleScoretable|visibleWatch|waitUntil|waves|waypointAttachedObject|waypointAttachedVehicle|waypointAttachObject|waypointAttachVehicle|waypointBehaviour|waypointCombatMode|waypointCompletionRadius|waypointDescription|waypointForceBehaviour|waypointFormation|waypointHousePosition|waypointLoiterRadius|waypointLoiterType|waypointName|waypointPosition|waypoints|waypointScript|waypointsEnabledUAV|waypointShow|waypointSpeed|waypointStatements|waypointTimeout|waypointTimeoutCurrent|waypointType|waypointVisible|weaponAccessories|weaponAccessoriesCargo|weaponCargo|weaponDirection|weaponInertia|weaponLowered|weapons|weaponsItems|weaponsItemsCargo|weaponState|weaponsTurret|weightRTD|west|WFSideText|wind|windDir|windRTD|windStr|wingsForcesRTD|worldName|worldSize|worldToModel|worldToModelVisual|worldToScreen)\b/i,number:/(?:\$|\b0x)[\da-f]+\b|(?:\B\.\d+|\b\d+(?:\.\d+)?)(?:e[+-]?\d+)?\b/i,operator:/##|>>|&&|\|\||[!=<>]=?|[-+*/%#^]|\b(?:and|mod|not|or)\b/i,"magic-variable":{pattern:/\b(?:this|thisList|thisTrigger|_exception|_fnc_scriptName|_fnc_scriptNameParent|_forEachIndex|_this|_thisEventHandler|_thisFSM|_thisScript|_x)\b/i,alias:"keyword"},constant:/\bDIK(?:_[a-z\d]+)+\b/i}),e.languages.insertBefore("sqf","string",{macro:{pattern:/(^[ \t]*)#[a-z](?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{directive:{pattern:/#[a-z]+\b/i,alias:"keyword"},comment:e.languages.sqf.comment}}}),delete e.languages.sqf["class-name"]}e.exports=n,n.displayName="sqf",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.squirrel=e.languages.extend("clike",{comment:[e.languages.clike.comment[0],{pattern:/(^|[^\\:])(?:\/\/|#).*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^\\"'@])(?:@"(?:[^"]|"")*"(?!")|"(?:[^\\\r\n"]|\\.)*")/,lookbehind:!0,greedy:!0},"class-name":{pattern:/(\b(?:class|enum|extends|instanceof)\s+)\w+(?:\.\w+)*/,lookbehind:!0,inside:{punctuation:/\./}},keyword:/\b(?:__FILE__|__LINE__|base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield)\b/,number:/\b(?:0x[0-9a-fA-F]+|\d+(?:\.(?:\d+|[eE][+-]?\d+))?)\b/,operator:/\+\+|--|<=>|<[-<]|>>>?|&&?|\|\|?|[-+*/%!=<>]=?|[~^]|::?/,punctuation:/[(){}\[\],;.]/}),e.languages.insertBefore("squirrel","string",{char:{pattern:/(^|[^\\"'])'(?:[^\\']|\\(?:[xuU][0-9a-fA-F]{0,8}|[\s\S]))'/,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("squirrel","operator",{"attribute-punctuation":{pattern:/<\/|\/>/,alias:"important"},lambda:{pattern:/@(?=\()/,alias:"operator"}})}e.exports=n,n.displayName="squirrel",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\b(?:algebra_solver|algebra_solver_newton|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect|ode_(?:adams|bdf|ckrk|rk45)(?:_tol)?|ode_adjoint_tol_ctl|reduce_sum|reduce_sum_static)\b/;e.languages.stan={comment:/\/\/.*|\/\*[\s\S]*?\*\/|#(?!include).*/,string:{pattern:/"[\x20\x21\x23-\x5B\x5D-\x7E]*"/,greedy:!0},directive:{pattern:/^([ \t]*)#include\b.*/m,lookbehind:!0,alias:"property"},"function-arg":{pattern:RegExp("("+t.source+/\s*\(\s*/.source+")"+/[a-zA-Z]\w*/.source),lookbehind:!0,alias:"function"},constraint:{pattern:/(\b(?:int|matrix|real|row_vector|vector)\s*)<[^<>]*>/,lookbehind:!0,inside:{expression:{pattern:/(=\s*)\S(?:\S|\s+(?!\s))*?(?=\s*(?:>$|,\s*\w+\s*=))/,lookbehind:!0,inside:null},property:/\b[a-z]\w*(?=\s*=)/i,operator:/=/,punctuation:/^<|>$|,/}},keyword:[{pattern:/\bdata(?=\s*\{)|\b(?:functions|generated|model|parameters|quantities|transformed)\b/,alias:"program-block"},/\b(?:array|break|cholesky_factor_corr|cholesky_factor_cov|complex|continue|corr_matrix|cov_matrix|data|else|for|if|in|increment_log_prob|int|matrix|ordered|positive_ordered|print|real|reject|return|row_vector|simplex|target|unit_vector|vector|void|while)\b/,t],function:/\b[a-z]\w*(?=\s*\()/i,number:/(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:E[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,boolean:/\b(?:false|true)\b/,operator:/<-|\.[*/]=?|\|\|?|&&|[!=<>+\-*/]=?|['^%~?:]/,punctuation:/[()\[\]{},;]/},e.languages.stan.constraint.inside.expression.inside=e.languages.stan}(e)}e.exports=n,n.displayName="stan",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},n={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:r,punctuation:/[{}()\[\];:,]/};n.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:n}},n.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:n}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:n}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:n}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:n}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:n.interpolation}},rest:n}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:n.interpolation,comment:n.comment,punctuation:/[{},]/}},func:n.func,string:n.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:n.interpolation,punctuation:/[{}()\[\];:.]/}}(e)}e.exports=n,n.displayName="stylus",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach((function(t){t.inside.interpolation.inside=e.languages.swift}))}e.exports=n,n.displayName="swift",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t={pattern:/^[;#].*/m,greedy:!0},r=/"(?:[^\r\n"\\]|\\(?:[^\r]|\r\n?))*"(?!\S)/.source;e.languages.systemd={comment:t,section:{pattern:/^\[[^\n\r\[\]]*\](?=[ \t]*$)/m,greedy:!0,inside:{punctuation:/^\[|\]$/,"section-name":{pattern:/[\s\S]+/,alias:"selector"}}},key:{pattern:/^[^\s=]+(?=[ \t]*=)/m,greedy:!0,alias:"attr-name"},value:{pattern:RegExp(/(=[ \t]*(?!\s))/.source+"(?:"+r+'|(?=[^"\r\n]))(?:'+/[^\s\\]/.source+'|[ \t]+(?:(?![ \t"])|'+r+")|"+/\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;])/.source+")*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:t,quoted:{pattern:RegExp(/(^|\s)/.source+r),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},punctuation:/=/}}(e)}e.exports=n,n.displayName="systemd",n.aliases=[]},function(e,t,r){"use strict";var n=r(1072),a=r(812);function i(e){e.register(n),e.register(a),e.languages.t4=e.languages["t4-cs"]=e.languages["t4-templating"].createT4("csharp")}e.exports=i,i.displayName="t4Cs",i.aliases=[]},function(e,t,r){"use strict";var n=r(1072),a=r(1561);function i(e){e.register(n),e.register(a),e.languages["t4-vb"]=e.languages["t4-templating"].createT4("vbnet")}e.exports=i,i.displayName="t4Vb",i.aliases=[]},function(e,t,r){"use strict";var n=r(1562);function a(e){e.register(n),e.languages.tap={fail:/not ok[^#{\n\r]*/,pass:/ok[^#{\n\r]*/,pragma:/pragma [+-][a-z]+/,bailout:/bail out!.*/i,version:/TAP version \d+/i,plan:/\b\d+\.\.\d+(?: +#.*)?/,subtest:{pattern:/# Subtest(?:: .*)?/,greedy:!0},punctuation:/[{}]/,directive:/#.*/,yamlish:{pattern:/(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,lookbehind:!0,inside:e.languages.yaml,alias:"language-yaml"}}}e.exports=a,a.displayName="tap",a.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.tcl={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,greedy:!0},variable:[{pattern:/(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/,lookbehind:!0},{pattern:/(\$)\{[^}]+\}/,lookbehind:!0},{pattern:/(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m,lookbehind:!0}],function:{pattern:/(^[\t ]*proc[ \t]+)\S+/m,lookbehind:!0},builtin:[{pattern:/(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m,lookbehind:!0},/\b(?:else|elseif)\b/],scope:{pattern:/(^[\t ]*)(?:global|upvar|variable)\b/m,lookbehind:!0,alias:"constant"},keyword:{pattern:/(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,lookbehind:!0},operator:/!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/,punctuation:/[{}()\[\]]/}}e.exports=n,n.displayName="tcl",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source,r=/\)|\((?![^|()\n]+\))/.source;function n(e,n){return RegExp(e.replace(//g,(function(){return"(?:"+t+")"})).replace(//g,(function(){return"(?:"+r+")"})),n||"")}var a={css:{pattern:/\{[^{}]+\}/,inside:{rest:e.languages.css}},"class-id":{pattern:/(\()[^()]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\[\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},i=e.languages.textile=e.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:n(/^[a-z]\w*(?:||[<>=])*\./.source),inside:{modifier:{pattern:n(/(^[a-z]\w*)(?:||[<>=])+(?=\.)/.source),lookbehind:!0,inside:a},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:n(/^[*#]+*\s+\S.*/.source,"m"),inside:{modifier:{pattern:n(/(^[*#]+)+/.source),lookbehind:!0,inside:a},punctuation:/^[*#]+/}},table:{pattern:n(/^(?:(?:||[<>=^~])+\.\s*)?(?:\|(?:(?:||[<>=^~_]|[\\/]\d+)+\.|(?!(?:||[<>=^~_]|[\\/]\d+)+\.))[^|]*)+\|/.source,"m"),inside:{modifier:{pattern:n(/(^|\|(?:\r?\n|\r)?)(?:||[<>=^~_]|[\\/]\d+)+(?=\.)/.source),lookbehind:!0,inside:a},punctuation:/\||^\./}},inline:{pattern:n(/(^|[^a-zA-Z\d])(\*\*|__|\?\?|[*_%@+\-^~])*.+?\2(?![a-zA-Z\d])/.source),lookbehind:!0,inside:{bold:{pattern:n(/(^(\*\*?)*).+?(?=\2)/.source),lookbehind:!0},italic:{pattern:n(/(^(__?)*).+?(?=\2)/.source),lookbehind:!0},cite:{pattern:n(/(^\?\?*).+?(?=\?\?)/.source),lookbehind:!0,alias:"string"},code:{pattern:n(/(^@*).+?(?=@)/.source),lookbehind:!0,alias:"keyword"},inserted:{pattern:n(/(^\+*).+?(?=\+)/.source),lookbehind:!0},deleted:{pattern:n(/(^-*).+?(?=-)/.source),lookbehind:!0},span:{pattern:n(/(^%*).+?(?=%)/.source),lookbehind:!0},modifier:{pattern:n(/(^\*\*|__|\?\?|[*_%@+\-^~])+/.source),lookbehind:!0,inside:a},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(^\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:n(/"*[^"]+":.+?(?=[^\w/]?(?:\s|$))/.source),inside:{text:{pattern:n(/(^"*)[^"]+(?=")/.source),lookbehind:!0},modifier:{pattern:n(/(^")+/.source),lookbehind:!0,inside:a},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:n(/!(?:||[<>=])*(?![<>=])[^!\s()]+(?:\([^)]+\))?!(?::.+?(?=[^\w/]?(?:\s|$)))?/.source),inside:{source:{pattern:n(/(^!(?:||[<>=])*)(?![<>=])[^!\s()]+(?:\([^)]+\))?(?=!)/.source),lookbehind:!0,alias:"url"},modifier:{pattern:n(/(^!)(?:||[<>=])+/.source),lookbehind:!0,inside:a},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^()]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:C|R|TM)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),o=i.phrase.inside,s={inline:o.inline,link:o.link,image:o.image,footnote:o.footnote,acronym:o.acronym,mark:o.mark};i.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var c=o.inline.inside;c.bold.inside=s,c.italic.inside=s,c.inserted.inside=s,c.deleted.inside=s,c.span.inside=s;var u=o.table.inside;u.inline=s.inline,u.link=s.link,u.image=s.image,u.footnote=s.footnote,u.acronym=s.acronym,u.mark=s.mark}(e)}e.exports=n,n.displayName="textile",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function r(e){return e.replace(/__/g,(function(){return t}))}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(r(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(r(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}}(e)}e.exports=n,n.displayName="toml",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{regex:{pattern:/(^re)\|[\s\S]+/,lookbehind:!0},function:/^\w+/,value:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0b[01_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?>?=?|(?:absent|and|not|or|present|xor)\b/,punctuation:/::|[;\[\]()\{\},.:]/};var t=/#\{(?:[^"{}]|\{[^{}]*\}|"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*")*\}/.source;e.languages.tremor["interpolated-string"]={pattern:RegExp(/(^|[^\\])/.source+'(?:"""(?:'+/[^"\\#]|\\[\s\S]|"(?!"")|#(?!\{)/.source+"|"+t+')*"""|"(?:'+/[^"\\\r\n#]|\\(?:\r\n|[\s\S])|#(?!\{)/.source+"|"+t+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(t),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.tremor}}},string:/[\s\S]+/}},e.languages.troy=e.languages.tremor,e.languages.trickle=e.languages.tremor}(e)}e.exports=n,n.displayName="tremor",n.aliases=[]},function(e,t,r){"use strict";var n=r(1559),a=r(1069);function i(e){e.register(n),e.register(a),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var r=e.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0}(e)}e.exports=i,i.displayName="tsx",i.aliases=[]},function(e,t,r){"use strict";var n=r(256);function a(e){e.register(n),function(e){e.languages.tt2=e.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),e.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/,variable:{pattern:/\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i}}),e.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%\]$/,alias:"punctuation"}}),e.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete e.languages.tt2.string,e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"tt2",/\[%[\s\S]+?%\]/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"tt2")}))}(e)}e.exports=a,a.displayName="tt2",a.aliases=[]},function(e,t,r){"use strict";var n=r(256);function a(e){e.register(n),e.languages.twig={comment:/^\{#[\s\S]*?#\}$/,"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/}},keyword:/\b(?:even|if|odd)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/},e.hooks.add("before-tokenize",(function(t){if("twig"===t.language){e.languages["markup-templating"].buildPlaceholders(t,"twig",/\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g)}})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"twig")}))}e.exports=a,a.displayName="twig",a.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/;e.languages.typoscript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^"'])#.*/,lookbehind:!0,greedy:!0}],function:[{pattern://,inside:{string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,inside:{keyword:t}},keyword:{pattern:/INCLUDE_TYPOSCRIPT/}}},{pattern:/@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/,inside:{string:/"[^"\r\n]*"|'[^'\r\n]*'/}}],string:{pattern:/^([^=]*=[< ]?)(?:(?!\]\n).)*/,lookbehind:!0,inside:{function:/\{\$.*\}/,keyword:t,number:/^\d+$/,punctuation:/[,|:]/}},keyword:t,number:{pattern:/\b\d+\s*[.{=]/,inside:{operator:/[.{=]/}},tag:{pattern:/\.?[-\w\\]+\.?/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:|]/,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/},e.languages.tsconfig=e.languages.typoscript}(e)}e.exports=n,n.displayName="typoscript",n.aliases=["tsconfig"]},function(e,t,r){"use strict";function n(e){e.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},e.languages.uc=e.languages.uscript=e.languages.unrealscript}e.exports=n,n.displayName="unrealscript",n.aliases=["uc","uscript"]},function(e,t,r){"use strict";function n(e){e.languages.uorazor={"comment-hash":{pattern:/#.*/,alias:"comment",greedy:!0},"comment-slash":{pattern:/\/\/.*/,alias:"comment",greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/},greedy:!0},"source-layers":{pattern:/\b(?:arms|backpack|blue|bracelet|cancel|clear|cloak|criminal|earrings|enemy|facialhair|friend|friendly|gloves|gray|grey|ground|hair|head|innerlegs|innertorso|innocent|lefthand|middletorso|murderer|neck|nonfriendly|onehandedsecondary|outerlegs|outertorso|pants|red|righthand|ring|self|shirt|shoes|talisman|waist)\b/i,alias:"function"},"source-commands":{pattern:/\b(?:alliance|attack|cast|clearall|clearignore|clearjournal|clearlist|clearsysmsg|createlist|createtimer|dclick|dclicktype|dclickvar|dress|dressconfig|drop|droprelloc|emote|getlabel|guild|gumpclose|gumpresponse|hotkey|ignore|lasttarget|lift|lifttype|menu|menuresponse|msg|org|organize|organizer|overhead|pause|poplist|potion|promptresponse|pushlist|removelist|removetimer|rename|restock|say|scav|scavenger|script|setability|setlasttarget|setskill|settimer|setvar|sysmsg|target|targetloc|targetrelloc|targettype|undress|unignore|unsetvar|useobject|useonce|useskill|usetype|virtue|wait|waitforgump|waitformenu|waitforprompt|waitforstat|waitforsysmsg|waitfortarget|walk|wfsysmsg|wft|whisper|yell)\b/,alias:"function"},"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},function:/\b(?:atlist|close|closest|count|counter|counttype|dead|dex|diffhits|diffmana|diffstam|diffweight|find|findbuff|finddebuff|findlayer|findtype|findtypelist|followers|gumpexists|hidden|hits|hp|hue|human|humanoid|ingump|inlist|insysmessage|insysmsg|int|invul|lhandempty|list|listexists|mana|maxhits|maxhp|maxmana|maxstam|maxweight|monster|mounted|name|next|noto|paralyzed|poisoned|position|prev|previous|queued|rand|random|rhandempty|skill|stam|str|targetexists|timer|timerexists|varexist|warmode|weight)\b/,keyword:/\b(?:and|as|break|continue|else|elseif|endfor|endif|endwhile|for|if|loop|not|or|replay|stop|while)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/}}e.exports=n,n.displayName="uorazor",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.uri={scheme:{pattern:/^[a-z][a-z0-9+.-]*:/im,greedy:!0,inside:{"scheme-delimiter":/:$/}},fragment:{pattern:/#[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"fragment-delimiter":/^#/}},query:{pattern:/\?[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"query-delimiter":{pattern:/^\?/,greedy:!0},"pair-delimiter":/[&;]/,pair:{pattern:/^[^=][\s\S]*/,inside:{key:/^[^=]+/,value:{pattern:/(^=)[\s\S]+/,lookbehind:!0}}}}},authority:{pattern:RegExp(/^\/\//.source+/(?:[\w\-.~!$&'()*+,;=%:]*@)?/.source+"(?:"+/\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\.[\w\-.~!$&'()*+,;=]+)\]/.source+"|"+/[\w\-.~!$&'()*+,;=%]*/.source+")"+/(?::\d*)?/.source,"m"),inside:{"authority-delimiter":/^\/\//,"user-info-segment":{pattern:/^[\w\-.~!$&'()*+,;=%:]*@/,inside:{"user-info-delimiter":/@$/,"user-info":/^[\w\-.~!$&'()*+,;=%:]+/}},"port-segment":{pattern:/:\d*$/,inside:{"port-delimiter":/^:/,port:/^\d+/}},host:{pattern:/[\s\S]+/,inside:{"ip-literal":{pattern:/^\[[\s\S]+\]$/,inside:{"ip-literal-delimiter":/^\[|\]$/,"ipv-future":/^v[\s\S]+/,"ipv6-address":/^[\s\S]+/}},"ipv4-address":/^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]\d{0,2})$/}}}},path:{pattern:/^[\w\-.~!$&'()*+,;=%:@/]+/m,inside:{"path-separator":/\//}}},e.languages.url=e.languages.uri}e.exports=n,n.displayName="uri",n.aliases=["url"]},function(e,t,r){"use strict";function n(e){!function(e){var t={pattern:/[\s\S]+/,inside:null};e.languages.v=e.languages.extend("clike",{string:{pattern:/r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,alias:"quoted-string",greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/,lookbehind:!0,inside:{"interpolation-variable":{pattern:/^\$\w[\s\S]*$/,alias:"variable"},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},"interpolation-expression":t}}}},"class-name":{pattern:/(\b(?:enum|interface|struct|type)\s+)(?:C\.)?\w+/,lookbehind:!0},keyword:/(?:\b(?:__global|as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:else|for|if)|#(?:flag|include))\b/,number:/\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i,operator:/~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/,builtin:/\b(?:any(?:_float|_int)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|64|128|nt)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/}),t.inside=e.languages.v,e.languages.insertBefore("v","string",{char:{pattern:/`(?:\\`|\\?[^`]{1,2})`/,alias:"rune"}}),e.languages.insertBefore("v","operator",{attribute:{pattern:/(^[\t ]*)\[(?:deprecated|direct_array_access|flag|inline|live|ref_only|typedef|unsafe_fn|windows_stdcall)\]/m,lookbehind:!0,alias:"annotation",inside:{punctuation:/[\[\]]/,keyword:/\w+/}},generic:{pattern:/<\w+>(?=\s*[\)\{])/,inside:{punctuation:/[<>]/,"class-name":/\w+/}}}),e.languages.insertBefore("v","function",{"generic-function":{pattern:/\b\w+\s*<\w+>(?=\()/,inside:{function:/^\w+/,generic:{pattern:/<\w+>/,inside:e.languages.v.generic.inside}}}})}(e)}e.exports=n,n.displayName="v",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.vala=e.languages.extend("clike",{"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|enum|interface|new|struct)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],keyword:/\b(?:abstract|as|assert|async|base|bool|break|case|catch|char|class|const|construct|continue|default|delegate|delete|do|double|dynamic|else|ensures|enum|errordomain|extern|finally|float|for|foreach|get|if|in|inline|int|int16|int32|int64|int8|interface|internal|is|lock|long|namespace|new|null|out|override|owned|params|private|protected|public|ref|requires|return|set|short|signal|sizeof|size_t|ssize_t|static|string|struct|switch|this|throw|throws|try|typeof|uchar|uint|uint16|uint32|uint64|uint8|ulong|unichar|unowned|ushort|using|value|var|virtual|void|volatile|weak|while|yield)\b/i,function:/\b\w+(?=\s*\()/,number:/(?:\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,operator:/\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/,constant:/\b[A-Z0-9_]+\b/}),e.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:e.languages.vala}},string:/[\s\S]+/}}}),e.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\//,"regex-flags":/^[a-z]+$/}}})}e.exports=n,n.displayName="vala",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.velocity=e.languages.extend("markup",{});var t={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/};t.variable.inside={string:t.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:t.number,boolean:t.boolean,punctuation:t.punctuation},e.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:t}},variable:t.variable}),e.languages.velocity.tag.inside["attr-value"].inside.rest=e.languages.velocity}(e)}e.exports=n,n.displayName="velocity",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.verilog={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"kernel-function":{pattern:/\B\$\w+\b/,alias:"property"},constant:/\B`\w+\b/,function:/\b\w+(?=\()/,keyword:/\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|cell|chandle|class|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endsequence|endspecify|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/,important:/\b(?:always|always_comb|always_ff|always_latch)\b(?: *@)?/,number:/\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b(?:\d*[._])?\d+(?:e[-+]?\d+)?/i,operator:/[-+{}^~%*\/?=!<>&|]+/,punctuation:/[[\];(),.:]/}}e.exports=n,n.displayName="verilog",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:library|use)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}}e.exports=n,n.displayName="vhdl",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,function:/\b\w+(?=\()/,keyword:/\b(?:N|Next|P|Print|X|XMLent|XMLns|ab|abbreviate|abc|abclear|abo|aboveleft|al|all|ar|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|args|argu|argument|as|ascii|b|bN|bNext|ba|bad|badd|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bo|botright|bp|bprevious|br|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|brewind|bro|browse|bufdo|buffer|buffers|bun|bunload|bw|bwipeout|c|cN|cNext|cNfcNfile|ca|cabbrev|cabc|cabclear|cad|caddb|caddbuffer|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cg|cgetb|cgetbuffer|cgete|cgetexpr|cgetfile|change|changes|chd|chdir|che|checkpath|checkt|checktime|cl|cla|clast|clist|clo|close|cmapc|cmapclear|cn|cnew|cnewer|cnext|cnf|cnfile|cnorea|cnoreabbrev|co|col|colder|colo|colorscheme|comc|comclear|comp|compiler|con|conf|confirm|continue|cope|copen|copy|cp|cpf|cpfile|cprevious|cq|cquit|cr|crewind|cu|cuna|cunabbrev|cunmap|cw|cwindow|d|debugg|debuggreedy|delc|delcommand|delete|delf|delfunction|delm|delmarks|di|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|e|earlier|echoe|echoerr|echom|echomsg|echon|edit|el|else|elsei|elseif|em|emenu|en|endf|endfo|endfor|endfun|endfunction|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fin|fina|finally|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoc|folddoclosed|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|h|ha|hardcopy|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iu|iuna|iunabbrev|iunmap|j|join|ju|jumps|k|kee|keepalt|keepj|keepjumps|keepmarks|l|lN|lNext|lNf|lNfile|la|lad|laddb|laddbuffer|laddexpr|laddf|laddfile|lan|language|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|left|lefta|leftabove|let|lex|lexpr|lf|lfile|lfir|lfirst|lg|lgetb|lgetbuffer|lgete|lgetexpr|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|list|ll|lla|llast|lli|llist|lm|lmak|lmake|lmap|lmapc|lmapclear|ln|lne|lnew|lnewer|lnext|lnf|lnfile|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lpf|lpfile|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|ma|mak|make|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvie|mkview|mkvimrc|mod|mode|move|mz|mzf|mzfile|mzscheme|n|nbkey|new|next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|o|omapc|omapclear|on|only|open|opt|options|ou|ounmap|p|pc|pclose|pe|ped|pedit|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|print|prof|profd|profdel|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|ptN|ptNext|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|py|pyf|pyfile|python|q|qa|qall|quit|quita|quitall|r|read|rec|recover|red|redi|redir|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|rub|ruby|rubyd|rubydo|rubyf|rubyfile|runtime|rv|rviminfo|sN|sNext|sa|sal|sall|san|sandbox|sargument|sav|saveas|sb|sbN|sbNext|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbp|sbprevious|sbr|sbrewind|sbuffer|scrip|scripte|scriptencoding|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sl|sla|slast|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|so|sor|sort|source|sp|spe|spelld|spelldump|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|split|spr|sprevious|sre|srewind|st|sta|stag|star|startg|startgreplace|startinsert|startr|startreplace|stj|stjump|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tN|tNext|ta|tab|tabN|tabNext|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnew|tabnext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|una|unabbreviate|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|ve|verb|verbose|version|vert|vertical|vi|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|w|wN|wNext|wa|wall|wh|while|win|winc|wincmd|windo|winp|winpos|winsize|wn|wnext|wp|wprevious|wq|wqa|wqall|write|ws|wsverb|wv|wviminfo|x|xa|xall|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autocmd|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|t_AB|t_AF|t_AL|t_CS|t_CV|t_Ce|t_Co|t_Cs|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_IE|t_IS|t_K1|t_K3|t_K4|t_K5|t_K6|t_K7|t_K8|t_K9|t_KA|t_KB|t_KC|t_KD|t_KE|t_KF|t_KG|t_KH|t_KI|t_KJ|t_KK|t_KL|t_RI|t_RV|t_SI|t_Sb|t_Sf|t_WP|t_WS|t_ZH|t_ZR|t_al|t_bc|t_cd|t_ce|t_cl|t_cm|t_cs|t_da|t_db|t_dl|t_fs|t_k1|t_k2|t_k3|t_k4|t_k5|t_k6|t_k7|t_k8|t_k9|t_kB|t_kD|t_kI|t_kN|t_kP|t_kb|t_kd|t_ke|t_kh|t_kl|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_se|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_xs|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/}}e.exports=n,n.displayName="vim",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages["visual-basic"]={comment:{pattern:/(?:['\u2018\u2019]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["\u201c\u201d](?:["\u201c\u201d]{2}|[^"\u201c\u201d])*["\u201c\u201d]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},e.languages.vb=e.languages["visual-basic"],e.languages.vba=e.languages["visual-basic"]}e.exports=n,n.displayName="visualBasic",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:F|T|false|true)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/}}e.exports=n,n.displayName="warpscript",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}}e.exports=n,n.displayName="wasm",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){var t=/(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source,r="(?:"+/\b(?:unsigned\s+)?long\s+long(?![\w-])/.source+"|"+/\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source+"|"+/(?!(?:unrestricted|unsigned)\b)/.source+t+/(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source+")"+/(?:\s*\?)?/.source,n={};for(var a in e.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp(/(\bnamespace\s+)/.source+t),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:n},{pattern:RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source+r),lookbehind:!0,inside:n},{pattern:RegExp("("+/\bcallback\s+/.source+t+/\s*=\s*/.source+")"+r),lookbehind:!0,inside:n},{pattern:RegExp(/(\btypedef\b\s*)/.source+r),lookbehind:!0,inside:n},{pattern:RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source+t),lookbehind:!0},{pattern:RegExp(/(:\s*)/.source+t),lookbehind:!0},RegExp(t+/(?=\s+(?:implements|includes)\b)/.source),{pattern:RegExp(/(\b(?:implements|includes)\s+)/.source+t),lookbehind:!0},{pattern:RegExp(r+"(?="+/\s*(?:\.{3}\s*)?/.source+t+/\s*[(),;=]/.source+")"),inside:n}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/},e.languages["web-idl"])"class-name"!==a&&(n[a]=e.languages["web-idl"][a]);e.languages.webidl=e.languages["web-idl"]}(e)}e.exports=n,n.displayName="webIdl",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.wiki=e.languages.extend("markup",{"block-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},heading:{pattern:/^(=+)[^=\r\n].*?\1/m,inside:{punctuation:/^=+|=+$/,important:/.+/}},emphasis:{pattern:/('{2,5}).+?\1/,inside:{"bold-italic":{pattern:/(''''').+?(?=\1)/,lookbehind:!0,alias:["bold","italic"]},bold:{pattern:/(''')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},italic:{pattern:/('')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},punctuation:/^''+|''+$/}},hr:{pattern:/^-{4,}/m,alias:"punctuation"},url:[/ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:PMID|RFC) +\d+/i,/\[\[.+?\]\]|\[.+?\]/],variable:[/__[A-Z]+__/,/\{{3}.+?\}{3}/,/\{\{.+?\}\}/],symbol:[/^#redirect/im,/~{3,5}/],"table-tag":{pattern:/((?:^|[|!])[|!])[^|\r\n]+\|(?!\|)/m,lookbehind:!0,inside:{"table-bar":{pattern:/\|$/,alias:"punctuation"},rest:e.languages.markup.tag.inside}},punctuation:/^(?:\{\||\|\}|\|-|[*#:;!|])|\|\||!!/m}),e.languages.insertBefore("wiki","tag",{nowiki:{pattern:/<(nowiki|pre|source)\b[^>]*>[\s\S]*?<\/\1>/i,inside:{tag:{pattern:/<(?:nowiki|pre|source)\b[^>]*>|<\/(?:nowiki|pre|source)>/i,inside:e.languages.markup.tag.inside}}}})}e.exports=n,n.displayName="wiki",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.wolfram={comment:/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,context:{pattern:/\b\w+`+\w*/,alias:"class-name"},blank:{pattern:/\b\w+_\b/,alias:"regex"},"global-variable":{pattern:/\$\w+/,alias:"variable"},boolean:/\b(?:False|True)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.mathematica=e.languages.wolfram,e.languages.wl=e.languages.wolfram,e.languages.nb=e.languages.wolfram}e.exports=n,n.displayName="wolfram",n.aliases=["mathematica","wl","nb"]},function(e,t,r){"use strict";function n(e){e.languages.wren={comment:[{pattern:/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"string-literal":null,hashbang:{pattern:/^#!\/.+/,greedy:!0,alias:"comment"},attribute:{pattern:/#!?[ \t\u3000]*\w+/,alias:"keyword"},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},/\b[A-Z][a-z\d_]*\b/],constant:/\b[A-Z][A-Z\d_]*\b/,null:{pattern:/\bnull\b/,alias:"keyword"},keyword:/\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,function:/\b[a-z_]\w*(?=\s*[({])/i,operator:/<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/,punctuation:/[\[\](){}.,;]/},e.languages.wren["string-literal"]={pattern:/(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/,lookbehind:!0,inside:{expression:{pattern:/^(%\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:e.languages.wren},"interpolation-punctuation":{pattern:/^%\(|\)$/,alias:"punctuation"}}},string:/[\s\S]+/}}}e.exports=n,n.displayName="wren",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.xeora=e.languages.extend("markup",{constant:{pattern:/\$(?:DomainContents|PageRenderDuration)\$/,inside:{punctuation:{pattern:/\$/}}},variable:{pattern:/\$@?(?:#+|[-+*~=^])?[\w.]+\$/,inside:{punctuation:{pattern:/[$.]/},operator:{pattern:/#+|[-+*~=^@]/}}},"function-inline":{pattern:/\$F:[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\$/,inside:{variable:{pattern:/(?:[,|])@?(?:#+|[-+*~=^])?[\w.]+/,inside:{punctuation:{pattern:/[,.|]/},operator:{pattern:/#+|[-+*~=^@]/}}},punctuation:{pattern:/\$\w:|[$:?.,|]/}},alias:"function"},"function-block":{pattern:/\$XF:\{[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\}:XF\$/,inside:{punctuation:{pattern:/[$:{}?.,|]/}},alias:"function"},"directive-inline":{pattern:/\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\/\w.]+\$/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}}},alias:"function"},"directive-block-open":{pattern:/\$\w+:\{|\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\w.]+:\{(?:![A-Z]+)?/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}},attribute:{pattern:/![A-Z]+$/,inside:{punctuation:{pattern:/!/}},alias:"keyword"}},alias:"function"},"directive-block-separator":{pattern:/\}:[-\w.]+:\{/,inside:{punctuation:{pattern:/[:{}]/}},alias:"function"},"directive-block-close":{pattern:/\}:[-\w.]+\$/,inside:{punctuation:{pattern:/[:{}$]/}},alias:"function"}}),e.languages.insertBefore("inside","punctuation",{variable:e.languages.xeora["function-inline"].inside.variable},e.languages.xeora["function-block"]),e.languages.xeoracube=e.languages.xeora}(e)}e.exports=n,n.displayName="xeora",n.aliases=["xeoracube"]},function(e,t,r){"use strict";function n(e){!function(e){function t(t,r){e.languages[t]&&e.languages.insertBefore(t,"comment",{"doc-comment":r})}var r=e.languages.markup.tag,n={pattern:/\/\/\/.*/,greedy:!0,alias:"comment",inside:{tag:r}},a={pattern:/'''.*/,greedy:!0,alias:"comment",inside:{tag:r}};t("csharp",n),t("fsharp",n),t("vbnet",a)}(e)}e.exports=n,n.displayName="xmlDoc",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,greedy:!0},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],directive:{pattern:/#(?:Else|ElseIf|Endif|If|Pragma)\b/i,alias:"property"},keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,punctuation:/[.,;:()]/}}e.exports=n,n.displayName="xojo",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){e.languages.xquery=e.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),e.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,e.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,e.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,e.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:e.languages.xquery,alias:"language-xquery"};var t=function e(t){return"string"===typeof t?t:"string"===typeof t.content?t.content:t.content.map(e).join("")},r=function r(n){for(var a=[],i=0;i0&&a[a.length-1].tagName===t(o.content[0].content[1])&&a.pop():"/>"===o.content[o.content.length-1].content||a.push({tagName:t(o.content[0].content[1]),openedBraces:0}):!(a.length>0&&"punctuation"===o.type&&"{"===o.content)||n[i+1]&&"punctuation"===n[i+1].type&&"{"===n[i+1].content||n[i-1]&&"plain-text"===n[i-1].type&&"{"===n[i-1].content?a.length>0&&a[a.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?a[a.length-1].openedBraces--:"comment"!==o.type&&(s=!0):a[a.length-1].openedBraces++),(s||"string"===typeof o)&&a.length>0&&0===a[a.length-1].openedBraces){var c=t(o);i0&&("string"===typeof n[i-1]||"plain-text"===n[i-1].type)&&(c=t(n[i-1])+c,n.splice(i-1,1),i--),/^\s+$/.test(c)?n[i]=c:n[i]=new e.Token("plain-text",c,null,c)}o.content&&"string"!==typeof o.content&&r(o.content)}};e.hooks.add("after-tokenize",(function(e){"xquery"===e.language&&r(e.tokens)}))}(e)}e.exports=n,n.displayName="xquery",n.aliases=[]},function(e,t,r){"use strict";function n(e){e.languages.yang={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"(?:[^\\"]|\\.)*"|'[^']*'/,greedy:!0},keyword:{pattern:/(^|[{};\r\n][ \t]*)[a-z_][\w.-]*/i,lookbehind:!0},namespace:{pattern:/(\s)[a-z_][\w.-]*(?=:)/i,lookbehind:!0},boolean:/\b(?:false|true)\b/,operator:/\+/,punctuation:/[{};:]/}}e.exports=n,n.displayName="yang",n.aliases=[]},function(e,t,r){"use strict";function n(e){!function(e){function t(e){return function(){return e}}var r=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,n="\\b(?!"+r.source+")(?!\\d)\\w+\\b",a=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,i="(?!\\s)(?:!?\\s*(?:"+/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(//g,t(a))+"\\s*)*"+/(?:\bpromise\b|(?:\berror\.)?(?:\.)*(?!\s+))/.source.replace(//g,t(n))+")+";e.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)(?=\s*(?:\s*)?[=;,)])|(?=\s*(?:\s*)?\{)/.source.replace(//g,t(i)).replace(//g,t(a))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)(?=\s*(?:\s*)?;)/.source.replace(//g,t(i)).replace(//g,t(a))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:r,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},e.languages.zig["class-name"].forEach((function(t){null===t.inside&&(t.inside=e.languages.zig)}))}(e)}e.exports=n,n.displayName="zig",n.aliases=[]},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n=0||(a[r]=e[r]);return a},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(1563);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(1563);e.exports=function(e,t){if(e){if("string"===typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},,,function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return Er})),r.d(t,"VERSION",(function(){return a.e})),r.d(t,"restArguments",(function(){return i})),r.d(t,"isObject",(function(){return o})),r.d(t,"isNull",(function(){return s})),r.d(t,"isUndefined",(function(){return c})),r.d(t,"isBoolean",(function(){return u})),r.d(t,"isElement",(function(){return f})),r.d(t,"isString",(function(){return l})),r.d(t,"isNumber",(function(){return h})),r.d(t,"isDate",(function(){return p})),r.d(t,"isRegExp",(function(){return b})),r.d(t,"isError",(function(){return m})),r.d(t,"isSymbol",(function(){return g})),r.d(t,"isArrayBuffer",(function(){return v})),r.d(t,"isDataView",(function(){return k})),r.d(t,"isArray",(function(){return B})),r.d(t,"isFunction",(function(){return w})),r.d(t,"isArguments",(function(){return O})),r.d(t,"isFinite",(function(){return M})),r.d(t,"isNaN",(function(){return D})),r.d(t,"isTypedArray",(function(){return L})),r.d(t,"isEmpty",(function(){return H})),r.d(t,"isMatch",(function(){return z})),r.d(t,"isEqual",(function(){return J})),r.d(t,"isMap",(function(){return ie})),r.d(t,"isWeakMap",(function(){return oe})),r.d(t,"isSet",(function(){return se})),r.d(t,"isWeakSet",(function(){return ce})),r.d(t,"keys",(function(){return G})),r.d(t,"allKeys",(function(){return X})),r.d(t,"values",(function(){return ue})),r.d(t,"pairs",(function(){return fe})),r.d(t,"invert",(function(){return de})),r.d(t,"functions",(function(){return le})),r.d(t,"methods",(function(){return le})),r.d(t,"extend",(function(){return pe})),r.d(t,"extendOwn",(function(){return be})),r.d(t,"assign",(function(){return be})),r.d(t,"defaults",(function(){return me})),r.d(t,"create",(function(){return ve})),r.d(t,"clone",(function(){return ye})),r.d(t,"tap",(function(){return Ae})),r.d(t,"get",(function(){return _e})),r.d(t,"has",(function(){return Ce})),r.d(t,"mapObject",(function(){return Te})),r.d(t,"identity",(function(){return ke})),r.d(t,"constant",(function(){return T})),r.d(t,"noop",(function(){return Fe})),r.d(t,"toPath",(function(){return we})),r.d(t,"property",(function(){return Ie})),r.d(t,"propertyOf",(function(){return Re})),r.d(t,"matcher",(function(){return Be})),r.d(t,"matches",(function(){return Be})),r.d(t,"times",(function(){return Pe})),r.d(t,"random",(function(){return Ne})),r.d(t,"now",(function(){return je})),r.d(t,"escape",(function(){return Qe})),r.d(t,"unescape",(function(){return Ge})),r.d(t,"templateSettings",(function(){return He})),r.d(t,"template",(function(){return Ye})),r.d(t,"result",(function(){return Je})),r.d(t,"uniqueId",(function(){return Ze})),r.d(t,"chain",(function(){return $e})),r.d(t,"iteratee",(function(){return Me})),r.d(t,"partial",(function(){return rt})),r.d(t,"bind",(function(){return nt})),r.d(t,"bindAll",(function(){return ot})),r.d(t,"memoize",(function(){return st})),r.d(t,"delay",(function(){return ct})),r.d(t,"defer",(function(){return ut})),r.d(t,"throttle",(function(){return ft})),r.d(t,"debounce",(function(){return dt})),r.d(t,"wrap",(function(){return lt})),r.d(t,"negate",(function(){return ht})),r.d(t,"compose",(function(){return pt})),r.d(t,"after",(function(){return bt})),r.d(t,"before",(function(){return mt})),r.d(t,"once",(function(){return gt})),r.d(t,"findKey",(function(){return vt})),r.d(t,"findIndex",(function(){return At})),r.d(t,"findLastIndex",(function(){return wt})),r.d(t,"sortedIndex",(function(){return xt})),r.d(t,"indexOf",(function(){return _t})),r.d(t,"lastIndexOf",(function(){return Ct})),r.d(t,"find",(function(){return kt})),r.d(t,"detect",(function(){return kt})),r.d(t,"findWhere",(function(){return Bt})),r.d(t,"each",(function(){return It})),r.d(t,"forEach",(function(){return It})),r.d(t,"map",(function(){return St})),r.d(t,"collect",(function(){return St})),r.d(t,"reduce",(function(){return Mt})),r.d(t,"foldl",(function(){return Mt})),r.d(t,"inject",(function(){return Mt})),r.d(t,"reduceRight",(function(){return Dt})),r.d(t,"foldr",(function(){return Dt})),r.d(t,"filter",(function(){return Tt})),r.d(t,"select",(function(){return Tt})),r.d(t,"reject",(function(){return Ft})),r.d(t,"every",(function(){return Rt})),r.d(t,"all",(function(){return Rt})),r.d(t,"some",(function(){return Pt})),r.d(t,"any",(function(){return Pt})),r.d(t,"contains",(function(){return Nt})),r.d(t,"includes",(function(){return Nt})),r.d(t,"include",(function(){return Nt})),r.d(t,"invoke",(function(){return jt})),r.d(t,"pluck",(function(){return Lt})),r.d(t,"where",(function(){return Ut})),r.d(t,"max",(function(){return Qt})),r.d(t,"min",(function(){return Gt})),r.d(t,"shuffle",(function(){return Kt})),r.d(t,"sample",(function(){return qt})),r.d(t,"sortBy",(function(){return Vt})),r.d(t,"groupBy",(function(){return Yt})),r.d(t,"indexBy",(function(){return Jt})),r.d(t,"countBy",(function(){return Xt})),r.d(t,"partition",(function(){return Zt})),r.d(t,"toArray",(function(){return zt})),r.d(t,"size",(function(){return $t})),r.d(t,"pick",(function(){return tr})),r.d(t,"omit",(function(){return rr})),r.d(t,"first",(function(){return ar})),r.d(t,"head",(function(){return ar})),r.d(t,"take",(function(){return ar})),r.d(t,"initial",(function(){return nr})),r.d(t,"last",(function(){return or})),r.d(t,"rest",(function(){return ir})),r.d(t,"tail",(function(){return ir})),r.d(t,"drop",(function(){return ir})),r.d(t,"compact",(function(){return sr})),r.d(t,"flatten",(function(){return cr})),r.d(t,"without",(function(){return fr})),r.d(t,"uniq",(function(){return dr})),r.d(t,"unique",(function(){return dr})),r.d(t,"union",(function(){return lr})),r.d(t,"intersection",(function(){return hr})),r.d(t,"difference",(function(){return ur})),r.d(t,"unzip",(function(){return pr})),r.d(t,"transpose",(function(){return pr})),r.d(t,"zip",(function(){return br})),r.d(t,"object",(function(){return mr})),r.d(t,"range",(function(){return gr})),r.d(t,"chunk",(function(){return vr})),r.d(t,"mixin",(function(){return Ar}));var n={};r.r(n),r.d(n,"VERSION",(function(){return a.e})),r.d(n,"restArguments",(function(){return i})),r.d(n,"isObject",(function(){return o})),r.d(n,"isNull",(function(){return s})),r.d(n,"isUndefined",(function(){return c})),r.d(n,"isBoolean",(function(){return u})),r.d(n,"isElement",(function(){return f})),r.d(n,"isString",(function(){return l})),r.d(n,"isNumber",(function(){return h})),r.d(n,"isDate",(function(){return p})),r.d(n,"isRegExp",(function(){return b})),r.d(n,"isError",(function(){return m})),r.d(n,"isSymbol",(function(){return g})),r.d(n,"isArrayBuffer",(function(){return v})),r.d(n,"isDataView",(function(){return k})),r.d(n,"isArray",(function(){return B})),r.d(n,"isFunction",(function(){return w})),r.d(n,"isArguments",(function(){return O})),r.d(n,"isFinite",(function(){return M})),r.d(n,"isNaN",(function(){return D})),r.d(n,"isTypedArray",(function(){return L})),r.d(n,"isEmpty",(function(){return H})),r.d(n,"isMatch",(function(){return z})),r.d(n,"isEqual",(function(){return J})),r.d(n,"isMap",(function(){return ie})),r.d(n,"isWeakMap",(function(){return oe})),r.d(n,"isSet",(function(){return se})),r.d(n,"isWeakSet",(function(){return ce})),r.d(n,"keys",(function(){return G})),r.d(n,"allKeys",(function(){return X})),r.d(n,"values",(function(){return ue})),r.d(n,"pairs",(function(){return fe})),r.d(n,"invert",(function(){return de})),r.d(n,"functions",(function(){return le})),r.d(n,"methods",(function(){return le})),r.d(n,"extend",(function(){return pe})),r.d(n,"extendOwn",(function(){return be})),r.d(n,"assign",(function(){return be})),r.d(n,"defaults",(function(){return me})),r.d(n,"create",(function(){return ve})),r.d(n,"clone",(function(){return ye})),r.d(n,"tap",(function(){return Ae})),r.d(n,"get",(function(){return _e})),r.d(n,"has",(function(){return Ce})),r.d(n,"mapObject",(function(){return Te})),r.d(n,"identity",(function(){return ke})),r.d(n,"constant",(function(){return T})),r.d(n,"noop",(function(){return Fe})),r.d(n,"toPath",(function(){return we})),r.d(n,"property",(function(){return Ie})),r.d(n,"propertyOf",(function(){return Re})),r.d(n,"matcher",(function(){return Be})),r.d(n,"matches",(function(){return Be})),r.d(n,"times",(function(){return Pe})),r.d(n,"random",(function(){return Ne})),r.d(n,"now",(function(){return je})),r.d(n,"escape",(function(){return Qe})),r.d(n,"unescape",(function(){return Ge})),r.d(n,"templateSettings",(function(){return He})),r.d(n,"template",(function(){return Ye})),r.d(n,"result",(function(){return Je})),r.d(n,"uniqueId",(function(){return Ze})),r.d(n,"chain",(function(){return $e})),r.d(n,"iteratee",(function(){return Me})),r.d(n,"partial",(function(){return rt})),r.d(n,"bind",(function(){return nt})),r.d(n,"bindAll",(function(){return ot})),r.d(n,"memoize",(function(){return st})),r.d(n,"delay",(function(){return ct})),r.d(n,"defer",(function(){return ut})),r.d(n,"throttle",(function(){return ft})),r.d(n,"debounce",(function(){return dt})),r.d(n,"wrap",(function(){return lt})),r.d(n,"negate",(function(){return ht})),r.d(n,"compose",(function(){return pt})),r.d(n,"after",(function(){return bt})),r.d(n,"before",(function(){return mt})),r.d(n,"once",(function(){return gt})),r.d(n,"findKey",(function(){return vt})),r.d(n,"findIndex",(function(){return At})),r.d(n,"findLastIndex",(function(){return wt})),r.d(n,"sortedIndex",(function(){return xt})),r.d(n,"indexOf",(function(){return _t})),r.d(n,"lastIndexOf",(function(){return Ct})),r.d(n,"find",(function(){return kt})),r.d(n,"detect",(function(){return kt})),r.d(n,"findWhere",(function(){return Bt})),r.d(n,"each",(function(){return It})),r.d(n,"forEach",(function(){return It})),r.d(n,"map",(function(){return St})),r.d(n,"collect",(function(){return St})),r.d(n,"reduce",(function(){return Mt})),r.d(n,"foldl",(function(){return Mt})),r.d(n,"inject",(function(){return Mt})),r.d(n,"reduceRight",(function(){return Dt})),r.d(n,"foldr",(function(){return Dt})),r.d(n,"filter",(function(){return Tt})),r.d(n,"select",(function(){return Tt})),r.d(n,"reject",(function(){return Ft})),r.d(n,"every",(function(){return Rt})),r.d(n,"all",(function(){return Rt})),r.d(n,"some",(function(){return Pt})),r.d(n,"any",(function(){return Pt})),r.d(n,"contains",(function(){return Nt})),r.d(n,"includes",(function(){return Nt})),r.d(n,"include",(function(){return Nt})),r.d(n,"invoke",(function(){return jt})),r.d(n,"pluck",(function(){return Lt})),r.d(n,"where",(function(){return Ut})),r.d(n,"max",(function(){return Qt})),r.d(n,"min",(function(){return Gt})),r.d(n,"shuffle",(function(){return Kt})),r.d(n,"sample",(function(){return qt})),r.d(n,"sortBy",(function(){return Vt})),r.d(n,"groupBy",(function(){return Yt})),r.d(n,"indexBy",(function(){return Jt})),r.d(n,"countBy",(function(){return Xt})),r.d(n,"partition",(function(){return Zt})),r.d(n,"toArray",(function(){return zt})),r.d(n,"size",(function(){return $t})),r.d(n,"pick",(function(){return tr})),r.d(n,"omit",(function(){return rr})),r.d(n,"first",(function(){return ar})),r.d(n,"head",(function(){return ar})),r.d(n,"take",(function(){return ar})),r.d(n,"initial",(function(){return nr})),r.d(n,"last",(function(){return or})),r.d(n,"rest",(function(){return ir})),r.d(n,"tail",(function(){return ir})),r.d(n,"drop",(function(){return ir})),r.d(n,"compact",(function(){return sr})),r.d(n,"flatten",(function(){return cr})),r.d(n,"without",(function(){return fr})),r.d(n,"uniq",(function(){return dr})),r.d(n,"unique",(function(){return dr})),r.d(n,"union",(function(){return lr})),r.d(n,"intersection",(function(){return hr})),r.d(n,"difference",(function(){return ur})),r.d(n,"unzip",(function(){return pr})),r.d(n,"transpose",(function(){return pr})),r.d(n,"zip",(function(){return br})),r.d(n,"object",(function(){return mr})),r.d(n,"range",(function(){return gr})),r.d(n,"chunk",(function(){return vr})),r.d(n,"mixin",(function(){return Ar})),r.d(n,"default",(function(){return wr}));var a=r(77);function i(e,t){return t=null==t?e.length-1:+t,function(){for(var r=Math.max(arguments.length-t,0),n=Array(r),a=0;a=0&&r<=a.b}}function R(e){return function(t){return null==t?void 0:t[e]}}var P=R("byteLength"),N=F(P),j=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var L=a.r?function(e){return a.l?Object(a.l)(e)&&!k(e):N(e)&&j.test(a.t.call(e))}:T(!1),U=R("length");function Q(e,t){t=function(e){for(var t={},r=e.length,n=0;n":">",'"':""","'":"'","`":"`"},Qe=Le(Ue),Ge=Le(de(Ue)),He=q.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},ze=/(.)^/,qe={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Ke=/\\|'|\r|\n|\u2028|\u2029/g;function Ve(e){return"\\"+qe[e]}var We=/^\s*(\w|\$)+\s*$/;function Ye(e,t,r){!t&&r&&(t=r),t=me({},t,q.templateSettings);var n=RegExp([(t.escape||ze).source,(t.interpolate||ze).source,(t.evaluate||ze).source].join("|")+"|$","g"),a=0,i="__p+='";e.replace(n,(function(t,r,n,o,s){return i+=e.slice(a,s).replace(Ke,Ve),a=s+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?i+="'+\n((__t=("+n+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t})),i+="';\n";var o,s=t.variable;if(s){if(!We.test(s))throw new Error("variable is not a bare identifier: "+s)}else i="with(obj||{}){\n"+i+"}\n",s="obj";i="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{o=new Function(s,"_",i)}catch(u){throw u.source=i,u}var c=function(e){return o.call(this,e,q)};return c.source="function("+s+"){\n"+i+"}",c}function Je(e,t,r){var n=(t=xe(t)).length;if(!n)return w(r)?r.call(e):r;for(var a=0;a1)it(s,t-1,r,n),a=n.length;else for(var c=0,u=s.length;ct?(n&&(clearTimeout(n),n=null),s=u,o=e.apply(a,i),n||(a=i=null)):n||!1===r.trailing||(n=setTimeout(c,f)),o};return u.cancel=function(){clearTimeout(n),s=0,n=a=i=null},u}function dt(e,t,r){var n,a,o,s,c,u=function i(){var u=je()-a;t>u?n=setTimeout(i,t-u):(n=null,r||(s=e.apply(c,o)),n||(o=c=null))},f=i((function(i){return c=this,o=i,a=je(),n||(n=setTimeout(u,t),r&&(s=e.apply(c,o))),s}));return f.cancel=function(){clearTimeout(n),n=o=c=null},f}function lt(e,t){return rt(t,e)}function ht(e){return function(){return!e.apply(this,arguments)}}function pt(){var e=arguments,t=e.length-1;return function(){for(var r=t,n=e[t].apply(this,arguments);r--;)n=e[r].call(this,n);return n}}function bt(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function mt(e,t){var r;return function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=null),r}}var gt=rt(mt,2);function vt(e,t,r){t=De(t,r);for(var n,a=G(e),i=0,o=a.length;i0?0:a-1;i>=0&&i0?s=o>=0?o:Math.max(o+c,s):c=o>=0?Math.min(o+1,c):o+c+1;else if(r&&o&&c)return n[o=r(n,i)]===i?o:-1;if(i!==i)return(o=t(a.q.call(n,s,c),D))>=0?o+s:-1;for(o=e>0?s:c-1;o>=0&&o=3;return function(t,r,n,a){var i=!at(t)&&G(t),o=(i||t).length,s=e>0?0:o-1;for(a||(n=t[i?i[s]:s],s+=e);s>=0&&s=0}var jt=i((function(e,t,r){var n,a;return w(t)?a=t:(t=xe(t),n=t.slice(0,-1),t=t[t.length-1]),St(e,(function(e){var i=a;if(!i){if(n&&n.length&&(e=Ee(e,n)),null==e)return;i=e[t]}return null==i?i:i.apply(e,r)}))}));function Lt(e,t){return St(e,Ie(t))}function Ut(e,t){return Tt(e,Be(t))}function Qt(e,t,r){var n,a,i=-1/0,o=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=at(e)?e:ue(e)).length;si&&(i=n);else t=De(t,r),It(e,(function(e,r,n){((a=t(e,r,n))>o||a===-1/0&&i===-1/0)&&(i=e,o=a)}));return i}function Gt(e,t,r){var n,a,i=1/0,o=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=at(e)?e:ue(e)).length;sn||void 0===r)return 1;if(r1&&(n=Se(n,t[1])),t=X(e)):(n=er,t=it(t,!1,!1),e=Object(e));for(var a=0,i=t.length;a1&&(r=t[1])):(t=St(it(t,!1,!1),String),n=function(e,r){return!Nt(t,r)}),tr(e,n,r)}));function nr(e,t,r){return a.q.call(e,0,Math.max(0,e.length-(null==t||r?1:t)))}function ar(e,t,r){return null==e||e.length<1?null==t||r?void 0:[]:null==t||r?e[0]:nr(e,e.length-t)}function ir(e,t,r){return a.q.call(e,null==t||r?1:t)}function or(e,t,r){return null==e||e.length<1?null==t||r?void 0:[]:null==t||r?e[e.length-1]:ir(e,Math.max(0,e.length-t))}function sr(e){return Tt(e,Boolean)}function cr(e,t){return it(e,t,!1)}var ur=i((function(e,t){return t=it(t,!0,!0),Tt(e,(function(e){return!Nt(t,e)}))})),fr=i((function(e,t){return ur(e,t)}));function dr(e,t,r,n){u(t)||(n=r,r=t,t=!1),null!=r&&(r=De(r,n));for(var a=[],i=[],o=0,s=U(e);o0&&(A.log("connect","connecting to ".concat(r.length," peers")),n=r.map((function(e){return y(a,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.listen(e.publicKey));case 1:case"end":return t.stop()}}),t,this)})))})),Promise.all(n).catch((function(e){return A.error("connect",e)}))),e.next=12,this.startOpenChannelListener();case 12:return e.abrupt("return",t.connect.call(this));case 13:case"end":return e.stop()}}),e,this)})))}},{key:"disconnect",value:function(){var e=this,t=Object.create(null,{disconnect:{get:function(){return Object(m.a)(Object(g.a)(r.prototype),"disconnect",e)}}});return y(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.stop();case 2:return e.abrupt("return",t.disconnect.call(this));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"startOpenChannelListener",value:function(){return y(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))}},{key:"getPairingRequestInfo",value:function(){return y(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.getPairingRequestInfo());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"listen",value:function(e){return y(this,void 0,void 0,Object(s.a)().mark((function t(){var r=this;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.listenForEncryptedMessage(e,(function(t){var n={origin:v.f.P2P,id:e};r.notifyListeners(t,n).catch((function(e){throw e}))})).catch((function(e){throw e}));case 2:case"end":return t.stop()}}),t,this)})))}}],[{key:"isAvailable",value:function(){return y(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(!0));case 1:case"end":return e.stop()}}),e)})))}}]),r}(p.v),x=r(1649),E=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},_=new p.j("PostMessageTransport"),C=!1,k=function(e){Object(d.a)(r,e);var t=Object(l.a)(r);function r(e,n,a,i){var o;return Object(f.a)(this,r),(o=t.call(this,e,new x.a(e,n),new p.q(a,i))).type=v.k.POST_MESSAGE,o}return Object(u.a)(r,[{key:"connect",value:function(){var e=this,t=Object.create(null,{connect:{get:function(){return Object(m.a)(Object(g.a)(r.prototype),"connect",e)}}});return E(this,void 0,void 0,Object(s.a)().mark((function e(){var r,n,a=this;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_.log("connect"),this._isConnected===v.j.NOT_CONNECTED){e.next=3;break}return e.abrupt("return");case 3:return this._isConnected=v.j.CONNECTING,e.next=6,this.getPeers();case 6:return(r=e.sent).length>0&&(_.log("connect","connecting to ".concat(r.length," peers")),n=r.map((function(e){return E(a,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.listen(e.publicKey));case 1:case"end":return t.stop()}}),t,this)})))})),Promise.all(n).catch((function(e){return _.error("connect",e)}))),e.next=10,this.startOpenChannelListener();case 10:return e.next=12,t.connect.call(this);case 12:case"end":return e.stop()}}),e,this)})))}},{key:"startOpenChannelListener",value:function(){return E(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))}},{key:"getPairingRequestInfo",value:function(){return E(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.getPairingRequestInfo());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"listen",value:function(e){return E(this,void 0,void 0,Object(s.a)().mark((function t(){var r=this;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return _.log("listen",e),t.next=3,this.client.listenForEncryptedMessage(e,(function(e,t){var n={origin:v.f.EXTENSION,id:t.id};r.notifyListeners(e,n).catch((function(e){throw e}))})).catch((function(e){throw e}));case 3:case"end":return t.stop()}}),t,this)})))}}],[{key:"isAvailable",value:function(){return E(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){p.z.addEventListener("message",(function t(r){var n=r.data;n&&"pong"===n.payload&&(e(!0),p.z.removeEventListener("message",t))}));var t={target:v.d.EXTENSION,payload:"ping"};p.z.postMessage(t,p.z.location.origin)})));case 1:case"end":return e.stop()}}),e)})))}},{key:"getAvailableExtensions",value:function(){return E(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=2;break}return e.abrupt("return",n);case 2:if(!a){e.next=4;break}return e.abrupt("return",a);case 4:return a=[],n=new Promise((function(e){r.listenForExtensions(),setTimeout((function(){e(null!==a&&void 0!==a?a:[])}),1e3)})).finally((function(){n=void 0})),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})))}},{key:"listenForExtensions",value:function(){if(!C){p.z.addEventListener("message",(function(e){if(e.source===p.z&&e.origin===p.z.location.origin){var t,r=e.data,n=r.sender;r&&"pong"===r.payload&&n&&(_.log("getAvailableExtensions",'extension "'.concat(n.name,'" is available'),n),t=n,a||(a=[]),a.some((function(e){return e.id===t.id}))||(a.push(t),p.z.postMessage("extensionsUpdated",p.z.location.origin)))}}));var e={target:v.d.EXTENSION,payload:"ping"};p.z.postMessage(e,p.z.location.origin),C=!0}}}]),r}(p.v),B=r(70),I=r(14),S={css:":host {\n --animation-duration: 300ms;\n all: initial;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n.beacon-modal__wrapper {\n position: relative;\n top: 0;\n display: inline-block;\n z-index: 2147483000;\n max-width: 500px;\n width: 80%;\n padding: 24px;\n}\n\n@media (min-height: 700px) {\n .beacon-modal__wrapper {\n top: 50%;\n transform: translateY(-50%);\n }\n}\n\n.theme__light .beacon-modal__base,\n.theme__light .beacon-modal__close__wrapper {\n background: #fff;\n}\n\n.theme__dark .beacon-modal__base,\n.theme__dark .beacon-modal__close__wrapper {\n background: #27334c;\n}\n\n.beacon-modal__base,\n.beacon-modal__close__wrapper {\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1);\n}\n\n.beacon-modal__base {\n margin: 0 auto;\n border-radius: 32px;\n overflow: hidden;\n}\n\n.beacon-modal__header {\n padding: 16px 0;\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n\n.beacon-modal__headerLogo {\n width: 100%;\n max-width: 320px;\n margin: 20px auto;\n height: 100%;\n}\n\na,\nbutton {\n cursor: pointer;\n}\n\n.beacon-modal__close__wrapper {\n position: absolute;\n top: 44px;\n right: 24px;\n z-index: 10000;\n cursor: pointer;\n border-radius: 100%;\n}\n\n.beacon-modal__close__icon {\n width: 16px;\n height: 16px;\n position: relative;\n top: 0;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n margin: 8px;\n}\n\n.beacon-modal__close__line1 {\n position: absolute;\n width: 90%;\n}\n\n.beacon-modal__close__line2 {\n position: absolute;\n width: 90%;\n transform: rotate(90deg);\n}\n\n.theme__light .beacon-modal__close__line2,\n.theme__light .beacon-modal__close__line1 {\n border: 1px solid #000;\n}\n\n.theme__dark .beacon-modal__close__line2,\n.theme__dark .beacon-modal__close__line1 {\n border: 1px solid #fff;\n}\n\n.beacon-alert__base {\n position: fixed;\n overflow-y: scroll;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 2147482999;\n background-color: rgb(17 17 17 / 0.84);\n text-align: center;\n -ms-overflow-style: none;\n scrollbar-width: none;\n font-family: Roboto, Helvetica, sans-serif;\n}\n\n.beacon-alert__base::-webkit-scrollbar {\n display: none;\n}\n\n.beacon-alert__title {\n text-align: center;\n}\n\n.beacon-alert__text,\n.beacon-alert__title {\n margin: 0 auto;\n padding: 0 0 24px;\n}\n\n.margin__bottom {\n margin-bottom: 16px;\n}\n\n.beacon-alert__title {\n font-size: 18px;\n}\n\n.theme__light .beacon-alert__title {\n color: #3b3d40;\n}\n\n.theme__dark .beacon-alert__title,\n.theme__dark .beacon-alert__text {\n color: #7c99d6;\n}\n\n.beacon-alert__text {\n color: #000;\n font-size: 14px;\n}\n\n.beacon-modal__button,\n.beacon-modal__button--outline {\n height: 36px;\n font-size: 14px;\n letter-spacing: 0.84px;\n margin-bottom: 4px;\n margin-inline-end: 2px;\n margin-inline-start: 2px;\n margin-left: 2px;\n margin-right: 2px;\n margin-top: 4px;\n padding-inline-end: 15.4px;\n padding-inline-start: 15.4px;\n padding-left: 15.4px;\n padding-right: 15.4px;\n overflow-wrap: break-word;\n pointer-events: auto;\n text-align: center;\n border-radius: 4px;\n border: 2px solid #3880ff;\n}\n\n.beacon-modal__button {\n background: #3880ff;\n color: #fff;\n}\n\n.beacon-modal__button--outline {\n background: #fff;\n color: #444444;\n border: 1px solid #444444;\n}\n\n.beacon-alert__image {\n width: 200px;\n height: 200px;\n box-sizing: border-box;\n box-shadow: 0 10px 20px 0 rgba(17, 17, 17, 0.12);\n border: 1px solid rgba(17, 17, 17, 0.04);\n border-radius: 16px;\n}\n.connect__btn {\n margin: 24px 0;\n width: 100%;\n}\n\n#beacon-modal__content {\n padding: 24px;\n}\n\n#beacon-switch {\n margin-top: 24px;\n}\n\n#beacon-title {\n margin: 0 0 24px;\n}\n\na {\n text-decoration: none;\n}\n\npre {\n white-space: pre-wrap; /* css-3 */\n white-space: -moz-pre-wrap; /* Mozilla, since 1999 */\n white-space: -pre-wrap; /* Opera 4-6 */\n white-space: -o-pre-wrap; /* Opera 7 */\n word-wrap: break-word; /* Internet Explorer 5.5+ */\n padding: 16px;\n background: #ececec;\n line-height: 1.25rem;\n}\n"},O={css:"#beacon-main-text {\n display: initial;\n}\n.beacon-selection__container {\n padding: 16px 16px 0;\n}\n.beacon-selection__list {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n text-decoration: none;\n padding-bottom: 12px;\n align-items: center;\n}\n.beacon-list__title {\n text-align: left;\n font-size: 12px;\n}\n.beacon-list__wrapper:nth-child(-n + 3) {\n padding: 0 0 1rem;\n}\n.theme__light .beacon-list__title {\n color: #7c828b;\n}\n.theme__dark .beacon-list__title,\n.theme__dark #beacon--disclaimer {\n color: #7c99d6;\n}\n\n.beacon-selection__name {\n font-size: 1rem;\n font-weight: 600;\n text-align: left;\n}\n.theme__light .beacon-selection__name,\n.theme__light .beacon--selection__name__lg {\n color: #3b3d40;\n}\n.theme__dark .beacon-selection__name,\n.theme__dark .beacon--selection__name__lg {\n color: #6183ff;\n}\n.beacon-selection__img {\n width: 48px;\n height: 48px;\n box-shadow: 0 4px 12px 0 rgba(17, 17, 17, 0.24);\n border-radius: 16px;\n background-color: #fff;\n}\n.beacon--selection__name__lg {\n font-size: 1.5rem;\n font-weight: 600;\n text-align: center;\n padding: 1rem 0;\n}\n.beacon--selected__container {\n padding: 2rem 0 0;\n}\n#beacon--qr__copy__container {\n height: 0;\n}\n#beacon--qr__copy {\n display: none;\n position: relative;\n top: -190px;\n left: 138px;\n margin: 0;\n}\n#beacon--qr__container {\n margin-left: auto;\n margin-right: auto;\n}\n#beacon--qr__container:hover #beacon--qr__copy {\n display: block;\n}\n.disabled {\n cursor: initial;\n}\n.disabled span,\n.disabled img {\n opacity: 0.48;\n}\n.disabled p {\n text-align: left;\n margin: 0;\n font-size: 10px;\n font-weight: 300;\n}\n.disabled img {\n -webkit-filter: grayscale(100%);\n -moz-filter: grayscale(100%);\n -ms-filter: grayscale(100%);\n -o-filter: grayscale(100%);\n filter: grayscale(100%);\n filter: gray;\n}\n\n#beacon--disclaimer {\n text-align: left;\n padding-top: 24px;\n font-size: 0.875rem;\n}\n.progress-line,\n.progress-line:before {\n height: 3px;\n width: -webkit-fill-available;\n margin-left: -24px;\n margin-right: -24px;\n}\n.progress-line {\n background-color: #a7c4f7;\n display: -webkit-flex;\n display: flex;\n}\n.progress-line:before {\n background-color: #3880ff;\n content: '';\n -webkit-animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n}\n@-webkit-keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n@keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n"},M=function(e,t){return t.test(e.navigator.userAgent)},D=function(e){return function(e,t){return e.matchMedia(t).matches}(e,"(any-pointer:coarse)")},T=function(e){return M(e,/iPhone|iPod/i)||function(e){return!!M(e,/iPad/i)||!(!M(e,/Macintosh/i)||!D(e))}(e)},F=function(e){return M(e,/android|sink/i)},R=r(863),P=new p.j("QR"),N=function(e,t){var r=R(0,"L");e.length>500&&P.warn("getQrData",'The size of the payload in the QR code is quite long and some devices might not be able to scan it anymore. To reduce the QR size, try using a shorter "name", "appUrl" and "iconUrl"');try{if(r.addData(e),r.make(),"svg"===t)return r.createSvgTag();if("ascii"===t){var n=r.getModuleCount(),a="\x1b[40m \x1b[0m",i="\x1b[47m \x1b[0m",o=new Array(n+3).join(i),s=new Array(n+3).join(a),c="";c+="".concat(s,"\n"),c+="".concat(o,"\n");for(var u=0;u=0&&Y.splice(t,1)})),f=[],q().length>0&&f.push({title:"Browser Extensions",type:o.EXTENSION,wallets:[].concat(Object(I.a)(u.map((function(e){var t,a,i,c,u,f=q().find((function(t){return t.id===e.id}));return{key:null!==(t=null===f||void 0===f?void 0:f.key)&&void 0!==t?t:e.id,name:null!==(a=e.name)&&void 0!==a?a:null===f||void 0===f?void 0:f.name,logo:null!==(i=e.iconUrl)&&void 0!==i?i:null===f||void 0===f?void 0:f.logo,shortName:null!==(c=e.shortName)&&void 0!==c?c:null===f||void 0===f?void 0:f.shortName,color:null!==(u=e.color)&&void 0!==u?u:null===f||void 0===f?void 0:f.color,enabled:!0,clicked:!1,clickHandler:function(){return L(this,void 0,void 0,Object(s.a)().mark((function t(){var a,i;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.clicked){t.next=2;break}return t.abrupt("return");case 2:if(this.clicked=!0,!n){t.next=13;break}return t.t0=W,t.next=7,n();case 7:return t.t1=t.sent,t.next=10,t.t0.serialize.call(t.t0,t.t1);case 10:a=t.sent,i={target:v.d.EXTENSION,payload:a,targetId:e.id},p.z.postMessage(i,p.z.location.origin);case 13:r(o.EXTENSION,this);case 14:case"end":return t.stop()}}),t,this)})))}}}))),Object(I.a)(q().filter((function(e){return Y.some((function(t){return t===e.id}))})).map((function(e){return{key:e.key,name:e.name,shortName:e.shortName,color:e.color,logo:e.logo,enabled:!1,clickHandler:function(){}}})))).sort((function(e,t){return e.key.localeCompare(t.key)}))}),!(z().length>0)){c.next=19;break}return c.t0=f,c.t1=o.DESKTOP,c.t2=[],c.t3=Object(I.a)(z().map((function(e){return{key:e.key,name:e.name,shortName:e.shortName,color:e.color,logo:e.logo,enabled:!0,clicked:!1,clickHandler:function(){return L(this,void 0,void 0,Object(s.a)().mark((function n(){var a,i;return Object(s.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.clicked){n.next=2;break}return n.abrupt("return");case 2:return this.clicked=!0,n.t0=W,n.next=6,t();case 6:return n.t1=n.sent,n.next=9,n.t0.serialize.call(n.t0,n.t1);case 9:a=n.sent,i=j(e.deepLink,a),window.open(i,"_blank"),r(o.DESKTOP,this,!0);case 13:case"end":return n.stop()}}),n,this)})))}}}))),c.t4=I.a,c.next=14,e.getWebList(t,r,i);case 14:c.t5=c.sent,c.t6=(0,c.t4)(c.t5),c.t7=c.t2.concat.call(c.t2,c.t3,c.t6).sort((function(e,t){return e.key.localeCompare(t.key)})),c.t8={title:"Desktop & Web Wallets",type:c.t1,wallets:c.t7},c.t0.push.call(c.t0,c.t8);case 19:return V().length>0&&f.push({title:"Mobile Wallets",type:o.IOS,wallets:Object(I.a)(V().map((function(e){return{key:e.key,name:e.name,shortName:e.shortName,color:e.color,logo:e.logo,enabled:!0,clicked:!1,clickHandler:function(){return L(this,void 0,void 0,Object(s.a)().mark((function e(){var n;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.clicked){e.next=2;break}return e.abrupt("return");case 2:return this.clicked=!0,e.t0=W,e.next=6,t();case 6:return e.t1=e.sent,e.next=9,e.t0.serialize.call(e.t0,e.t1);case 9:n=e.sent,a(n),r(o.IOS,this,!0);case 12:case"end":return e.stop()}}),e,this)})))}}}))).sort((function(e,t){return e.key.localeCompare(t.key)}))}),c.abrupt("return",{walletLists:f,buttons:[]});case 21:case"end":return c.stop()}}),c)})))}},{key:"getIOSPairingAlert",value:function(t,r,n){return L(this,void 0,void 0,Object(s.a)().mark((function a(){return Object(s.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.t0={title:"Mobile Wallets",type:o.IOS,wallets:V().map((function(e){return{key:e.key,name:e.name,shortName:e.shortName,color:e.color,logo:e.logo,enabled:!0,clicked:!1,clickHandler:function(){var n;return L(this,void 0,void 0,Object(s.a)().mark((function a(){var i,c,u;return Object(s.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!this.clicked){a.next=2;break}return a.abrupt("return");case 2:return this.clicked=!0,a.t0=W,a.next=6,t();case 6:return a.t1=a.sent,a.next=9,a.t0.serialize.call(a.t0,a.t1);case 9:i=a.sent,c=j(null!==(n=e.deepLink)&&void 0!==n?n:e.universalLink,i),(u=document.createElement("a")).setAttribute("href",c),u.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0})),r(o.IOS,this,!0);case 15:case"end":return a.stop()}}),a,this)})))}}})).sort((function(e,t){return e.key.localeCompare(t.key)}))},a.t1=o.WEB,a.t2=I.a,a.next=5,e.getWebList(t,r,n);case 5:return a.t3=a.sent,a.t4=(0,a.t2)(a.t3).sort((function(e,t){return e.key.localeCompare(t.key)})),a.t5={title:"Web Wallets",type:a.t1,wallets:a.t4},a.t6=[a.t0,a.t5],a.t7=[],a.abrupt("return",{walletLists:a.t6,buttons:a.t7});case 11:case"end":return a.stop()}}),a)})))}},{key:"getAndroidPairingAlert",value:function(t,r,n){return L(this,void 0,void 0,Object(s.a)().mark((function a(){var i=this;return Object(s.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.t0=o.WEB,a.t1=I.a,a.next=4,e.getWebList(t,r,n);case 4:return a.t2=a.sent,a.t3=(0,a.t1)(a.t2).sort((function(e,t){return e.key.localeCompare(t.key)})),a.t4={title:"Web Wallets",type:a.t0,wallets:a.t3},a.t5=[a.t4],a.t6=[{title:"Mobile Wallets",text:"Connect Wallet",clickHandler:function(){return L(i,void 0,void 0,Object(s.a)().mark((function e(){var n,a;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=W,e.next=3,t();case 3:return e.t1=e.sent,e.next=6,e.t0.serialize.call(e.t0,e.t1);case 6:n=e.sent,a=j("tezos://",n),window.open(a,"_blank"),r(o.ANDROID);case 10:case"end":return e.stop()}}),e)})))}}],a.abrupt("return",{walletLists:a.t5,buttons:a.t6});case 10:case"end":return a.stop()}}),a)})))}},{key:"getWebList",value:function(e,t,r){return L(this,void 0,void 0,Object(s.a)().mark((function n(){return Object(s.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",K().map((function(n){return{key:n.key,name:n.name,shortName:n.shortName,color:n.color,logo:n.logo,enabled:!0,clicked:!1,clickHandler:function(){var a=this;if(!this.clicked){this.clicked=!0;var i=window.open("","_blank");e().then((function(e){return W.serialize(e)})).then((function(e){var s,c=j(null!==(s=n.links[r])&&void 0!==s?s:n.links[v.e.MAINNET],e);i?i.location.href=c:window.open(c,"_blank"),t(o.WEB,a,!0)})).catch((function(e){console.error(e)}))}}}})).sort((function(e,t){return e.key.localeCompare(t.key)})));case 1:case"end":return n.stop()}}),n)})))}}]),e}(),$=function(e,t,r,n){var a,i=document.createElement(e);t.length>0&&(a=i.classList).add.apply(a,Object(I.a)(t.filter((function(e){return!!e})).map((function(e){return ne(e)}))));return r.forEach((function(e){i.setAttribute(ne(e[0]),ne(e[1]))})),"object"===typeof n&&Array.isArray(n)?n.filter((function(e){return!!e})).forEach((function(e){i.appendChild(e)})):"string"===typeof n&&(i.innerText=n),i},ee=function(e,t,r){var n,a=document.createElementNS("http://www.w3.org/2000/svg","svg");e.length>0&&(n=a.classList).add.apply(n,Object(I.a)(e.filter((function(e){return!!e}))));return t.forEach((function(e){a.setAttribute(ne(e[0]),ne(e[1]))})),"object"===typeof r&&Array.isArray(r)&&r.filter((function(e){return!!e})).forEach((function(e){a.appendChild(e)})),a},te=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","path");return e.forEach((function(e){t.setAttribute(ne(e[0]),ne(e[1]))})),t},re=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return e.filter((function(e){return!!e})).forEach((function(e){t.appendChild(e)})),t},ne=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML},ae=function(e){e.innerHTML=""},ie=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},oe=new p.j("Alert"),se=new p.r,ce=function(e,t,r){return ie(void 0,void 0,void 0,Object(s.a)().mark((function n(){var a,i,c,u,f,d,l,h,b,m,g,v,y,A,w,x,E,_,C,k,S,O;return Object(s.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=function(){return ie(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Z.getPairingInfo(r,(function(e,t,r){return ie(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,ve();case 4:case"end":return e.stop()}}),e)})))}),(function(){return ie(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:S();case 1:case"end":return e.stop()}}),e)})))})));case 1:case"end":return e.stop()}}),e)})))},n.next=3,a();case 3:if(i=n.sent,c=t.getElementById("pairing-container")){n.next=7;break}throw new Error("container not found");case 7:u=document.createElement("span"),c.appendChild(u),i.buttons.forEach((function(e){return ie(void 0,void 0,void 0,Object(s.a)().mark((function r(){var n,a,i,o,c;return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(B.e)();case 2:n=r.sent,a=$("div",["beacon-list__title"],[],e.title),i=$("button",["beacon-modal__button","connect__btn"],[],e.text),(o=document.createElement("a")).id="button_".concat(n),o.appendChild(a),o.appendChild(i),u.appendChild(o),(c=t.getElementById(o.id))&&c.addEventListener("click",(function(){return ie(void 0,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.clickHandler();case 1:case"end":return t.stop()}}),t)})))}));case 12:case"end":return r.stop()}}),r)})))})),f=function(e,r,n){var a="Open in ".concat(n.name),i=n.key,c=n.logo?$("div",[],[],[$("img",["beacon-selection__img"],[["src",n.logo]],"")]):ee(["beacon-selection__img","svg-inline--fa","fa-wallet","fa-w-16"],[["aria-hidden","true"],["focusable","false"],["data-prefix","fas"],["data-icon","wallet"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 512 512"],["style","enable-background:new 0 0 512 512;"],["xml:space","preserve"]],[te([["d","M376.2,181H152.9c-5.2,0-9.4-4.2-9.4-9.4s4.2-9.4,9.4-9.4h225c5.2,0,9.4-4.2,9.4-9.4c0-15.5-12.6-28.1-28.1-28.1H143.5c-20.7,0-37.5,16.8-37.5,37.5v187.5c0,20.7,16.8,37.5,37.5,37.5h232.7c16.4,0,29.8-12.6,29.8-28.1v-150C406,193.6,392.7,181,376.2,181z M349.8,302.9c-10.4,0-18.8-8.4-18.8-18.8s8.4-18.8,18.8-18.8s18.8,8.4,18.8,18.8S360.1,302.9,349.8,302.9z"]])]),u=$("div",["beacon-selection__name"],[],[$("span",[],[],n.name),n.enabled?void 0:$("p",[],[],"Not installed")]),f=$("a",["beacon-selection__list",n.enabled?"":"disabled"],[["tabindex","0"],["id","wallet_".concat(i)],["alt",a],["target","_blank"]],[u,c]),d=document.createElement("span");d.appendChild(f),e.appendChild(d);var l=t.getElementById("wallet_".concat(i)),h=function(e){return ie(void 0,void 0,void 0,Object(s.a)().mark((function a(){var i;return Object(s.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!e||"Enter"===e.key){a.next=2;break}return a.abrupt("return");case 2:n.clickHandler(),(i=t.getElementById("beacon-modal__content"))&&r!==o.EXTENSION&&r!==o.IOS&&(ae(i),i.appendChild($("p",["beacon-alert__title"],[],"Establishing Connection..")),i.appendChild($("div",["progress-line"],[["id","beacon-toast-loader"]],"")),i.appendChild($("div",["beacon--selected__container"],[],Object(I.a)(n.logo?[$("img",["beacon-selection__img"],[["src",n.logo]],""),$("img",["beacon--selection__name__lg"],[],n.name)]:[]))));case 5:case"end":return a.stop()}}),a)})))};l&&(l.addEventListener("click",(function(){return h()})),l.addEventListener("keydown",h))},d=document.createElement("span"),c.appendChild(d),(l=function(e){ae(d),e.forEach((function(e){var t=document.createElement("div");t.classList.add("beacon-list__wrapper"),d.appendChild(t),t.appendChild($("div",["beacon-list__title"],[],e.title));var r=document.createElement("span");t.appendChild(r),e.wallets.forEach((function(t){return ie(void 0,void 0,void 0,Object(s.a)().mark((function n(){return Object(s.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:f(r,e.type,t);case 1:case"end":return n.stop()}}),n)})))}))}))})(i.walletLists),h=function(e){return ie(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("extensionsUpdated"!==e.data){t.next=5;break}return t.next=3,a();case 3:r=t.sent,l(r.walletLists);case 5:case"end":return t.stop()}}),t)})))},b=function(t){t.data==="closeAlert-".concat(e)&&(p.z.removeEventListener("message",h),p.z.removeEventListener("message",b))},p.z.addEventListener("message",h),p.z.addEventListener("message",b),m=t.getElementById("beacon--qr__container"),g=t.getElementById("beacon--qr__copy"),v=t.getElementById("beacon-title"),y=F(window)?"android":T(window)?"ios":"desktop",A=t.getElementById("beacon-main-text"),w=t.getElementById("pairing-container"),x=t.getElementById("beacon--switch__container"),E=function(){return ie(void 0,void 0,void 0,Object(s.a)().mark((function e(){var t;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=10;break}return e.t1=se,e.next=4,r.p2pSyncCode();case 4:return e.t2=e.sent,e.next=7,e.t1.serialize.call(e.t1,e.t2);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0="";case 11:t=e.t0,navigator.clipboard.writeText(t).then((function(){g&&(g.innerText="Copied"),oe.log("Copying to clipboard was successful!")}),(function(e){oe.error("Could not copy text to clipboard: ",e)}));case 13:case"end":return e.stop()}}),e)})))},_=!1,C=function(e){return ie(void 0,void 0,void 0,Object(s.a)().mark((function n(){var a,i,o,c,u;return Object(s.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((a=t.getElementById("beacon-switch"))&&(a.innerText="none"===e?"Pair wallet on same device":"Pair wallet on another device"),!(A&&w&&x&&g&&m&&v)){n.next=35;break}A.style.display="none",v.style.textAlign="center",w.style.display="none",x.style.display="initial",n.t0=e,n.next="ios"===n.t0?10:"android"===n.t0?12:"desktop"===n.t0?14:19;break;case 10:case 12:return w.style.display="initial",n.abrupt("break",35);case 14:return w.style.display="initial",v.style.textAlign="left",A.style.display="none",x.style.display="initial",n.abrupt("break",35);case 19:if(_){n.next=34;break}return _=!0,n.t1=se,n.next=24,r.p2pSyncCode();case 24:return n.t2=n.sent,n.next=27,n.t1.serialize.call(n.t1,n.t2);case 27:i=n.sent,o=j("tezos://",i),c=N(o,"svg"),u=c.replace("0)){t.next=9;break}return n=[],r.forEach((function(e){return he(void 0,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n.push(e.id.split("-")[3]);case 1:case"end":return t.stop()}}),t)})))})),t.next=6,Promise.all(n.map(ge));case 6:e(),t.next=10;break;case 9:e();case 10:case"end":return t.stop()}}),t)})))})));case 1:case"end":return e.stop()}}),e)})))},ye=function(e){return he(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i,o,c,u,f,d,l,h,p,b,m,g,v,y,A,w,x,E,_,C,k,S;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.body,i=e.data,o=e.title,c=e.timer,u=e.pairingPayload,f=e.disclaimerText,d=e.closeButtonCallback,t.next=9,ve();case 9:return t.next=11,Object(B.e)();case 11:if(l=t.sent.split("-").join(""),(h=X.createElement("div")).setAttribute("id","beacon-alert-wrapper-".concat(l)),p=h.attachShadow({mode:"open"}),(b=X.createElement("div")).setAttribute("tabindex","0"),p.appendChild(b),m=Object(I.a)(null!==(n=null===(r=e.buttons)||void 0===r?void 0:r.map((function(e){var t,r;return{text:e.text,actionCallback:null!==(t=e.actionCallback)&&void 0!==t?t:function(){return Promise.resolve()},style:null!==(r=e.style)&&void 0!==r?r:"outline"}})))&&void 0!==n?n:[]),g=u?"string"===typeof a?$("div",[],[["id","beacon--qr__container"]],[$("div",[],[["id","beacon--qr__copy__container"]],[$("button",["beacon-modal__button--outline"],[["id","beacon--qr__copy"]],"Copy")])]):$("span",[],[],""):$("span",[],[],null!==a&&void 0!==a?a:""),i&&(g=$("span",[],[],[g,$("pre",[],[["style","text-align: left"]],i)])),v=me(l,g,o,m,!!(null===u||void 0===u?void 0:u.p2pSyncCode)),y=v.style,A=v.html,b.appendChild(A),(w=X.createElement("style")).textContent=y,p.appendChild(w),c&&(be[l]=window.setTimeout((function(){return he(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ge(l);case 2:case"end":return e.stop()}}),e)})))}),c)),X.body.prepend(h),x=p.getElementById("beacon-alert-".concat(l,"-close")),E=function(){return he(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d&&d(),e.next=3,ge(l);case 3:case"end":return e.stop()}}),e)})))},f&&(_=p.getElementById("beacon--disclaimer"))&&(_.innerText=f),C=de(),(k=p.getElementById("beacon-alert-modal-".concat(l)))&&(k.classList.add("theme__".concat(C)),k.addEventListener("click",E)),(S=p.querySelectorAll(".beacon-modal__wrapper")).length>0&&S[0].addEventListener("click",(function(e){e.stopPropagation()})),J=X.activeElement,b.focus(),m.forEach((function(e,t){var r=p.getElementById("beacon-alert-".concat(l,"-").concat(t));r&&r.addEventListener("click",(function(){return he(void 0,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ge(l);case 2:if(!e.actionCallback){t.next=5;break}return t.next=5,e.actionCallback();case 5:case"end":return t.stop()}}),t)})))}))})),x&&x.addEventListener("click",(function(){return he(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E();case 2:case"end":return e.stop()}}),e)})))})),window.addEventListener("keydown",(function(e){return he(void 0,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("Escape"!==e.key){t.next=3;break}return t.next=3,E();case 3:case"end":return t.stop()}}),t)})))})),!u){t.next=44;break}return t.next=44,ce(l,p,u);case 44:return t.abrupt("return",l);case 45:case"end":return t.stop()}}),t)})))},Ae={css:":host {\n --animation-duration: 300ms;\n all: initial;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n.beacon-toast__base {\n position: fixed;\n top: 16px;\n right: 16px;\n z-index: 2147483000;\n margin: 0 auto;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1);\n flex-direction: column;\n}\n@media (max-width: 576px) {\n .beacon-toast__base {\n top: 8px;\n right: 8px;\n left: 8px;\n }\n .beacon-toast__wallet__outer {\n flex-wrap: wrap;\n }\n .beacon-toast__wallet__link {\n display: flex;\n margin-left: 12px !important;\n }\n}\n\n.theme__light.beacon-toast__base {\n background: #fff;\n}\n\n.theme__dark.beacon-toast__base {\n background: #27334c;\n}\n\n.theme__dark p {\n color: #6183ff;\n}\n\na {\n text-decoration: none;\n color: #3880ff;\n}\n\na svg {\n width: 12px;\n margin-left: 2px;\n}\n\na:visited {\n color: #3880ff;\n}\n\nhr {\n height: 1px;\n color: rgba(0, 0, 0, 0.12);\n background-color: rgba(0, 0, 0, 0.12);\n border: none;\n width: 100%;\n margin: 0;\n display: none;\n}\n\n.show {\n display: block !important;\n}\n\n.hide {\n display: none !important;\n}\n\n#beacon-toast-list {\n display: none;\n}\n\n.beacon-toast__upside_down {\n transform: rotate(180deg);\n}\n\n.beacon-toast__content {\n justify-content: space-between;\n min-height: 56px;\n height: 0;\n}\n\n.beacon-toast__action__item,\n.beacon-toast__powered a,\n.beacon-toast__wallet__container,\n#beacon-text,\n.beacon-toast__action__item p,\n.beacon-toast__wallet__outer {\n align-items: center;\n}\n\n.beacon-toast__content,\n.beacon-toast__base,\n.beacon-toast__action__item,\n.beacon-toast__powered a,\n#beacon-text,\n.beacon-toast__wallet__container,\n.beacon-toast__wallet__outer {\n display: flex;\n}\n\n.beacon-toast__content,\n.beacon-toast__action__item,\n.beacon-toast__powered a {\n padding: 0 16px;\n font-family: Roboto, Helvetica, sans-serif;\n}\n\n#beacon-text strong {\n display: contents;\n}\n.beacon-toast__wallet__link {\n margin-left: 8px;\n}\n.beacon-toast__wallet__link svg {\n margin-left: 4px;\n}\n.beacon-toast__powered a {\n margin: 4px 0 12px;\n font-size: 12px;\n opacity: 0.64;\n}\n\n.beacon-toast__powered svg {\n width: 20px;\n height: 20px;\n margin: 0 2px 0 4px;\n}\n\n.beacon-toast__action__item {\n font-size: 14px;\n max-width: 40ch;\n}\n\n.beacon-toast__action__item p {\n margin-right: 8px;\n}\n\n.beacon-toast__action__item__subtitle,\n.beacon-toast__powered a {\n min-width: 88px;\n color: rgba(0, 0, 0, 0.54);\n}\n\n.theme__dark .beacon-toast__powered a {\n color: #7c99d6;\n}\n\n.beacon-toast__content__img {\n width: 24px;\n height: 24px;\n margin-right: 4px;\n image-rendering: -moz-crisp-edges; /* Firefox */\n image-rendering: -o-crisp-edges; /* Opera */\n image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming) */\n image-rendering: crisp-edges;\n -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */\n}\n\n.beacon-toast__more {\n width: 14px;\n transition: transform 0.5s;\n}\n\na,\n.beacon-toast__more {\n cursor: pointer;\n}\n\na:hover {\n opacity: 0.64;\n}\n\n.theme__dark .beacon-toast__more {\n color: #7c99d6;\n}\n\n.beacon-toast__more--action {\n margin: 8px 0;\n}\n\n#beacon-text {\n padding-right: 24px;\n}\n\n#beacon-text-content {\n display: flex;\n align-items: center;\n}\n\n.progress-line,\n.progress-line:before {\n height: 3px;\n width: 100%;\n margin: 0;\n}\n.progress-line {\n background-color: #a7c4f7;\n display: -webkit-flex;\n display: flex;\n}\n.progress-line:before {\n background-color: #3880ff;\n content: '';\n -webkit-animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n}\n@-webkit-keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n@keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n"},we=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};"undefined"!==typeof window&&"undefined"!==typeof window.document&&(pe=window.document);var xe,Ee,_e,Ce,ke,Be=function(e){return we(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i,o,c,u,f,d,l,h;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.text,n=e.isBold,a=e.actionText,i=e.actionLogo,o=e.actionCallback,t.next=3,Object(B.e)();case 3:return c=t.sent,(u=pe.createElement("div")).classList.add("beacon-toast__action__item"),Ie(u),f=function(e){return $("strong",[],[],e)},o?(r.length>0&&u.appendChild($("p",[],[],r)),d=$("span",[],[],[$("span",[],[],a),i&&"external"===i?ee(["svg-inline--fa","fa-external-link-alt","fa-w-16"],[["aria-hidden","true"],["focusable","false"],["data-prefix","fas"],["data-icon","external-link-alt"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 512 512"]],[te([["fill","currentColor"],["d","M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"]])]):void 0]),u.appendChild($("p",[],[],[$("a",[],[["id",c]],[n?f([d]):d])]))):a?(r.length>0&&u.appendChild($("p",["beacon-toast__action__item__subtitle"],[],r)),l=$("span",[],[],a),u.appendChild($("p",[],[],[n?f([l]):l]))):(h=$("p",[],[],r),u.appendChild(n?f([h]):h)),o&&u.addEventListener("click",o),t.abrupt("return",u);case 11:case"end":return t.stop()}}),t)})))},Ie=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},Se=function(e){var t,r,n,a=null===(t=null===_e||void 0===_e?void 0:_e.walletInfo)||void 0===t?void 0:t.icon,i=null===(r=null===_e||void 0===_e?void 0:_e.walletInfo)||void 0===r?void 0:r.name,o=$("strong",[],[],null!==i&&void 0!==i?i:"Wallet");n=a?$("span",["beacon-toast__wallet__container"],[],[$("img",["beacon-toast__content__img"],[["src",a]],""),o]):o;var s=e.split("{{wallet}}");if(1===s.length)return[$("span",[],[],e)];for(var c=[],u=0;u0)){n.next=14;break}return i=a.map((function(e){return we(void 0,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Be(e));case 1:case"end":return t.stop()}}),t)})))})),n.next=5,Promise.all(i);case 5:n.sent.forEach((function(e){return r.appendChild(e)})),(o=pe.createElement("small")).classList.add("beacon-toast__powered"),o.appendChild($("a",[],[["href","https://walletbeacon.io"],["target","_blank"]],[document.createTextNode("powered by"),ee([],[["id","f63e95a9-fd19-4487-bc1a-09eb2f066704"],["data-name","Guides"],["xmlns","http://www.w3.org/2000/svg"],["width","65"],["height","65"],["viewBox","0 0 65 65"]],[$("title",[],[],"beacon_logo"),te([["fill","currentColor"],["d","M59.66,29.52v1.06c0,.37-.18,9.07-4.11,15.88S44.16,57.75,43.84,57.93l-.91.54-1.61-.93-9.19-5.3a14.68,14.68,0,0,1-1.63-1.06h0a14.09,14.09,0,0,1-1.29-1,17.63,17.63,0,0,1-2.56-2.7,18.58,18.58,0,0,1-2.56-4.51,21.53,21.53,0,0,1-1.5-9,6.21,6.21,0,0,1,2.93-.73c.25,0,.49,0,.74,0a18.29,18.29,0,0,0,1,7.93,15.06,15.06,0,0,0,6.67,8l8.93,5.16c.2-.13.43-.3.68-.48,2.26-1.6,6.42-4.92,8.86-9.13C55.12,39.94,55.8,34,56,31.57l-3.79-2.19a23,23,0,0,0,.6-3.83Z"]]),te([["fill","currentColor"],["d","M49.22,11.43V23.89c0,.65,0,1.3-.1,1.94v0c-.06.55-.13,1.1-.24,1.63A18,18,0,0,1,47.82,31a19.11,19.11,0,0,1-2.62,4.49,21.37,21.37,0,0,1-7.07,5.8,6.08,6.08,0,0,1-2.42-2.84A18.1,18.1,0,0,0,42,33.7h0a15.12,15.12,0,0,0,3.58-9.81V13.6c-.21-.11-.47-.21-.74-.35-2.52-1.16-7.47-3.1-12.36-3.1-5.42,0-11,2.4-13.08,3.45V18a22.54,22.54,0,0,0-3.63,1.38V11.43l.92-.52c.33-.18,8-4.38,15.79-4.38s15.48,4.2,15.8,4.38Z"]]),te([["fill","currentColor"],["d","M18,26.4,9,31.55q0,.35.06.78a31.63,31.63,0,0,0,3.49,12.28c2.71,4.71,7.55,8.3,9.53,9.64l3.79-2.19a23.33,23.33,0,0,0,3,2.44l-6.88,4-.92-.54c-.31-.18-7.75-4.69-11.68-11.5S5.36,30.92,5.35,30.56V29.49L7,28.55l9.17-5.29c.57-.32,1.14-.61,1.72-.87a13.46,13.46,0,0,1,1.55-.61A17.52,17.52,0,0,1,23,20.91a19.2,19.2,0,0,1,5.19,0,21.49,21.49,0,0,1,8.55,3.24,6.29,6.29,0,0,1-1.25,3.51,17.9,17.9,0,0,0-7.3-3.06A15.14,15.14,0,0,0,18,26.4Z"]])]),document.createTextNode("Beacon")])),r.appendChild(o),Pe(e),n.next=16;break;case 14:Ne(e),je(e);case 16:case"end":return n.stop()}}),n)})))},Ge=function(e){return we(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i,o,c,u,f,d,l,h,p,b;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_e=e,r=e.timer,(n=pe.createElement("div")).setAttribute("id","beacon-toast-wrapper"),a=n.attachShadow({mode:"open"}),i=pe.createElement("div"),o=Oe(e),c=o.style,u=o.html,i.appendChild(u),(f=pe.createElement("style")).textContent=c,a.appendChild(i),a.appendChild(f),r&&(xe=window.setTimeout((function(){return we(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Me();case 2:case"end":return e.stop()}}),e)})))}),r)),pe.body.prepend(n),d=de(),(l=a.getElementById("beacon-toast"))&&l.classList.add("theme__".concat(d)),!(h=a.getElementById("beacon-toast-list"))){t.next=21;break}return t.next=21,Qe(a,e,h);case 21:(p=a.getElementById("beacon-open-wallet"))&&(e.openWalletAction?p.addEventListener("click",(function(){e.openWalletAction&&e.openWalletAction()})):p.classList.add("hide")),"loading"===_e.state&&(Ee=window.setTimeout((function(){return we(void 0,void 0,void 0,Object(s.a)().mark((function e(){var t;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=a.getElementById("beacon-toast-button-expand"))&&!t.classList.contains("beacon-toast__upside_down")&&Ue(a);case 2:case"end":return e.stop()}}),e)})))}),5e3)),De(a,"beacon-toast-button-done",(function(){return we(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Me();case 2:case"end":return e.stop()}}),e)})))})),(b=De(a,"beacon-toast-button-close",(function(){return we(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Me();case 2:case"end":return e.stop()}}),e)})))})))&&"loading"===_e.state&&b.classList.add("hide"),De(a,"beacon-toast-button-expand",(function(){return we(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ue(a);case 1:case"end":return e.stop()}}),e)})))}));case 28:case"end":return t.stop()}}),t)})))},He=function(e){return we(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i,o,c,u;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_e=Object.assign(Object.assign({},_e),e),r=e.timer,n=pe.getElementById("beacon-toast-wrapper")){t.next=5;break}return t.abrupt("return");case 5:if(a=n.shadowRoot){t.next=8;break}return t.abrupt("return");case 8:if(!(i=a.getElementById("beacon-toast-list"))){t.next=13;break}return Ie(i),t.next=13,Qe(a,e,i);case 13:"loading"===_e.state&&(Ee=window.setTimeout((function(){return we(void 0,void 0,void 0,Object(s.a)().mark((function e(){var t;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=a.getElementById("beacon-toast-button-expand"))&&!t.classList.contains("beacon-toast__upside_down")&&Ue(a);case 2:case"end":return e.stop()}}),e)})))}),5e3)),(o=a.getElementById("beacon-text-content"))&&(Ie(o),o.appendChild($("span",["beacon-toast__wallet__outer"],[],Se(e.body)))),(c=a.getElementById("beacon-open-wallet"))&&(e.openWalletAction?(c.classList.remove("hide"),c.addEventListener("click",(function(){e.openWalletAction&&e.openWalletAction()}))):c.classList.add("hide")),r&&(xe=window.setTimeout((function(){return we(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Me();case 2:case"end":return e.stop()}}),e)})))}),r)),(u=a.getElementById("beacon-toast-button-done"))&&u.addEventListener("click",(function(){return we(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Me();case 2:case"end":return e.stop()}}),e)})))}));case 21:case"end":return t.stop()}}),t)})))},ze=function(e){return we(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r,n;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Ee&&clearTimeout(Ee),!pe.getElementById("beacon-toast-wrapper")){t.next=14;break}if(!e.forceNew){t.next=10;break}return t.next=6,Me();case 6:return t.next=8,Ge(e);case 8:t.next=12;break;case 10:return t.next=12,He(e);case 12:t.next=16;break;case 14:return t.next=16,Ge(e);case 16:return _e&&"finished"===_e.state&&(n=null===(r=pe.getElementById("beacon-toast-wrapper"))||void 0===r?void 0:r.shadowRoot)&&(Re(n),Ne(n),Le(n)),t.abrupt("return");case 18:case"end":return t.stop()}}),t)})))},qe=r(23),Ke=r(12),Ve=function(e){return e.length>=12?"".concat(e.substr(0,5),"...").concat(e.substr(-5)):e},We=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},Ye=new p.j("BeaconEvents"),Je=5e3;!function(e){e.PERMISSION_REQUEST_SENT="PERMISSION_REQUEST_SENT",e.PERMISSION_REQUEST_SUCCESS="PERMISSION_REQUEST_SUCCESS",e.PERMISSION_REQUEST_ERROR="PERMISSION_REQUEST_ERROR",e.OPERATION_REQUEST_SENT="OPERATION_REQUEST_SENT",e.OPERATION_REQUEST_SUCCESS="OPERATION_REQUEST_SUCCESS",e.OPERATION_REQUEST_ERROR="OPERATION_REQUEST_ERROR",e.SIGN_REQUEST_SENT="SIGN_REQUEST_SENT",e.SIGN_REQUEST_SUCCESS="SIGN_REQUEST_SUCCESS",e.SIGN_REQUEST_ERROR="SIGN_REQUEST_ERROR",e.BROADCAST_REQUEST_SENT="BROADCAST_REQUEST_SENT",e.BROADCAST_REQUEST_SUCCESS="BROADCAST_REQUEST_SUCCESS",e.BROADCAST_REQUEST_ERROR="BROADCAST_REQUEST_ERROR",e.ACKNOWLEDGE_RECEIVED="ACKNOWLEDGE_RECEIVED",e.LOCAL_RATE_LIMIT_REACHED="LOCAL_RATE_LIMIT_REACHED",e.NO_PERMISSIONS="NO_PERMISSIONS",e.ACTIVE_ACCOUNT_SET="ACTIVE_ACCOUNT_SET",e.ACTIVE_TRANSPORT_SET="ACTIVE_TRANSPORT_SET",e.SHOW_PREPARE="SHOW_PREPARE",e.HIDE_UI="HIDE_UI",e.PAIR_INIT="PAIR_INIT",e.PAIR_SUCCESS="PAIR_SUCCESS",e.CHANNEL_CLOSED="CHANNEL_CLOSED",e.INTERNAL_ERROR="INTERNAL_ERROR",e.UNKNOWN="UNKNOWN"}(ke||(ke={}));var Xe,Ze=function(e){return We(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],e.walletInfo.deeplink&&("web"===e.walletInfo.type||"mobile"===e.walletInfo.type&&D(window)||"desktop"===e.walletInfo.type&&!D(window))&&(a=e.walletInfo.deeplink,r=function(){return We(void 0,void 0,void 0,Object(s.a)().mark((function e(){var t;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=document.createElement("a")).setAttribute("href",a),t.setAttribute("target","_blank"),t.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}));case 4:case"end":return e.stop()}}),e)})))}),n.push({text:"No answer from your wallet received yet. Please make sure the wallet is open.",isBold:!0}),n.push({text:"Did you make a mistake?",actionText:"Cancel Request",actionCallback:function(){return We(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Me();case 2:case"end":return e.stop()}}),e)})))}}),n.push({text:"Wallet not receiving request?",actionText:"Reset Connection",actionCallback:function(){return We(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Me();case 2:if(!(r=e.extraInfo.resetCallback)){t.next=7;break}return Ye.log("showSentToast","resetCallback invoked"),t.next=7,r();case 7:case"end":return t.stop()}}),t)})))}}),ze({body:"Request sent to\xa0 {{wallet}}",walletInfo:e.walletInfo,state:"loading",actions:n,openWalletAction:r}).catch((function(e){return console.error(e)}));case 6:case"end":return t.stop()}}),t)})))},$e=function(e,t){return We(void 0,void 0,void 0,Object(s.a)().mark((function r(){var n,a;return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.errorResponse.errorType?p.d.getError(e.errorResponse.errorType,e.errorResponse.errorData):new p.w,a=[{text:n.title,isBold:!0},{text:n.description}],e.errorResponse.errorType===v.a.TRANSACTION_INVALID_ERROR&&e.errorResponse.errorData&&a.push({text:"",actionText:"Show Details",actionCallback:function(){return We(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Me();case 2:return e.next=4,ye({title:n.title,body:n.fullDescription.description,data:n.fullDescription.data,buttons:t});case 4:case"end":return e.stop()}}),e)})))}}),r.next=5,ze({body:"{{wallet}}\xa0 has returned an error",timer:e.errorResponse.errorType===v.a.ABORTED_ERROR?Je:void 0,state:"finished",walletInfo:e.walletInfo,actions:a});case 5:case"end":return r.stop()}}),r)})))},et=function(){return function(){return We(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))}},tt=(Ce={},Object(Ke.a)(Ce,ke.PERMISSION_REQUEST_SENT,Ze),Object(Ke.a)(Ce,ke.PERMISSION_REQUEST_SUCCESS,(function(e){return We(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.output,t.next=3,ze({body:"{{wallet}}\xa0 has granted permission",timer:Je,walletInfo:e.walletInfo,state:"finished",actions:[{text:"Address",actionText:Ve(r.address),isBold:!0},{text:"Network",actionText:"".concat(r.network.type)},{text:"Permissions",actionText:r.scopes.join(", ")}]});case 3:case"end":return t.stop()}}),t)})))})),Object(Ke.a)(Ce,ke.PERMISSION_REQUEST_ERROR,$e),Object(Ke.a)(Ce,ke.OPERATION_REQUEST_SENT,Ze),Object(Ke.a)(Ce,ke.OPERATION_REQUEST_SUCCESS,(function(e){return We(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.account,n=e.output,a=e.blockExplorer,t.next=3,ze({body:"{{wallet}}\xa0 successfully submitted operation",timer:Je,state:"finished",walletInfo:e.walletInfo,actions:[{text:Ve(n.transactionHash),isBold:!0,actionText:"Open Blockexplorer",actionLogo:"external",actionCallback:function(){return We(void 0,void 0,void 0,Object(s.a)().mark((function e(){var t;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getTransactionLink(n.transactionHash,r.network);case 2:return t=e.sent,window.open(t,"_blank"),e.next=6,Me();case 6:case"end":return e.stop()}}),e)})))}}]});case 3:case"end":return t.stop()}}),t)})))})),Object(Ke.a)(Ce,ke.OPERATION_REQUEST_ERROR,$e),Object(Ke.a)(Ce,ke.SIGN_REQUEST_SENT,Ze),Object(Ke.a)(Ce,ke.SIGN_REQUEST_SUCCESS,(function(e){return We(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.output,t.next=3,ze({body:"{{wallet}}\xa0 successfully signed payload",timer:Je,state:"finished",walletInfo:e.walletInfo,actions:[{text:"Signature: ".concat(Ve(r.signature)),actionText:"Copy to clipboard",actionCallback:function(){return We(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return navigator.clipboard.writeText(r.signature).then((function(){Ye.log("showSignSuccessAlert","Copying to clipboard was successful!")}),(function(e){Ye.error("showSignSuccessAlert","Could not copy text to clipboard: ",e)})),e.next=3,Me();case 3:case"end":return e.stop()}}),e)})))}}]});case 3:case"end":return t.stop()}}),t)})))})),Object(Ke.a)(Ce,ke.SIGN_REQUEST_ERROR,$e),Object(Ke.a)(Ce,ke.BROADCAST_REQUEST_SENT,Ze),Object(Ke.a)(Ce,ke.BROADCAST_REQUEST_SUCCESS,(function(e){return We(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.network,n=e.output,a=e.blockExplorer,t.next=3,ze({body:"{{wallet}}\xa0 successfully injected operation",timer:Je,state:"finished",walletInfo:e.walletInfo,actions:[{text:Ve(n.transactionHash),isBold:!0,actionText:"Open Blockexplorer",actionLogo:"external",actionCallback:function(){return We(void 0,void 0,void 0,Object(s.a)().mark((function e(){var t;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getTransactionLink(n.transactionHash,r);case 2:return t=e.sent,window.open(t,"_blank"),e.next=6,Me();case 6:case"end":return e.stop()}}),e)})))}}]});case 3:case"end":return t.stop()}}),t)})))})),Object(Ke.a)(Ce,ke.BROADCAST_REQUEST_ERROR,$e),Object(Ke.a)(Ce,ke.ACKNOWLEDGE_RECEIVED,(function(e){return We(void 0,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:ze({body:"Awaiting confirmation in\xa0 {{wallet}}",state:"acknowledge",walletInfo:e.walletInfo}).catch((function(e){return console.error(e)}));case 1:case"end":return t.stop()}}),t)})))})),Object(Ke.a)(Ce,ke.LOCAL_RATE_LIMIT_REACHED,(function(){return We(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ye({title:"Error",body:"Rate limit reached. Please slow down",buttons:[{text:"Done",style:"outline"}],timer:3e3}).catch((function(e){return console.error(e)}));case 1:case"end":return e.stop()}}),e)})))})),Object(Ke.a)(Ce,ke.NO_PERMISSIONS,(function(){return We(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ye({title:"No Permission",body:"Please allow the wallet to handle this type of request."});case 2:case"end":return e.stop()}}),e)})))})),Object(Ke.a)(Ce,ke.ACTIVE_ACCOUNT_SET,et()),Object(Ke.a)(Ce,ke.ACTIVE_TRANSPORT_SET,et()),Object(Ke.a)(Ce,ke.SHOW_PREPARE,(function(e){return We(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.walletInfo?"Preparing Request for\xa0 {{wallet}}...":"Preparing Request...",ze({body:r,state:"prepare",walletInfo:e.walletInfo}).catch((function(e){return console.error(e)}));case 2:case"end":return t.stop()}}),t)})))})),Object(Ke.a)(Ce,ke.HIDE_UI,(function(e){return We(void 0,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e?(e.includes("alert")&&ve(),e.includes("toast")&&Me()):Me();case 1:case"end":return t.stop()}}),t)})))})),Object(Ke.a)(Ce,ke.PAIR_INIT,(function(e){return We(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={title:"Choose your preferred wallet",body:"

",pairingPayload:{p2pSyncCode:e.p2pPeerInfo,postmessageSyncCode:e.postmessagePeerInfo,preferredNetwork:e.preferredNetwork},closeButtonCallback:e.abortedHandler,disclaimerText:e.disclaimerText},t.next=3,ye(r);case 3:case"end":return t.stop()}}),t)})))})),Object(Ke.a)(Ce,ke.PAIR_SUCCESS,(function(){return We(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ve();case 2:case"end":return e.stop()}}),e)})))})),Object(Ke.a)(Ce,ke.CHANNEL_CLOSED,(function(){return We(void 0,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ye({title:"Channel closed",body:"Your peer has closed the connection.",buttons:[{text:"Done",style:"outline"}],timer:1500});case 2:case"end":return e.stop()}}),e)})))})),Object(Ke.a)(Ce,ke.INTERNAL_ERROR,(function(e){return We(void 0,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(n=Object(I.a)(null!==(r=e.buttons)&&void 0!==r?r:[])).push({text:"Done",style:"outline"}),a={title:"Internal Error",body:e.text,buttons:n},t.next=5,ye(a);case 5:case"end":return t.stop()}}),t)})))})),Object(Ke.a)(Ce,ke.UNKNOWN,et()),Ce),rt=function(){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;Object(f.a)(this,e),this.callbackMap=(t={},Object(Ke.a)(t,ke.PERMISSION_REQUEST_SENT,[tt.PERMISSION_REQUEST_SENT]),Object(Ke.a)(t,ke.PERMISSION_REQUEST_SUCCESS,[tt.PERMISSION_REQUEST_SUCCESS]),Object(Ke.a)(t,ke.PERMISSION_REQUEST_ERROR,[tt.PERMISSION_REQUEST_ERROR]),Object(Ke.a)(t,ke.OPERATION_REQUEST_SENT,[tt.OPERATION_REQUEST_SENT]),Object(Ke.a)(t,ke.OPERATION_REQUEST_SUCCESS,[tt.OPERATION_REQUEST_SUCCESS]),Object(Ke.a)(t,ke.OPERATION_REQUEST_ERROR,[tt.OPERATION_REQUEST_ERROR]),Object(Ke.a)(t,ke.SIGN_REQUEST_SENT,[tt.SIGN_REQUEST_SENT]),Object(Ke.a)(t,ke.SIGN_REQUEST_SUCCESS,[tt.SIGN_REQUEST_SUCCESS]),Object(Ke.a)(t,ke.SIGN_REQUEST_ERROR,[tt.SIGN_REQUEST_ERROR]),Object(Ke.a)(t,ke.BROADCAST_REQUEST_SENT,[tt.BROADCAST_REQUEST_SENT]),Object(Ke.a)(t,ke.BROADCAST_REQUEST_SUCCESS,[tt.BROADCAST_REQUEST_SUCCESS]),Object(Ke.a)(t,ke.BROADCAST_REQUEST_ERROR,[tt.BROADCAST_REQUEST_ERROR]),Object(Ke.a)(t,ke.ACKNOWLEDGE_RECEIVED,[tt.ACKNOWLEDGE_RECEIVED]),Object(Ke.a)(t,ke.LOCAL_RATE_LIMIT_REACHED,[tt.LOCAL_RATE_LIMIT_REACHED]),Object(Ke.a)(t,ke.NO_PERMISSIONS,[tt.NO_PERMISSIONS]),Object(Ke.a)(t,ke.ACTIVE_ACCOUNT_SET,[tt.ACTIVE_ACCOUNT_SET]),Object(Ke.a)(t,ke.ACTIVE_TRANSPORT_SET,[tt.ACTIVE_TRANSPORT_SET]),Object(Ke.a)(t,ke.SHOW_PREPARE,[tt.SHOW_PREPARE]),Object(Ke.a)(t,ke.HIDE_UI,[tt.HIDE_UI]),Object(Ke.a)(t,ke.PAIR_INIT,[tt.PAIR_INIT]),Object(Ke.a)(t,ke.PAIR_SUCCESS,[tt.PAIR_SUCCESS]),Object(Ke.a)(t,ke.CHANNEL_CLOSED,[tt.CHANNEL_CLOSED]),Object(Ke.a)(t,ke.INTERNAL_ERROR,[tt.INTERNAL_ERROR]),Object(Ke.a)(t,ke.UNKNOWN,[tt.UNKNOWN]),t),n&&this.setAllHandlers(),this.overrideDefaults(r)}return Object(u.a)(e,[{key:"on",value:function(e,t){return We(this,void 0,void 0,Object(s.a)().mark((function r(){var n;return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:(n=this.callbackMap[e]||[]).push(t),this.callbackMap[e]=n;case 3:case"end":return r.stop()}}),r,this)})))}},{key:"emit",value:function(e,t,r){return We(this,void 0,void 0,Object(s.a)().mark((function n(){var a,i=this;return Object(s.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:(a=this.callbackMap[e])&&a.length>0&&a.forEach((function(n){return We(i,void 0,void 0,Object(s.a)().mark((function a(){return Object(s.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,n(t,r);case 3:a.next=8;break;case 5:a.prev=5,a.t0=a.catch(0),Ye.error("error handling event ".concat(e),a.t0);case 8:case"end":return a.stop()}}),a,null,[[0,5]])})))}));case 2:case"end":return n.stop()}}),n,this)})))}},{key:"overrideDefaults",value:function(e){var t=this;Object.keys(e).forEach((function(r){var n=r,a=e[n];a&&(t.callbackMap[n]=[a.handler])}))}},{key:"setAllHandlers",value:function(e){var t=this;Object.keys(this.callbackMap).forEach((function(r){var n=r;t.callbackMap[n]=[],e?t.callbackMap[n].push(e):t.callbackMap[n].push((function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:(e={},Object(Ke.a)(e,v.e.MAINNET,"https://tezblock.io"),Object(Ke.a)(e,v.e.DELPHINET,"https://delphinet.tezblock.io"),Object(Ke.a)(e,v.e.EDONET,"https://edonet.tezblock.io"),Object(Ke.a)(e,v.e.FLORENCENET,"https://florencenet.tezblock.io"),Object(Ke.a)(e,v.e.GRANADANET,"https://granadanet.tezblock.io"),Object(Ke.a)(e,v.e.HANGZHOUNET,"https://hangzhounet.tezblock.io"),Object(Ke.a)(e,v.e.ITHACANET,"https://ithacanet.tezblock.io"),Object(Ke.a)(e,v.e.JAKARTANET,"https://jakartanet.tezblock.io"),Object(Ke.a)(e,v.e.CUSTOM,"https://jakartanet.tezblock.io"),e);return Object(f.a)(this,r),(n=t.call(this,a)).rpcUrls=a,n}return Object(u.a)(r,[{key:"getAddressLink",value:function(e,t){return it(this,void 0,void 0,Object(s.a)().mark((function r(){var n;return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getLinkForNetwork(t);case 2:return n=r.sent,r.abrupt("return","".concat(n,"/account/").concat(e));case 4:case"end":return r.stop()}}),r,this)})))}},{key:"getTransactionLink",value:function(e,t){return it(this,void 0,void 0,Object(s.a)().mark((function r(){var n;return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getLinkForNetwork(t);case 2:return n=r.sent,r.abrupt("return","".concat(n,"/transaction/").concat(e));case 4:case"end":return r.stop()}}),r,this)})))}}]),r}(function(){function e(t){Object(f.a)(this,e),this.rpcUrls=t}return Object(u.a)(e,[{key:"getLinkForNetwork",value:function(e){return at(this,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.rpcUrls[e.type]);case 1:case"end":return t.stop()}}),t,this)})))}}]),e}()),st=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},ct=new p.j("DappPostMessageTransport"),ut=function(e){Object(d.a)(r,e);var t=Object(l.a)(r);function r(e,n,a){return Object(f.a)(this,r),t.call(this,e,n,a,v.i.TRANSPORT_POSTMESSAGE_PEERS_DAPP)}return Object(u.a)(r,[{key:"startOpenChannelListener",value:function(){return st(this,void 0,void 0,Object(s.a)().mark((function e(){var t=this;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.listenForChannelOpening((function(e){return st(t,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return ct.log("connect","received PostMessagePairingResponse",e),t.next=3,this.addPeer(e);case 3:this._isConnected=v.j.CONNECTED,this.newPeerListener&&(this.newPeerListener(e),this.newPeerListener=void 0);case 5:case"end":return t.stop()}}),t,this)})))})));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"listenForNewPeer",value:function(e){return st(this,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:ct.log("listenForNewPeer"),this.newPeerListener=e;case 2:case"end":return t.stop()}}),t,this)})))}},{key:"stopListeningForNewPeers",value:function(){return st(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ct.log("stopListeningForNewPeers"),this.newPeerListener=void 0;case 2:case"end":return e.stop()}}),e,this)})))}}]),r}(k),ft=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},dt=new p.j("DappP2PTransport"),lt=function(e){Object(d.a)(r,e);var t=Object(l.a)(r);function r(e,n,a,i,o,s){return Object(f.a)(this,r),t.call(this,e,n,a,i,v.i.TRANSPORT_P2P_PEERS_DAPP,o,s)}return Object(u.a)(r,[{key:"startOpenChannelListener",value:function(){return ft(this,void 0,void 0,Object(s.a)().mark((function e(){var t=this;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.listenForChannelOpening((function(e){return ft(t,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return dt.log("listenForNewPeer","new publicKey",e.publicKey),t.next=3,this.addPeer(e);case 3:this._isConnected=v.j.CONNECTED,this.newPeerListener&&(this.newPeerListener(e),this.newPeerListener=void 0);case 5:case"end":return t.stop()}}),t,this)})))})));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"listenForNewPeer",value:function(e){return ft(this,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:dt.log("listenForNewPeer"),this.newPeerListener=e;case 2:case"end":return t.stop()}}),t,this)})))}},{key:"stopListeningForNewPeers",value:function(){return ft(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:dt.log("stopListeningForNewPeers"),this.newPeerListener=void 0;case 2:case"end":return e.stop()}}),e,this)})))}}]),r}(w),ht=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},pt=new p.j("DAppClient"),bt=function(e){Object(d.a)(r,e);var t=Object(l.a)(r);function r(e){var n,a,i,o,c;return Object(f.a)(this,r),(n=t.call(this,Object.assign({storage:e&&e.storage?e.storage:new p.i},e))).events=new rt,n.openRequests=new Map,n._activeAccount=new B.a,n._activePeer=new B.a,n.blockchains=new Map,n.events=new rt(e.eventHandlers,null!==(a=e.disableDefaultEvents)&&void 0!==a&&a),n.blockExplorer=null!==(i=e.blockExplorer)&&void 0!==i?i:new ot,n.preferredNetwork=null!==(o=e.preferredNetwork)&&void 0!==o?o:v.e.MAINNET,fe(null!==(c=e.colorMode)&&void 0!==c?c:v.c.LIGHT),n.disclaimerText=e.disclaimerText,n.appMetadataManager=new p.b(n.storage),n.activeAccountLoaded=n.storage.get(v.i.ACTIVE_ACCOUNT).then((function(e){return ht(Object(qe.a)(n),void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=9;break}return t.t0=this,t.next=4,this.accountManager.getAccount(e);case 4:return t.t1=t.sent,t.next=7,t.t0.setActiveAccount.call(t.t0,t.t1);case 7:t.next=11;break;case 9:return t.next=11,this.setActiveAccount(void 0);case 11:case"end":return t.stop()}}),t,this)})))})).catch((function(e){return ht(Object(qe.a)(n),void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setActiveAccount(void 0);case 2:console.error(e);case 3:case"end":return t.stop()}}),t,this)})))})),n.handleResponse=function(e,t){return ht(Object(qe.a)(n),void 0,void 0,Object(s.a)().mark((function r(){var n,a,i,o,c,u,f,d,l,h,p,b;return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.openRequests.get(e.id),pt.log("handleResponse","Received message",e,t),"3"!==e.version){r.next=63;break}if(o=e,!i||o.message.type!==v.b.Acknowledge){r.next=18;break}return pt.log("acknowledge message received for ".concat(e.id)),console.timeLog(e.id,"acknowledge"),r.t0=this.events,r.t1=ke.ACKNOWLEDGE_RECEIVED,r.t2=o.message,r.t3={},r.next=13,this.getWalletInfo();case 13:r.t4=r.sent,r.t5={message:r.t2,extraInfo:r.t3,walletInfo:r.t4},r.t0.emit.call(r.t0,r.t1,r.t5).catch(console.error),r.next=61;break;case 18:if(!i){r.next=29;break}if(c=o.message.blockchainData.appMetadata,o.message.type!==v.b.PermissionResponse||!c){r.next=23;break}return r.next=23,this.appMetadataManager.addAppMetadata(c);case 23:console.timeLog(o.id,"response"),console.timeEnd(o.id),o.message.type===v.b.Error?i.reject(o.message):i.resolve({message:e,connectionInfo:t}),this.openRequests.delete(o.id),r.next=61;break;case 29:if(o.message.type!==v.b.Disconnect){r.next=60;break}if(t.origin!==v.f.P2P){r.next=34;break}r.t6=this.p2pTransport,r.next=42;break;case 34:if(null===(n=this.postMessageTransport)||void 0===n){r.next=38;break}r.t7=n,r.next=41;break;case 38:return r.next=40,this.transport;case 40:r.t7=r.sent;case 41:r.t6=r.t7;case 42:if(!(u=r.t6)){r.next=58;break}return r.next=46,u.getPeers();case 46:if(f=r.sent,!(d=f.find((function(t){return t.senderId===e.senderId})))){r.next=57;break}return r.next=51,u.removePeer(d);case 51:return r.next=53,this.removeAccountsForPeers([d]);case 53:return r.next=55,this.events.emit(ke.CHANNEL_CLOSED);case 55:r.next=58;break;case 57:pt.error("handleDisconnect","cannot find peer for sender ID",e.senderId);case 58:r.next=61;break;case 60:pt.error("handleResponse","no request found for id ",e.id);case 61:r.next=120;break;case 63:if(l=e,!i||l.type!==v.b.Acknowledge){r.next=78;break}return pt.log("acknowledge message received for ".concat(e.id)),console.timeLog(e.id,"acknowledge"),r.t8=this.events,r.t9=ke.ACKNOWLEDGE_RECEIVED,r.t10=l,r.t11={},r.next=73,this.getWalletInfo();case 73:r.t12=r.sent,r.t13={message:r.t10,extraInfo:r.t11,walletInfo:r.t12},r.t8.emit.call(r.t8,r.t9,r.t13).catch(console.error),r.next=120;break;case 78:if(!i){r.next=88;break}if(l.type!==v.b.PermissionResponse||!l.appMetadata){r.next=82;break}return r.next=82,this.appMetadataManager.addAppMetadata(l.appMetadata);case 82:console.timeLog(l.id,"response"),console.timeEnd(l.id),l.type===v.b.Error||e.errorType?i.reject(l):i.resolve({message:e,connectionInfo:t}),this.openRequests.delete(l.id),r.next=120;break;case 88:if(l.type!==v.b.Disconnect&&e.typedMessage.type!==v.b.Disconnect){r.next=119;break}if(t.origin!==v.f.P2P){r.next=93;break}r.t14=this.p2pTransport,r.next=101;break;case 93:if(null===(a=this.postMessageTransport)||void 0===a){r.next=97;break}r.t15=a,r.next=100;break;case 97:return r.next=99,this.transport;case 99:r.t15=r.sent;case 100:r.t14=r.t15;case 101:if(!(h=r.t14)){r.next=117;break}return r.next=105,h.getPeers();case 105:if(p=r.sent,!(b=p.find((function(t){return t.senderId===e.senderId})))){r.next=116;break}return r.next=110,h.removePeer(b);case 110:return r.next=112,this.removeAccountsForPeers([b]);case 112:return r.next=114,this.events.emit(ke.CHANNEL_CLOSED);case 114:r.next=117;break;case 116:pt.error("handleDisconnect","cannot find peer for sender ID",e.senderId);case 117:r.next=120;break;case 119:pt.error("handleResponse","no request found for id ",e.id);case 120:case"end":return r.stop()}}),r,this)})))},n}return Object(u.a)(r,[{key:"initInternalTransports",value:function(){return ht(this,void 0,void 0,Object(s.a)().mark((function e(){var t;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.keyPair;case 2:if(t=e.sent,!this.postMessageTransport&&!this.p2pTransport){e.next=5;break}return e.abrupt("return");case 5:return this.postMessageTransport=new ut(this.name,t,this.storage),e.next=8,this.addListener(this.postMessageTransport);case 8:return this.p2pTransport=new lt(this.name,t,this.storage,this.matrixNodes,this.iconUrl,this.appUrl),e.next=11,this.addListener(this.p2pTransport);case 11:case"end":return e.stop()}}),e,this)})))}},{key:"init",value:function(e){var t=this,n=Object.create(null,{init:{get:function(){return Object(m.a)(Object(g.a)(r.prototype),"init",t)}}});return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r=this;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._initPromise){t.next=2;break}return t.abrupt("return",this._initPromise);case 2:return t.prev=2,t.next=5,this.activeAccountLoaded;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(2);case 9:return this._initPromise=new Promise((function(t){return ht(r,void 0,void 0,Object(s.a)().mark((function r(){var a,i,o,c,u,f=this;return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e){r.next=10;break}return r.next=3,this.addListener(e);case 3:return r.t0=t,r.next=6,n.init.call(this,e);case 6:r.t1=r.sent,(0,r.t0)(r.t1),r.next=59;break;case 10:if(!this._transport.isSettled()){r.next=27;break}return r.next=13,this.transport;case 13:return r.next=15,r.sent.connect();case 15:return r.t2=t,r.t3=n.init,r.t4=this,r.next=20,this.transport;case 20:return r.t5=r.sent,r.next=23,r.t3.call.call(r.t3,r.t4,r.t5);case 23:r.t6=r.sent,(0,r.t2)(r.t6),r.next=59;break;case 27:return r.next=29,this.getActiveAccount();case 29:return a=r.sent,i=function(){f.postMessageTransport&&f.postMessageTransport.stopListeningForNewPeers().catch(console.error),f.p2pTransport&&f.p2pTransport.stopListeningForNewPeers().catch(console.error)},r.next=33,this.initInternalTransports();case 33:if(this.postMessageTransport&&this.p2pTransport){r.next=35;break}return r.abrupt("return");case 35:if(this.postMessageTransport.connect().then().catch(console.error),!a||!a.origin){r.next=54;break}if((o=a.origin.type)!==v.f.EXTENSION){r.next=46;break}return r.t7=t,r.next=42,n.init.call(this,this.postMessageTransport);case 42:r.t8=r.sent,(0,r.t7)(r.t8),r.next=52;break;case 46:if(o!==v.f.P2P){r.next=52;break}return r.t9=t,r.next=50,n.init.call(this,this.p2pTransport);case 50:r.t10=r.sent,(0,r.t9)(r.t10);case 52:r.next=59;break;case 54:c=this.p2pTransport,(u=this.postMessageTransport).listenForNewPeer((function(e){pt.log("init","postmessage transport peer connected",e),f.events.emit(ke.PAIR_SUCCESS,e).catch((function(e){return console.warn(e)})),f.setActivePeer(e).catch(console.error),f.setTransport(f.postMessageTransport).catch(console.error),i(),t(v.k.POST_MESSAGE)})).catch(console.error),c.listenForNewPeer((function(e){pt.log("init","p2p transport peer connected",e),f.events.emit(ke.PAIR_SUCCESS,e).catch((function(e){return console.warn(e)})),f.setActivePeer(e).catch(console.error),f.setTransport(f.p2pTransport).catch(console.error),i(),t(v.k.P2P)})).catch(console.error),k.getAvailableExtensions().then((function(){return ht(f,void 0,void 0,Object(s.a)().mark((function e(){var t=this;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.events.emit(ke.PAIR_INIT,{p2pPeerInfo:function(){return c.connect().then().catch(console.error),c.getPairingRequestInfo()},postmessagePeerInfo:function(){return u.getPairingRequestInfo()},preferredNetwork:this.preferredNetwork,abortedHandler:function(){t._initPromise=void 0},disclaimerText:this.disclaimerText}).catch((function(e){return console.warn(e)}));case 1:case"end":return e.stop()}}),e,this)})))})).catch((function(e){f._initPromise=void 0,console.error(e)}));case 59:case"end":return r.stop()}}),r,this)})))})),t.abrupt("return",this._initPromise);case 11:case"end":return t.stop()}}),t,this,[[2,7]])})))}},{key:"getActiveAccount",value:function(){return ht(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._activeAccount.promise);case 1:case"end":return e.stop()}}),e,this)})))}},{key:"setActiveAccount",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r,n;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._activeAccount.isSettled()?this._activeAccount=B.a.resolve(e):this._activeAccount.resolve(e),!e){t.next=20;break}return r=e.origin.type,t.next=5,this.initInternalTransports();case 5:if(r!==v.f.EXTENSION){t.next=10;break}return t.next=8,this.setTransport(this.postMessageTransport);case 8:t.next=13;break;case 10:if(r!==v.f.P2P){t.next=13;break}return t.next=13,this.setTransport(this.p2pTransport);case 13:return t.next=15,this.getPeer(e);case 15:return n=t.sent,t.next=18,this.setActivePeer(n);case 18:t.next=24;break;case 20:return t.next=22,this.setActivePeer(void 0);case 22:return t.next=24,this.setTransport(void 0);case 24:return t.next=26,this.storage.set(v.i.ACTIVE_ACCOUNT,e?e.accountIdentifier:void 0);case 26:return t.next=28,this.events.emit(ke.ACTIVE_ACCOUNT_SET,e);case 28:return t.abrupt("return");case 29:case"end":return t.stop()}}),t,this)})))}},{key:"clearActiveAccount",value:function(){return this.setActiveAccount()}},{key:"setColorMode",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",fe(e));case 1:case"end":return t.stop()}}),t)})))}},{key:"getColorMode",value:function(){return ht(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",de());case 1:case"end":return e.stop()}}),e)})))}},{key:"getAppMetadata",value:function(){return ht(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getOwnAppMetadata());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"showPrepare",value:function(){return ht(this,void 0,void 0,Object(s.a)().mark((function e(){var t,r=this;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ht(r,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getWalletInfo();case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",void 0);case 9:case"end":return e.stop()}}),e,this,[[0,6]])})));case 2:return t=e.sent,e.next=5,this.events.emit(ke.SHOW_PREPARE,{walletInfo:t});case 5:case"end":return e.stop()}}),e,this)})))}},{key:"hideUI",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.events.emit(ke.HIDE_UI,e);case 2:case"end":return t.stop()}}),t,this)})))}},{key:"removeAccount",value:function(e){var t=this,n=Object.create(null,{removeAccount:{get:function(){return Object(m.a)(Object(g.a)(r.prototype),"removeAccount",t)}}});return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r,a;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.removeAccount.call(this,e),t.next=3,this.getActiveAccount();case 3:if(!(a=t.sent)||a.accountIdentifier!==e){t.next=7;break}return t.next=7,this.setActiveAccount(void 0);case 7:return t.abrupt("return",r);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"removeAllAccounts",value:function(){var e=this,t=Object.create(null,{removeAllAccounts:{get:function(){return Object(m.a)(Object(g.a)(r.prototype),"removeAllAccounts",e)}}});return ht(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.removeAllAccounts.call(this);case 2:return e.next=4,this.setActiveAccount(void 0);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"removePeer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ht(this,void 0,void 0,Object(s.a)().mark((function r(){var n,a;return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.transport;case 2:return n=r.sent,a=n.removePeer(e),r.next=6,this.removeAccountsForPeers([e]);case 6:if(!t){r.next=9;break}return r.next=9,this.sendDisconnectToPeer(e,n);case 9:return r.abrupt("return",a);case 10:case"end":return r.stop()}}),r,this)})))}},{key:"removeAllPeers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i,o=this;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.transport;case 2:return r=t.sent,t.next=5,r.getPeers();case 5:return n=t.sent,a=r.removeAllPeers(),t.next=9,this.removeAccountsForPeers(n);case 9:if(!e){t.next=13;break}return i=n.map((function(e){return o.sendDisconnectToPeer(e,r)})),t.next=13,Promise.all(i);case 13:return t.abrupt("return",a);case 14:case"end":return t.stop()}}),t,this)})))}},{key:"subscribeToEvent",value:function(e,t){return ht(this,void 0,void 0,Object(s.a)().mark((function r(){return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.events.on(e,t);case 2:case"end":return r.stop()}}),r,this)})))}},{key:"checkPermissions",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r,n;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e!==v.b.PermissionRequest){t.next=2;break}return t.abrupt("return",!0);case 2:return t.next=4,this.getActiveAccount();case 4:if(r=t.sent){t.next=9;break}return t.next=8,this.sendInternalError("No active account set!");case 8:throw t.sent;case 9:n=r.scopes,t.t0=e,t.next=t.t0===v.b.OperationRequest?13:t.t0===v.b.SignPayloadRequest?14:t.t0===v.b.BroadcastRequest?15:16;break;case 13:return t.abrupt("return",n.includes(v.g.OPERATION_REQUEST));case 14:return t.abrupt("return",n.includes(v.g.SIGN));case 15:return t.abrupt("return",!0);case 16:return t.abrupt("return",!1);case 17:case"end":return t.stop()}}),t,this)})))}},{key:"addBlockchain",value:function(e){this.blockchains.set(e.identifier,e),e.getWalletLists().then((function(e){var t;!function(e){U=e}(e.desktopList),function(e){Q=e}(e.extensionList),function(e){G=e}(e.webList),t=e.iOSList,H=t}))}},{key:"removeBlockchain",value:function(e){this.blockchains.delete(e)}},{key:"permissionRequest",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i,o,c,u,f=this;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("PERMISSION REQUEST"),r=this.blockchains.get(e.blockchainIdentifier)){t.next=4;break}throw new Error('Blockchain "'.concat(e.blockchainIdentifier,'" not supported by dAppClient'));case 4:return t.t0=Object,t.t1=Object.assign({},e),t.t2=v.b.PermissionRequest,t.t3=Object,t.t4=Object.assign({},e.blockchainData),t.next=11,this.getOwnAppMetadata();case 11:return t.t5=t.sent,t.t6={appMetadata:t.t5},t.t7=t.t3.assign.call(t.t3,t.t4,t.t6),t.t8={type:t.t2,blockchainData:t.t7},n=t.t0.assign.call(t.t0,t.t1,t.t8),console.log("REQUESTION PERMIMISSION V3","xxx",n),t.next=19,this.makeRequestV3(n).catch((function(e){return ht(f,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("TODO");case 1:case"end":return e.stop()}}),e)})))}));case 19:return a=t.sent,i=a.message,o=a.connectionInfo,console.log("RESPONSE V3",i,o),t.next=25,r.getAccountInfosFromPermissionResponse(i.message);case 25:return c=t.sent,u={accountIdentifier:c[0].accountId,senderId:i.senderId,origin:{type:o.origin,id:o.id},address:c[0].address,publicKey:c[0].publicKey,scopes:i.message.blockchainData.scopes,connectedAt:(new Date).getTime(),chainData:i.message.blockchainData},t.next=29,this.accountManager.addAccount(u);case 29:return t.next=31,this.setActiveAccount(u);case 31:return t.t9=r,t.t10=n,t.t11=u,t.t12=i,t.t13=this.blockExplorer,t.t14=o,t.next=39,this.getWalletInfo();case 39:return t.t15=t.sent,t.t16={request:t.t10,account:t.t11,output:t.t12,blockExplorer:t.t13,connectionContext:t.t14,walletInfo:t.t15},t.next=43,t.t9.handleResponse.call(t.t9,t.t16);case 43:return t.t17=this,t.t18=n,t.t19=u,t.t20={address:c[0].address,network:{type:v.e.MAINNET},scopes:[v.g.OPERATION_REQUEST]},t.t21=this.blockExplorer,t.t22=o,t.next=51,this.getWalletInfo();case 51:return t.t23=t.sent,t.t24={account:t.t19,output:t.t20,blockExplorer:t.t21,connectionContext:t.t22,walletInfo:t.t23},t.next=55,t.t17.notifySuccess.call(t.t17,t.t18,t.t24);case 55:return t.abrupt("return",i.message);case 56:case"end":return t.stop()}}),t,this)})))}},{key:"request",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i,o,c,u=this;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("REQUEST",e),r=this.blockchains.get(e.blockchainIdentifier)){t.next=4;break}throw new Error('Blockchain "'.concat(r,'" not supported by dAppClient'));case 4:return t.next=6,r.validateRequest(e);case 6:return t.next=8,this.getActiveAccount();case 8:if(n=t.sent){t.next=13;break}return t.next=12,this.sendInternalError("No active account!");case 12:throw t.sent;case 13:return a=Object.assign(Object.assign({},e),{type:v.b.BlockchainRequest,accountId:n.accountIdentifier}),t.next=16,this.makeRequestV3(a).catch((function(e){return ht(u,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw console.error(e),new Error("TODO");case 2:case"end":return t.stop()}}),t)})))}));case 16:return i=t.sent,o=i.message,c=i.connectionInfo,t.t0=r,t.t1=a,t.t2=n,t.t3=o,t.t4=this.blockExplorer,t.t5=c,t.next=27,this.getWalletInfo();case 27:return t.t6=t.sent,t.t7={request:t.t1,account:t.t2,output:t.t3,blockExplorer:t.t4,connectionContext:t.t5,walletInfo:t.t6},t.next=31,t.t0.handleResponse.call(t.t0,t.t7);case 31:return t.abrupt("return",o.message);case 32:case"end":return t.stop()}}),t,this)})))}},{key:"requestPermissions",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i,o,c,u,f,d=this;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getOwnAppMetadata();case 2:return t.t0=t.sent,t.t1=v.b.PermissionRequest,t.t2=e&&e.network?e.network:{type:v.e.MAINNET},t.t3=e&&e.scopes?e.scopes:[v.g.OPERATION_REQUEST,v.g.SIGN],r={appMetadata:t.t0,type:t.t1,network:t.t2,scopes:t.t3},t.next=9,this.makeRequest(r).catch((function(e){return ht(d,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.handleRequestError(r,e);case 2:throw t.sent;case 3:case"end":return t.stop()}}),t,this)})))}));case 9:return n=t.sent,a=n.message,i=n.connectionInfo,o=a.publicKey||a.pubkey||a.pubKey,t.next=15,Object(B.f)(o);case 15:return c=t.sent,t.next=18,Object(p.x)(c,a.network);case 18:return t.t4=t.sent,t.t5=a.senderId,t.t6={type:i.origin,id:i.id},t.t7=c,t.t8=o,t.t9=a.network,t.t10=a.scopes,t.t11=a.threshold,t.t12=(new Date).getTime(),u={accountIdentifier:t.t4,senderId:t.t5,origin:t.t6,address:t.t7,publicKey:t.t8,network:t.t9,scopes:t.t10,threshold:t.t11,connectedAt:t.t12},t.next=30,this.accountManager.addAccount(u);case 30:return t.next=32,this.setActiveAccount(u);case 32:return f=Object.assign(Object.assign({},a),{address:c,accountInfo:u}),t.t13=this,t.t14=r,t.t15=u,t.t16=f,t.t17=this.blockExplorer,t.t18=i,t.next=41,this.getWalletInfo();case 41:return t.t19=t.sent,t.t20={account:t.t15,output:t.t16,blockExplorer:t.t17,connectionContext:t.t18,walletInfo:t.t19},t.next=45,t.t13.notifySuccess.call(t.t13,t.t14,t.t20);case 45:return t.abrupt("return",f);case 46:case"end":return t.stop()}}),t,this)})))}},{key:"requestSignPayload",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i,o,c,u,f=this;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.payload){t.next=4;break}return t.next=3,this.sendInternalError("Payload must be provided");case 3:case 10:throw t.sent;case 4:return t.next=6,this.getActiveAccount();case 6:if(r=t.sent){t.next=11;break}return t.next=10,this.sendInternalError("No active account!");case 11:if("string"===typeof(n=e.payload)){t.next=14;break}throw new Error("Payload must be a string");case 14:return a=function(){switch(e.signingType){case v.h.OPERATION:if(!n.startsWith("03"))throw new Error('When using signing type "OPERATION", the payload must start with prefix "03"');return v.h.OPERATION;case v.h.MICHELINE:if(!n.startsWith("05"))throw new Error('When using signing type "MICHELINE", the payload must start with prefix "05"');return v.h.MICHELINE;case v.h.RAW:default:return v.h.RAW}}(),i={type:v.b.SignPayloadRequest,signingType:a,payload:n,sourceAddress:e.sourceAddress||r.address},t.next=18,this.makeRequest(i).catch((function(e){return ht(f,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.handleRequestError(i,e);case 2:throw t.sent;case 3:case"end":return t.stop()}}),t,this)})))}));case 18:return o=t.sent,c=o.message,u=o.connectionInfo,t.t0=this,t.t1=i,t.t2=r,t.t3=c,t.t4=u,t.next=28,this.getWalletInfo();case 28:return t.t5=t.sent,t.t6={account:t.t2,output:t.t3,connectionContext:t.t4,walletInfo:t.t5},t.next=32,t.t0.notifySuccess.call(t.t0,t.t1,t.t6);case 32:return t.abrupt("return",c);case 33:case"end":return t.stop()}}),t,this)})))}},{key:"requestOperation",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i,o,c=this;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.operationDetails){t.next=4;break}return t.next=3,this.sendInternalError("Operation details must be provided");case 3:case 10:throw t.sent;case 4:return t.next=6,this.getActiveAccount();case 6:if(r=t.sent){t.next=11;break}return t.next=10,this.sendInternalError("No active account!");case 11:return n={type:v.b.OperationRequest,network:r.network||{type:v.e.MAINNET},operationDetails:e.operationDetails,sourceAddress:r.address||""},t.next=14,this.makeRequest(n).catch((function(e){return ht(c,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.handleRequestError(n,e);case 2:throw t.sent;case 3:case"end":return t.stop()}}),t,this)})))}));case 14:return a=t.sent,i=a.message,o=a.connectionInfo,t.t0=this,t.t1=n,t.t2=r,t.t3=i,t.t4=this.blockExplorer,t.t5=o,t.next=25,this.getWalletInfo();case 25:return t.t6=t.sent,t.t7={account:t.t2,output:t.t3,blockExplorer:t.t4,connectionContext:t.t5,walletInfo:t.t6},t.next=29,t.t0.notifySuccess.call(t.t0,t.t1,t.t7);case 29:return t.abrupt("return",i);case 30:case"end":return t.stop()}}),t,this)})))}},{key:"requestBroadcast",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i,o,c=this;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.signedTransaction){t.next=4;break}return t.next=3,this.sendInternalError("Signed transaction must be provided");case 3:throw t.sent;case 4:return r=e.network||{type:v.e.MAINNET},n={type:v.b.BroadcastRequest,network:r,signedTransaction:e.signedTransaction},t.next=8,this.makeRequest(n).catch((function(e){return ht(c,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.handleRequestError(n,e);case 2:throw t.sent;case 3:case"end":return t.stop()}}),t,this)})))}));case 8:return a=t.sent,i=a.message,o=a.connectionInfo,t.t0=this,t.t1=n,t.t2=r,t.t3=i,t.t4=this.blockExplorer,t.t5=o,t.next=19,this.getWalletInfo();case 19:return t.t6=t.sent,t.t7={network:t.t2,output:t.t3,blockExplorer:t.t4,connectionContext:t.t5,walletInfo:t.t6},t.next=23,t.t0.notifySuccess.call(t.t0,t.t1,t.t7);case 23:return t.abrupt("return",i);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"setActivePeer",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._activePeer.isSettled()?this._activePeer=B.a.resolve(e):this._activePeer.resolve(e),!e){t.next=12;break}return t.next=4,this.initInternalTransports();case 4:if("postmessage-pairing-response"!==e.type){t.next=9;break}return t.next=7,this.setTransport(this.postMessageTransport);case 7:t.next=12;break;case 9:if("p2p-pairing-response"!==e.type){t.next=12;break}return t.next=12,this.setTransport(this.p2pTransport);case 12:return t.abrupt("return");case 13:case"end":return t.stop()}}),t,this)})))}},{key:"setTransport",value:function(e){var t=this,n=Object.create(null,{setTransport:{get:function(){return Object(m.a)(Object(g.a)(r.prototype),"setTransport",t)}}});return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e||(this._initPromise=void 0),r=n.setTransport.call(this,e),t.next=4,this.events.emit(ke.ACTIVE_TRANSPORT_SET,e);case 4:return t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"sendInternalError",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.events.emit(ke.INTERNAL_ERROR,{text:e});case 2:throw new Error(e);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"removeAccountsForPeers",value:function(e){return ht(this,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i,o;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.accountManager.getAccounts();case 2:return r=t.sent,n=e.map((function(e){return e.senderId})),a=r.filter((function(e){return n.includes(e.senderId)})),i=a.map((function(e){return e.accountIdentifier})),t.next=8,this.accountManager.removeAccounts(i);case 8:return t.next=10,this.getActiveAccount();case 10:if(!(o=t.sent)){t.next=15;break}if(!i.includes(o.accountIdentifier)){t.next=15;break}return t.next=15,this.setActiveAccount(void 0);case 15:case"end":return t.stop()}}),t,this)})))}},{key:"handleRequestError",value:function(e,t){return ht(this,void 0,void 0,Object(s.a)().mark((function r(){var n,a,i,o,c=this;return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(pt.error("handleRequestError","error response",t),!t.errorType){r.next=35;break}return n=[],t.errorType===v.a.NO_PRIVATE_KEY_FOUND_ERROR&&(a=function(){return ht(c,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e).sourceAddress||!r.network){t.next=11;break}return t.next=4,Object(p.x)(r.sourceAddress,r.network);case 4:return a=t.sent,t.next=7,this.getAccount(a);case 7:if(!(n=t.sent)){t.next=11;break}return t.next=11,this.removeAccount(n.accountIdentifier);case 11:case"end":return t.stop()}}),t,this)})))},n.push({text:"Remove account",actionCallback:a})),r.next=6,this.getPeer();case 6:return i=r.sent,r.next=9,this.getActiveAccount();case 9:if(o=r.sent,r.t0=e.type===v.b.PermissionRequest,!r.t0){r.next=17;break}return r.next=14,this.getActiveAccount();case 14:r.t1=r.sent,r.t2=void 0,r.t0=r.t1===r.t2;case 17:if(!r.t0){r.next=25;break}return this._initPromise=void 0,this.postMessageTransport=void 0,this.p2pTransport=void 0,r.next=23,this.setTransport();case 23:return r.next=25,this.setActivePeer();case 25:return r.t3=this.events,r.t4=nt[e.type].error,r.t5=t,r.next=30,this.getWalletInfo(i,o);case 30:throw r.t6=r.sent,r.t7={errorResponse:r.t5,walletInfo:r.t6},r.t8=n,r.t3.emit.call(r.t3,r.t4,r.t7,r.t8).catch((function(e){return pt.error("handleRequestError",e)})),p.d.getError(t.errorType,t.errorData);case 35:throw t;case 36:case"end":return r.stop()}}),r,this)})))}},{key:"notifySuccess",value:function(e,t){return ht(this,void 0,void 0,Object(s.a)().mark((function r(){return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:this.events.emit(nt[e.type].success,t).catch((function(e){return console.warn(e)}));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"getWalletInfo",value:function(e,t){var r,n;return ht(this,void 0,void 0,Object(s.a)().mark((function a(){var i,o,c,u,f,d,l,h;return Object(s.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!t){a.next=4;break}a.t0=t,a.next=7;break;case 4:return a.next=6,this.getActiveAccount();case 6:a.t0=a.sent;case 7:if(i=a.t0,!e){a.next=12;break}a.t1=e,a.next=15;break;case 12:return a.next=14,this.getPeer(i);case 14:a.t1=a.sent;case 15:if(o=a.t1,!i){a.next=20;break}return a.next=19,this.appMetadataManager.getAppMetadata(i.senderId);case 19:c=a.sent;case 20:if(u=o,c||(c={name:u.name,icon:u.icon}),f=function(e,t){return!(!e||!t)&&e.toLowerCase()===t.toLowerCase()},V().find((function(e){return f(e.name,null===c||void 0===c?void 0:c.name)}))?(d=V().find((function(e){return f(e.name,null===c||void 0===c?void 0:c.name)})),l="mobile"):K().find((function(e){return f(e.name,null===c||void 0===c?void 0:c.name)}))?(d=K().find((function(e){return f(e.name,null===c||void 0===c?void 0:c.name)})),l="web"):z().find((function(e){return f(e.name,null===c||void 0===c?void 0:c.name)}))?(d=z().find((function(e){return f(e.name,null===c||void 0===c?void 0:c.name)})),l="desktop"):q().find((function(e){return f(e.name,null===c||void 0===c?void 0:c.name)}))&&(d=q().find((function(e){return f(e.name,null===c||void 0===c?void 0:c.name)})),l="extension"),!d){a.next=27;break}return d.hasOwnProperty("links")?h=d.links[null!==(r=null===i||void 0===i?void 0:i.network.type)&&void 0!==r?r:this.preferredNetwork]:d.hasOwnProperty("deepLink")&&(h=d.deepLink),a.abrupt("return",{name:c.name,icon:null!==(n=c.icon)&&void 0!==n?n:d.logo,deeplink:h,type:l});case 27:return a.abrupt("return",c);case 28:case"end":return a.stop()}}),a,this)})))}},{key:"getPeer",value:function(e){var t,r,n,a;return ht(this,void 0,void 0,Object(s.a)().mark((function i(){var o,c,u,f;return Object(s.a)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(!e){i.next=32;break}return pt.log("getPeer","We have an account",e),i.next=4,null===(t=this.postMessageTransport)||void 0===t?void 0:t.getPeers();case 4:if(i.t1=r=i.sent,i.t0=null!==i.t1,!i.t0){i.next=8;break}i.t0=void 0!==r;case 8:if(!i.t0){i.next=12;break}i.t2=r,i.next=13;break;case 12:i.t2=[];case 13:return c=i.t2,i.next=16,null===(n=this.p2pTransport)||void 0===n?void 0:n.getPeers();case 16:if(i.t4=a=i.sent,i.t3=null!==i.t4,!i.t3){i.next=20;break}i.t3=void 0!==a;case 20:if(!i.t3){i.next=24;break}i.t5=a,i.next=25;break;case 24:i.t5=[];case 25:u=i.t5,f=[].concat(Object(I.a)(c),Object(I.a)(u)),pt.log("getPeer","Found peers",f,e),(o=f.find((function(t){return t.senderId===e.senderId})))||(o=f.find((function(t){return t.extensionId===e.origin.id}))),i.next=36;break;case 32:return i.next=34,this._activePeer.promise;case 34:o=i.sent,pt.log("getPeer","Active peer",o);case 36:if(o){i.next=38;break}throw new Error("No matching peer found.");case 38:return i.abrupt("return",o);case 39:case"end":return i.stop()}}),i,this)})))}},{key:"makeRequest",value:function(e){var t;return ht(this,void 0,void 0,Object(s.a)().mark((function r(){var n,a,i,o,c,u,f,d=this;return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(B.e)();case 2:return n=r.sent,console.time(n),pt.log("makeRequest","starting"),r.next=7,this.init();case 7:return console.timeLog(n,"init done"),pt.log("makeRequest","after init"),r.next=11,this.addRequestAndCheckIfRateLimited();case 11:if(!r.sent){r.next=14;break}throw this.events.emit(ke.LOCAL_RATE_LIMIT_REACHED).catch((function(e){return console.warn(e)})),new Error("rate limit reached");case 14:return r.next=16,this.checkPermissions(e.type);case 16:if(r.sent){r.next=19;break}throw this.events.emit(ke.NO_PERMISSIONS).catch((function(e){return console.warn(e)})),new Error("No permissions to send this request to wallet!");case 19:if(this.beaconId){r.next=23;break}return r.next=22,this.sendInternalError("BeaconID not defined");case 22:throw r.sent;case 23:return r.t0=Object,r.t1=n,r.t2=p.y,r.next=28,this.beaconId;case 28:return r.t3=r.sent,r.next=31,(0,r.t2)(r.t3);case 31:return r.t4=r.sent,r.t5={id:r.t1,version:"2",senderId:r.t4},r.t6=e,a=r.t0.assign.call(r.t0,r.t5,r.t6),i=new B.a,this.addOpenRequest(a.id,i),r.next=39,(new p.r).serialize(a);case 39:return o=r.sent,r.next=42,this.getActiveAccount();case 42:return c=r.sent,r.next=45,this.getPeer(c);case 45:return u=r.sent,r.next=48,this.getWalletInfo(u,c);case 48:return f=r.sent,pt.log("makeRequest","sending message",a),console.timeLog(n,"sending"),r.prev=51,r.next=54,this.transport;case 54:return r.next=56,r.sent.send(o,u);case 56:r.next=63;break;case 58:throw r.prev=58,r.t7=r.catch(51),this.events.emit(ke.INTERNAL_ERROR,{text:"Unable to send message. If this problem persists, please reset the connection and pair your wallet again.",buttons:[{text:"Reset Connection",actionCallback:function(){return ht(d,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Me();case 2:this.disconnect();case 3:case"end":return e.stop()}}),e,this)})))}}]}),console.timeLog(n,"send error"),r.t7;case 63:return console.timeLog(n,"sent"),this.events.emit(nt[e.type].sent,{walletInfo:Object.assign(Object.assign({},f),{name:null!==(t=f.name)&&void 0!==t?t:"Wallet"}),extraInfo:{resetCallback:function(){return ht(d,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.disconnect();case 1:case"end":return e.stop()}}),e,this)})))}}}).catch((function(e){return console.warn(e)})),r.abrupt("return",i.promise);case 66:case"end":return r.stop()}}),r,this,[[51,58]])})))}},{key:"makeRequestV3",value:function(e){var t;return ht(this,void 0,void 0,Object(s.a)().mark((function r(){var n,a,i,o,c,u,f,d,l=this;return Object(s.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(B.e)();case 2:return n=r.sent,console.time(n),pt.log("makeRequest","starting"),r.next=7,this.init();case 7:return console.timeLog(n,"init done"),pt.log("makeRequest","after init"),r.next=11,this.addRequestAndCheckIfRateLimited();case 11:if(!r.sent){r.next=14;break}throw this.events.emit(ke.LOCAL_RATE_LIMIT_REACHED).catch((function(e){return console.warn(e)})),new Error("rate limit reached");case 14:if(this.beaconId){r.next=18;break}return r.next=17,this.sendInternalError("BeaconID not defined");case 17:throw r.sent;case 18:return r.t0=n,r.t1=p.c,r.t2=p.y,r.next=23,this.beaconId;case 23:return r.t3=r.sent,r.next=26,(0,r.t2)(r.t3);case 26:return r.t4=r.sent,r.t5=e,a={id:r.t0,version:r.t1,senderId:r.t4,message:r.t5},i=new B.a,this.addOpenRequest(a.id,i),r.next=33,(new p.r).serialize(a);case 33:return o=r.sent,r.next=36,this.getActiveAccount();case 36:return c=r.sent,r.next=39,this.getPeer(c);case 39:return u=r.sent,r.next=42,this.getWalletInfo(u,c);case 42:return f=r.sent,pt.log("makeRequest","sending message",a),console.timeLog(n,"sending"),r.prev=45,r.next=48,this.transport;case 48:return r.next=50,r.sent.send(o,u);case 50:r.next=57;break;case 52:throw r.prev=52,r.t6=r.catch(45),this.events.emit(ke.INTERNAL_ERROR,{text:"Unable to send message. If this problem persists, please reset the connection and pair your wallet again.",buttons:[{text:"Reset Connection",actionCallback:function(){return ht(l,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Me();case 2:this.disconnect();case 3:case"end":return e.stop()}}),e,this)})))}}]}),console.timeLog(n,"send error"),r.t6;case 57:return console.timeLog(n,"sent"),d=e.type,this.events.emit(nt[d].sent,{walletInfo:Object.assign(Object.assign({},f),{name:null!==(t=f.name)&&void 0!==t?t:"Wallet"}),extraInfo:{resetCallback:function(){return ht(l,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.disconnect();case 1:case"end":return e.stop()}}),e,this)})))}}}).catch((function(e){return console.warn(e)})),r.abrupt("return",i.promise);case 61:case"end":return r.stop()}}),r,this,[[45,52]])})))}},{key:"disconnect",value:function(){return ht(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.postMessageTransport=void 0,this.p2pTransport=void 0,e.t0=Promise,e.t1=this.clearActiveAccount(),e.next=6,this.transport;case 6:return e.t2=e.sent.disconnect(),e.t3=[e.t1,e.t2],e.next=10,e.t0.all.call(e.t0,e.t3);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"addOpenRequest",value:function(e,t){pt.log("addOpenRequest",this.name,"adding request ".concat(e," and waiting for answer")),this.openRequests.set(e,t)}}]),r}(p.g),mt=r(579);function gt(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))}var vt={commitHash:"cbdd0af87e400489076259d065e2d328feb8e1b4",version:"12.1.0"},yt=function(e){Object(d.a)(r,e);var t=Object(l.a)(r);function r(){var e;return Object(f.a)(this,r),(e=t.call(this,"You need to initialize BeaconWallet by calling beaconWallet.requestPermissions first")).name="BeaconWalletNotInitialized",e}return Object(u.a)(r)}(Object(h.a)(Error)),At=function(e){Object(d.a)(r,e);var t=Object(l.a)(r);function r(e){var n;return Object(f.a)(this,r),(n=t.call(this,"Required permissions scopes were not granted: ".concat(e.join(",")))).requiredScopes=e,n.name="MissingRequiredScopes",n}return Object(u.a)(r)}(Object(h.a)(Error)),wt=function(){function e(t){Object(f.a)(this,e),this.client=new bt(t)}return Object(u.a)(e,[{key:"validateRequiredScopesOrFail",value:function(e,t){var r,n=new Set(t),a=Object(c.a)(e);try{for(a.s();!(r=a.n()).done;){var i=r.value;n.has(i)&&n.delete(i)}}catch(o){a.e(o)}finally{a.f()}if(n.size>0)throw new At(Array.from(n))}},{key:"requestPermissions",value:function(e){return gt(this,void 0,void 0,Object(s.a)().mark((function t(){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.requestPermissions(e);case 2:case"end":return t.stop()}}),t,this)})))}},{key:"getPKH",value:function(){return gt(this,void 0,void 0,Object(s.a)().mark((function e(){var t;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.getActiveAccount();case 2:if(t=e.sent){e.next=5;break}throw new yt;case 5:return e.abrupt("return",t.address);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"mapTransferParamsToWalletParams",value:function(e){return gt(this,void 0,void 0,Object(s.a)().mark((function t(){var r;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.showPrepare();case 2:return t.prev=2,t.next=5,e();case 5:r=t.sent,t.next=13;break;case 8:return t.prev=8,t.t0=t.catch(2),t.next=12,this.client.hideUI();case 12:throw t.t0;case 13:return t.t1=this,t.t2=r,t.next=17,Object(mt.createTransferOperation)(this.formatParameters(r));case 17:return t.t3=t.sent,t.abrupt("return",t.t1.removeDefaultParams.call(t.t1,t.t2,t.t3));case 19:case"end":return t.stop()}}),t,this,[[2,8]])})))}},{key:"mapOriginateParamsToWalletParams",value:function(e){return gt(this,void 0,void 0,Object(s.a)().mark((function t(){var r;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.showPrepare();case 2:return t.prev=2,t.next=5,e();case 5:r=t.sent,t.next=13;break;case 8:return t.prev=8,t.t0=t.catch(2),t.next=12,this.client.hideUI();case 12:throw t.t0;case 13:return t.t1=this,t.t2=r,t.next=17,Object(mt.createOriginationOperation)(this.formatParameters(r));case 17:return t.t3=t.sent,t.abrupt("return",t.t1.removeDefaultParams.call(t.t1,t.t2,t.t3));case 19:case"end":return t.stop()}}),t,this,[[2,8]])})))}},{key:"mapDelegateParamsToWalletParams",value:function(e){return gt(this,void 0,void 0,Object(s.a)().mark((function t(){var r;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.showPrepare();case 2:return t.prev=2,t.next=5,e();case 5:r=t.sent,t.next=13;break;case 8:return t.prev=8,t.t0=t.catch(2),t.next=12,this.client.hideUI();case 12:throw t.t0;case 13:return t.t1=this,t.t2=r,t.next=17,Object(mt.createSetDelegateOperation)(this.formatParameters(r));case 17:return t.t3=t.sent,t.abrupt("return",t.t1.removeDefaultParams.call(t.t1,t.t2,t.t3));case 19:case"end":return t.stop()}}),t,this,[[2,8]])})))}},{key:"formatParameters",value:function(e){return e.fee&&(e.fee=e.fee.toString()),e.storageLimit&&(e.storageLimit=e.storageLimit.toString()),e.gasLimit&&(e.gasLimit=e.gasLimit.toString()),e}},{key:"removeDefaultParams",value:function(e,t){return e.fee||delete t.fee,e.storageLimit||delete t.storage_limit,e.gasLimit||delete t.gas_limit,t}},{key:"sendOperations",value:function(e){return gt(this,void 0,void 0,Object(s.a)().mark((function t(){var r,n,a,i;return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.getActiveAccount();case 2:if(r=t.sent){t.next=5;break}throw new yt;case 5:return n=r.scopes,this.validateRequiredScopesOrFail(n,[v.g.OPERATION_REQUEST]),t.next=9,this.client.requestOperation({operationDetails:e});case 9:return a=t.sent,i=a.transactionHash,t.abrupt("return",i);case 12:case"end":return t.stop()}}),t,this)})))}},{key:"disconnect",value:function(){return gt(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.destroy();case 2:case"end":return e.stop()}}),e,this)})))}},{key:"clearActiveAccount",value:function(){return gt(this,void 0,void 0,Object(s.a)().mark((function e(){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.setActiveAccount();case 2:case"end":return e.stop()}}),e,this)})))}}]),e}()},function(e,t,r){"use strict";r.r(t);var n=r(432),a=r.n(n),i=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a.a),s=o,c=r(0),u=r(27),f=r(9),d=r(25),l=r(1),h=r(2),p=r(23),b=r(7),m=r(8),g=(r(222),r(33)),v=r(14),y=r(43),A=r(150),w=r.n(A),x=r(15),E=r(887),_=r.n(E),C=r(87),k=r.n(C),B=r(257),I=r(17),S=r(888),O=r(5),M=(r(1660),r(859),r(1121)),D=r.n(M),T=r(136),F=r.n(T),R=function(e){return x.Buffer.isBuffer(e)?e:e instanceof Uint8Array?x.Buffer.from(e.buffer,e.byteOffset,e.byteLength):x.Buffer.from(e)},P={},N={},j=L;function L(e,t){if(!e)throw new Error(t||"Assertion failed")}L.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var U={exports:{}};"function"===typeof Object.create?U.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:U.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}};var Q=j,G=U.exports;function H(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function z(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function q(e){return 1===e.length?"0"+e:e}function K(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}N.inherits=G,N.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),a=0;a>6|192,r[n++]=63&i|128):H(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=63&i|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=63&i|128)}else for(a=0;a>>0}return i},N.split32=function(e,t){for(var r=new Array(4*e.length),n=0,a=0;n>>24,r[a+1]=i>>>16&255,r[a+2]=i>>>8&255,r[a+3]=255&i):(r[a+3]=i>>>24,r[a+2]=i>>>16&255,r[a+1]=i>>>8&255,r[a]=255&i)}return r},N.rotr32=function(e,t){return e>>>t|e<<32-t},N.rotl32=function(e,t){return e<>>32-t},N.sum32=function(e,t){return e+t>>>0},N.sum32_3=function(e,t,r){return e+t+r>>>0},N.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},N.sum32_5=function(e,t,r,n,a){return e+t+r+n+a>>>0},N.sum64=function(e,t,r,n){var a=e[t],i=n+e[t+1]>>>0,o=(i>>0,e[t+1]=i},N.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},N.sum64_lo=function(e,t,r,n){return t+n>>>0},N.sum64_4_hi=function(e,t,r,n,a,i,o,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},N.sum64_4_lo=function(e,t,r,n,a,i,o,s){return t+n+i+s>>>0},N.sum64_5_hi=function(e,t,r,n,a,i,o,s,c,u){var f=0,d=t;return f+=(d=d+n>>>0)>>0)>>0)>>0)>>0},N.sum64_5_lo=function(e,t,r,n,a,i,o,s,c,u){return t+n+i+s+u>>>0},N.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},N.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},N.shr64_hi=function(e,t,r){return e>>>r},N.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0};var V={},W=N,Y=j;function J(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}V.BlockHash=J,J.prototype.update=function(e,t){if(e=W.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=W.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[a++]=e>>>16&255,n[a++]=e>>>8&255,n[a++]=255&e}else for(n[a++]=255&e,n[a++]=e>>>8&255,n[a++]=e>>>16&255,n[a++]=e>>>24&255,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,i=8;i>>3},Z.g1_256=function(e){return $(e,17)^$(e,19)^e>>>10};var ne=N,ae=V,ie=Z,oe=ne.rotl32,se=ne.sum32,ce=ne.sum32_5,ue=ie.ft_1,fe=ae.BlockHash,de=[1518500249,1859775393,2400959708,3395469782];function le(){if(!(this instanceof le))return new le;fe.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ne.inherits(le,fe);var he=le;le.blockSize=512,le.outSize=160,le.hmacStrength=80,le.padLength=64,le.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),Dt(e.length<=this.blockSize);for(var t=e.length;tjt[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=zt[15&t[i]];a.push(e+"=Uint8Array(0x"+r+")")}else a.push(e+"="+JSON.stringify(t))}catch(c){a.push(e+"="+JSON.stringify(n[e].toString()))}})),a.push("code=".concat(r)),a.push("version=".concat(this.version));var i=t,o="";switch(r){case Gt.NUMERIC_FAULT:o="NUMERIC_FAULT";var s=t;switch(s){case"overflow":case"underflow":case"division-by-zero":o+="-"+s;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break;case Gt.CALL_EXCEPTION:case Gt.INSUFFICIENT_FUNDS:case Gt.MISSING_NEW:case Gt.NONCE_EXPIRED:case Gt.REPLACEMENT_UNDERPRICED:case Gt.TRANSACTION_REPLACED:case Gt.UNPREDICTABLE_GAS_LIMIT:o=r}o&&(t+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),a.length&&(t+=" ("+a.join(", ")+")");var c=new Error(t);return c.reason=i,c.code=r,Object.keys(n).forEach((function(e){c[e]=n[e]})),c}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){Ht&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Ht})}},{key:"checkSafeUint53",value:function(t,r){"number"===typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return Ut||(Ut=new e("logger/5.6.0")),Ut}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Pt){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Nt=!!t,Pt=!!r}},{key:"setLogLevel",value:function(t){var r=jt[t.toLowerCase()];null!=r?Lt=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();qt.errors=Gt,qt.levels=Qt;var Kt=new qt("bytes/5.6.0");function Vt(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return Vt(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function Wt(e){return"number"===typeof e&&e==e&&e%1===0}function Yt(e,t){if(t||(t={}),"number"===typeof e){Kt.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),Vt(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),function(e){return!!e.toHexString}(e)&&(e=e.toHexString()),function(e,t){if("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))return!1;if(t&&e.length!==2+2*t)return!1;return!0}(e)){var n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0x0"+n.substring(2):"right"===t.hexPad?n+="0":Kt.throwArgumentError("hex data is odd-length","value",e));for(var a=[],i=0;i=256)return!1}return!0}(e)?Vt(new Uint8Array(e)):Kt.throwArgumentError("invalid arrayify value","value",e)}function Jt(e){return"0x"+Rt.sha256().update(Yt(e)).digest("hex")}new qt("sha2/5.6.0");var Xt=function(){function e(t){Object(l.a)(this,e),Object.assign(this,t)}return Object(h.a)(e,[{key:"encode",value:function(){return x.Buffer.from(Object(B.serialize)(Zt,this))}}],[{key:"decode",value:function(e){return Object(B.deserialize)(Zt,this,e)}},{key:"decodeUnchecked",value:function(e){return Object(B.deserializeUnchecked)(Zt,this,e)}}]),e}(),Zt=new Map;var $t=function(e){Object(b.a)(r,e);var t=Object(m.a)(r);function r(e){var n;if(Object(l.a)(this,r),(n=t.call(this,{}))._bn=void 0,function(e){return void 0!==e._bn}(e))n._bn=e._bn;else{if("string"===typeof e){var a=k.a.decode(e);if(32!=a.length)throw new Error("Invalid public key input");n._bn=new _.a(a)}else n._bn=new _.a(e);if(n._bn.byteLength()>32)throw new Error("Invalid public key input")}return n}return Object(h.a)(r,[{key:"equals",value:function(e){return this._bn.eq(e._bn)}},{key:"toBase58",value:function(){return k.a.encode(this.toBytes())}},{key:"toJSON",value:function(){return this.toBase58()}},{key:"toBytes",value:function(){return this.toBuffer()}},{key:"toBuffer",value:function(){var e=this._bn.toArrayLike(x.Buffer);if(32===e.length)return e;var t=x.Buffer.alloc(32);return e.copy(t,32-e.length),t}},{key:"toString",value:function(){return this.toBase58()}}],[{key:"createWithSeed",value:function(){var e=Object(f.a)(Object(c.a)().mark((function e(t,n,a){var i,o;return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=x.Buffer.concat([t.toBuffer(),x.Buffer.from(n),a.toBuffer()]),o=Jt(new Uint8Array(i)).slice(2),e.abrupt("return",new r(x.Buffer.from(o,"hex")));case 3:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"createProgramAddressSync",value:function(e,t){var n=x.Buffer.alloc(0);e.forEach((function(e){if(e.length>32)throw new TypeError("Max seed length exceeded");n=x.Buffer.concat([n,R(e)])})),n=x.Buffer.concat([n,t.toBuffer(),x.Buffer.from("ProgramDerivedAddress")]);var a=Jt(new Uint8Array(n)).slice(2),i=new _.a(a,16).toArray(void 0,32);if(tr(i))throw new Error("Invalid seeds, address must fall off the curve");return new r(i)}},{key:"createProgramAddress",value:function(){var e=Object(f.a)(Object(c.a)().mark((function e(t,r){return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.createProgramAddressSync(t,r));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"findProgramAddressSync",value:function(e,t){for(var r,n=255;0!=n;){try{var a=e.concat(x.Buffer.from([n]));r=this.createProgramAddressSync(a,t)}catch(i){if(i instanceof TypeError)throw i;n--;continue}return[r,n]}throw new Error("Unable to find a viable program address nonce")}},{key:"findProgramAddress",value:function(){var e=Object(f.a)(Object(c.a)().mark((function e(t,r){return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.findProgramAddressSync(t,r));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"isOnCurve",value:function(e){return 1==tr(new r(e).toBytes())}}]),r}(Xt);$t.default=new $t("11111111111111111111111111111111"),Zt.set($t,{kind:"struct",fields:[["_bn","u256"]]});var er=w.a.lowlevel;function tr(e){var t=[er.gf(),er.gf(),er.gf(),er.gf()],r=er.gf(),n=er.gf(),a=er.gf(),i=er.gf(),o=er.gf(),s=er.gf(),c=er.gf();return er.set25519(t[2],rr),er.unpack25519(t[1],e),er.S(a,t[1]),er.M(i,a,er.D),er.Z(a,a,t[2]),er.A(i,t[2],i),er.S(o,i),er.S(s,o),er.M(c,s,o),er.M(r,c,a),er.M(r,r,i),er.pow2523(r,r),er.M(r,r,a),er.M(r,r,i),er.M(r,r,i),er.M(t[0],r,i),er.S(n,t[0]),er.M(n,n,i),ar(n,a)&&er.M(t[0],t[0],nr),er.S(n,t[0]),er.M(n,n,i),ar(n,a)?0:1}var rr=er.gf([1]),nr=er.gf([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function ar(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return er.pack25519(r,e),er.pack25519(n,t),er.crypto_verify_32(r,0,n,0)}new $t("BPFLoader1111111111111111111111111111111111");var ir=1232,or=function(e){Object(b.a)(r,e);var t=Object(m.a)(r);function r(e){var n;return Object(l.a)(this,r),(n=t.call(this,"Signature ".concat(e," has expired: block height exceeded."))).signature=void 0,n.signature=e,n}return Object(h.a)(r)}(Object(y.a)(Error));Object.defineProperty(or.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});var sr=function(e){Object(b.a)(r,e);var t=Object(m.a)(r);function r(e,n){var a;return Object(l.a)(this,r),(a=t.call(this,"Transaction was not confirmed in ".concat(n.toFixed(2)," seconds. It is ")+"unknown if it succeeded or failed. Check signature "+"".concat(e," using the Solana Explorer or CLI tools."))).signature=void 0,a.signature=e,a}return Object(h.a)(r)}(Object(y.a)(Error));Object.defineProperty(sr.prototype,"name",{value:"TransactionExpiredTimeoutError"});var cr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"publicKey";return I.blob(32,e)},ur=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"string",t=I.struct([I.u32("length"),I.u32("lengthPadding"),I.blob(I.offset(I.u32(),-8),"chars")],e),r=t.decode.bind(t),n=t.encode.bind(t),a=t;return a.decode=function(e,t){return r(e,t).chars.toString()},a.encode=function(e,t,r){var a={chars:x.Buffer.from(e,"utf8")};return n(a,t,r)},a.alloc=function(e){return I.u32().span+I.u32().span+x.Buffer.from(e,"utf8").length},a};function fr(e,t){var r=function e(r){if(r.span>=0)return r.span;if("function"===typeof r.alloc)return r.alloc(t[r.property]);if("count"in r&&"elementLayout"in r){var n=t[r.property];if(Array.isArray(n))return n.length*e(r.elementLayout)}return 0},n=0;return e.layout.fields.forEach((function(e){n+=r(e)})),n}function dr(e){for(var t=0,r=0;;){var n=e.shift();if(t|=(127&n)<<7*r,r+=1,0===(128&n))break}return t}function lr(e,t){for(var r=t;;){var n=127&r;if(0==(r>>=7)){e.push(n);break}n|=128,e.push(n)}}var hr,pr=function(){function e(t){var r=this;Object(l.a)(this,e),this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map((function(e){return new $t(e)})),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach((function(e){return r.indexToProgramIds.set(e.programIdIndex,r.accountKeys[e.programIdIndex])}))}return Object(h.a)(e,[{key:"isAccountSigner",value:function(e){return e=this.header.numRequiredSignatures&&e0?this.signatures[0].signature:null}},{key:"toJSON",value:function(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map((function(e){return e.toJSON()})),signers:this.signatures.map((function(e){return e.publicKey.toJSON()}))}}},{key:"add",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n0&&this.signatures[0].publicKey))throw new Error("Transaction fee payer required");r=this.signatures[0].publicKey}for(var n=0;n-1?(o[r].isWritable=o[r].isWritable||e.isWritable,o[r].isSigner=o[r].isSigner||e.isSigner):o.push(e)})),o.sort((function(e,t){return e.isSigner!==t.isSigner?e.isSigner?-1:1:e.isWritable!==t.isWritable?e.isWritable?-1:1:e.pubkey.toBase58().localeCompare(t.pubkey.toBase58())}));var s=o.findIndex((function(e){return e.pubkey.equals(r)}));if(s>-1){var c=o.splice(s,1),f=Object(d.a)(c,1)[0];f.isSigner=!0,f.isWritable=!0,o.unshift(f)}else o.unshift({pubkey:r,isSigner:!0,isWritable:!0});var l,h=Object(g.a)(this.signatures);try{var p=function(){var e=l.value,t=o.findIndex((function(t){return t.pubkey.equals(e.publicKey)}));if(!(t>-1))throw new Error("unknown signer: ".concat(e.publicKey.toString()));o[t].isSigner||(o[t].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."))};for(h.s();!(l=h.n()).done;)p()}catch(_){h.e(_)}finally{h.f()}var b=0,m=0,y=0,A=[],w=[];o.forEach((function(e){var t=e.pubkey,r=e.isSigner,n=e.isWritable;r?(A.push(t.toString()),b+=1,n||(m+=1)):(w.push(t.toString()),n||(y+=1))}));var x=A.concat(w),E=t.map((function(e){var t=e.data,r=e.programId;return{programIdIndex:x.indexOf(r.toString()),accounts:e.keys.map((function(e){return x.indexOf(e.pubkey.toString())})),data:k.a.encode(t)}}));return E.forEach((function(e){br(e.programIdIndex>=0),e.accounts.forEach((function(e){return br(e>=0)}))})),new pr({header:{numRequiredSignatures:b,numReadonlySignedAccounts:m,numReadonlyUnsignedAccounts:y},accountKeys:x,recentBlockhash:e,instructions:E})}},{key:"_compile",value:function(){var e=this.compileMessage(),t=e.accountKeys.slice(0,e.header.numRequiredSignatures);if(this.signatures.length===t.length&&this.signatures.every((function(e,r){return t[r].equals(e.publicKey)})))return e;return this.signatures=t.map((function(e){return{signature:null,publicKey:e}})),e}},{key:"serializeMessage",value:function(){return this._compile().serialize()}},{key:"getEstimatedFee",value:function(){var e=Object(f.a)(Object(c.a)().mark((function e(t){return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getFeeForMessage(this.compileMessage());case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setSigners",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r1?n-1:0),i=1;i ").concat(ir)),a}},{key:"keys",get:function(){return br(1===this.instructions.length),this.instructions[0].keys.map((function(e){return e.pubkey}))}},{key:"programId",get:function(){return br(1===this.instructions.length),this.instructions[0].programId}},{key:"data",get:function(){return br(1===this.instructions.length),this.instructions[0].data}}],[{key:"from",value:function(t){for(var r=Object(v.a)(t),n=dr(r),a=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:[],n=new e;return n.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(n.feePayer=t.accountKeys[0]),r.forEach((function(e,r){var a={signature:e==k.a.encode(mr)?null:k.a.decode(e),publicKey:t.accountKeys[r]};n.signatures.push(a)})),t.instructions.forEach((function(e){var r=e.accounts.map((function(e){var r=t.accountKeys[e];return{pubkey:r,isSigner:n.signatures.some((function(e){return e.publicKey.toString()===r.toString()}))||t.isAccountSigner(e),isWritable:t.isAccountWritable(e)}}));n.instructions.push(new gr({keys:r,programId:t.accountKeys[e.programIdIndex],data:k.a.decode(e.data)}))})),n._message=t,n._json=n.toJSON(),n}}]),e}(),yr=new $t("SysvarC1ock11111111111111111111111111111111"),Ar=(new $t("SysvarEpochSchedu1e111111111111111111111111"),new $t("Sysvar1nstructions1111111111111111111111111"),new $t("SysvarRecentB1ockHashes11111111111111111111")),wr=new $t("SysvarRent111111111111111111111111111111111"),xr=(new $t("SysvarRewards111111111111111111111111111111"),new $t("SysvarS1otHashes111111111111111111111111111"),new $t("SysvarS1otHistory11111111111111111111111111"),new $t("SysvarStakeHistory1111111111111111111111111"));function Er(e,t,r,n){return _r.apply(this,arguments)}function _r(){return(_r=Object(f.a)(Object(c.a)().mark((function e(t,r,n,a){var i,o,s;return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a&&{skipPreflight:a.skipPreflight,preflightCommitment:a.preflightCommitment||a.commitment,maxRetries:a.maxRetries,minContextSlot:a.minContextSlot},e.next=3,t.sendTransaction(r,n,i);case 3:if(o=e.sent,null==r.recentBlockhash||null==r.lastValidBlockHeight){e.next=10;break}return e.next=7,t.confirmTransaction({signature:o,blockhash:r.recentBlockhash,lastValidBlockHeight:r.lastValidBlockHeight},a&&a.commitment);case 7:e.t0=e.sent.value,e.next=13;break;case 10:return e.next=12,t.confirmTransaction(o,a&&a.commitment);case 12:e.t0=e.sent.value;case 13:if(!(s=e.t0).err){e.next=16;break}throw new Error("Transaction ".concat(o," failed (").concat(JSON.stringify(s),")"));case 16:return e.abrupt("return",o);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Cr(e){return new Promise((function(t){return setTimeout(t,e)}))}function kr(e,t){var r=e.layout.span>=0?e.layout.span:fr(e,t),n=x.Buffer.alloc(r),a=Object.assign({instruction:e.index},t);return e.layout.encode(a,n),n}var Br,Ir=I.nu64("lamportsPerSignature"),Sr=I.struct([I.u32("version"),I.u32("state"),cr("authorizedPubkey"),cr("nonce"),I.struct([Ir],"feeCalculator")]),Or=Sr.span,Mr=(Br=8,function(e){var t=Object(I.blob)(Br,e),r=function(e){return{decode:e.decode.bind(e),encode:e.encode.bind(e)}}(t),n=r.encode,a=r.decode,i=t;return i.decode=function(e,t){var r=a(e,t);return Object(S.toBigIntLE)(x.Buffer.from(r))},i.encode=function(e,t,r){var a=Object(S.toBufferLE)(e,Br);return n(a,t,r)},i}),Dr=Object.freeze({Create:{index:0,layout:I.struct([I.u32("instruction"),I.ns64("lamports"),I.ns64("space"),cr("programId")])},Assign:{index:1,layout:I.struct([I.u32("instruction"),cr("programId")])},Transfer:{index:2,layout:I.struct([I.u32("instruction"),Mr("lamports")])},CreateWithSeed:{index:3,layout:I.struct([I.u32("instruction"),cr("base"),ur("seed"),I.ns64("lamports"),I.ns64("space"),cr("programId")])},AdvanceNonceAccount:{index:4,layout:I.struct([I.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:I.struct([I.u32("instruction"),I.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:I.struct([I.u32("instruction"),cr("authorized")])},AuthorizeNonceAccount:{index:7,layout:I.struct([I.u32("instruction"),cr("authorized")])},Allocate:{index:8,layout:I.struct([I.u32("instruction"),I.ns64("space")])},AllocateWithSeed:{index:9,layout:I.struct([I.u32("instruction"),cr("base"),ur("seed"),I.ns64("space"),cr("programId")])},AssignWithSeed:{index:10,layout:I.struct([I.u32("instruction"),cr("base"),ur("seed"),cr("programId")])},TransferWithSeed:{index:11,layout:I.struct([I.u32("instruction"),Mr("lamports"),ur("seed"),cr("programId")])},UpgradeNonceAccount:{index:12,layout:I.struct([I.u32("instruction")])}}),Tr=function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,null,[{key:"createAccount",value:function(e){var t=kr(Dr.Create,{lamports:e.lamports,space:e.space,programId:R(e.programId.toBuffer())});return new gr({keys:[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:t})}},{key:"transfer",value:function(e){var t,r;"basePubkey"in e?(t=kr(Dr.TransferWithSeed,{lamports:BigInt(e.lamports),seed:e.seed,programId:R(e.programId.toBuffer())}),r=[{pubkey:e.fromPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]):(t=kr(Dr.Transfer,{lamports:BigInt(e.lamports)}),r=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]);return new gr({keys:r,programId:this.programId,data:t})}},{key:"assign",value:function(e){var t,r;"basePubkey"in e?(t=kr(Dr.AssignWithSeed,{base:R(e.basePubkey.toBuffer()),seed:e.seed,programId:R(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]):(t=kr(Dr.Assign,{programId:R(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]);return new gr({keys:r,programId:this.programId,data:t})}},{key:"createAccountWithSeed",value:function(e){var t=kr(Dr.CreateWithSeed,{base:R(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:R(e.programId.toBuffer())}),r=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!1,isWritable:!0}];return e.basePubkey!=e.fromPubkey&&r.push({pubkey:e.basePubkey,isSigner:!0,isWritable:!1}),new gr({keys:r,programId:this.programId,data:t})}},{key:"createNonceAccount",value:function(t){var r=new vr;"basePubkey"in t&&"seed"in t?r.add(e.createAccountWithSeed({fromPubkey:t.fromPubkey,newAccountPubkey:t.noncePubkey,basePubkey:t.basePubkey,seed:t.seed,lamports:t.lamports,space:Or,programId:this.programId})):r.add(e.createAccount({fromPubkey:t.fromPubkey,newAccountPubkey:t.noncePubkey,lamports:t.lamports,space:Or,programId:this.programId}));var n={noncePubkey:t.noncePubkey,authorizedPubkey:t.authorizedPubkey};return r.add(this.nonceInitialize(n)),r}},{key:"nonceInitialize",value:function(e){var t=kr(Dr.InitializeNonceAccount,{authorized:R(e.authorizedPubkey.toBuffer())}),r={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Ar,isSigner:!1,isWritable:!1},{pubkey:wr,isSigner:!1,isWritable:!1}],programId:this.programId,data:t};return new gr(r)}},{key:"nonceAdvance",value:function(e){var t=kr(Dr.AdvanceNonceAccount),r={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Ar,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t};return new gr(r)}},{key:"nonceWithdraw",value:function(e){var t=kr(Dr.WithdrawNonceAccount,{lamports:e.lamports});return new gr({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:Ar,isSigner:!1,isWritable:!1},{pubkey:wr,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}},{key:"nonceAuthorize",value:function(e){var t=kr(Dr.AuthorizeNonceAccount,{authorized:R(e.newAuthorizedPubkey.toBuffer())});return new gr({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}},{key:"allocate",value:function(e){var t,r;"basePubkey"in e?(t=kr(Dr.AllocateWithSeed,{base:R(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:R(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]):(t=kr(Dr.Allocate,{space:e.space}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]);return new gr({keys:r,programId:this.programId,data:t})}}]),e}();Tr.programId=new $t("11111111111111111111111111111111");var Fr=function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,null,[{key:"getMinNumSignatures",value:function(t){return 2*(Math.ceil(t/e.chunkSize)+1+1)}},{key:"load",value:function(){var t=Object(f.a)(Object(c.a)().mark((function t(r,n,a,i,o){var s,u,f,d,l,h,p,b,m,g,v,y,A,w;return Object(c.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.getMinimumBalanceForRentExemption(o.length);case 2:return s=t.sent,t.next=5,r.getAccountInfo(a.publicKey,"confirmed");case 5:if(u=t.sent,f=null,null===u){t.next=16;break}if(!u.executable){t.next=11;break}return console.error("Program load failed, account is already executable"),t.abrupt("return",!1);case 11:u.data.length!==o.length&&(f=f||new vr).add(Tr.allocate({accountPubkey:a.publicKey,space:o.length})),u.owner.equals(i)||(f=f||new vr).add(Tr.assign({accountPubkey:a.publicKey,programId:i})),u.lamports0?s:1,space:o.length,programId:i}));case 17:if(null===f){t.next=20;break}return t.next=20,Er(r,f,[n,a],{commitment:"confirmed"});case 20:d=I.struct([I.u32("instruction"),I.u32("offset"),I.u32("bytesLength"),I.u32("bytesLengthPadding"),I.seq(I.u8("byte"),I.offset(I.u32(),-8),"bytes")]),l=e.chunkSize,h=0,p=o,b=[];case 25:if(!(p.length>0)){t.next=39;break}if(m=p.slice(0,l),g=x.Buffer.alloc(l+16),d.encode({instruction:0,offset:h,bytes:m,bytesLength:0,bytesLengthPadding:0},g),v=(new vr).add({keys:[{pubkey:a.publicKey,isSigner:!0,isWritable:!0}],programId:i,data:g}),b.push(Er(r,v,[n,a],{commitment:"confirmed"})),!r._rpcEndpoint.includes("solana.com")){t.next=35;break}return 4,t.next=35,Cr(250);case 35:h+=l,p=p.slice(l),t.next=25;break;case 39:return t.next=41,Promise.all(b);case 41:return y=I.struct([I.u32("instruction")]),A=x.Buffer.alloc(y.span),y.encode({instruction:1},A),w=(new vr).add({keys:[{pubkey:a.publicKey,isSigner:!0,isWritable:!0},{pubkey:wr,isSigner:!1,isWritable:!1}],programId:i,data:A}),t.next=47,Er(r,w,[n,a],{commitment:"confirmed"});case 47:return t.abrupt("return",!0);case 48:case"end":return t.stop()}}),t)})));return function(e,r,n,a,i){return t.apply(this,arguments)}}()}]),e}();Fr.chunkSize=932;new $t("BPFLoader2111111111111111111111111111111111"),Object.prototype.toString,Object.keys;Error,Error,globalThis.fetch;var Rr;I.struct([I.u32("typeIndex"),Mr("deactivationSlot"),I.nu64("lastExtendedSlot"),I.u8("lastExtendedStartIndex"),I.u8(),I.seq(cr(),I.offset(I.u8(),-1),"authority")]),globalThis.URL;var Pr=Object(O.e)(Object(O.g)($t),Object(O.m)(),(function(e){return new $t(e)})),Nr=Object(O.n)([Object(O.m)(),Object(O.h)("base64")]),jr=Object(O.e)(Object(O.g)(x.Buffer),Nr,(function(e){return x.Buffer.from(e[0],"base64")}));function Lr(e){return Object(O.p)([Object(O.o)({jsonrpc:Object(O.h)("2.0"),id:Object(O.m)(),result:e}),Object(O.o)({jsonrpc:Object(O.h)("2.0"),id:Object(O.m)(),error:Object(O.o)({code:Object(O.q)(),message:Object(O.m)(),data:Object(O.k)(Object(O.a)())})})])}var Ur=Lr(Object(O.q)());function Qr(e){return Object(O.e)(Lr(e),Ur,(function(t){return"error"in t?t:Object(u.a)(Object(u.a)({},t),{},{result:Object(O.f)(t.result,e)})}))}function Gr(e){return Qr(Object(O.o)({context:Object(O.o)({slot:Object(O.j)()}),value:e}))}function Hr(e){return Object(O.o)({context:Object(O.o)({slot:Object(O.j)()}),value:e})}var zr=Object(O.o)({foundation:Object(O.j)(),foundationTerm:Object(O.j)(),initial:Object(O.j)(),taper:Object(O.j)(),terminal:Object(O.j)()}),qr=(Qr(Object(O.b)(Object(O.i)(Object(O.o)({epoch:Object(O.j)(),effectiveSlot:Object(O.j)(),amount:Object(O.j)(),postBalance:Object(O.j)()})))),Object(O.o)({epoch:Object(O.j)(),slotIndex:Object(O.j)(),slotsInEpoch:Object(O.j)(),absoluteSlot:Object(O.j)(),blockHeight:Object(O.k)(Object(O.j)()),transactionCount:Object(O.k)(Object(O.j)())})),Kr=Object(O.o)({slotsPerEpoch:Object(O.j)(),leaderScheduleSlotOffset:Object(O.j)(),warmup:Object(O.d)(),firstNormalEpoch:Object(O.j)(),firstNormalSlot:Object(O.j)()}),Vr=Object(O.l)(Object(O.m)(),Object(O.b)(Object(O.j)())),Wr=Object(O.i)(Object(O.p)([Object(O.o)({}),Object(O.m)()])),Yr=Object(O.o)({err:Wr}),Jr=Object(O.h)("receivedSignature");Object(O.o)({"solana-core":Object(O.m)(),"feature-set":Object(O.k)(Object(O.j)())}),Gr(Object(O.o)({err:Object(O.i)(Object(O.p)([Object(O.o)({}),Object(O.m)()])),logs:Object(O.i)(Object(O.b)(Object(O.m)())),accounts:Object(O.k)(Object(O.i)(Object(O.b)(Object(O.i)(Object(O.o)({executable:Object(O.d)(),owner:Object(O.m)(),lamports:Object(O.j)(),data:Object(O.b)(Object(O.m)()),rentEpoch:Object(O.k)(Object(O.j)())}))))),unitsConsumed:Object(O.k)(Object(O.j)()),returnData:Object(O.k)(Object(O.i)(Object(O.o)({programId:Object(O.m)(),data:Object(O.n)([Object(O.m)(),Object(O.h)("base64")])})))})),Gr(Object(O.o)({byIdentity:Object(O.l)(Object(O.m)(),Object(O.b)(Object(O.j)())),range:Object(O.o)({firstSlot:Object(O.j)(),lastSlot:Object(O.j)()})}));Qr(zr),Qr(qr),Qr(Kr),Qr(Vr),Qr(Object(O.j)()),Gr(Object(O.o)({total:Object(O.j)(),circulating:Object(O.j)(),nonCirculating:Object(O.j)(),nonCirculatingAccounts:Object(O.b)(Pr)}));var Xr=Object(O.o)({amount:Object(O.m)(),uiAmount:Object(O.i)(Object(O.j)()),decimals:Object(O.j)(),uiAmountString:Object(O.k)(Object(O.m)())}),Zr=(Gr(Object(O.b)(Object(O.o)({address:Pr,amount:Object(O.m)(),uiAmount:Object(O.i)(Object(O.j)()),decimals:Object(O.j)(),uiAmountString:Object(O.k)(Object(O.m)())}))),Gr(Object(O.b)(Object(O.o)({pubkey:Pr,account:Object(O.o)({executable:Object(O.d)(),owner:Pr,lamports:Object(O.j)(),data:jr,rentEpoch:Object(O.j)()})}))),Object(O.o)({program:Object(O.m)(),parsed:Object(O.q)(),space:Object(O.j)()})),$r=(Gr(Object(O.b)(Object(O.o)({pubkey:Pr,account:Object(O.o)({executable:Object(O.d)(),owner:Pr,lamports:Object(O.j)(),data:Zr,rentEpoch:Object(O.j)()})}))),Gr(Object(O.b)(Object(O.o)({lamports:Object(O.j)(),address:Pr}))),Object(O.o)({executable:Object(O.d)(),owner:Pr,lamports:Object(O.j)(),data:jr,rentEpoch:Object(O.j)()})),en=(Object(O.o)({pubkey:Pr,account:$r}),Object(O.e)(Object(O.p)([Object(O.g)(x.Buffer),Zr]),Object(O.p)([Nr,Zr]),(function(e){return Array.isArray(e)?Object(O.f)(e,jr):e}))),tn=Object(O.o)({executable:Object(O.d)(),owner:Pr,lamports:Object(O.j)(),data:en,rentEpoch:Object(O.j)()}),rn=(Object(O.o)({pubkey:Pr,account:tn}),Object(O.o)({state:Object(O.p)([Object(O.h)("active"),Object(O.h)("inactive"),Object(O.h)("activating"),Object(O.h)("deactivating")]),active:Object(O.j)(),inactive:Object(O.j)()}),Qr(Object(O.b)(Object(O.o)({signature:Object(O.m)(),slot:Object(O.j)(),err:Wr,memo:Object(O.i)(Object(O.m)()),blockTime:Object(O.k)(Object(O.i)(Object(O.j)()))}))),Qr(Object(O.b)(Object(O.o)({signature:Object(O.m)(),slot:Object(O.j)(),err:Wr,memo:Object(O.i)(Object(O.m)()),blockTime:Object(O.k)(Object(O.i)(Object(O.j)()))}))),Object(O.o)({subscription:Object(O.j)(),result:Hr($r)}),Object(O.o)({pubkey:Pr,account:$r})),nn=(Object(O.o)({subscription:Object(O.j)(),result:Hr(rn)}),Object(O.o)({parent:Object(O.j)(),slot:Object(O.j)(),root:Object(O.j)()})),an=(Object(O.o)({subscription:Object(O.j)(),result:nn}),Object(O.p)([Object(O.o)({type:Object(O.p)([Object(O.h)("firstShredReceived"),Object(O.h)("completed"),Object(O.h)("optimisticConfirmation"),Object(O.h)("root")]),slot:Object(O.j)(),timestamp:Object(O.j)()}),Object(O.o)({type:Object(O.h)("createdBank"),parent:Object(O.j)(),slot:Object(O.j)(),timestamp:Object(O.j)()}),Object(O.o)({type:Object(O.h)("frozen"),slot:Object(O.j)(),timestamp:Object(O.j)(),stats:Object(O.o)({numTransactionEntries:Object(O.j)(),numSuccessfulTransactions:Object(O.j)(),numFailedTransactions:Object(O.j)(),maxTransactionsPerEntry:Object(O.j)()})}),Object(O.o)({type:Object(O.h)("dead"),slot:Object(O.j)(),timestamp:Object(O.j)(),err:Object(O.m)()})])),on=(Object(O.o)({subscription:Object(O.j)(),result:an}),Object(O.o)({subscription:Object(O.j)(),result:Hr(Object(O.p)([Yr,Jr]))}),Object(O.o)({subscription:Object(O.j)(),result:Object(O.j)()}),Object(O.o)({pubkey:Object(O.m)(),gossip:Object(O.i)(Object(O.m)()),tpu:Object(O.i)(Object(O.m)()),rpc:Object(O.i)(Object(O.m)()),version:Object(O.i)(Object(O.m)())}),Object(O.o)({votePubkey:Object(O.m)(),nodePubkey:Object(O.m)(),activatedStake:Object(O.j)(),epochVoteAccount:Object(O.d)(),epochCredits:Object(O.b)(Object(O.n)([Object(O.j)(),Object(O.j)(),Object(O.j)()])),commission:Object(O.j)(),lastVote:Object(O.j)(),rootSlot:Object(O.i)(Object(O.j)())})),sn=(Qr(Object(O.o)({current:Object(O.b)(on),delinquent:Object(O.b)(on)})),Object(O.p)([Object(O.h)("processed"),Object(O.h)("confirmed"),Object(O.h)("finalized")])),cn=Object(O.o)({slot:Object(O.j)(),confirmations:Object(O.i)(Object(O.j)()),err:Wr,confirmationStatus:Object(O.k)(sn)}),un=(Gr(Object(O.b)(Object(O.i)(cn))),Qr(Object(O.j)()),Object(O.o)({signatures:Object(O.b)(Object(O.m)()),message:Object(O.o)({accountKeys:Object(O.b)(Object(O.m)()),header:Object(O.o)({numRequiredSignatures:Object(O.j)(),numReadonlySignedAccounts:Object(O.j)(),numReadonlyUnsignedAccounts:Object(O.j)()}),instructions:Object(O.b)(Object(O.o)({accounts:Object(O.b)(Object(O.j)()),data:Object(O.m)(),programIdIndex:Object(O.j)()})),recentBlockhash:Object(O.m)()})})),fn=Object(O.o)({parsed:Object(O.q)(),program:Object(O.m)(),programId:Pr}),dn=Object(O.o)({accounts:Object(O.b)(Pr),data:Object(O.m)(),programId:Pr}),ln=Object(O.p)([dn,fn]),hn=Object(O.p)([Object(O.o)({parsed:Object(O.q)(),program:Object(O.m)(),programId:Object(O.m)()}),Object(O.o)({accounts:Object(O.b)(Object(O.m)()),data:Object(O.m)(),programId:Object(O.m)()})]),pn=Object(O.e)(ln,hn,(function(e){return"accounts"in e?Object(O.f)(e,dn):Object(O.f)(e,fn)})),bn=Object(O.o)({signatures:Object(O.b)(Object(O.m)()),message:Object(O.o)({accountKeys:Object(O.b)(Object(O.o)({pubkey:Pr,signer:Object(O.d)(),writable:Object(O.d)()})),instructions:Object(O.b)(pn),recentBlockhash:Object(O.m)()})}),mn=Object(O.o)({accountIndex:Object(O.j)(),mint:Object(O.m)(),owner:Object(O.k)(Object(O.m)()),uiTokenAmount:Xr}),gn=Object(O.o)({writable:Object(O.b)(Pr),readonly:Object(O.b)(Pr)}),vn=Object(O.o)({err:Wr,fee:Object(O.j)(),innerInstructions:Object(O.k)(Object(O.i)(Object(O.b)(Object(O.o)({index:Object(O.j)(),instructions:Object(O.b)(Object(O.o)({accounts:Object(O.b)(Object(O.j)()),data:Object(O.m)(),programIdIndex:Object(O.j)()}))})))),preBalances:Object(O.b)(Object(O.j)()),postBalances:Object(O.b)(Object(O.j)()),logMessages:Object(O.k)(Object(O.i)(Object(O.b)(Object(O.m)()))),preTokenBalances:Object(O.k)(Object(O.i)(Object(O.b)(mn))),postTokenBalances:Object(O.k)(Object(O.i)(Object(O.b)(mn))),loadedAddresses:Object(O.k)(gn)}),yn=Object(O.o)({err:Wr,fee:Object(O.j)(),innerInstructions:Object(O.k)(Object(O.i)(Object(O.b)(Object(O.o)({index:Object(O.j)(),instructions:Object(O.b)(pn)})))),preBalances:Object(O.b)(Object(O.j)()),postBalances:Object(O.b)(Object(O.j)()),logMessages:Object(O.k)(Object(O.i)(Object(O.b)(Object(O.m)()))),preTokenBalances:Object(O.k)(Object(O.i)(Object(O.b)(mn))),postTokenBalances:Object(O.k)(Object(O.i)(Object(O.b)(mn))),loadedAddresses:Object(O.k)(gn)}),An=(Qr(Object(O.i)(Object(O.o)({blockhash:Object(O.m)(),previousBlockhash:Object(O.m)(),parentSlot:Object(O.j)(),transactions:Object(O.b)(Object(O.o)({transaction:un,meta:Object(O.i)(vn)})),rewards:Object(O.k)(Object(O.b)(Object(O.o)({pubkey:Object(O.m)(),lamports:Object(O.j)(),postBalance:Object(O.i)(Object(O.j)()),rewardType:Object(O.i)(Object(O.m)())}))),blockTime:Object(O.i)(Object(O.j)()),blockHeight:Object(O.i)(Object(O.j)())}))),Qr(Object(O.i)(Object(O.o)({blockhash:Object(O.m)(),previousBlockhash:Object(O.m)(),parentSlot:Object(O.j)(),transactions:Object(O.b)(Object(O.o)({transaction:un,meta:Object(O.i)(vn)})),rewards:Object(O.k)(Object(O.b)(Object(O.o)({pubkey:Object(O.m)(),lamports:Object(O.j)(),postBalance:Object(O.i)(Object(O.j)()),rewardType:Object(O.i)(Object(O.m)())}))),blockTime:Object(O.i)(Object(O.j)())}))),Qr(Object(O.i)(Object(O.o)({blockhash:Object(O.m)(),previousBlockhash:Object(O.m)(),parentSlot:Object(O.j)(),signatures:Object(O.b)(Object(O.m)()),blockTime:Object(O.i)(Object(O.j)())}))),Qr(Object(O.i)(Object(O.o)({slot:Object(O.j)(),meta:vn,blockTime:Object(O.k)(Object(O.i)(Object(O.j)())),transaction:un}))),Qr(Object(O.i)(Object(O.o)({slot:Object(O.j)(),transaction:bn,meta:Object(O.i)(yn),blockTime:Object(O.k)(Object(O.i)(Object(O.j)()))}))),Gr(Object(O.o)({blockhash:Object(O.m)(),feeCalculator:Object(O.o)({lamportsPerSignature:Object(O.j)()})})),Gr(Object(O.o)({blockhash:Object(O.m)(),lastValidBlockHeight:Object(O.j)()})),Object(O.o)({slot:Object(O.j)(),numTransactions:Object(O.j)(),numSlots:Object(O.j)(),samplePeriodSecs:Object(O.j)()})),wn=(Qr(Object(O.b)(An)),Gr(Object(O.i)(Object(O.o)({feeCalculator:Object(O.o)({lamportsPerSignature:Object(O.j)()})}))),Qr(Object(O.m)()),Qr(Object(O.m)()),Object(O.o)({err:Wr,logs:Object(O.b)(Object(O.m)()),signature:Object(O.m)()})),xn=(Object(O.o)({result:Hr(wn),subscription:Object(O.j)()}),"js/".concat(null!==(Rr="0.0.0-development")?Rr:"UNKNOWN"),function(){function e(t){Object(l.a)(this,e),this._keypair=void 0,this._keypair=t||w.a.sign.keyPair()}return Object(h.a)(e,[{key:"publicKey",get:function(){return new $t(this._keypair.publicKey)}},{key:"secretKey",get:function(){return this._keypair.secretKey}}],[{key:"generate",value:function(){return new e(w.a.sign.keyPair())}},{key:"fromSecretKey",value:function(t,r){var n=w.a.sign.keyPair.fromSecretKey(t);if(!r||!r.skipValidation){var a=(new TextEncoder).encode("@solana/web3.js-validation-v1"),i=w.a.sign.detached(a,n.secretKey);if(!w.a.sign.detached.verify(a,i,n.publicKey))throw new Error("provided secretKey is invalid")}return new e(n)}},{key:"fromSeed",value:function(t){return new e(w.a.sign.keyPair.fromSeed(t))}}]),e}()),En=Object.freeze({CreateLookupTable:{index:0,layout:I.struct([I.u32("instruction"),Mr("recentSlot"),I.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:I.struct([I.u32("instruction")])},ExtendLookupTable:{index:2,layout:I.struct([I.u32("instruction"),Mr(),I.seq(cr(),I.offset(I.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:I.struct([I.u32("instruction")])},CloseLookupTable:{index:4,layout:I.struct([I.u32("instruction")])}}),_n=function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,null,[{key:"createLookupTable",value:function(e){var t=$t.findProgramAddressSync([e.authority.toBuffer(),Object(S.toBufferLE)(BigInt(e.recentSlot),8)],this.programId),r=Object(d.a)(t,2),n=r[0],a=r[1],i=kr(En.CreateLookupTable,{recentSlot:BigInt(e.recentSlot),bumpSeed:a}),o=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:Tr.programId,isSigner:!1,isWritable:!1}];return[new gr({programId:this.programId,keys:o,data:i}),n]}},{key:"freezeLookupTable",value:function(e){var t=kr(En.FreezeLookupTable),r=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new gr({programId:this.programId,keys:r,data:t})}},{key:"extendLookupTable",value:function(e){var t=kr(En.ExtendLookupTable,{addresses:e.addresses.map((function(e){return e.toBytes()}))}),r=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return e.payer&&r.push({pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:Tr.programId,isSigner:!1,isWritable:!1}),new gr({programId:this.programId,keys:r,data:t})}},{key:"deactivateLookupTable",value:function(e){var t=kr(En.DeactivateLookupTable),r=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new gr({programId:this.programId,keys:r,data:t})}},{key:"closeLookupTable",value:function(e){var t=kr(En.CloseLookupTable),r=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.recipient,isSigner:!1,isWritable:!0}];return new gr({programId:this.programId,keys:r,data:t})}}]),e}();_n.programId=new $t("AddressLookupTab1e1111111111111111111111111");var Cn=Object.freeze({RequestUnits:{index:0,layout:I.struct([I.u8("instruction"),I.u32("units"),I.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:I.struct([I.u8("instruction"),I.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:I.struct([I.u8("instruction"),I.u32("units")])},SetComputeUnitPrice:{index:3,layout:I.struct([I.u8("instruction"),Mr("microLamports")])}}),kn=function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,null,[{key:"requestUnits",value:function(e){var t=kr(Cn.RequestUnits,e);return new gr({keys:[],programId:this.programId,data:t})}},{key:"requestHeapFrame",value:function(e){var t=kr(Cn.RequestHeapFrame,e);return new gr({keys:[],programId:this.programId,data:t})}},{key:"setComputeUnitLimit",value:function(e){var t=kr(Cn.SetComputeUnitLimit,e);return new gr({keys:[],programId:this.programId,data:t})}},{key:"setComputeUnitPrice",value:function(e){var t=kr(Cn.SetComputeUnitPrice,{microLamports:BigInt(e.microLamports)});return new gr({keys:[],programId:this.programId,data:t})}}]),e}();kn.programId=new $t("ComputeBudget111111111111111111111111111111");var Bn=I.struct([I.u8("numSignatures"),I.u8("padding"),I.u16("signatureOffset"),I.u16("signatureInstructionIndex"),I.u16("publicKeyOffset"),I.u16("publicKeyInstructionIndex"),I.u16("messageDataOffset"),I.u16("messageDataSize"),I.u16("messageInstructionIndex")]);(function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,null,[{key:"createInstructionWithPublicKey",value:function(t){var r=t.publicKey,n=t.message,a=t.signature,i=t.instructionIndex;br(32===r.length,"Public Key must be ".concat(32," bytes but received ").concat(r.length," bytes")),br(64===a.length,"Signature must be ".concat(64," bytes but received ").concat(a.length," bytes"));var o=Bn.span,s=o+r.length,c=s+a.length,u=x.Buffer.alloc(c+n.length),f=null==i?65535:i;return Bn.encode({numSignatures:1,padding:0,signatureOffset:s,signatureInstructionIndex:f,publicKeyOffset:o,publicKeyInstructionIndex:f,messageDataOffset:c,messageDataSize:n.length,messageInstructionIndex:f},u),u.fill(r,o),u.fill(a,s),u.fill(n,c),new gr({keys:[],programId:e.programId,data:u})}},{key:"createInstructionWithPrivateKey",value:function(e){var t=e.privateKey,r=e.message,n=e.instructionIndex;br(64===t.length,"Private key must be ".concat(64," bytes but received ").concat(t.length," bytes"));try{var a=xn.fromSecretKey(t),i=a.publicKey.toBytes(),o=w.a.sign.detached(r,a.secretKey);return this.createInstructionWithPublicKey({publicKey:i,message:r,signature:o,instructionIndex:n})}catch(s){throw new Error("Error creating instruction; ".concat(s))}}}]),e}()).programId=new $t("Ed25519SigVerify111111111111111111111111111");var In=D.a.publicKeyCreate,Sn=D.a.ecdsaSign,On=I.struct([I.u8("numSignatures"),I.u16("signatureOffset"),I.u8("signatureInstructionIndex"),I.u16("ethAddressOffset"),I.u8("ethAddressInstructionIndex"),I.u16("messageDataOffset"),I.u16("messageDataSize"),I.u8("messageInstructionIndex"),I.blob(20,"ethAddress"),I.blob(64,"signature"),I.u8("recoveryId")]);(function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,null,[{key:"publicKeyToEthAddress",value:function(e){br(64===e.length,"Public key must be ".concat(64," bytes but received ").concat(e.length," bytes"));try{return x.Buffer.from(F.a.keccak_256.update(R(e)).digest()).slice(-20)}catch(t){throw new Error("Error constructing Ethereum address: ".concat(t))}}},{key:"createInstructionWithPublicKey",value:function(t){var r=t.publicKey,n=t.message,a=t.signature,i=t.recoveryId,o=t.instructionIndex;return e.createInstructionWithEthAddress({ethAddress:e.publicKeyToEthAddress(r),message:n,signature:a,recoveryId:i,instructionIndex:o})}},{key:"createInstructionWithEthAddress",value:function(t){var r,n=t.ethAddress,a=t.message,i=t.signature,o=t.recoveryId,s=t.instructionIndex,c=void 0===s?0:s;br(20===(r="string"===typeof n?n.startsWith("0x")?x.Buffer.from(n.substr(2),"hex"):x.Buffer.from(n,"hex"):n).length,"Address must be ".concat(20," bytes but received ").concat(r.length," bytes"));var u=12+r.length,f=u+i.length+1,d=x.Buffer.alloc(On.span+a.length);return On.encode({numSignatures:1,signatureOffset:u,signatureInstructionIndex:c,ethAddressOffset:12,ethAddressInstructionIndex:c,messageDataOffset:f,messageDataSize:a.length,messageInstructionIndex:c,signature:R(i),ethAddress:R(r),recoveryId:o},d),d.fill(R(a),On.span),new gr({keys:[],programId:e.programId,data:d})}},{key:"createInstructionWithPrivateKey",value:function(e){var t=e.privateKey,r=e.message,n=e.instructionIndex;br(32===t.length,"Private key must be ".concat(32," bytes but received ").concat(t.length," bytes"));try{var a=R(t),i=In(a,!1).slice(1),o=x.Buffer.from(F.a.keccak_256.update(R(r)).digest()),s=Sn(o,a),c=s.signature,u=s.recid;return this.createInstructionWithPublicKey({publicKey:i,message:r,signature:c,recoveryId:u,instructionIndex:n})}catch(f){throw new Error("Error creating instruction; ".concat(f))}}}]),e}()).programId=new $t("KeccakSecp256k11111111111111111111111111111");var Mn=new $t("StakeConfig11111111111111111111111111111111"),Dn=Object(h.a)((function e(t,r,n){Object(l.a)(this,e),this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=r,this.custodian=n}));Dn.default=new Dn(0,0,$t.default);var Tn=Object.freeze({Initialize:{index:0,layout:I.struct([I.u32("instruction"),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"authorized";return I.struct([cr("staker"),cr("withdrawer")],e)}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lockup";return I.struct([I.ns64("unixTimestamp"),I.ns64("epoch"),cr("custodian")],e)}()])},Authorize:{index:1,layout:I.struct([I.u32("instruction"),cr("newAuthorized"),I.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:I.struct([I.u32("instruction")])},Split:{index:3,layout:I.struct([I.u32("instruction"),I.ns64("lamports")])},Withdraw:{index:4,layout:I.struct([I.u32("instruction"),I.ns64("lamports")])},Deactivate:{index:5,layout:I.struct([I.u32("instruction")])},Merge:{index:7,layout:I.struct([I.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:I.struct([I.u32("instruction"),cr("newAuthorized"),I.u32("stakeAuthorizationType"),ur("authoritySeed"),cr("authorityOwner")])}}),Fn=(Object.freeze({Staker:{index:0},Withdrawer:{index:1}}),function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,null,[{key:"initialize",value:function(e){var t=e.stakePubkey,r=e.authorized,n=e.lockup||Dn.default,a=kr(Tn.Initialize,{authorized:{staker:R(r.staker.toBuffer()),withdrawer:R(r.withdrawer.toBuffer())},lockup:{unixTimestamp:n.unixTimestamp,epoch:n.epoch,custodian:R(n.custodian.toBuffer())}}),i={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:wr,isSigner:!1,isWritable:!1}],programId:this.programId,data:a};return new gr(i)}},{key:"createAccountWithSeed",value:function(e){var t=new vr;t.add(Tr.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:this.space,programId:this.programId}));var r=e.stakePubkey,n=e.authorized,a=e.lockup;return t.add(this.initialize({stakePubkey:r,authorized:n,lockup:a}))}},{key:"createAccount",value:function(e){var t=new vr;t.add(Tr.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,lamports:e.lamports,space:this.space,programId:this.programId}));var r=e.stakePubkey,n=e.authorized,a=e.lockup;return t.add(this.initialize({stakePubkey:r,authorized:n,lockup:a}))}},{key:"delegate",value:function(e){var t=e.stakePubkey,r=e.authorizedPubkey,n=e.votePubkey,a=kr(Tn.Delegate);return(new vr).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:yr,isSigner:!1,isWritable:!1},{pubkey:xr,isSigner:!1,isWritable:!1},{pubkey:Mn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}},{key:"authorize",value:function(e){var t=e.stakePubkey,r=e.authorizedPubkey,n=e.newAuthorizedPubkey,a=e.stakeAuthorizationType,i=e.custodianPubkey,o=kr(Tn.Authorize,{newAuthorized:R(n.toBuffer()),stakeAuthorizationType:a.index}),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:yr,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return i&&s.push({pubkey:i,isSigner:!1,isWritable:!1}),(new vr).add({keys:s,programId:this.programId,data:o})}},{key:"authorizeWithSeed",value:function(e){var t=e.stakePubkey,r=e.authorityBase,n=e.authoritySeed,a=e.authorityOwner,i=e.newAuthorizedPubkey,o=e.stakeAuthorizationType,s=e.custodianPubkey,c=kr(Tn.AuthorizeWithSeed,{newAuthorized:R(i.toBuffer()),stakeAuthorizationType:o.index,authoritySeed:n,authorityOwner:R(a.toBuffer())}),u=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:yr,isSigner:!1,isWritable:!1}];return s&&u.push({pubkey:s,isSigner:!1,isWritable:!1}),(new vr).add({keys:u,programId:this.programId,data:c})}},{key:"splitInstruction",value:function(e){var t=e.stakePubkey,r=e.authorizedPubkey,n=e.splitStakePubkey,a=e.lamports,i=kr(Tn.Split,{lamports:a});return new gr({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}},{key:"split",value:function(e){var t=new vr;return t.add(Tr.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:0,space:this.space,programId:this.programId})),t.add(this.splitInstruction(e))}},{key:"splitWithSeed",value:function(e){var t=e.stakePubkey,r=e.authorizedPubkey,n=e.splitStakePubkey,a=e.basePubkey,i=e.seed,o=e.lamports,s=new vr;return s.add(Tr.allocate({accountPubkey:n,basePubkey:a,seed:i,space:this.space,programId:this.programId})),s.add(this.splitInstruction({stakePubkey:t,authorizedPubkey:r,splitStakePubkey:n,lamports:o}))}},{key:"merge",value:function(e){var t=e.stakePubkey,r=e.sourceStakePubKey,n=e.authorizedPubkey,a=kr(Tn.Merge);return(new vr).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:yr,isSigner:!1,isWritable:!1},{pubkey:xr,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}},{key:"withdraw",value:function(e){var t=e.stakePubkey,r=e.authorizedPubkey,n=e.toPubkey,a=e.lamports,i=e.custodianPubkey,o=kr(Tn.Withdraw,{lamports:a}),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:yr,isSigner:!1,isWritable:!1},{pubkey:xr,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return i&&s.push({pubkey:i,isSigner:!1,isWritable:!1}),(new vr).add({keys:s,programId:this.programId,data:o})}},{key:"deactivate",value:function(e){var t=e.stakePubkey,r=e.authorizedPubkey,n=kr(Tn.Deactivate);return(new vr).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:yr,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:n})}}]),e}());Fn.programId=new $t("Stake11111111111111111111111111111111111111"),Fn.space=200;var Rn=Object.freeze({InitializeAccount:{index:0,layout:I.struct([I.u32("instruction"),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"voteInit";return I.struct([cr("nodePubkey"),cr("authorizedVoter"),cr("authorizedWithdrawer"),I.u8("commission")],e)}()])},Authorize:{index:1,layout:I.struct([I.u32("instruction"),cr("newAuthorized"),I.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:I.struct([I.u32("instruction"),I.ns64("lamports")])}}),Pn=(Object.freeze({Voter:{index:0},Withdrawer:{index:1}}),function(){function e(){Object(l.a)(this,e)}return Object(h.a)(e,null,[{key:"initializeAccount",value:function(e){var t=e.votePubkey,r=e.nodePubkey,n=e.voteInit,a=kr(Rn.InitializeAccount,{voteInit:{nodePubkey:R(n.nodePubkey.toBuffer()),authorizedVoter:R(n.authorizedVoter.toBuffer()),authorizedWithdrawer:R(n.authorizedWithdrawer.toBuffer()),commission:n.commission}}),i={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:wr,isSigner:!1,isWritable:!1},{pubkey:yr,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:a};return new gr(i)}},{key:"createAccount",value:function(e){var t=new vr;return t.add(Tr.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.votePubkey,lamports:e.lamports,space:this.space,programId:this.programId})),t.add(this.initializeAccount({votePubkey:e.votePubkey,nodePubkey:e.voteInit.nodePubkey,voteInit:e.voteInit}))}},{key:"authorize",value:function(e){var t=e.votePubkey,r=e.authorizedPubkey,n=e.newAuthorizedPubkey,a=e.voteAuthorizationType,i=kr(Rn.Authorize,{newAuthorized:R(n.toBuffer()),voteAuthorizationType:a.index}),o=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:yr,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return(new vr).add({keys:o,programId:this.programId,data:i})}},{key:"withdraw",value:function(e){var t=e.votePubkey,r=e.authorizedWithdrawerPubkey,n=e.lamports,a=e.toPubkey,i=kr(Rn.Withdraw,{lamports:n}),o=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return(new vr).add({keys:o,programId:this.programId,data:i})}}]),e}());Pn.programId=new $t("Vote111111111111111111111111111111111111111"),Pn.space=3731;new $t("Va1idator1nfo111111111111111111111111111111"),Object(O.o)({name:Object(O.m)(),website:Object(O.k)(Object(O.m)()),details:Object(O.k)(Object(O.m)()),keybaseUsername:Object(O.k)(Object(O.m)())}),new $t("Vote111111111111111111111111111111111111111"),I.struct([cr("nodePubkey"),cr("authorizedWithdrawer"),I.u8("commission"),I.nu64(),I.seq(I.struct([I.nu64("slot"),I.u32("confirmationCount")]),I.offset(I.u32(),-8),"votes"),I.u8("rootSlotValid"),I.nu64("rootSlot"),I.nu64(),I.seq(I.struct([I.nu64("epoch"),cr("authorizedVoter")]),I.offset(I.u32(),-8),"authorizedVoters"),I.struct([I.seq(I.struct([cr("authorizedPubkey"),I.nu64("epochOfLastAuthorizedSwitch"),I.nu64("targetEpoch")]),32,"buf"),I.nu64("idx"),I.u8("isEmpty")],"priorVoters"),I.nu64(),I.seq(I.struct([I.nu64("epoch"),I.nu64("credits"),I.nu64("prevCredits")]),I.offset(I.u32(),-8),"epochCredits"),I.struct([I.nu64("slot"),I.nu64("timestamp")],"lastTimestamp")]);var Nn=function(e){Object(b.a)(r,e);var t=Object(m.a)(r);function r(e,n){var a,i,o;if(Object(l.a)(this,r),a=t.call(this),i=Object(p.a)(a),a._handleMessage=function(e){if(a._injectedProvider&&e.source===window||e.origin===a._providerUrl.origin&&e.source===a._popup)if("connected"===e.data.method){var t=new $t(e.data.params.publicKey);a._publicKey&&a._publicKey.equals(t)||(a._publicKey&&!a._publicKey.equals(t)&&a._handleDisconnect(),a._publicKey=t,a._autoApprove=!!e.data.params.autoApprove,a.emit("connect",a._publicKey))}else if("disconnected"===e.data.method)a._handleDisconnect();else if((e.data.result||e.data.error)&&a._responsePromises.has(e.data.id)){var r=a._responsePromises.get(e.data.id),n=Object(d.a)(r,2),i=n[0],o=n[1];e.data.result?i(e.data.result):o(new Error(e.data.error))}},a._handleConnect=function(){return a._handlerAdded||(a._handlerAdded=!0,window.addEventListener("message",a._handleMessage),window.addEventListener("beforeunload",a.disconnect)),a._injectedProvider?new Promise((function(e){a._sendRequest("connect",{}),e()})):(window.name="parent",a._popup=window.open(a._providerUrl.toString(),"_blank","location,resizable,width=460,height=675"),new Promise((function(e){a.once("connect",e)})))},a._handleDisconnect=function(){a._handlerAdded&&(a._handlerAdded=!1,window.removeEventListener("message",a._handleMessage),window.removeEventListener("beforeunload",a.disconnect)),a._publicKey&&(a._publicKey=null,a.emit("disconnect")),a._responsePromises.forEach((function(e,t){var r=Object(d.a)(e,2),n=(r[0],r[1]);a._responsePromises.delete(t),n("Wallet disconnected")}))},a._sendRequest=function(){var e=Object(f.a)(Object(c.a)().mark((function e(t,r){var n;return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("connect"===t||i.connected){e.next=2;break}throw new Error("Wallet not connected");case 2:return n=i._nextRequestId,++i._nextRequestId,e.abrupt("return",new Promise((function(e,a){i._responsePromises.set(n,[e,a]),i._injectedProvider?i._injectedProvider.postMessage({jsonrpc:"2.0",id:n,method:t,params:Object(u.a)({network:i._network},r)}):(i._popup.postMessage({jsonrpc:"2.0",id:n,method:t,params:r},i._providerUrl.origin),i.autoApprove||i._popup.focus())})));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),a.connect=function(){return a._popup&&a._popup.close(),a._handleConnect()},a.disconnect=Object(f.a)(Object(c.a)().mark((function e(){return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i._injectedProvider){e.next=3;break}return e.next=3,i._sendRequest("disconnect",{});case 3:i._popup&&i._popup.close(),i._handleDisconnect();case 5:case"end":return e.stop()}}),e)}))),a.sign=function(){var e=Object(f.a)(Object(c.a)().mark((function e(t,r){var n,a,o;return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t instanceof Uint8Array){e.next=2;break}throw new Error("Data must be an instance of Uint8Array");case 2:return e.next=4,i._sendRequest("sign",{data:t,display:r});case 4:return n=e.sent,a=k.a.decode(n.signature),o=new $t(n.publicKey),e.abrupt("return",{signature:a,publicKey:o});case 8:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),a.signTransaction=function(){var e=Object(f.a)(Object(c.a)().mark((function e(t){var r,n,a;return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i._sendRequest("signTransaction",{message:k.a.encode(t.serializeMessage())});case 2:return r=e.sent,n=k.a.decode(r.signature),a=new $t(r.publicKey),t.addSignature(a,n),e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a.signAllTransactions=function(){var e=Object(f.a)(Object(c.a)().mark((function e(t){var r,n,a;return Object(c.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i._sendRequest("signAllTransactions",{messages:t.map((function(e){return k.a.encode(e.serializeMessage())}))});case 2:return r=e.sent,n=r.signatures.map((function(e){return k.a.decode(e)})),a=new $t(r.publicKey),t=t.map((function(e,t){return e.addSignature(a,n[t]),e})),e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(e){return"object"===typeof e&&null!==e}(o=e)&&function(e){return"function"===typeof e}(o.postMessage))a._injectedProvider=e;else{if(!function(e){return"string"===typeof e}(e))throw new Error("provider parameter must be an injected provider or a URL string.");a._providerUrl=new URL(e),a._providerUrl.hash=new URLSearchParams({origin:window.location.origin,network:n}).toString()}return a._network=n,a._publicKey=null,a._autoApprove=!1,a._popup=null,a._handlerAdded=!1,a._nextRequestId=1,a._responsePromises=new Map,a}return Object(h.a)(r,[{key:"publicKey",get:function(){return this._publicKey}},{key:"connected",get:function(){return null!==this._publicKey}},{key:"autoApprove",get:function(){return this._autoApprove}}]),r}(a.a);var jn=Nn,Ln=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Un=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},Qn=function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},$n=function(e){function t(r){var n=e.call(this)||this;return n._network="mainnet-beta",n._provider=null,n._adapterInstance=null,n._element=null,n._iframe=null,n._connectHandler=null,n._flutterHandlerInterval=null,n._handleEvent=function(e){var t,r,a;switch(e.type){case"connect_native_web":return n._collapseIframe(),n._adapterInstance=new Gn(n._iframe,n._network,(null===(t=e.data)||void 0===t?void 0:t.provider)||n._provider||"https://solflare.com/provider"),n._adapterInstance.on("connect",n._webConnected),n._adapterInstance.on("disconnect",n._webDisconnected),n._adapterInstance.connect(),void n._setPreferredAdapter("native_web");case"connect":return n._collapseIframe(),n._adapterInstance=new Wn(n._iframe,(null===(r=e.data)||void 0===r?void 0:r.publicKey)||""),n._adapterInstance.connect(),n._setPreferredAdapter(null===(a=e.data)||void 0===a?void 0:a.adapter),n._connectHandler&&(n._connectHandler.resolve(),n._connectHandler=null),void n.emit("connect",n.publicKey);case"disconnect":return n._connectHandler&&(n._connectHandler.reject(),n._connectHandler=null),n._disconnected(),void n.emit("disconnect");case"collapse":return void n._collapseIframe();default:return}},n._handleMessage=function(e){var t;if("solflareIframeToWalletAdapter"===(null===(t=e.data)||void 0===t?void 0:t.channel)){var r=e.data.data||{};"event"===r.type?n._handleEvent(r.event):n._adapterInstance&&n._adapterInstance.handleMessage(r)}},n._removeElement=function(){null!==n._flutterHandlerInterval&&(clearInterval(n._flutterHandlerInterval),n._flutterHandlerInterval=null),n._element&&(n._element.remove(),n._element=null)},n._removeDanglingElements=function(){var e,t,r=document.getElementsByClassName("solflare-wallet-adapter-iframe");try{for(var n=Zn(r),a=n.next();!a.done;a=n.next()){var i=a.value;i.parentElement&&i.remove()}}catch(o){e={error:o}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},n._injectElement=function(){n._removeElement(),n._removeDanglingElements();var e="".concat(t.IFRAME_URL,"?cluster=").concat(encodeURIComponent(n._network),"&origin=").concat(encodeURIComponent(window.location.origin)),r=n._getPreferredAdapter();r&&(e+="&adapter=".concat(encodeURIComponent(r))),n._element=document.createElement("div"),n._element.className="solflare-wallet-adapter-iframe",n._element.innerHTML="\n \n "),document.body.appendChild(n._element),n._iframe=n._element.querySelector("iframe"),window.fromFlutter=n._handleMobileMessage,n._flutterHandlerInterval=setInterval((function(){window.fromFlutter=n._handleMobileMessage}),100),window.addEventListener("message",n._handleMessage,!1)},n._collapseIframe=function(){n._iframe&&(n._iframe.style.top="",n._iframe.style.right="",n._iframe.style.height="2px",n._iframe.style.width="2px")},n._getPreferredAdapter=function(){return localStorage&&localStorage.getItem("solflarePreferredWalletAdapter")||null},n._setPreferredAdapter=function(e){localStorage&&e&&localStorage.setItem("solflarePreferredWalletAdapter",e)},n._clearPreferredAdapter=function(){localStorage&&localStorage.removeItem("solflarePreferredWalletAdapter")},n._webConnected=function(){n._connectHandler&&(n._connectHandler.resolve(),n._connectHandler=null),n.emit("connect",n.publicKey)},n._webDisconnected=function(){n._connectHandler&&(n._connectHandler.reject(),n._connectHandler=null),n._disconnected(),n.emit("disconnect")},n._disconnected=function(){window.removeEventListener("message",n._handleMessage,!1),n._removeElement(),n._clearPreferredAdapter(),n._adapterInstance=null},n._handleMobileMessage=function(e){var t,r;null===(r=null===(t=n._iframe)||void 0===t?void 0:t.contentWindow)||void 0===r||r.postMessage({channel:"solflareMobileToIframe",data:e},"*")},(null===r||void 0===r?void 0:r.network)&&(n._network=null===r||void 0===r?void 0:r.network),(null===r||void 0===r?void 0:r.provider)&&(n._provider=null===r||void 0===r?void 0:r.provider),n}return Yn(t,e),Object.defineProperty(t.prototype,"publicKey",{get:function(){var e;return(null===(e=this._adapterInstance)||void 0===e?void 0:e.publicKey)||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isConnected",{get:function(){var e;return!!(null===(e=this._adapterInstance)||void 0===e?void 0:e.connected)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"connected",{get:function(){return this.isConnected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoApprove",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.connect=function(){return Jn(this,void 0,void 0,(function(){var e=this;return Xn(this,(function(t){switch(t.label){case 0:return this.connected?[2]:(this._injectElement(),[4,new Promise((function(t,r){e._connectHandler={resolve:t,reject:r}}))]);case 1:return t.sent(),[2]}}))}))},t.prototype.disconnect=function(){return Jn(this,void 0,void 0,(function(){return Xn(this,(function(e){switch(e.label){case 0:return this._adapterInstance?[4,this._adapterInstance.disconnect()]:[2];case 1:return e.sent(),this._disconnected(),this.emit("disconnect"),[2]}}))}))},t.prototype.signTransaction=function(e){return Jn(this,void 0,void 0,(function(){return Xn(this,(function(t){switch(t.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signTransaction(e)];case 1:return[2,t.sent()]}}))}))},t.prototype.signAllTransactions=function(e){return Jn(this,void 0,void 0,(function(){return Xn(this,(function(t){switch(t.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signAllTransactions(e)];case 1:return[2,t.sent()]}}))}))},t.prototype.signMessage=function(e,t){return void 0===t&&(t="utf8"),Jn(this,void 0,void 0,(function(){return Xn(this,(function(r){switch(r.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signMessage(e,t)];case 1:return[2,r.sent()]}}))}))},t.prototype.sign=function(e,t){return void 0===t&&(t="utf8"),Jn(this,void 0,void 0,(function(){return Xn(this,(function(r){switch(r.label){case 0:return[4,this.signMessage(e,t)];case 1:return[2,r.sent()]}}))}))},t.prototype.detectWallet=function(e){return void 0===e&&(e=10),Jn(this,void 0,void 0,(function(){return Xn(this,(function(r){return[2,new Promise((function(r){var n=null;function a(e){!function(){window.removeEventListener("message",o,!1),n&&(document.body.removeChild(n),n=null);i&&(clearTimeout(i),i=null)}(),r(e)}var i=setTimeout((function(){a(!1)}),1e3*e);function o(e){var t,r,n;"solflareDetectorToAdapter"===(null===(t=e.data)||void 0===t?void 0:t.channel)&&a(!!(null===(n=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.detected))}window.addEventListener("message",o,!1),(n=document.createElement("div")).className="solflare-wallet-detect-iframe",n.innerHTML="\n \n "),document.body.appendChild(n)}))]}))}))},t.IFRAME_URL="https://connect.solflare.com/",t.DETECT_IFRAME_URL="https://connect.solflare.com/detect",t}(a.a);t.default=$n},function(e,t,r){"use strict";r.r(t),r.d(t,"Mutex",(function(){return i})),r.d(t,"Semaphore",(function(){return a})),r.d(t,"withTimeout",(function(){return o}));var n=r(19),a=function(){function e(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return e.prototype.acquire=function(){var e=this,t=this.isLocked(),r=new Promise((function(t){return e._queue.push(t)}));return t||this._dispatch(),r},e.prototype.runExclusive=function(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){var t,r,a;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return[4,this.acquire()];case 1:t=n.sent(),r=t[0],a=t[1],n.label=2;case 2:return n.trys.push([2,,4,5]),[4,e(r)];case 3:return[2,n.sent()];case 4:return a(),[7];case 5:return[2]}}))}))},e.prototype.isLocked=function(){return this._value<=0},e.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},e.prototype._dispatch=function(){var e=this,t=this._queue.shift();if(t){var r=!1;this._currentReleaser=function(){r||(r=!0,e._value++,e._dispatch())},t([this._value--,this._currentReleaser])}},e}(),i=function(){function e(){this._semaphore=new a(1)}return e.prototype.acquire=function(){return Object(n.__awaiter)(this,void 0,void 0,(function(){var e;return Object(n.__generator)(this,(function(t){switch(t.label){case 0:return[4,this._semaphore.acquire()];case 1:return e=t.sent(),[2,e[1]]}}))}))},e.prototype.runExclusive=function(e){return this._semaphore.runExclusive((function(){return e()}))},e.prototype.isLocked=function(){return this._semaphore.isLocked()},e.prototype.release=function(){this._semaphore.release()},e}();function o(e,t,r){var a=this;return void 0===r&&(r=new Error("timeout")),{acquire:function(){return new Promise((function(i,o){return Object(n.__awaiter)(a,void 0,void 0,(function(){var a,s;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return a=!1,setTimeout((function(){a=!0,o(r)}),t),[4,e.acquire()];case 1:return s=n.sent(),a?(Array.isArray(s)?s[1]:s)():i(s),[2]}}))}))}))},runExclusive:function(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){var t,r;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:t=function(){},n.label=1;case 1:return n.trys.push([1,,7,8]),[4,this.acquire()];case 2:return r=n.sent(),Array.isArray(r)?(t=r[1],[4,e(r[0])]):[3,4];case 3:return[2,n.sent()];case 4:return t=r,[4,e()];case 5:return[2,n.sent()];case 6:return[3,8];case 7:return t(),[7];case 8:return[2]}}))}))},release:function(){e.release()},isLocked:function(){return e.isLocked()}}}},function(e,t,r){"use strict";r.r(t),r.d(t,"componentsToDebugString",(function(){return fe})),r.d(t,"default",(function(){return be})),r.d(t,"getFullscreenElement",(function(){return R})),r.d(t,"getScreenFrame",(function(){return W})),r.d(t,"hashComponents",(function(){return de})),r.d(t,"isAndroid",(function(){return N})),r.d(t,"isChromium",(function(){return M})),r.d(t,"isDesktopSafari",(function(){return T})),r.d(t,"isEdgeHTML",(function(){return O})),r.d(t,"isGecko",(function(){return F})),r.d(t,"isTrident",(function(){return S})),r.d(t,"isWebKit",(function(){return D})),r.d(t,"load",(function(){return pe})),r.d(t,"loadSources",(function(){return B})),r.d(t,"murmurX64Hash128",(function(){return me})),r.d(t,"prepareForSources",(function(){return le})),r.d(t,"sources",(function(){return se})),r.d(t,"transformSource",(function(){return I})),r.d(t,"withIframe",(function(){return L}));var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&a[a.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]=a+r?(a=s,[4,c(0)]):[3,3]):[3,4];case 2:i.sent(),i.label=3;case 3:return++o,[3,1];case 4:return[2,n]}}))}))}function l(e){e.then(void 0,(function(){}))}function h(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]+t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function p(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]*t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function b(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function m(e,t){return 0===(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=g(e=p(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=g(e=p(e,[3301882366,444984403]),[0,e[0]>>>1])}function y(e,t){t=t||0;var r,n=(e=e||"").length%16,a=e.length-n,i=[0,t],o=[0,t],s=[0,0],c=[0,0],u=[2277735313,289559509],f=[1291169091,658871167];for(r=0;r>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)+("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)}function A(e){return parseInt(e)}function w(e){return parseFloat(e)}function x(e,t){return"number"===typeof e&&isNaN(e)?t:e}function E(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}function _(e,t){if(void 0===t&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;var r=1/t;return Math.round(e*r)/r}function C(e){return e&&"object"===typeof e&&"message"in e?e:{message:e}}function k(e){return"function"!==typeof e}function B(e,t,r){var n=Object.keys(e).filter((function(e){return!function(e,t){for(var r=0,n=e.length;r=4}function O(){var e=window,t=navigator;return E(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!S()}function M(){var e=window,t=navigator;return E(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,0===t.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function D(){var e=window,t=navigator;return E(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===t.vendor.indexOf("Apple"),"getStorageUpdates"in t,"WebKitMediaKeys"in e])>=4}function T(){var e=window;return E(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function F(){var e,t,r=window;return E(["buildID"in navigator,"MozAppearance"in(null!==(t=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==t?t:{}),"onmozfullscreenchange"in r,"mozInnerScreenX"in r,"CSSMozDocumentRule"in r,"CanvasCaptureMediaStream"in r])>=4}function R(){var e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function P(){var e=document;return(e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen).call(e)}function N(){var e=M(),t=F();if(!e&&!t)return!1;var r=window;return E(["onorientationchange"in r,"orientation"in r,e&&!("SharedWorker"in r),t&&/android/i.test(navigator.appVersion)])>=2}function j(e){var t=new Error(e);return t.name=e,t}function L(e,t,r){var n,o,s;return void 0===r&&(r=50),a(this,void 0,void 0,(function(){var a,u;return i(this,(function(i){switch(i.label){case 0:a=document,i.label=1;case 1:return a.body?[3,3]:[4,c(r)];case 2:return i.sent(),[3,1];case 3:u=a.createElement("iframe"),i.label=4;case 4:return i.trys.push([4,,10,11]),[4,new Promise((function(e,r){var n=!1,i=function(){n=!0,e()};u.onload=i,u.onerror=function(e){n=!0,r(e)};var o=u.style;o.setProperty("display","block","important"),o.position="absolute",o.top="0",o.left="0",o.visibility="hidden",t&&"srcdoc"in u?u.srcdoc=t:u.src="about:blank",a.body.appendChild(u);!function e(){var t,r;n||("complete"===(null===(r=null===(t=u.contentWindow)||void 0===t?void 0:t.document)||void 0===r?void 0:r.readyState)?i():setTimeout(e,10))}()}))];case 5:i.sent(),i.label=6;case 6:return(null===(o=null===(n=u.contentWindow)||void 0===n?void 0:n.document)||void 0===o?void 0:o.body)?[3,8]:[4,c(r)];case 7:return i.sent(),[3,6];case 8:return[4,e(u,u.contentWindow)];case 9:return[2,i.sent()];case 10:return null===(s=u.parentNode)||void 0===s||s.removeChild(u),[7];case 11:return[2]}}))}))}function U(e){for(var t=function(e){for(var t,r,n="Unexpected syntax '".concat(e,"'"),a=/^\s*([a-z-]*)(.*)$/i.exec(e),i=a[1]||void 0,o={},s=/([.:#][\w-]+|\[.+?\])/gi,c=function(e,t){o[e]=o[e]||[],o[e].push(t)};;){var u=s.exec(a[2]);if(!u)break;var f=u[0];switch(f[0]){case".":c("class",f.slice(1));break;case"#":c("id",f.slice(1));break;case"[":var d=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(f);if(!d)throw new Error(n);c(d[1],null!==(r=null!==(t=d[4])&&void 0!==t?t:d[5])&&void 0!==r?r:"");break;default:throw new Error(n)}}return[i,o]}(e),r=t[0],n=t[1],a=document.createElement(null!==r&&void 0!==r?r:"div"),i=0,o=Object.keys(n);i.6*r.length}))).sort(),[2,a]}}))}))},fontPreferences:function(){return function(e,t){void 0===t&&(t=4e3);return L((function(r,n){var a=n.document,i=a.body,s=i.style;s.width="".concat(t,"px"),s.webkitTextSizeAdjust=s.textSizeAdjust="none",M()?i.style.zoom="".concat(1/n.devicePixelRatio):D()&&(i.style.zoom="reset");var c=a.createElement("div");return c.textContent=o([],Array(t/20<<0),!0).map((function(){return"word"})).join(" "),i.appendChild(c),e(a,i)}),'')}((function(e,t){for(var r={},n={},a=0,i=Object.keys(oe);a=3}())return-1;var r=new t(1,5e3,44100),n=r.createOscillator();n.type="triangle",n.frequency.value=1e4;var a=r.createDynamicsCompressor();a.threshold.value=-50,a.knee.value=40,a.ratio.value=12,a.attack.value=0,a.release.value=.25,n.connect(a),a.connect(r.destination),n.start(0);var i=function(e){var t=3,r=500,n=500,a=5e3,i=function(){},o=new Promise((function(o,s){var c=!1,f=0,d=0;e.oncomplete=function(e){return o(e.renderedBuffer)};var h=function(){setTimeout((function(){return s(j("timeout"))}),Math.min(n,d+a-Date.now()))};(function n(){try{var a=e.startRendering();switch(u(a)&&l(a),e.state){case"running":d=Date.now(),c&&h();break;case"suspended":document.hidden||f++,c&&f>=t?s(j("suspended")):setTimeout(n,r)}}catch(i){s(i)}})(),i=function(){c||(c=!0,d>0&&h())}}));return[o,i]}(r),o=i[0],s=i[1],c=o.then((function(e){return function(e){for(var t=0,r=0;r=3}()||t.push(e.languages);else if("string"===typeof e.languages){var n=e.languages;n&&t.push(n.split(","))}return t},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return x(w(navigator.deviceMemory),void 0)},screenResolution:function(){var e=screen,t=function(e){return x(A(e),null)},r=[t(e.width),t(e.height)];return r.sort().reverse(),r},hardwareConcurrency:function(){return x(A(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,t=null===(e=window.Intl)||void 0===e?void 0:e.DateTimeFormat;if(t){var r=(new t).resolvedOptions().timeZone;if(r)return r}var n=-function(){var e=(new Date).getFullYear();return Math.max(w(new Date(e,0,1).getTimezoneOffset()),w(new Date(e,6,1).getTimezoneOffset()))}();return"UTC".concat(n>=0?"+":"").concat(Math.abs(n))},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!S()&&!O())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return"MacIntel"===e&&D()&&!T()?function(){if("iPad"===navigator.platform)return!0;var e=screen,t=e.width/e.height;return E(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}()?"iPad":"iPhone":e},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],r=0;r=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/fingerprintjs/v".concat(s,"/npm-monitoring"),!0),e.send()}catch(t){console.error(t)}}(),[4,le(r)];case 1:return e.sent(),[2,he(B(se,{debug:n},[]),n)]}}))}))}var be={load:pe,hashComponents:de,componentsToDebugString:fe},me=y},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(10),a=r(845);function i(){return n.useContext(a.a)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(14),a=r(49),i=r(100),o=r(892),s=r(872),c=["sx"],u=function(e){var t={systemProps:{},otherProps:{}};return Object.keys(e).forEach((function(r){s.a[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]})),t};function f(e){var t,r=e.sx,s=Object(i.a)(e,c),f=u(s),d=f.systemProps,l=f.otherProps;return t=Array.isArray(r)?[d].concat(Object(n.a)(r)):"function"===typeof r?function(){var e=r.apply(void 0,arguments);return Object(o.b)(e)?Object(a.a)({},d,e):d}:Object(a.a)({},d,r),Object(a.a)({},l,{sx:t})}},function(e,t,r){"use strict";var n=r(18),a=(r(10),r(3987)),i=r(435),o=r(3);t.a=function(e){return Object(o.jsx)(a.a,Object(n.a)({},e,{defaultTheme:i.a}))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));r(10);var n=r(481),a=r(3);function i(e){var t=e.styles,r=e.defaultTheme,i=void 0===r?{}:r,o="function"===typeof t?function(e){return t(void 0===(r=e)||null===r||0===Object.keys(r).length?i:e);var r}:t;return Object(a.jsx)(n.a,{styles:o})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(10);function a(e,t){return n.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(25),a=r(10),i=0;var o=a.useId;function s(e){if(void 0!==o){var t=o();return null!=e?e:t}return function(e){var t=a.useState(e),r=Object(n.a)(t,2),o=r[0],s=r[1],c=e||o;return a.useEffect((function(){null==o&&s("mui-".concat(i+=1))}),[o]),c}(e)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(25),a=r(10);function i(e){var t=e.controlled,r=e.default,i=(e.name,e.state,a.useRef(void 0!==t).current),o=a.useState(r),s=Object(n.a)(o,2),c=s[0],u=s[1];return[i?t:c,a.useCallback((function(e){i||u(e)}),[])]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n={};r.r(n),r.d(n,"encode",(function(){return N})),r.d(n,"decode",(function(){return U}));var a={};r.r(a),r.d(a,"decode",(function(){return Gt})),r.d(a,"encode",(function(){return Ht}));var i={};r.r(i),r.d(i,"AbiCoder",(function(){return st})),r.d(i,"defaultAbiCoder",(function(){return ct})),r.d(i,"Fragment",(function(){return qe})),r.d(i,"ConstructorFragment",(function(){return Je})),r.d(i,"ErrorFragment",(function(){return $e})),r.d(i,"EventFragment",(function(){return Ke})),r.d(i,"FunctionFragment",(function(){return Xe})),r.d(i,"ParamType",(function(){return He})),r.d(i,"FormatTypes",(function(){return Qe})),r.d(i,"checkResultErrors",(function(){return _})),r.d(i,"Logger",(function(){return f.b})),r.d(i,"RLP",(function(){return n})),r.d(i,"_fetchData",(function(){return qi})),r.d(i,"fetchJson",(function(){return Ki})),r.d(i,"poll",(function(){return Vi})),r.d(i,"checkProperties",(function(){return u.b})),r.d(i,"deepCopy",(function(){return u.c})),r.d(i,"defineReadOnly",(function(){return u.d})),r.d(i,"getStatic",(function(){return u.e})),r.d(i,"resolveProperties",(function(){return u.f})),r.d(i,"shallowCopy",(function(){return u.g})),r.d(i,"arrayify",(function(){return c.a})),r.d(i,"concat",(function(){return c.b})),r.d(i,"stripZeros",(function(){return c.o})),r.d(i,"zeroPad",(function(){return c.p})),r.d(i,"isBytes",(function(){return c.j})),r.d(i,"isBytesLike",(function(){return c.k})),r.d(i,"defaultPath",(function(){return Ia})),r.d(i,"HDNode",(function(){return Sa})),r.d(i,"SigningKey",(function(){return ei})),r.d(i,"Interface",(function(){return Bt})),r.d(i,"LogDescription",(function(){return wt})),r.d(i,"TransactionDescription",(function(){return xt})),r.d(i,"base58",(function(){return qt})),r.d(i,"base64",(function(){return a})),r.d(i,"hexlify",(function(){return c.i})),r.d(i,"isHexString",(function(){return c.l})),r.d(i,"hexConcat",(function(){return c.c})),r.d(i,"hexStripZeros",(function(){return c.f})),r.d(i,"hexValue",(function(){return c.g})),r.d(i,"hexZeroPad",(function(){return c.h})),r.d(i,"hexDataLength",(function(){return c.d})),r.d(i,"hexDataSlice",(function(){return c.e})),r.d(i,"nameprep",(function(){return Ci})),r.d(i,"_toEscapedUtf8String",(function(){return di})),r.d(i,"toUtf8Bytes",(function(){return ui})),r.d(i,"toUtf8CodePoints",(function(){return pi})),r.d(i,"toUtf8String",(function(){return hi})),r.d(i,"Utf8ErrorFuncs",(function(){return si})),r.d(i,"formatBytes32String",(function(){return Bi})),r.d(i,"parseBytes32String",(function(){return Ii})),r.d(i,"dnsEncode",(function(){return ur})),r.d(i,"hashMessage",(function(){return dr})),r.d(i,"namehash",(function(){return cr})),r.d(i,"isValidName",(function(){return sr})),r.d(i,"id",(function(){return yt})),r.d(i,"_TypedDataEncoder",(function(){return Vr})),r.d(i,"getAddress",(function(){return Nt})),r.d(i,"getIcapAddress",(function(){return Lt})),r.d(i,"getContractAddress",(function(){return Ut})),r.d(i,"getCreate2Address",(function(){return Qt})),r.d(i,"isAddress",(function(){return jt})),r.d(i,"formatEther",(function(){return Mi.b})),r.d(i,"parseEther",(function(){return Mi.d})),r.d(i,"formatUnits",(function(){return Mi.c})),r.d(i,"parseUnits",(function(){return Mi.e})),r.d(i,"commify",(function(){return Mi.a})),r.d(i,"computeHmac",(function(){return vn})),r.d(i,"keccak256",(function(){return St})),r.d(i,"ripemd160",(function(){return bn})),r.d(i,"sha256",(function(){return mn})),r.d(i,"sha512",(function(){return gn})),r.d(i,"randomBytes",(function(){return Wa.a})),r.d(i,"shuffled",(function(){return Ya})),r.d(i,"solidityPack",(function(){return Va.b})),r.d(i,"solidityKeccak256",(function(){return Va.a})),r.d(i,"soliditySha256",(function(){return Va.c})),r.d(i,"splitSignature",(function(){return c.n})),r.d(i,"joinSignature",(function(){return c.m})),r.d(i,"accessListify",(function(){return oa})),r.d(i,"parseTransaction",(function(){return la})),r.d(i,"serializeTransaction",(function(){return fa})),r.d(i,"TransactionTypes",(function(){return Jn})),r.d(i,"getJsonWalletAddress",(function(){return Ka})),r.d(i,"computeAddress",(function(){return ra})),r.d(i,"recoverAddress",(function(){return na})),r.d(i,"computePublicKey",(function(){return ri})),r.d(i,"recoverPublicKey",(function(){return ti})),r.d(i,"verifyMessage",(function(){return Di.b})),r.d(i,"verifyTypedData",(function(){return Di.c})),r.d(i,"getAccountPath",(function(){return Fa})),r.d(i,"mnemonicToEntropy",(function(){return Ma})),r.d(i,"entropyToMnemonic",(function(){return Da})),r.d(i,"isValidMnemonic",(function(){return Ta})),r.d(i,"mnemonicToSeed",(function(){return Oa})),r.d(i,"SupportedAlgorithm",(function(){return dn})),r.d(i,"UnicodeNormalizationForm",(function(){return ni})),r.d(i,"Utf8ErrorReason",(function(){return ai})),r.d(i,"Indexed",(function(){return _t}));var o=r(1),s=r(2),c=r(4),u=r(13),f=r(11),d="abi/5.6.4",l=r(1608),h=r.n(l).a.BN,p=new f.b("bignumber/5.6.2"),b={},m=9007199254740991;var g=!1,v=function(){function e(t,r){Object(o.a)(this,e),t!==b&&p.throwError("cannot call constructor directly; use BigNumber.from",f.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return Object(s.a)(e,[{key:"fromTwos",value:function(e){return A(w(this).fromTwos(e))}},{key:"toTwos",value:function(e){return A(w(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return A(w(this).add(w(e)))}},{key:"sub",value:function(e){return A(w(this).sub(w(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&x("division-by-zero","div"),A(w(this).div(w(t)))}},{key:"mul",value:function(e){return A(w(this).mul(w(e)))}},{key:"mod",value:function(e){var t=w(e);return t.isNeg()&&x("division-by-zero","mod"),A(w(this).umod(t))}},{key:"pow",value:function(e){var t=w(e);return t.isNeg()&&x("negative-power","pow"),A(w(this).pow(t))}},{key:"and",value:function(e){var t=w(e);return(this.isNegative()||t.isNeg())&&x("unbound-bitwise-result","and"),A(w(this).and(t))}},{key:"or",value:function(e){var t=w(e);return(this.isNegative()||t.isNeg())&&x("unbound-bitwise-result","or"),A(w(this).or(t))}},{key:"xor",value:function(e){var t=w(e);return(this.isNegative()||t.isNeg())&&x("unbound-bitwise-result","xor"),A(w(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&x("negative-width","mask"),A(w(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&x("negative-width","shl"),A(w(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&x("negative-width","shr"),A(w(this).shrn(e))}},{key:"eq",value:function(e){return w(this).eq(w(e))}},{key:"lt",value:function(e){return w(this).lt(w(e))}},{key:"lte",value:function(e){return w(this).lte(w(e))}},{key:"gt",value:function(e){return w(this).gt(w(e))}},{key:"gte",value:function(e){return w(this).gte(w(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return w(this).isZero()}},{key:"toNumber",value:function(){try{return w(this).toNumber()}catch(e){x("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return p.throwError("this platform does not support BigInt",f.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?g||(g=!0,p.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?p.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.b.errors.UNEXPECTED_ARGUMENT,{}):p.throwError("BigNumber.toString does not accept parameters",f.b.errors.UNEXPECTED_ARGUMENT,{})),w(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(b,y(t)):t.match(/^-?[0-9]+$/)?new e(b,y(new h(t))):p.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&x("underflow","BigNumber.from",t),(t>=m||t<=-m)&&x("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(c.j)(r))return e.from(Object(c.i)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var a=r._hex;if(null==a&&"BigNumber"===r.type&&(a=r.hex),"string"===typeof a&&(Object(c.l)(a)||"-"===a[0]&&Object(c.l)(a.substring(1))))return e.from(a)}return p.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function y(e){if("string"!==typeof e)return y(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&p.throwArgumentError("invalid hex","value",e),"0x00"===(e=y(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function A(e){return v.from(y(e))}function w(e){var t=v.from(e).toHexString();return"-"===t[0]?new h("-"+t.substring(3),16):new h(t.substring(2),16)}function x(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),p.throwError(e,f.b.errors.NUMERIC_FAULT,n)}var E=new f.b(d);function _(e){var t=[];return function e(r,n){if(Array.isArray(n))for(var a in n){var i=r.slice();i.push(a);try{e(i,n[a])}catch(o){t.push({path:i,error:o})}}}([],e),t}var C=function(){function e(t,r,n,a){Object(o.a)(this,e),this.name=t,this.type=r,this.localName=n,this.dynamic=a}return Object(s.a)(e,[{key:"_throwError",value:function(e,t){E.throwArgumentError(e,this.localName,t)}}]),e}(),k=function(){function e(t){Object(o.a)(this,e),Object(u.d)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return Object(s.a)(e,[{key:"data",get:function(){return Object(c.c)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData(Object(c.b)(e._data))}},{key:"writeBytes",value:function(e){var t=Object(c.a)(e),r=t.length%this.wordSize;return r&&(t=Object(c.b)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=Object(c.a)(v.from(e));return t.length>this.wordSize&&E.throwError("value out-of-bounds",f.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(c.b)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}(),B=function(){function e(t,r,n,a){Object(o.a)(this,e),Object(u.d)(this,"_data",Object(c.a)(t)),Object(u.d)(this,"wordSize",r||32),Object(u.d)(this,"_coerceFunc",n),Object(u.d)(this,"allowLoose",a),this._offset=0}return Object(s.a)(e,[{key:"data",get:function(){return Object(c.i)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:E.throwError("data out-of-bounds",f.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return v.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}(),I=r(7),S=r(8),O=r(136),M=r.n(O);function D(e){return"0x"+M.a.keccak_256(Object(c.a)(e))}var T=new f.b("rlp/5.6.1");function F(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function R(e,t,r){for(var n=0,a=0;at+1+n&&T.throwError("child data too short",f.b.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:a}}function L(e,t){if(0===e.length&&T.throwError("data too short",f.b.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&T.throwError("data short segment too short",f.b.errors.BUFFER_OVERRUN,{});var n=R(e,t+1,r);return t+1+r+n>e.length&&T.throwError("data long segment too short",f.b.errors.BUFFER_OVERRUN,{}),j(e,t,t+1+r,r+n)}if(e[t]>=192){var a=e[t]-192;return t+1+a>e.length&&T.throwError("data array too short",f.b.errors.BUFFER_OVERRUN,{}),j(e,t,t+1,a)}if(e[t]>=184){var i=e[t]-183;t+1+i>e.length&&T.throwError("data array too short",f.b.errors.BUFFER_OVERRUN,{});var o=R(e,t+1,i);return t+1+i+o>e.length&&T.throwError("data array too short",f.b.errors.BUFFER_OVERRUN,{}),{consumed:1+i+o,result:Object(c.i)(e.slice(t+1+i,t+1+i+o))}}if(e[t]>=128){var s=e[t]-128;return t+1+s>e.length&&T.throwError("data too short",f.b.errors.BUFFER_OVERRUN,{}),{consumed:1+s,result:Object(c.i)(e.slice(t+1,t+1+s))}}return{consumed:1,result:Object(c.i)(e[t])}}function U(e){var t=Object(c.a)(e),r=L(t,0);return r.consumed!==t.length&&T.throwArgumentError("invalid rlp data","data",e),r.result}var Q=new f.b("address/5.6.1");function G(e){Object(c.l)(e,20)||Q.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=t[n].charCodeAt(0);for(var a=Object(c.a)(D(r)),i=0;i<40;i+=2)a[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&a[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}for(var H={},z=0;z<10;z++)H[String(z)]=String(z);for(var q=0;q<26;q++)H[String.fromCharCode(65+q)]=String(10+q);var K,V=Math.floor((K=9007199254740991,Math.log10?Math.log10(K):Math.log(K)/Math.LN10));function W(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return H[e]})).join("");t.length>=V;){var r=t.substring(0,V);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function Y(e){var t,r=null;if("string"!==typeof e&&Q.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),r=G(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&r!==e&&Q.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==W(e)&&Q.throwArgumentError("bad icap checksum","address",e),t=e.substring(4),r=new h(t,36).toString(16);r.length<40;)r="0"+r;r=G("0x"+r)}else Q.throwArgumentError("invalid address","address",e);return r}var J=function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(e){return Object(o.a)(this,r),t.call(this,"address","address",e,!1)}return Object(s.a)(r,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{t=Y(t)}catch(r){this._throwError(r.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return Y(Object(c.h)(e.readValue().toHexString(),20))}}]),r}(C),X=function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(e){var n;return Object(o.a)(this,r),(n=t.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,n}return Object(s.a)(r,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(e,t){return this.coder.encode(e,t)}},{key:"decode",value:function(e){return this.coder.decode(e)}}]),r}(C),Z=new f.b(d);function $(e,t,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){var a={};n=t.map((function(e){var t=e.localName;return t||Z.throwError("cannot encode object for signature with missing names",f.b.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),a[t]&&Z.throwError("cannot encode object for signature with duplicate names",f.b.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),a[t]=!0,r[t]}))}else Z.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&Z.throwArgumentError("types/value length mismatch","tuple",r);var i=new k(e.wordSize),o=new k(e.wordSize),s=[];t.forEach((function(e,t){var r=n[t];if(e.dynamic){var a=o.length;e.encode(o,r);var c=i.writeUpdatableValue();s.push((function(e){c(e+a)}))}else e.encode(i,r)})),s.forEach((function(e){e(i.length)}));var c=e.appendWriter(i);return c+=e.appendWriter(o)}function ee(e,t){var r=[],n=e.subReader(0);t.forEach((function(t){var a=null;if(t.dynamic){var i=e.readValue(),o=n.subReader(i.toNumber());try{a=t.decode(o)}catch(s){if(s.code===f.b.errors.BUFFER_OVERRUN)throw s;(a=s).baseType=t.name,a.name=t.localName,a.type=t.type}}else try{a=t.decode(e)}catch(s){if(s.code===f.b.errors.BUFFER_OVERRUN)throw s;(a=s).baseType=t.name,a.name=t.localName,a.type=t.type}void 0!=a&&r.push(a)}));var a=t.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach((function(e,t){var n=e.localName;if(n&&1===a[n]&&("length"===n&&(n="_length"),null==r[n])){var i=r[t];i instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:function(){throw i}}):r[n]=i}}));for(var i=function(){var e=r[o];e instanceof Error&&Object.defineProperty(r,o,{enumerable:!0,get:function(){throw e}})},o=0;o=0?n:"")+"]",c=-1===n||e.dynamic;return(i=t.call(this,"array",s,a,c)).coder=e,i.length=n,i}return Object(s.a)(r,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;re._data.length&&Z.throwError("insufficient data length",f.b.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n0&&(10===arguments[0]?pe||(pe=!0,de.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?de.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.b.errors.UNEXPECTED_ARGUMENT,{}):de.throwError("BigNumber.toString does not accept parameters",f.b.errors.UNEXPECTED_ARGUMENT,{})),ve(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(le,me(t)):t.match(/^-?[0-9]+$/)?new e(le,me(new fe(t))):de.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&ye("underflow","BigNumber.from",t),(t>=he||t<=-9007199254740991)&&ye("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(c.j)(r))return e.from(Object(c.i)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var a=r._hex;if(null==a&&"BigNumber"===r.type&&(a=r.hex),"string"===typeof a&&(Object(c.l)(a)||"-"===a[0]&&Object(c.l)(a.substring(1))))return e.from(a)}return de.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function me(e){if("string"!==typeof e)return me(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&de.throwArgumentError("invalid hex","value",e),"0x00"===(e=me(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function ge(e){return be.from(me(e))}function ve(e){var t=be.from(e).toHexString();return"-"===t[0]?new fe("-"+t.substring(3),16):new fe(t.substring(2),16)}function ye(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),de.throwError(e,f.b.errors.NUMERIC_FAULT,n)}var Ae,we,xe=be.from(-1),Ee=be.from(0),_e=be.from(1),Ce=be.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ke=function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(e,n,a){var i;Object(o.a)(this,r);var s=(n?"int":"uint")+8*e;return(i=t.call(this,s,s,a,!1)).size=e,i.signed=n,i}return Object(s.a)(r,[{key:"defaultValue",value:function(){return 0}},{key:"encode",value:function(e,t){var r=v.from(t),n=Ce.mask(8*e.wordSize);if(this.signed){var a=n.mask(8*this.size-1);(r.gt(a)||r.lt(a.add(_e).mul(xe)))&&this._throwError("value out-of-bounds",t)}else(r.lt(Ee)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}},{key:"decode",value:function(e){var t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}]),r}(C),Be=new f.b("strings/5.6.1");function Ie(e,t,r,n,a){if(e===we.BAD_PREFIX||e===we.UNEXPECTED_CONTINUE){for(var i=0,o=t+1;o>6===2;o++)i++;return i}return e===we.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(Ae||(Ae={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(we||(we={}));var Se=Object.freeze({error:function(e,t,r,n,a){return Be.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:Ie,replace:function(e,t,r,n,a){return e===we.OVERLONG?(n.push(a),0):(n.push(65533),Ie(e,t,r))}});function Oe(e,t){null==t&&(t=Se.error),e=Object(c.a)(e);for(var r=[],n=0;n>7!==0){var i=null,o=null;if(192===(224&a))i=1,o=127;else if(224===(240&a))i=2,o=2047;else{if(240!==(248&a)){n+=t(128===(192&a)?we.UNEXPECTED_CONTINUE:we.BAD_PREFIX,n-1,e,r);continue}i=3,o=65535}if(n-1+i>=e.length)n+=t(we.OVERRUN,n-1,e,r);else{for(var s=a&(1<<8-i-1)-1,u=0;u1114111?n+=t(we.OUT_OF_RANGE,n-1-i,e,r,s):s>=55296&&s<=57343?n+=t(we.UTF16_SURROGATE,n-1-i,e,r,s):s<=o?n+=t(we.OVERLONG,n-1-i,e,r,s):r.push(s))}}else r.push(a)}return r}function Me(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ae.current;t!=Ae.current&&(Be.checkNormalize(),e=e.normalize(t));for(var r=[],n=0;n>6|192),r.push(63&a|128);else if(55296==(64512&a)){n++;var i=e.charCodeAt(n);if(n>=e.length||56320!==(64512&i))throw new Error("invalid utf-8 string");var o=65536+((1023&a)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return Object(c.a)(r)}function De(e,t){return Oe(e,t).map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}var Te=function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(e){return Object(o.a)(this,r),t.call(this,"string",e)}return Object(s.a)(r,[{key:"defaultValue",value:function(){return""}},{key:"encode",value:function(e,t){return Object(ne.a)(Object(ae.a)(r.prototype),"encode",this).call(this,e,Me(t))}},{key:"decode",value:function(e){return De(Object(ne.a)(Object(ae.a)(r.prototype),"decode",this).call(this,e))}}]),r}(ie),Fe=function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(e,n){var a;Object(o.a)(this,r);var i=!1,s=[];e.forEach((function(e){e.dynamic&&(i=!0),s.push(e.type)}));var c="tuple("+s.join(",")+")";return(a=t.call(this,"tuple",c,n,i)).coders=e,a}return Object(s.a)(r,[{key:"defaultValue",value:function(){var e=[];this.coders.forEach((function(t){e.push(t.defaultValue())}));var t=this.coders.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach((function(r,n){var a=r.localName;a&&1===t[a]&&("length"===a&&(a="_length"),null==e[a]&&(e[a]=e[n]))})),Object.freeze(e)}},{key:"encode",value:function(e,t){return $(e,this.coders,t)}},{key:"decode",value:function(e){return e.coerce(this.name,ee(e,this.coders))}}]),r}(C),Re=new f.b(d),Pe={},Ne={calldata:!0,memory:!0,storage:!0},je={calldata:!0,memory:!0};function Le(e,t){if("bytes"===e||"string"===e){if(Ne[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&je[t])return!0;return(Ne[t]||"payable"===t)&&Re.throwArgumentError("invalid modifier","name",t),!1}function Ue(e,t){for(var r in t)Object(u.d)(e,r,t[r])}var Qe=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),Ge=new RegExp(/^(.*)\[([0-9]*)\]$/),He=function(){function e(t,r){Object(o.a)(this,e),t!==Pe&&Re.throwError("use fromString",f.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Ue(this,r);var n=this.type.match(Ge);Ue(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return Object(s.a)(e,[{key:"format",value:function(e){if(e||(e=Qe.sighash),Qe[e]||Re.throwArgumentError("invalid format type","format",e),e===Qe.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==Qe.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===Qe.full?", ":",")+")"):r+=this.type,e!==Qe.sighash&&(!0===this.indexed&&(r+=" indexed"),e===Qe.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"===typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(Pe,{name:t.name||null,type:et(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return n=function(e,t){var r=e;function n(t){Re.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function a(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var i={type:"",name:"",state:{allowType:!0}},o=i,s=0;s2&&Re.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||Re.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=v.from(r[1]),r[0]):e}function We(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function Ye(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&Re.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&Re.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||Re.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&Re.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&Re.throwArgumentError("unable to determine stateMutability","value",e),t}var Je=function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(){return Object(o.a)(this,r),t.apply(this,arguments)}return Object(s.a)(r,[{key:"format",value:function(e){if(e||(e=Qe.sighash),Qe[e]||Re.throwArgumentError("invalid format type","format",e),e===Qe.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===Qe.sighash&&Re.throwError("cannot format a constructor for sighash",f.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===Qe.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&Re.throwArgumentError("invalid constructor object","value",e);var t=Ye(e);t.constant&&Re.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(He.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?v.from(e.gas):null};return new r(Pe,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=Ve(e,t)).match(nt);return n&&"constructor"===n[1].trim()||Re.throwArgumentError("invalid constructor string","value",e),t.inputs=ze(n[2].trim(),!1),We(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(qe),Xe=function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(){return Object(o.a)(this,r),t.apply(this,arguments)}return Object(s.a)(r,[{key:"format",value:function(e){if(e||(e=Qe.sighash),Qe[e]||Re.throwArgumentError("invalid format type","format",e),e===Qe.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==Qe.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===Qe.full?", ":",")+") ",e!==Qe.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&Re.throwArgumentError("invalid function object","value",e);var t=Ye(e),n={type:e.type,name:rt(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(He.fromObject):[],outputs:e.outputs?e.outputs.map(He.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?v.from(e.gas):null};return new r(Pe,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=Ve(e,t)).split(" returns ");n.length>2&&Re.throwArgumentError("invalid function string","value",e);var a=n[0].match(nt);if(a||Re.throwArgumentError("invalid function signature","value",e),t.name=a[1].trim(),t.name&&rt(t.name),t.inputs=ze(a[2],!1),We(a[3].trim(),t),n.length>1){var i=n[1].match(nt);""==i[1].trim()&&""==i[3].trim()||Re.throwArgumentError("unexpected tokens","value",e),t.outputs=ze(i[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(Je);function Ze(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||Re.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}var $e=function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(){return Object(o.a)(this,r),t.apply(this,arguments)}return Object(s.a)(r,[{key:"format",value:function(e){if(e||(e=Qe.sighash),Qe[e]||Re.throwArgumentError("invalid format type","format",e),e===Qe.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==Qe.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===Qe.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&Re.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:rt(e.name),inputs:e.inputs?e.inputs.map(He.fromObject):[]};return Ze(new r(Pe,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(nt);return n||Re.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&rt(t.name),t.inputs=ze(n[2],!1),Ze(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(qe);function et(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var tt=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function rt(e){return e&&e.match(tt)||Re.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var nt=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");var at=new f.b(d),it=new RegExp(/^bytes([0-9]*)$/),ot=new RegExp(/^(u?int)([0-9]*)$/),st=function(){function e(t){Object(o.a)(this,e),Object(u.d)(this,"coerceFunc",t||null)}return Object(s.a)(e,[{key:"_getCoder",value:function(e){var t=this;switch(e.baseType){case"address":return new J(e.name);case"bool":return new re(e.name);case"string":return new Te(e.name);case"bytes":return new oe(e.name);case"array":return new te(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Fe((e.components||[]).map((function(e){return t._getCoder(e)})),e.name);case"":return new ce(e.name)}var r=e.type.match(ot);if(r){var n=parseInt(r[2]||"256");return(0===n||n>256||n%8!==0)&&at.throwArgumentError("invalid "+r[1]+" bit length","param",e),new ke(n/8,"int"===r[1],e.name)}if(r=e.type.match(it)){var a=parseInt(r[1]);return(0===a||a>32)&&at.throwArgumentError("invalid bytes length","param",e),new se(a,e.name)}return at.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new B(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new k(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(He.from(e))}));return new Fe(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&at.throwError("types/values length mismatch",f.b.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var n=e.map((function(e){return r._getCoder(He.from(e))})),a=new Fe(n,"_"),i=this._getWriter();return a.encode(i,t),i.data}},{key:"decode",value:function(e,t,r){var n=this,a=e.map((function(e){return n._getCoder(He.from(e))}));return new Fe(a,"_").decode(this._getReader(Object(c.a)(t),r))}}]),e}(),ct=new st;function ut(e){return"0x"+M.a.keccak_256(Object(c.a)(e))}var ft,dt,lt=new f.b("strings/5.6.1");function ht(e,t,r,n,a){if(e===dt.BAD_PREFIX||e===dt.UNEXPECTED_CONTINUE){for(var i=0,o=t+1;o>6===2;o++)i++;return i}return e===dt.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(ft||(ft={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(dt||(dt={}));var pt=Object.freeze({error:function(e,t,r,n,a){return lt.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:ht,replace:function(e,t,r,n,a){return e===dt.OVERLONG?(n.push(a),0):(n.push(65533),ht(e,t,r))}});function bt(e,t){null==t&&(t=pt.error),e=Object(c.a)(e);for(var r=[],n=0;n>7!==0){var i=null,o=null;if(192===(224&a))i=1,o=127;else if(224===(240&a))i=2,o=2047;else{if(240!==(248&a)){n+=t(128===(192&a)?dt.UNEXPECTED_CONTINUE:dt.BAD_PREFIX,n-1,e,r);continue}i=3,o=65535}if(n-1+i>=e.length)n+=t(dt.OVERRUN,n-1,e,r);else{for(var s=a&(1<<8-i-1)-1,u=0;u1114111?n+=t(dt.OUT_OF_RANGE,n-1-i,e,r,s):s>=55296&&s<=57343?n+=t(dt.UTF16_SURROGATE,n-1-i,e,r,s):s<=o?n+=t(dt.OVERLONG,n-1-i,e,r,s):r.push(s))}}else r.push(a)}return r}function mt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ft.current;t!=ft.current&&(lt.checkNormalize(),e=e.normalize(t));for(var r=[],n=0;n>6|192),r.push(63&a|128);else if(55296==(64512&a)){n++;var i=e.charCodeAt(n);if(n>=e.length||56320!==(64512&i))throw new Error("invalid utf-8 string");var o=65536+((1023&a)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return Object(c.a)(r)}function gt(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}function vt(e){return bt(mt(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:ft.current))}function yt(e){return ut(mt(e))}var At=new f.b(d),wt=function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(){return Object(o.a)(this,r),t.apply(this,arguments)}return Object(s.a)(r)}(u.a),xt=function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(){return Object(o.a)(this,r),t.apply(this,arguments)}return Object(s.a)(r)}(u.a),Et=function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(){return Object(o.a)(this,r),t.apply(this,arguments)}return Object(s.a)(r)}(u.a),_t=function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(){return Object(o.a)(this,r),t.apply(this,arguments)}return Object(s.a)(r,null,[{key:"isIndexed",value:function(e){return!(!e||!e._isIndexed)}}]),r}(u.a),Ct={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function kt(e,t){var r=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return r.error=t,r}var Bt=function(){function e(t){var r=this;Object(o.a)(this,e);var n=[];n="string"===typeof t?JSON.parse(t):t,Object(u.d)(this,"fragments",n.map((function(e){return qe.from(e)})).filter((function(e){return null!=e}))),Object(u.d)(this,"_abiCoder",Object(u.e)(this instanceof e?this.constructor:void 0,"getAbiCoder")()),Object(u.d)(this,"functions",{}),Object(u.d)(this,"errors",{}),Object(u.d)(this,"events",{}),Object(u.d)(this,"structs",{}),this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":return r.deploy?void At.warn("duplicate definition - constructor"):void Object(u.d)(r,"deploy",e);case"function":t=r.functions;break;case"event":t=r.events;break;case"error":t=r.errors;break;default:return}var n=e.format();t[n]?At.warn("duplicate definition - "+n):t[n]=e})),this.deploy||Object(u.d)(this,"deploy",Je.from({payable:!1,type:"constructor"})),Object(u.d)(this,"_isInterface",!0)}return Object(s.a)(e,[{key:"format",value:function(e){e||(e=Qe.full),e===Qe.sighash&&At.throwArgumentError("interface does not support formatting sighash","format",e);var t=this.fragments.map((function(t){return t.format(e)}));return e===Qe.json?JSON.stringify(t.map((function(e){return JSON.parse(e)}))):t}},{key:"getFunction",value:function(e){if(Object(c.l)(e)){for(var t in this.functions)if(e===this.getSighash(t))return this.functions[t];At.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){var r=e.trim(),n=Object.keys(this.functions).filter((function(e){return e.split("(")[0]===r}));return 0===n.length?At.throwArgumentError("no matching function","name",r):n.length>1&&At.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var a=this.functions[Xe.fromString(e).format()];return a||At.throwArgumentError("no matching function","signature",e),a}},{key:"getEvent",value:function(e){if(Object(c.l)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];At.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var n=e.trim(),a=Object.keys(this.events).filter((function(e){return e.split("(")[0]===n}));return 0===a.length?At.throwArgumentError("no matching event","name",n):a.length>1&&At.throwArgumentError("multiple matching events","name",n),this.events[a[0]]}var i=this.events[Ke.fromString(e).format()];return i||At.throwArgumentError("no matching event","signature",e),i}},{key:"getError",value:function(e){if(Object(c.l)(e)){var t=Object(u.e)(this.constructor,"getSighash");for(var r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}At.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),a=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));return 0===a.length?At.throwArgumentError("no matching error","name",n):a.length>1&&At.throwArgumentError("multiple matching errors","name",n),this.errors[a[0]]}var i=this.errors[Xe.fromString(e).format()];return i||At.throwArgumentError("no matching error","signature",e),i}},{key:"getSighash",value:function(e){if("string"===typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(r){throw t}}return Object(u.e)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"===typeof e&&(e=this.getEvent(e)),Object(u.e)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeErrorResult",value:function(e,t){"string"===typeof e&&(e=this.getError(e));var r=Object(c.a)(t);return Object(c.i)(r.slice(0,4))!==this.getSighash(e)&&At.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",Object(c.i)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"===typeof e&&(e=this.getError(e)),Object(c.i)(Object(c.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var r=Object(c.a)(t);return Object(c.i)(r.slice(0,4))!==this.getSighash(e)&&At.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",Object(c.i)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),Object(c.i)(Object(c.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var r=Object(c.a)(t),n=null,a="",i=null,o=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(l){}break;case 4:var u=Object(c.i)(r.slice(0,4)),d=Ct[u];if(d)i=this._abiCoder.decode(d.inputs,r.slice(4)),o=d.name,s=d.signature,d.reason&&(n=i[0]),"Error"===o?a="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(i[0])):"Panic"===o&&(a="; VM Exception while processing transaction: reverted with panic code ".concat(i[0]));else try{var l=this.getError(u);i=this._abiCoder.decode(l.inputs,r.slice(4)),o=l.name,s=l.format()}catch(l){}}return At.throwError("call revert exception"+a,f.b.errors.CALL_EXCEPTION,{method:e.format(),data:Object(c.i)(t),errorArgs:i,errorName:o,errorSignature:s,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),Object(c.i)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var r=this;"string"===typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&At.throwError("too many arguments for "+e.format(),f.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var n=[];e.anonymous||n.push(this.getEventTopic(e));var a=function(e,t){return"string"===e.type?yt(t):"bytes"===e.type?D(Object(c.i)(t)):("bool"===e.type&&"boolean"===typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=v.from(t).toHexString()),"address"===e.type&&r._abiCoder.encode(["address"],[t]),Object(c.h)(Object(c.i)(t),32))};for(t.forEach((function(t,r){var i=e.inputs[r];i.indexed?null==t?n.push(null):"array"===i.baseType||"tuple"===i.baseType?At.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?n.push(t.map((function(e){return a(i,e)}))):n.push(a(i,t)):null!=t&&At.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(e,t){var r=this;"string"===typeof e&&(e=this.getEvent(e));var n=[],a=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&At.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,o){var s=t[o];if(e.indexed)if("string"===e.type)n.push(yt(s));else if("bytes"===e.type)n.push(D(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[s]))}else a.push(e),i.push(s)})),{data:this._abiCoder.encode(a,i),topics:n}}},{key:"decodeEventLog",value:function(e,t,r){if("string"===typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){var n=this.getEventTopic(e);Object(c.l)(r[0],32)&&r[0].toLowerCase()===n||At.throwError("fragment/topic mismatch",f.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var a=[],i=[],o=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(a.push(He.fromObject({type:"bytes32",name:e.name})),o.push(!0)):(a.push(e),o.push(!1)):(i.push(e),o.push(!1))}));var s=null!=r?this._abiCoder.decode(a,Object(c.b)(r)):null,u=this._abiCoder.decode(i,t,!0),d=[],l=0,h=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)d[t]=new _t({_isIndexed:!0,hash:null});else if(o[t])d[t]=new _t({_isIndexed:!0,hash:s[h++]});else try{d[t]=s[h++]}catch(n){d[t]=n}else try{d[t]=u[l++]}catch(n){d[t]=n}if(e.name&&null==d[e.name]){var r=d[t];r instanceof Error?Object.defineProperty(d,e.name,{enumerable:!0,get:function(){throw kt("property ".concat(JSON.stringify(e.name)),r)}}):d[e.name]=r}}));for(var p=function(e){var t=d[e];t instanceof Error&&Object.defineProperty(d,e,{enumerable:!0,get:function(){throw kt("index ".concat(e),t)}})},b=0;b>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&a[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}for(var Dt={},Tt=0;Tt<10;Tt++)Dt[String(Tt)]=String(Tt);for(var Ft=0;Ft<26;Ft++)Dt[String.fromCharCode(65+Ft)]=String(10+Ft);var Rt=Math.floor(function(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}(9007199254740991));function Pt(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return Dt[e]})).join("");t.length>=Rt;){var r=t.substring(0,Rt);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function Nt(e){var t=null;if("string"!==typeof e&&Ot.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=Mt(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&Ot.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==Pt(e)&&Ot.throwArgumentError("bad icap checksum","address",e),t=Object(It.c)(e.substring(4));t.length<40;)t="0"+t;t=Mt("0x"+t)}else Ot.throwArgumentError("invalid address","address",e);return t}function jt(e){try{return Nt(e),!0}catch(t){}return!1}function Lt(e){for(var t=Object(It.b)(Nt(e).substring(2)).toUpperCase();t.length<30;)t="0"+t;return"XE"+Pt("XE00"+t)+t}function Ut(e){var t=null;try{t=Nt(e.from)}catch(n){Ot.throwArgumentError("missing from address","transaction",e)}var r=Object(c.o)(Object(c.a)(It.a.from(e.nonce).toHexString()));return Nt(Object(c.e)(St(N([t,r])),12))}function Qt(e,t,r){return 32!==Object(c.d)(t)&&Ot.throwArgumentError("salt must be 32 bytes","salt",t),32!==Object(c.d)(r)&&Ot.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Nt(Object(c.e)(St(Object(c.b)(["0xff",Nt(e),t,r])),12))}function Gt(e){e=atob(e);for(var t=[],r=0;r0;)r.push(a%this.base),a=a/this.base|0}for(var o="",s=0;0===t[s]&&s=0;--u)o+=this.alphabet[r[u]];return o}},{key:"decode",value:function(e){if("string"!==typeof e)throw new TypeError("Expected String");var t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(var r=0;r>=8;for(;a>0;)t.push(255&a),a>>=8}for(var o=0;e[o]===this._leader&&o=(r+=a.l)&&e<=r+a.h&&(e-r)%(a.d||1)===0){if(a.e&&-1!==a.e.indexOf(e-r))continue;return a}}return null}var Yt=Vt("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Jt="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),Xt=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Zt=Kt("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),$t=Kt("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),er=Kt("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!==0)throw new Error("bad data");for(var t=[],r=0;r=0)return[];if(e>=65024&&e<=65039)return[];var t=function(e){var t=Wt(e,Xt);if(t)return[e+t.s];var r=Zt[e];if(r)return r;var n=$t[e];return n?[e+n[0]]:er[e]||null}(e);return t||[e]})),r=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(r=vt(gt(r),ft.NFKC)).forEach((function(e){if(Wt(e,tr))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(e){if(Wt(e,Yt))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var n=gt(r);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");if(n.length>63)throw new Error("too long");return n}var nr="hash/5.6.1",ar=new f.b(nr),ir=new Uint8Array(32);ir.fill(0);var or=new RegExp("^((.*)\\.)?([^.]+)$");function sr(e){try{for(var t=e.split("."),r=0;r0&&(10===arguments[0]?vr||(vr=!0,br.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?br.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.b.errors.UNEXPECTED_ARGUMENT,{}):br.throwError("BigNumber.toString does not accept parameters",f.b.errors.UNEXPECTED_ARGUMENT,{})),xr(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(mr,Ar(t)):t.match(/^-?[0-9]+$/)?new e(mr,Ar(new pr(t))):br.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&Er("underflow","BigNumber.from",t),(t>=gr||t<=-9007199254740991)&&Er("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(c.j)(r))return e.from(Object(c.i)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var a=r._hex;if(null==a&&"BigNumber"===r.type&&(a=r.hex),"string"===typeof a&&(Object(c.l)(a)||"-"===a[0]&&Object(c.l)(a.substring(1))))return e.from(a)}return br.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function Ar(e){if("string"!==typeof e)return Ar(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&br.throwArgumentError("invalid hex","value",e),"0x00"===(e=Ar(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function wr(e){return yr.from(Ar(e))}function xr(e){var t=yr.from(e).toHexString();return"-"===t[0]?new pr("-"+t.substring(3),16):new pr(t.substring(2),16)}function Er(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),br.throwError(e,f.b.errors.NUMERIC_FAULT,n)}var _r=new f.b("address/5.6.1");function Cr(e){Object(c.l)(e,20)||_r.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=t[n].charCodeAt(0);for(var a=Object(c.a)(ut(r)),i=0;i<40;i+=2)a[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&a[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}for(var kr={},Br=0;Br<10;Br++)kr[String(Br)]=String(Br);for(var Ir=0;Ir<26;Ir++)kr[String.fromCharCode(65+Ir)]=String(10+Ir);var Sr=Math.floor(function(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}(9007199254740991));function Or(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return kr[e]})).join("");t.length>=Sr;){var r=t.substring(0,Sr);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function Mr(e){var t,r=null;if("string"!==typeof e&&_r.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),r=Cr(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&r!==e&&_r.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==Or(e)&&_r.throwArgumentError("bad icap checksum","address",e),t=e.substring(4),r=new pr(t,36).toString(16);r.length<40;)r="0"+r;r=Cr("0x"+r)}else _r.throwArgumentError("invalid address","address",e);return r}var Dr=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},Tr=new f.b(nr),Fr=new Uint8Array(32);Fr.fill(0);var Rr=yr.from(-1),Pr=yr.from(0),Nr=yr.from(1),jr=yr.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Lr=Object(c.h)(Nr.toHexString(),32),Ur=Object(c.h)(Pr.toHexString(),32),Qr={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Gr=["name","version","chainId","verifyingContract","salt"];function Hr(e){return function(t){return"string"!==typeof t&&Tr.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var zr={name:Hr("name"),version:Hr("version"),chainId:function(e){try{return yr.from(e).toString()}catch(t){}return Tr.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return Mr(e).toLowerCase()}catch(t){}return Tr.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=Object(c.a)(e);if(32!==t.length)throw new Error("bad length");return Object(c.i)(t)}catch(r){}return Tr.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function qr(e){var t=e.match(/^(u?)int(\d*)$/);if(t){var r=""===t[1],n=parseInt(t[2]||"256");(n%8!==0||n>256||t[2]&&t[2]!==String(n))&&Tr.throwArgumentError("invalid numeric width","type",e);var a=jr.mask(r?n-1:n),i=r?a.add(Nr).mul(Rr):Pr;return function(t){var r=yr.from(t);return(r.lt(i)||r.gt(a))&&Tr.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),Object(c.h)(r.toTwos(256).toHexString(),32)}}var o=e.match(/^bytes(\d+)$/);if(o){var s=parseInt(o[1]);return(0===s||s>32||o[1]!==String(s))&&Tr.throwArgumentError("invalid bytes width","type",e),function(t){return Object(c.a)(t).length!==s&&Tr.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=Object(c.a)(e),r=t.length%32;return r?Object(c.c)([t,Fr.slice(r)]):Object(c.i)(t)}(t)}}switch(e){case"address":return function(e){return Object(c.h)(Mr(e),32)};case"bool":return function(e){return e?Lr:Ur};case"bytes":return function(e){return ut(e)};case"string":return function(e){return yt(e)}}return null}function Kr(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var Vr=function(){function e(t){Object(o.a)(this,e),Object(u.d)(this,"types",Object.freeze(Object(u.c)(t))),Object(u.d)(this,"_encoderCache",{}),Object(u.d)(this,"_types",{});var r={},n={},a={};Object.keys(t).forEach((function(e){r[e]={},n[e]=[],a[e]={}}));var i=function(e){var a={};t[e].forEach((function(i){a[i.name]&&Tr.throwArgumentError("duplicate variable name ".concat(JSON.stringify(i.name)," in ").concat(JSON.stringify(e)),"types",t),a[i.name]=!0;var o=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];o===e&&Tr.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),qr(o)||(n[o]||Tr.throwArgumentError("unknown type ".concat(JSON.stringify(o)),"types",t),n[o].push(e),r[e][o]=!0)}))};for(var s in t)i(s);var c=Object.keys(n).filter((function(e){return 0===n[e].length}));for(var f in 0===c.length?Tr.throwArgumentError("missing primary type","types",t):c.length>1&&Tr.throwArgumentError("ambiguous primary types or unused types: ".concat(c.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),Object(u.d)(this,"primaryType",c[0]),function e(i,o){o[i]&&Tr.throwArgumentError("circular type reference to ".concat(JSON.stringify(i)),"types",t),o[i]=!0,Object.keys(r[i]).forEach((function(t){n[t]&&(e(t,o),Object.keys(o).forEach((function(e){a[e][t]=!0})))})),delete o[i]}(this.primaryType,{}),a){var d=Object.keys(a[f]);d.sort(),this._types[f]=Kr(f,t[f])+d.map((function(e){return Kr(e,t[e])})).join("")}}return Object(s.a)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,r=qr(e);if(r)return r;var n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var a=n[1],i=this.getEncoder(a),o=parseInt(n[3]);return function(e){o>=0&&e.length!==o&&Tr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var r=e.map(i);return t._types[a]&&(r=r.map(ut)),ut(Object(c.c)(r))}}var s=this.types[e];if(s){var u=yt(this._types[e]);return function(e){var r=s.map((function(r){var n=r.name,a=r.type,i=t.getEncoder(a)(e[n]);return t._types[a]?ut(i):i}));return r.unshift(u),Object(c.c)(r)}}return Tr.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||Tr.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return ut(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,r){var n=this;if(qr(e))return r(e,t);var a=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(a){var i=a[1],o=parseInt(a[3]);return o>=0&&t.length!==o&&Tr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return n._visit(i,e,r)}))}var s=this.types[e];return s?s.reduce((function(e,a){var i=a.name,o=a.type;return e[i]=n._visit(o,t[i],r),e}),{}):Tr.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,r,n){return e.from(r).hashStruct(t,n)}},{key:"hashDomain",value:function(t){var r=[];for(var n in t){var a=Qr[n];a||Tr.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",t),r.push({name:n,type:a})}return r.sort((function(e,t){return Gr.indexOf(e.name)-Gr.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:r},t)}},{key:"encode",value:function(t,r,n){return Object(c.c)(["0x1901",e.hashDomain(t),e.from(r).hash(n)])}},{key:"hash",value:function(t,r,n){return ut(e.encode(t,r,n))}},{key:"resolveNames",value:function(t,r,n,a){return Dr(this,void 0,void 0,Object(lr.a)().mark((function i(){var o,s,f;return Object(lr.a)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=Object(u.g)(t),o={},t.verifyingContract&&!Object(c.l)(t.verifyingContract,20)&&(o[t.verifyingContract]="0x"),(s=e.from(r)).visit(n,(function(e,t){return"address"!==e||Object(c.l)(t,20)||(o[t]="0x"),t})),i.t0=Object(lr.a)().keys(o);case 6:if((i.t1=i.t0()).done){i.next=13;break}return f=i.t1.value,i.next=10,a(f);case 10:o[f]=i.sent,i.next=6;break;case 13:return t.verifyingContract&&o[t.verifyingContract]&&(t.verifyingContract=o[t.verifyingContract]),n=s.visit(n,(function(e,t){return"address"===e&&o[t]?o[t]:t})),i.abrupt("return",{domain:t,value:n});case 16:case"end":return i.stop()}}),i)})))}},{key:"getPayload",value:function(t,r,n){e.hashDomain(t);var a={},i=[];Gr.forEach((function(e){var r=t[e];null!=r&&(a[e]=zr[e](r),i.push({name:e,type:Qr[e]}))}));var o=e.from(r),s=Object(u.g)(r);return s.EIP712Domain?Tr.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):s.EIP712Domain=i,o.encode(n),{types:s,domain:a,primaryType:o.primaryType,message:o.visit(n,(function(e,t){if(e.match(/^bytes(\d*)/))return Object(c.i)(Object(c.a)(t));if(e.match(/^u?int/))return yr.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!==typeof t&&Tr.throwArgumentError("invalid string","value",t),t}return Tr.throwArgumentError("unsupported type","type",e)}))}}}]),e}(),Wr=r(104),Yr=r.n(Wr).a.BN,Jr=new f.b("bignumber/5.6.2"),Xr={},Zr=9007199254740991;var $r=!1,en=function(){function e(t,r){Object(o.a)(this,e),t!==Xr&&Jr.throwError("cannot call constructor directly; use BigNumber.from",f.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return Object(s.a)(e,[{key:"fromTwos",value:function(e){return rn(nn(this).fromTwos(e))}},{key:"toTwos",value:function(e){return rn(nn(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return rn(nn(this).add(nn(e)))}},{key:"sub",value:function(e){return rn(nn(this).sub(nn(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&an("division-by-zero","div"),rn(nn(this).div(nn(t)))}},{key:"mul",value:function(e){return rn(nn(this).mul(nn(e)))}},{key:"mod",value:function(e){var t=nn(e);return t.isNeg()&&an("division-by-zero","mod"),rn(nn(this).umod(t))}},{key:"pow",value:function(e){var t=nn(e);return t.isNeg()&&an("negative-power","pow"),rn(nn(this).pow(t))}},{key:"and",value:function(e){var t=nn(e);return(this.isNegative()||t.isNeg())&&an("unbound-bitwise-result","and"),rn(nn(this).and(t))}},{key:"or",value:function(e){var t=nn(e);return(this.isNegative()||t.isNeg())&&an("unbound-bitwise-result","or"),rn(nn(this).or(t))}},{key:"xor",value:function(e){var t=nn(e);return(this.isNegative()||t.isNeg())&&an("unbound-bitwise-result","xor"),rn(nn(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&an("negative-width","mask"),rn(nn(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&an("negative-width","shl"),rn(nn(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&an("negative-width","shr"),rn(nn(this).shrn(e))}},{key:"eq",value:function(e){return nn(this).eq(nn(e))}},{key:"lt",value:function(e){return nn(this).lt(nn(e))}},{key:"lte",value:function(e){return nn(this).lte(nn(e))}},{key:"gt",value:function(e){return nn(this).gt(nn(e))}},{key:"gte",value:function(e){return nn(this).gte(nn(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return nn(this).isZero()}},{key:"toNumber",value:function(){try{return nn(this).toNumber()}catch(e){an("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return Jr.throwError("this platform does not support BigInt",f.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?$r||($r=!0,Jr.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?Jr.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.b.errors.UNEXPECTED_ARGUMENT,{}):Jr.throwError("BigNumber.toString does not accept parameters",f.b.errors.UNEXPECTED_ARGUMENT,{})),nn(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(Xr,tn(t)):t.match(/^-?[0-9]+$/)?new e(Xr,tn(new Yr(t))):Jr.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&an("underflow","BigNumber.from",t),(t>=Zr||t<=-9007199254740991)&&an("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(c.j)(r))return e.from(Object(c.i)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var a=r._hex;if(null==a&&"BigNumber"===r.type&&(a=r.hex),"string"===typeof a&&(Object(c.l)(a)||"-"===a[0]&&Object(c.l)(a.substring(1))))return e.from(a)}return Jr.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function tn(e){if("string"!==typeof e)return tn(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&Jr.throwArgumentError("invalid hex","value",e),"0x00"===(e=tn(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function rn(e){return en.from(tn(e))}function nn(e){var t=en.from(e).toHexString();return"-"===t[0]?new Yr("-"+t.substring(3),16):new Yr(t.substring(2),16)}function an(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),Jr.throwError(e,f.b.errors.NUMERIC_FAULT,n)}var on,sn,cn=new f.b("strings/5.6.1");function un(e,t,r,n,a){if(e===sn.BAD_PREFIX||e===sn.UNEXPECTED_CONTINUE){for(var i=0,o=t+1;o>6===2;o++)i++;return i}return e===sn.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(on||(on={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(sn||(sn={}));Object.freeze({error:function(e,t,r,n,a){return cn.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:un,replace:function(e,t,r,n,a){return e===sn.OVERLONG?(n.push(a),0):(n.push(65533),un(e,t,r))}});function fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:on.current;t!=on.current&&(cn.checkNormalize(),e=e.normalize(t));for(var r=[],n=0;n>6|192),r.push(63&a|128);else if(55296==(64512&a)){n++;var i=e.charCodeAt(n);if(n>=e.length||56320!==(64512&i))throw new Error("invalid utf-8 string");var o=65536+((1023&a)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return Object(c.a)(r)}var dn,ln=r(26),hn=r.n(ln);!function(e){e.sha256="sha256",e.sha512="sha512"}(dn||(dn={}));var pn=new f.b("sha2/5.6.1");function bn(e){return"0x"+hn.a.ripemd160().update(Object(c.a)(e)).digest("hex")}function mn(e){return"0x"+hn.a.sha256().update(Object(c.a)(e)).digest("hex")}function gn(e){return"0x"+hn.a.sha512().update(Object(c.a)(e)).digest("hex")}function vn(e,t,r){return dn[e]||pn.throwError("unsupported algorithm "+e,f.b.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+hn.a.hmac(hn.a[e],Object(c.a)(t)).update(Object(c.a)(r)).digest("hex")}var yn=r(1610),An=new f.b("signing-key/5.6.2"),wn=null;function xn(){return wn||(wn=new yn.a("secp256k1")),wn}var En=function(){function e(t){Object(o.a)(this,e),Object(u.d)(this,"curve","secp256k1"),Object(u.d)(this,"privateKey",Object(c.i)(t)),32!==Object(c.d)(this.privateKey)&&An.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=xn().keyFromPrivate(Object(c.a)(this.privateKey));Object(u.d)(this,"publicKey","0x"+r.getPublic(!1,"hex")),Object(u.d)(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),Object(u.d)(this,"_isSigningKey",!0)}return Object(s.a)(e,[{key:"_addPoint",value:function(e){var t=xn().keyFromPublic(Object(c.a)(this.publicKey)),r=xn().keyFromPublic(Object(c.a)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=xn().keyFromPrivate(Object(c.a)(this.privateKey)),r=Object(c.a)(e);32!==r.length&&An.throwArgumentError("bad digest length","digest",e);var n=t.sign(r,{canonical:!0});return Object(c.n)({recoveryParam:n.recoveryParam,r:Object(c.h)("0x"+n.r.toString(16),32),s:Object(c.h)("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=xn().keyFromPrivate(Object(c.a)(this.privateKey)),r=xn().keyFromPublic(Object(c.a)(function(e,t){var r=Object(c.a)(e);if(32===r.length){var n=new En(r);return t?"0x"+xn().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}if(33===r.length)return t?Object(c.i)(r):"0x"+xn().keyFromPublic(r).getPublic(!1,"hex");if(65===r.length)return t?"0x"+xn().keyFromPublic(r).getPublic(!0,"hex"):Object(c.i)(r);return An.throwArgumentError("invalid public or private key","key","[REDACTED]")}(e)));return Object(c.h)("0x"+t.derive(r.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();var _n=r(105),Cn=r.n(_n).a.BN,kn=new f.b("bignumber/5.6.2"),Bn={},In=9007199254740991;var Sn=!1,On=function(){function e(t,r){Object(o.a)(this,e),t!==Bn&&kn.throwError("cannot call constructor directly; use BigNumber.from",f.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return Object(s.a)(e,[{key:"fromTwos",value:function(e){return Dn(Tn(this).fromTwos(e))}},{key:"toTwos",value:function(e){return Dn(Tn(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return Dn(Tn(this).add(Tn(e)))}},{key:"sub",value:function(e){return Dn(Tn(this).sub(Tn(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&Fn("division-by-zero","div"),Dn(Tn(this).div(Tn(t)))}},{key:"mul",value:function(e){return Dn(Tn(this).mul(Tn(e)))}},{key:"mod",value:function(e){var t=Tn(e);return t.isNeg()&&Fn("division-by-zero","mod"),Dn(Tn(this).umod(t))}},{key:"pow",value:function(e){var t=Tn(e);return t.isNeg()&&Fn("negative-power","pow"),Dn(Tn(this).pow(t))}},{key:"and",value:function(e){var t=Tn(e);return(this.isNegative()||t.isNeg())&&Fn("unbound-bitwise-result","and"),Dn(Tn(this).and(t))}},{key:"or",value:function(e){var t=Tn(e);return(this.isNegative()||t.isNeg())&&Fn("unbound-bitwise-result","or"),Dn(Tn(this).or(t))}},{key:"xor",value:function(e){var t=Tn(e);return(this.isNegative()||t.isNeg())&&Fn("unbound-bitwise-result","xor"),Dn(Tn(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&Fn("negative-width","mask"),Dn(Tn(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&Fn("negative-width","shl"),Dn(Tn(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&Fn("negative-width","shr"),Dn(Tn(this).shrn(e))}},{key:"eq",value:function(e){return Tn(this).eq(Tn(e))}},{key:"lt",value:function(e){return Tn(this).lt(Tn(e))}},{key:"lte",value:function(e){return Tn(this).lte(Tn(e))}},{key:"gt",value:function(e){return Tn(this).gt(Tn(e))}},{key:"gte",value:function(e){return Tn(this).gte(Tn(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return Tn(this).isZero()}},{key:"toNumber",value:function(){try{return Tn(this).toNumber()}catch(e){Fn("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return kn.throwError("this platform does not support BigInt",f.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?Sn||(Sn=!0,kn.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?kn.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.b.errors.UNEXPECTED_ARGUMENT,{}):kn.throwError("BigNumber.toString does not accept parameters",f.b.errors.UNEXPECTED_ARGUMENT,{})),Tn(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(Bn,Mn(t)):t.match(/^-?[0-9]+$/)?new e(Bn,Mn(new Cn(t))):kn.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&Fn("underflow","BigNumber.from",t),(t>=In||t<=-9007199254740991)&&Fn("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(c.j)(r))return e.from(Object(c.i)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var a=r._hex;if(null==a&&"BigNumber"===r.type&&(a=r.hex),"string"===typeof a&&(Object(c.l)(a)||"-"===a[0]&&Object(c.l)(a.substring(1))))return e.from(a)}return kn.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function Mn(e){if("string"!==typeof e)return Mn(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&kn.throwArgumentError("invalid hex","value",e),"0x00"===(e=Mn(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function Dn(e){return On.from(Mn(e))}function Tn(e){var t=On.from(e).toHexString();return"-"===t[0]?new Cn("-"+t.substring(3),16):new Cn(t.substring(2),16)}function Fn(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),kn.throwError(e,f.b.errors.NUMERIC_FAULT,n)}function Rn(e){return"0x"+M.a.keccak_256(Object(c.a)(e))}var Pn=new f.b("address/5.6.1");function Nn(e){Object(c.l)(e,20)||Pn.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=t[n].charCodeAt(0);for(var a=Object(c.a)(Rn(r)),i=0;i<40;i+=2)a[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&a[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}for(var jn={},Ln=0;Ln<10;Ln++)jn[String(Ln)]=String(Ln);for(var Un=0;Un<26;Un++)jn[String.fromCharCode(65+Un)]=String(10+Un);var Qn=Math.floor(function(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}(9007199254740991));function Gn(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return jn[e]})).join("");t.length>=Qn;){var r=t.substring(0,Qn);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function Hn(e){var t,r=null;if("string"!==typeof e&&Pn.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),r=Nn(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&r!==e&&Pn.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==Gn(e)&&Pn.throwArgumentError("bad icap checksum","address",e),t=e.substring(4),r=new Cn(t,36).toString(16);r.length<40;)r="0"+r;r=Nn("0x"+r)}else Pn.throwArgumentError("invalid address","address",e);return r}var zn=r(1611),qn=new f.b("signing-key/5.6.2"),Kn=null;function Vn(){return Kn||(Kn=new zn.a("secp256k1")),Kn}var Wn=function(){function e(t){Object(o.a)(this,e),Object(u.d)(this,"curve","secp256k1"),Object(u.d)(this,"privateKey",Object(c.i)(t)),32!==Object(c.d)(this.privateKey)&&qn.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=Vn().keyFromPrivate(Object(c.a)(this.privateKey));Object(u.d)(this,"publicKey","0x"+r.getPublic(!1,"hex")),Object(u.d)(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),Object(u.d)(this,"_isSigningKey",!0)}return Object(s.a)(e,[{key:"_addPoint",value:function(e){var t=Vn().keyFromPublic(Object(c.a)(this.publicKey)),r=Vn().keyFromPublic(Object(c.a)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=Vn().keyFromPrivate(Object(c.a)(this.privateKey)),r=Object(c.a)(e);32!==r.length&&qn.throwArgumentError("bad digest length","digest",e);var n=t.sign(r,{canonical:!0});return Object(c.n)({recoveryParam:n.recoveryParam,r:Object(c.h)("0x"+n.r.toString(16),32),s:Object(c.h)("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=Vn().keyFromPrivate(Object(c.a)(this.privateKey)),r=Vn().keyFromPublic(Object(c.a)(Yn(e)));return Object(c.h)("0x"+t.derive(r.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function Yn(e,t){var r=Object(c.a)(e);if(32===r.length){var n=new Wn(r);return t?"0x"+Vn().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}return 33===r.length?t?Object(c.i)(r):"0x"+Vn().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+Vn().keyFromPublic(r).getPublic(!0,"hex"):Object(c.i)(r):qn.throwArgumentError("invalid public or private key","key","[REDACTED]")}var Jn,Xn=new f.b("transactions/5.6.2");function Zn(e){return"0x"===e?null:Hn(e)}function $n(e){return"0x"===e?Ee:On.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(Jn||(Jn={}));var ea=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],ta={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function ra(e){var t=Yn(e);return Hn(Object(c.e)(Rn(Object(c.e)(t,1)),12))}function na(e,t){return ra(function(e,t){var r=Object(c.n)(t),n={r:Object(c.a)(r.r),s:Object(c.a)(r.s)};return"0x"+Vn().recoverPubKey(Object(c.a)(e),n,r.recoveryParam).encode("hex",!1)}(Object(c.a)(e),t))}function aa(e,t){var r=Object(c.o)(On.from(e).toHexString());return r.length>32&&Xn.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function ia(e,t){return{address:Hn(e),storageKeys:(t||[]).map((function(t,r){return 32!==Object(c.d)(t)&&Xn.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase()}))}}function oa(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&Xn.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),ia(e[0],e[1])):ia(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var r=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return ia(t,Object.keys(r).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function sa(e){return oa(e).map((function(e){return[e.address,e.storageKeys]}))}function ca(e,t){if(null!=e.gasPrice){var r=On.from(e.gasPrice),n=On.from(e.maxFeePerGas||0);r.eq(n)||Xn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var a=[aa(e.chainId||0,"chainId"),aa(e.nonce||0,"nonce"),aa(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),aa(e.maxFeePerGas||0,"maxFeePerGas"),aa(e.gasLimit||0,"gasLimit"),null!=e.to?Hn(e.to):"0x",aa(e.value||0,"value"),e.data||"0x",sa(e.accessList||[])];if(t){var i=Object(c.n)(t);a.push(aa(i.recoveryParam,"recoveryParam")),a.push(Object(c.o)(i.r)),a.push(Object(c.o)(i.s))}return Object(c.c)(["0x02",N(a)])}function ua(e,t){var r=[aa(e.chainId||0,"chainId"),aa(e.nonce||0,"nonce"),aa(e.gasPrice||0,"gasPrice"),aa(e.gasLimit||0,"gasLimit"),null!=e.to?Hn(e.to):"0x",aa(e.value||0,"value"),e.data||"0x",sa(e.accessList||[])];if(t){var n=Object(c.n)(t);r.push(aa(n.recoveryParam,"recoveryParam")),r.push(Object(c.o)(n.r)),r.push(Object(c.o)(n.s))}return Object(c.c)(["0x01",N(r)])}function fa(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&Xn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){Object(u.b)(e,ta);var r=[];ea.forEach((function(t){var n=e[t.name]||[],a={};t.numeric&&(a.hexPad="left"),n=Object(c.a)(Object(c.i)(n,a)),t.length&&n.length!==t.length&&n.length>0&&Xn.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=Object(c.o)(n)).length>t.maxLength&&Xn.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push(Object(c.i)(n))}));var n=0;if(null!=e.chainId?"number"!==typeof(n=e.chainId)&&Xn.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!Object(c.k)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push(Object(c.i)(n)),r.push("0x"),r.push("0x")),!t)return N(r);var a=Object(c.n)(t),i=27+a.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),i+=2*n+8,a.v>28&&a.v!==i&&Xn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):a.v!==i&&Xn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push(Object(c.i)(i)),r.push(Object(c.o)(Object(c.a)(a.r))),r.push(Object(c.o)(Object(c.a)(a.s))),N(r)}(e,t);switch(e.type){case 1:return ua(e,t);case 2:return ca(e,t)}return Xn.throwError("unsupported transaction type: ".concat(e.type),f.b.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function da(e,t,r){try{var n=$n(t[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");e.v=n}catch(i){Xn.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=Object(c.h)(t[1],32),e.s=Object(c.h)(t[2],32);try{var a=Rn(r(e));e.from=na(a,{r:e.r,s:e.s,recoveryParam:e.v})}catch(i){}}function la(e){var t=Object(c.a)(e);if(t[0]>127)return function(e){var t=U(e);9!==t.length&&6!==t.length&&Xn.throwArgumentError("invalid raw transaction","rawTransaction",e);var r={nonce:$n(t[0]).toNumber(),gasPrice:$n(t[1]),gasLimit:$n(t[2]),to:Zn(t[3]),value:$n(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=On.from(t[6]).toNumber()}catch(o){return r}if(r.r=Object(c.h)(t[7],32),r.s=Object(c.h)(t[8],32),On.from(r.r).isZero()&&On.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,a=t.slice(0,6);0!==r.chainId&&(a.push(Object(c.i)(r.chainId)),a.push("0x"),a.push("0x"),n-=2*r.chainId+8);var i=Rn(N(a));try{r.from=na(i,{r:Object(c.i)(r.r),s:Object(c.i)(r.s),recoveryParam:n})}catch(o){}r.hash=Rn(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){var t=U(e.slice(1));8!==t.length&&11!==t.length&&Xn.throwArgumentError("invalid component count for transaction type: 1","payload",Object(c.i)(e));var r={type:1,chainId:$n(t[0]).toNumber(),nonce:$n(t[1]).toNumber(),gasPrice:$n(t[2]),gasLimit:$n(t[3]),to:Zn(t[4]),value:$n(t[5]),data:t[6],accessList:oa(t[7])};return 8===t.length||(r.hash=Rn(e),da(r,t.slice(8),ua)),r}(t);case 2:return function(e){var t=U(e.slice(1));9!==t.length&&12!==t.length&&Xn.throwArgumentError("invalid component count for transaction type: 2","payload",Object(c.i)(e));var r=$n(t[2]),n=$n(t[3]),a={type:2,chainId:$n(t[0]).toNumber(),nonce:$n(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:$n(t[4]),to:Zn(t[5]),value:$n(t[6]),data:t[7],accessList:oa(t[8])};return 9===t.length||(a.hash=Rn(e),da(a,t.slice(9),ca)),a}(t)}return Xn.throwError("unsupported transaction type: ".concat(t[0]),f.b.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}var ha=new f.b("wordlists/5.6.1"),pa=function(){function e(t){Object(o.a)(this,e),ha.checkAbstract(this instanceof e?this.constructor:void 0,e),Object(u.d)(this,"locale",t)}return Object(s.a)(e,[{key:"split",value:function(e){return e.toLowerCase().split(/ +/g)}},{key:"join",value:function(e){return e.join(" ")}}],[{key:"check",value:function(e){for(var t=[],r=0;r<2048;r++){var n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return yt(t.join("\n")+"\n")}},{key:"register",value:function(e,t){t||(t=e.locale)}}]),e}(),ba=null;function ma(e){if(null==ba&&(ba="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==pa.check(e)))throw ba=null,new Error("BIP39 Wordlist for en (English) FAILED")}var ga=new(function(e){Object(I.a)(r,e);var t=Object(S.a)(r);function r(){return Object(o.a)(this,r),t.call(this,"en")}return Object(s.a)(r,[{key:"getWord",value:function(e){return ma(this),ba[e]}},{key:"getWordIndex",value:function(e){return ma(this),ba.indexOf(e)}}]),r}(pa));pa.register(ga);var va={en:ga},ya=new f.b("hdnode/5.6.2"),Aa=en.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),wa=fn("Bitcoin seed"),xa=2147483648;function Ea(e){return(1<=256)throw new Error("Depth too large!");return Ca(Object(c.b)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",Object(c.i)(this.depth),this.parentFingerprint,Object(c.h)(Object(c.i)(this.index),4),this.chainCode,null!=this.privateKey?Object(c.b)(["0x00",this.privateKey]):this.publicKey]))}},{key:"neuter",value:function(){return new e(Ba,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}},{key:"_derive",value:function(t){if(t>4294967295)throw new Error("invalid index - "+String(t));var r=this.path;r&&(r+="/"+(t&~xa));var n=new Uint8Array(37);if(t&xa){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(Object(c.a)(this.privateKey),1),r&&(r+="'")}else n.set(Object(c.a)(this.publicKey));for(var a=24;a>=0;a-=8)n[33+(a>>3)]=t>>24-a&255;var i=Object(c.a)(vn(dn.sha512,this.chainCode,n)),o=i.slice(0,32),s=i.slice(32),u=null,f=null;this.privateKey?u=_a(en.from(o).add(this.privateKey).mod(Aa)):f=new En(Object(c.i)(o))._addPoint(this.publicKey);var d=r,l=this.mnemonic;return l&&(d=Object.freeze({phrase:l.phrase,path:r,locale:l.locale||"en"})),new e(Ba,u,f,this.fingerprint,_a(s),t,this.depth+1,d)}},{key:"derivePath",value:function(e){var t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();for(var r=this,n=0;n=xa)throw new Error("invalid path index - "+a);r=r._derive(xa+i)}else{if(!a.match(/^[0-9]+$/))throw new Error("invalid path component - "+a);var o=parseInt(a);if(o>=xa)throw new Error("invalid path index - "+a);r=r._derive(o)}}return r}}],[{key:"_fromSeed",value:function(t,r){var n=Object(c.a)(t);if(n.length<16||n.length>64)throw new Error("invalid seed");var a=Object(c.a)(vn(dn.sha512,wa,n));return new e(Ba,_a(a.slice(0,32)),null,"0x00000000",_a(a.slice(32)),0,0,r)}},{key:"fromMnemonic",value:function(t,r,n){return t=Da(Ma(t,n=ka(n)),n),e._fromSeed(Oa(t,r),{phrase:t,path:"m",locale:n.locale})}},{key:"fromSeed",value:function(t){return e._fromSeed(t,null)}},{key:"fromExtendedKey",value:function(t){var r=qt.decode(t);82===r.length&&Ca(r.slice(0,78))===t||ya.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var n=r[4],a=Object(c.i)(r.slice(5,9)),i=parseInt(Object(c.i)(r.slice(9,13)).substring(2),16),o=Object(c.i)(r.slice(13,45)),s=r.slice(45,78);switch(Object(c.i)(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new e(Ba,null,Object(c.i)(s),a,o,i,n,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new e(Ba,Object(c.i)(s.slice(1)),null,a,o,i,n,null)}return ya.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}]),e}();function Oa(e,t){t||(t="");var r=fn("mnemonic"+t,on.NFKD);return function(e,t,r,n,a){var i;e=Object(c.a)(e),t=Object(c.a)(t);var o,s,u=1,f=new Uint8Array(n),d=new Uint8Array(t.length+4);d.set(t);for(var l=1;l<=u;l++){d[t.length]=l>>24&255,d[t.length+1]=l>>16&255,d[t.length+2]=l>>8&255,d[t.length+3]=255&l;var h=Object(c.a)(vn(a,e,d));i||(i=h.length,s=new Uint8Array(i),o=n-((u=Math.ceil(n/i))-1)*i),s.set(h);for(var p=1;p>3]|=1<<7-a%8),a++}var u=32*r.length/3,f=Ea(r.length/3);if((Object(c.a)(mn(n.slice(0,u/8)))[0]&f)!==(n[n.length-1]&f))throw new Error("invalid checksum");return Object(c.i)(n.slice(0,u/8))}function Da(e,t){if(t=ka(t),(e=Object(c.a)(e)).length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");for(var r=[0],n=11,a=0;a8?(r[r.length-1]<<=8,r[r.length-1]|=e[a],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[a]>>8-n,r.push(e[a]&(1<<8-n)-1),n+=3);var i=e.length/4,o=Object(c.a)(mn(e))[0]&Ea(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,t.join(r.map((function(e){return t.getWord(e)})))}function Ta(e,t){try{return Ma(e,t),!0}catch(r){}return!1}function Fa(e){return("number"!==typeof e||e<0||e>=xa||e%1)&&ya.throwArgumentError("invalid account index","index",e),"m/44'/60'/".concat(e,"'/0/0")}var Ra=r(1615),Pa=r.n(Ra).a.BN;new f.b("bignumber/5.6.2");function Na(e){return"0x"+M.a.keccak_256(Object(c.a)(e))}var ja=new f.b("address/5.6.1");function La(e){Object(c.l)(e,20)||ja.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=t[n].charCodeAt(0);for(var a=Object(c.a)(Na(r)),i=0;i<40;i+=2)a[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&a[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}for(var Ua={},Qa=0;Qa<10;Qa++)Ua[String(Qa)]=String(Qa);for(var Ga=0;Ga<26;Ga++)Ua[String.fromCharCode(65+Ga)]=String(10+Ga);var Ha=Math.floor(function(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}(9007199254740991));function za(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return Ua[e]})).join("");t.length>=Ha;){var r=t.substring(0,Ha);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function qa(e){var t,r=null;if("string"!==typeof e&&ja.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),r=La(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&r!==e&&ja.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==za(e)&&ja.throwArgumentError("bad icap checksum","address",e),t=e.substring(4),r=new Pa(t,36).toString(16);r.length<40;)r="0"+r;r=La("0x"+r)}else ja.throwArgumentError("invalid address","address",e);return r}function Ka(e){if(function(e){var t=null;try{t=JSON.parse(e)}catch(r){return!1}return t.encseed&&t.ethaddr}(e))try{return qa(JSON.parse(e).ethaddr)}catch(t){return null}if(function(e){var r=null;try{r=JSON.parse(e)}catch(t){return!1}return!(!r.version||parseInt(r.version)!==r.version||3!==parseInt(r.version))}(e))try{return qa(JSON.parse(e).address)}catch(t){return null}return null}var Va=r(200),Wa=r(4099);function Ya(e){for(var t=(e=e.slice()).length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}var Ja=r(1612),Xa=new f.b("signing-key/5.6.2"),Za=null;function $a(){return Za||(Za=new Ja.a("secp256k1")),Za}var ei=function(){function e(t){Object(o.a)(this,e),Object(u.d)(this,"curve","secp256k1"),Object(u.d)(this,"privateKey",Object(c.i)(t)),32!==Object(c.d)(this.privateKey)&&Xa.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=$a().keyFromPrivate(Object(c.a)(this.privateKey));Object(u.d)(this,"publicKey","0x"+r.getPublic(!1,"hex")),Object(u.d)(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),Object(u.d)(this,"_isSigningKey",!0)}return Object(s.a)(e,[{key:"_addPoint",value:function(e){var t=$a().keyFromPublic(Object(c.a)(this.publicKey)),r=$a().keyFromPublic(Object(c.a)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=$a().keyFromPrivate(Object(c.a)(this.privateKey)),r=Object(c.a)(e);32!==r.length&&Xa.throwArgumentError("bad digest length","digest",e);var n=t.sign(r,{canonical:!0});return Object(c.n)({recoveryParam:n.recoveryParam,r:Object(c.h)("0x"+n.r.toString(16),32),s:Object(c.h)("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=$a().keyFromPrivate(Object(c.a)(this.privateKey)),r=$a().keyFromPublic(Object(c.a)(ri(e)));return Object(c.h)("0x"+t.derive(r.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function ti(e,t){var r=Object(c.n)(t),n={r:Object(c.a)(r.r),s:Object(c.a)(r.s)};return"0x"+$a().recoverPubKey(Object(c.a)(e),n,r.recoveryParam).encode("hex",!1)}function ri(e,t){var r=Object(c.a)(e);if(32===r.length){var n=new ei(r);return t?"0x"+$a().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}return 33===r.length?t?Object(c.i)(r):"0x"+$a().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+$a().keyFromPublic(r).getPublic(!0,"hex"):Object(c.i)(r):Xa.throwArgumentError("invalid public or private key","key","[REDACTED]")}var ni,ai,ii=new f.b("strings/5.6.1");function oi(e,t,r,n,a){if(e===ai.BAD_PREFIX||e===ai.UNEXPECTED_CONTINUE){for(var i=0,o=t+1;o>6===2;o++)i++;return i}return e===ai.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(ni||(ni={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(ai||(ai={}));var si=Object.freeze({error:function(e,t,r,n,a){return ii.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:oi,replace:function(e,t,r,n,a){return e===ai.OVERLONG?(n.push(a),0):(n.push(65533),oi(e,t,r))}});function ci(e,t){null==t&&(t=si.error),e=Object(c.a)(e);for(var r=[],n=0;n>7!==0){var i=null,o=null;if(192===(224&a))i=1,o=127;else if(224===(240&a))i=2,o=2047;else{if(240!==(248&a)){n+=t(128===(192&a)?ai.UNEXPECTED_CONTINUE:ai.BAD_PREFIX,n-1,e,r);continue}i=3,o=65535}if(n-1+i>=e.length)n+=t(ai.OVERRUN,n-1,e,r);else{for(var s=a&(1<<8-i-1)-1,u=0;u1114111?n+=t(ai.OUT_OF_RANGE,n-1-i,e,r,s):s>=55296&&s<=57343?n+=t(ai.UTF16_SURROGATE,n-1-i,e,r,s):s<=o?n+=t(ai.OVERLONG,n-1-i,e,r,s):r.push(s))}}else r.push(a)}return r}function ui(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ni.current;t!=ni.current&&(ii.checkNormalize(),e=e.normalize(t));for(var r=[],n=0;n>6|192),r.push(63&a|128);else if(55296==(64512&a)){n++;var i=e.charCodeAt(n);if(n>=e.length||56320!==(64512&i))throw new Error("invalid utf-8 string");var o=65536+((1023&a)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return Object(c.a)(r)}function fi(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function di(e,t){return'"'+ci(e,t).map((function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?fi(e):fi(55296+((e-=65536)>>10&1023))+fi(56320+(1023&e))})).join("")+'"'}function li(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}function hi(e,t){return li(ci(e,t))}function pi(e){return ci(ui(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:ni.current))}function bi(e,t){t||(t=function(e){return[parseInt(e,16)]});var r=0,n={};return e.split(",").forEach((function(e){var a=e.split(":");r+=parseInt(a[0],16),n[r]=t(a[1])})),n}function mi(e){var t=0;return e.split(",").map((function(e){var r=e.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:t+parseInt(r[0],16),h:t=parseInt(r[1],16)}}))}function gi(e,t){for(var r=0,n=0;n=(r+=a.l)&&e<=r+a.h&&(e-r)%(a.d||1)===0){if(a.e&&-1!==a.e.indexOf(e-r))continue;return a}}return null}var vi=mi("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),yi="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),Ai=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],wi=bi("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),xi=bi("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),Ei=bi("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!==0)throw new Error("bad data");for(var t=[],r=0;r=0)return[];if(e>=65024&&e<=65039)return[];var t=function(e){var t=gi(e,Ai);if(t)return[e+t.s];var r=wi[e];if(r)return r;var n=xi[e];return n?[e+n[0]]:Ei[e]||null}(e);return t||[e]})),r=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(r=pi(li(r),ni.NFKC)).forEach((function(e){if(gi(e,_i))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(e){if(gi(e,vi))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var n=li(r);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");if(n.length>63)throw new Error("too long");return n}var ki="0x0000000000000000000000000000000000000000000000000000000000000000";function Bi(e){var t=ui(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Object(c.i)(Object(c.b)([t,ki]).slice(0,32))}function Ii(e){var t=Object(c.a)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===t[r-1];)r--;return hi(t.slice(0,r))}var Si,Oi,Mi=r(233),Di=r(333),Ti=new f.b("strings/5.6.1");function Fi(e,t,r,n,a){if(e===Oi.BAD_PREFIX||e===Oi.UNEXPECTED_CONTINUE){for(var i=0,o=t+1;o>6===2;o++)i++;return i}return e===Oi.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(Si||(Si={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(Oi||(Oi={}));var Ri=Object.freeze({error:function(e,t,r,n,a){return Ti.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:Fi,replace:function(e,t,r,n,a){return e===Oi.OVERLONG?(n.push(a),0):(n.push(65533),Fi(e,t,r))}});function Pi(e,t){null==t&&(t=Ri.error),e=Object(c.a)(e);for(var r=[],n=0;n>7!==0){var i=null,o=null;if(192===(224&a))i=1,o=127;else if(224===(240&a))i=2,o=2047;else{if(240!==(248&a)){n+=t(128===(192&a)?Oi.UNEXPECTED_CONTINUE:Oi.BAD_PREFIX,n-1,e,r);continue}i=3,o=65535}if(n-1+i>=e.length)n+=t(Oi.OVERRUN,n-1,e,r);else{for(var s=a&(1<<8-i-1)-1,u=0;u1114111?n+=t(Oi.OUT_OF_RANGE,n-1-i,e,r,s):s>=55296&&s<=57343?n+=t(Oi.UTF16_SURROGATE,n-1-i,e,r,s):s<=o?n+=t(Oi.OVERLONG,n-1-i,e,r,s):r.push(s))}}else r.push(a)}return r}function Ni(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Si.current;t!=Si.current&&(Ti.checkNormalize(),e=e.normalize(t));for(var r=[],n=0;n>6|192),r.push(63&a|128);else if(55296==(64512&a)){n++;var i=e.charCodeAt(n);if(n>=e.length||56320!==(64512&i))throw new Error("invalid utf-8 string");var o=65536+((1023&a)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return Object(c.a)(r)}function ji(e,t){return Pi(e,t).map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}var Li=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};function Ui(e,t){return Li(this,void 0,void 0,Object(lr.a)().mark((function r(){var n,a,i,o;return Object(lr.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==t&&(t={}),n={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0},!0!==t.skipFetchSetup&&(n.mode="cors",n.cache="no-cache",n.credentials="same-origin",n.redirect="follow",n.referrer="client"),r.next=6,fetch(e,n);case 6:return a=r.sent,r.next=9,a.arrayBuffer();case 9:return i=r.sent,o={},a.headers.forEach?a.headers.forEach((function(e,t){o[t.toLowerCase()]=e})):a.headers.keys().forEach((function(e){o[e.toLowerCase()]=a.headers.get(e)})),r.abrupt("return",{headers:o,statusCode:a.status,statusMessage:a.statusText,body:Object(c.a)(new Uint8Array(i))});case 13:case"end":return r.stop()}}),r)})))}var Qi=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function s(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},Gi=new f.b("web/5.6.1");function Hi(e){return new Promise((function(t){setTimeout(t,e)}))}function zi(e,t){if(null==e)return null;if("string"===typeof e)return e;if(Object(c.k)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return ji(e)}catch(r){}return Object(c.i)(e)}return e}function qi(e,t,r){var n="object"===typeof e&&null!=e.throttleLimit?e.throttleLimit:12;Gi.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);var a="object"===typeof e?e.throttleCallback:null,i="object"===typeof e&&"number"===typeof e.throttleSlotInterval?e.throttleSlotInterval:100;Gi.assertArgument(i>0&&i%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);var o="object"===typeof e&&!!e.errorPassThrough,s={},c=null,u={method:"GET"},d=!1,l=12e4;if("string"===typeof e)c=e;else if("object"===typeof e){if(null!=e&&null!=e.url||Gi.throwArgumentError("missing URL","connection.url",e),c=e.url,"number"===typeof e.timeout&&e.timeout>0&&(l=e.timeout),e.headers)for(var h in e.headers)s[h.toLowerCase()]={key:h,value:String(e.headers[h])},["if-none-match","if-modified-since"].indexOf(h.toLowerCase())>=0&&(d=!0);if(u.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==c.substring(0,6)&&!0!==e.allowInsecureAuthentication&&Gi.throwError("basic authentication requires a secure https url",f.b.errors.INVALID_ARGUMENT,{argument:"url",url:c,user:e.user,password:"[REDACTED]"});var p=e.user+":"+e.password;s.authorization={key:"Authorization",value:"Basic "+Ht(Ni(p))}}null!=e.skipFetchSetup&&(u.skipFetchSetup=!!e.skipFetchSetup)}var b=new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$","i"),m=c?c.match(b):null;if(m)try{var g={statusCode:200,statusMessage:"OK",headers:{"content-type":m[1]},body:Gt(m[2])},v=g.body;return r&&(v=r(g.body,g)),Promise.resolve(v)}catch(x){Gi.throwError("processing response error",f.b.errors.SERVER_ERROR,{body:zi(m[1],m[2]),error:x,requestBody:null,requestMethod:"GET",url:c})}t&&(u.method="POST",u.body=t,null==s["content-type"]&&(s["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==s["content-length"]&&(s["content-length"]={key:"Content-Length",value:String(t.length)}));var y={};Object.keys(s).forEach((function(e){var t=s[e];y[t.key]=t.value})),u.headers=y;var A=function(){var e=null;return{promise:new Promise((function(t,r){l&&(e=setTimeout((function(){null!=e&&(e=null,r(Gi.makeError("timeout",f.b.errors.TIMEOUT,{requestBody:zi(u.body,y["content-type"]),requestMethod:u.method,timeout:l,url:c})))}),l))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),w=function(){return Qi(this,void 0,void 0,Object(lr.a)().mark((function e(){var t,s,l,h,p,b,m,g,v,w;return Object(lr.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t=300)&&(A.cancel(),Gi.throwError("bad response",f.b.errors.SERVER_ERROR,{status:s.statusCode,headers:s.headers,body:zi(m,s.headers?s.headers["content-type"]:null),requestBody:zi(u.body,y["content-type"]),requestMethod:u.method,url:c})),!r){e.next=60;break}return e.prev=37,e.next=40,r(m,s);case 40:return g=e.sent,A.cancel(),e.abrupt("return",g);case 45:if(e.prev=45,e.t1=e.catch(37),!(e.t1.throttleRetry&&ts)return void(o()&&n(new Error("retry limit reached")));var u=t.interval*parseInt(String(Math.random()*Math.pow(2,c)));ut.ceiling&&(u=t.ceiling),setTimeout(a,u)}return null}),(function(e){o()&&n(e)}))}()}))}new f.b("ethers/5.6.9")},function(e,t,r){"use strict";var n=r(49),a=r(100),i=r(892),o=r(12),s=["values","unit","step"],c=function(e){var t=Object.keys(e).map((function(t){return{key:t,val:e[t]}}))||[];return t.sort((function(e,t){return e.val-t.val})),t.reduce((function(e,t){return Object(n.a)({},e,Object(o.a)({},t.key,t.val))}),{})};var u={borderRadius:4},f=r(223);var d=["breakpoints","palette","spacing","shape"];t.a=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,r=void 0===t?{}:t,o=e.palette,l=void 0===o?{}:o,h=e.spacing,p=e.shape,b=void 0===p?{}:p,m=Object(a.a)(e,d),g=function(e){var t=e.values,r=void 0===t?{xs:0,sm:600,md:900,lg:1200,xl:1536}:t,i=e.unit,o=void 0===i?"px":i,u=e.step,f=void 0===u?5:u,d=Object(a.a)(e,s),l=c(r),h=Object.keys(l);function p(e){var t="number"===typeof r[e]?r[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function b(e){var t="number"===typeof r[e]?r[e]:e;return"@media (max-width:".concat(t-f/100).concat(o,")")}function m(e,t){var n=h.indexOf(t);return"@media (min-width:".concat("number"===typeof r[e]?r[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==n&&"number"===typeof r[h[n]]?r[h[n]]:t)-f/100).concat(o,")")}return Object(n.a)({keys:h,values:l,up:p,down:b,between:m,only:function(e){return h.indexOf(e)+10&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Object(f.a)({spacing:e}),r=function(){for(var e=arguments.length,r=new Array(e),n=0;n1?A-1:0),x=1;x0&&void 0!==arguments[0]?arguments[0]:i.b,t=Object.keys(e).reduce((function(t,r){return e[r].filterProps.forEach((function(n){t[n]=e[r]})),t}),{});function r(e,r,a){var i,o=(i={},Object(n.a)(i,e,r),Object(n.a)(i,"theme",a),i),s=t[e];return s?s(o):Object(n.a)({},e,r)}return function e(i){var s=i||{},c=s.sx,u=s.theme,f=void 0===u?{}:u;if(!c)return null;function d(i){var s=i;if("function"===typeof i)s=i(f);else if("object"!==typeof i)return i;if(!s)return null;var c=Object(o.a)(f.breakpoints),u=Object.keys(c),d=c;return Object.keys(s).forEach((function(i){var c,u,l=(c=s[i],u=f,"function"===typeof c?c(u):c);if(null!==l&&void 0!==l)if("object"===typeof l)if(t[i])d=Object(a.a)(d,r(i,l,f));else{var h=Object(o.b)({theme:f},l,(function(e){return Object(n.a)({},i,e)}));!function(){for(var e=arguments.length,t=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),r)}function i(e){if(e.type)return e;if("#"===e.charAt(0))return i(function(e){e=e.slice(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),r=e.match(t);return r&&1===r[0].length&&(r=r.map((function(e){return e+e}))),r?"rgb".concat(4===r.length?"a":"","(").concat(r.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error(Object(n.a)(9,e));var a,o=e.substring(t+1,e.length-1);if("color"===r){if(a=(o=o.split(" ")).shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(a))throw new Error(Object(n.a)(10,a))}else o=o.split(",");return{type:r,values:o=o.map((function(e){return parseFloat(e)})),colorSpace:a}}function o(e){var t=e.type,r=e.colorSpace,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),n=-1!==t.indexOf("color")?"".concat(r," ").concat(n.join(" ")):"".concat(n.join(", ")),"".concat(t,"(").concat(n,")")}function s(e){var t="hsl"===(e=i(e)).type?i(function(e){var t=(e=i(e)).values,r=t[0],n=t[1]/100,a=t[2]/100,s=n*Math.min(a,1-a),c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+r/30)%12;return a-s*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",f=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return"hsla"===e.type&&(u+="a",f.push(t[3])),o({type:u,values:f})}(e)).values:e.values;return t=t.map((function(t){return"color"!==e.type&&(t/=255),t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){var r=s(e),n=s(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function u(e,t){return e=i(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,o(e)}function f(e,t){if(e=i(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(var r=0;r<3;r+=1)e.values[r]*=1-t;return o(e)}function d(e,t){if(e=i(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(-1!==e.type.indexOf("color"))for(var n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return o(e)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(49);function a(e,t){var r=Object(n.a)({},t);return Object.keys(e).forEach((function(t){void 0===r[t]&&(r[t]=e[t])})),r}},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return u}));var n=r(29),a=r(74),i=r(1577),o=new a.a(i.a);var s=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw new Error("unable to locate global object")}(),c=s.crypto||s.msCrypto;function u(e){(e<=0||e>1024||e%1||e!=e)&&o.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return c.getRandomValues(t),Object(n.a)(t)}c&&c.getRandomValues||(o.warn("WARNING: Missing strong random number source"),c={getRandomValues:function(e){return o.throwError("no secure random source avaialble",a.a.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(55))},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return u}));var n=r(34),a=r(97),i=r(1596),o=new a.a(i.a);var s=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw new Error("unable to locate global object")}(),c=s.crypto||s.msCrypto;function u(e){(e<=0||e>1024||e%1||e!=e)&&o.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return c.getRandomValues(t),Object(n.a)(t)}c&&c.getRandomValues||(o.warn("WARNING: Missing strong random number source"),c={getRandomValues:function(e){return o.throwError("no secure random source avaialble",a.a.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(55))},function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i}));var n=r(4);function a(e){e=atob(e);for(var t=[],r=0;r1024||e%1||e!=e)&&o.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return c.getRandomValues(t),Object(n.a)(t)}c&&c.getRandomValues||(o.warn("WARNING: Missing strong random number source"),c={getRandomValues:function(e){return o.throwError("no secure random source avaialble",a.b.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(55))},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return u}));var n=r(4),a=r(11),i=r(1617),o=new a.b(i.a);var s=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw new Error("unable to locate global object")}(),c=s.crypto||s.msCrypto;function u(e){(e<=0||e>1024||e%1||e!=e)&&o.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return c.getRandomValues(t),Object(n.a)(t)}c&&c.getRandomValues||(o.warn("WARNING: Missing strong random number source"),c={getRandomValues:function(e){return o.throwError("no secure random source avaialble",a.b.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(55))},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return u}));var n=r(4),a=r(11),i=r(1620),o=new a.b(i.a);var s=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw new Error("unable to locate global object")}(),c=s.crypto||s.msCrypto;function u(e){(e<=0||e>1024||e%1||e!=e)&&o.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return c.getRandomValues(t),Object(n.a)(t)}c&&c.getRandomValues||(o.warn("WARNING: Missing strong random number source"),c={getRandomValues:function(e){return o.throwError("no secure random source avaialble",a.b.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(55))},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"d",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return s}));var n=r(266),a=n.a.from(-1),i=n.a.from(0),o=n.a.from(1),s=n.a.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(173),a=r(1130);function i(e){return Object(n.keccak256)(Object(a.a)(e))}},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(182),c=r(223),u=r(3985),f=r(892),d=r(35),l=r(52),h=r(3),p=["component","direction","spacing","divider","children"];function b(e,t){var r=o.Children.toArray(e).filter(Boolean);return r.reduce((function(e,n,a){return e.push(n),a :not(style) + :not(style)":Object(n.a)({margin:0},"margin".concat((a=r?d[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[a])),Object(c.d)(o,e))};var a})))}return a})),g=o.forwardRef((function(e,t){var r=Object(l.a)({props:e,name:"MuiStack"}),n=Object(u.a)(r),o=n.component,s=void 0===o?"div":o,c=n.direction,f=void 0===c?"column":c,d=n.spacing,g=void 0===d?0:d,v=n.divider,y=n.children,A=Object(a.a)(n,p),w={direction:f,spacing:g};return Object(h.jsx)(m,Object(i.a)({as:s,ownerState:w,ref:t},A,{children:v?b(y,v):y}))}));t.a=g},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(1671);function a(e){return Object(n.a)(e).defaultView||window}},function(e,t,r){"use strict";function n(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function n(){for(var n=this,a=arguments.length,i=new Array(a),o=0;o code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#f76d47"},".language-sass > code":{color:"#f76d47"},".language-scss > code":{color:"#f76d47"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#7c4dff"},"attr-name":{color:"#39adb5"},"attr-value":{color:"#f6a434"},attribute:{color:"#f6a434"},boolean:{color:"#7c4dff"},builtin:{color:"#39adb5"},cdata:{color:"#39adb5"},char:{color:"#39adb5"},class:{color:"#39adb5"},"class-name":{color:"#6182b8"},comment:{color:"#aabfc9"},constant:{color:"#7c4dff"},deleted:{color:"#e53935"},doctype:{color:"#aabfc9"},entity:{color:"#e53935"},function:{color:"#7c4dff"},hexcode:{color:"#f76d47"},id:{color:"#7c4dff",fontWeight:"bold"},important:{color:"#7c4dff",fontWeight:"bold"},inserted:{color:"#39adb5"},keyword:{color:"#7c4dff"},number:{color:"#f76d47"},operator:{color:"#39adb5"},prolog:{color:"#aabfc9"},property:{color:"#39adb5"},"pseudo-class":{color:"#f6a434"},"pseudo-element":{color:"#f6a434"},punctuation:{color:"#39adb5"},regex:{color:"#6182b8"},selector:{color:"#e53935"},string:{color:"#f6a434"},symbol:{color:"#7c4dff"},tag:{color:"#e53935"},unit:{color:"#f76d47"},url:{color:"#e53935"},variable:{color:"#e53935"}}},function(e,t,r){"use strict";t.a={'code[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#2b2b2b"},'pre[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},':not(pre) > code[class*="language-"]':{background:"#2b2b2b",padding:".1em",borderRadius:".3em"},comment:{color:"#808080"},prolog:{color:"#808080"},cdata:{color:"#808080"},delimiter:{color:"#cc7832"},boolean:{color:"#cc7832"},keyword:{color:"#cc7832"},selector:{color:"#cc7832"},important:{color:"#cc7832"},atrule:{color:"#cc7832"},operator:{color:"#a9b7c6"},punctuation:{color:"#a9b7c6"},"attr-name":{color:"#a9b7c6"},tag:{color:"#e8bf6a"},"tag.punctuation":{color:"#e8bf6a"},doctype:{color:"#e8bf6a"},builtin:{color:"#e8bf6a"},entity:{color:"#6897bb"},number:{color:"#6897bb"},symbol:{color:"#6897bb"},property:{color:"#9876aa"},constant:{color:"#9876aa"},variable:{color:"#9876aa"},string:{color:"#6a8759"},char:{color:"#6a8759"},"attr-value":{color:"#a5c261"},"attr-value.punctuation":{color:"#a5c261"},"attr-value.punctuation:first-child":{color:"#a9b7c6"},url:{color:"#287bde",textDecoration:"underline"},function:{color:"#ffc66d"},regex:{background:"#364135"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#294436"},deleted:{background:"#484a4a"},"code.language-css .token.property":{color:"#a9b7c6"},"code.language-css .token.property + .token.punctuation":{color:"#a9b7c6"},"code.language-css .token.id":{color:"#ffc66d"},"code.language-css .token.selector > .token.class":{color:"#ffc66d"},"code.language-css .token.selector > .token.attribute":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-class":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-element":{color:"#ffc66d"}}},function(e,t,r){"use strict";var n=r(42),a=r(18),i=r(10),o=r(39),s=r(1684),c=r(35),u=r(52),f=r(1672),d=r(249),l=r(3),h=["className"],p=Object(c.a)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})((function(e){var t=e.theme,r=e.ownerState;return Object(a.a)({minWidth:56,color:t.palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===r.alignItems&&{marginTop:8})})),b=i.forwardRef((function(e,t){var r=Object(u.a)({props:e,name:"MuiListItemIcon"}),c=r.className,b=Object(n.a)(r,h),m=i.useContext(d.a),g=Object(a.a)({},r,{alignItems:m.alignItems}),v=function(e){var t=e.alignItems,r=e.classes,n={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return Object(s.a)(n,f.b,r)}(g);return Object(l.jsx)(p,Object(a.a)({className:Object(o.default)(v.root,c),ownerState:g,ref:t},b))}));t.a=b},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(39),c=r(1684),u=r(893),f=r(249),d=r(52),l=r(35),h=r(890),p=r(3),b=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],m=Object(l.a)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[Object(n.a)({},"& .".concat(h.a.primary),t.primary),Object(n.a)({},"& .".concat(h.a.secondary),t.secondary),t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})((function(e){var t=e.ownerState;return Object(i.a)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})})),g=o.forwardRef((function(e,t){var r=Object(d.a)({props:e,name:"MuiListItemText"}),n=r.children,l=r.className,g=r.disableTypography,v=void 0!==g&&g,y=r.inset,A=void 0!==y&&y,w=r.primary,x=r.primaryTypographyProps,E=r.secondary,_=r.secondaryTypographyProps,C=Object(a.a)(r,b),k=o.useContext(f.a).dense,B=null!=w?w:n,I=E,S=Object(i.a)({},r,{disableTypography:v,inset:A,primary:!!B,secondary:!!I,dense:k}),O=function(e){var t=e.classes,r=e.inset,n=e.primary,a=e.secondary,i={root:["root",r&&"inset",e.dense&&"dense",n&&a&&"multiline"],primary:["primary"],secondary:["secondary"]};return Object(c.a)(i,h.b,t)}(S);return null==B||B.type===u.a||v||(B=Object(p.jsx)(u.a,Object(i.a)({variant:k?"body2":"body1",className:O.primary,component:"span",display:"block"},x,{children:B}))),null==I||I.type===u.a||v||(I=Object(p.jsx)(u.a,Object(i.a)({variant:"body2",className:O.secondary,color:"text.secondary",display:"block"},_,{children:I}))),Object(p.jsxs)(m,Object(i.a)({className:Object(s.default)(O.root,l),ownerState:S,ref:t},C,{children:[B,I]}))}));t.a=g},function(e,t,r){"use strict";var n=r(18),a=r(10),i=r(52),o=r(3986),s=r(3),c=function(e,t){return Object(n.a)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&{colorScheme:e.palette.mode})},u=function(e){return Object(n.a)({color:e.palette.text.primary},e.typography.body1,{backgroundColor:e.palette.background.default,"@media print":{backgroundColor:e.palette.common.white}})};t.a=function(e){var t=Object(i.a)({props:e,name:"MuiCssBaseline"}),r=t.children,f=t.enableColorScheme,d=void 0!==f&&f;return Object(s.jsxs)(a.Fragment,{children:[Object(s.jsx)(o.a,{styles:function(e){return function(e){var t,r,a={html:c(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1]),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:Object(n.a)({margin:0},u(e),{"&::backdrop":{backgroundColor:e.palette.background.default}})},i=null==(t=e.components)||null==(r=t.MuiCssBaseline)?void 0:r.styleOverrides;return i&&(a=[a,i]),a}(e,d)}}),r]})}},function(e,t,r){"use strict";var n=r(25),a=r(12),i=r(42),o=r(18),s=r(10),c=r(39),u=r(1684),f=r(49),d=r(867);function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return Object(d.a)(e)?t:Object(f.a)({},t,{ownerState:Object(f.a)({},t.ownerState,r)})}var h=r(4094),p=r(35),b=r(313),m=r(52),g=r(51),v=r(4109),y=r(100),A=r(1129),w=r(698),x=r(1671);function E(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function _(e){return e instanceof E(e).Element||e instanceof Element}function C(e){return e instanceof E(e).HTMLElement||e instanceof HTMLElement}function k(e){return"undefined"!==typeof ShadowRoot&&(e instanceof E(e).ShadowRoot||e instanceof ShadowRoot)}var B=Math.max,I=Math.min,S=Math.round;function O(e,t){void 0===t&&(t=!1);var r=e.getBoundingClientRect(),n=1,a=1;if(C(e)&&t){var i=e.offsetHeight,o=e.offsetWidth;o>0&&(n=S(r.width)/o||1),i>0&&(a=S(r.height)/i||1)}return{width:r.width/n,height:r.height/a,top:r.top/a,right:r.right/n,bottom:r.bottom/a,left:r.left/n,x:r.left/n,y:r.top/a}}function M(e){var t=E(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function D(e){return e?(e.nodeName||"").toLowerCase():null}function T(e){return((_(e)?e.ownerDocument:e.document)||window.document).documentElement}function F(e){return O(T(e)).left+M(e).scrollLeft}function R(e){return E(e).getComputedStyle(e)}function P(e){var t=R(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function N(e,t,r){void 0===r&&(r=!1);var n=C(t),a=C(t)&&function(e){var t=e.getBoundingClientRect(),r=S(t.width)/e.offsetWidth||1,n=S(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),i=T(t),o=O(e,a),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&(("body"!==D(t)||P(i))&&(s=function(e){return e!==E(e)&&C(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:M(e);var t}(t)),C(t)?((c=O(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):i&&(c.x=F(i))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function j(e){var t=O(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function L(e){return"html"===D(e)?e:e.assignedSlot||e.parentNode||(k(e)?e.host:null)||T(e)}function U(e){return["html","body","#document"].indexOf(D(e))>=0?e.ownerDocument.body:C(e)&&P(e)?e:U(L(e))}function Q(e,t){var r;void 0===t&&(t=[]);var n=U(e),a=n===(null==(r=e.ownerDocument)?void 0:r.body),i=E(n),o=a?[i].concat(i.visualViewport||[],P(n)?n:[]):n,s=t.concat(o);return a?s:s.concat(Q(L(o)))}function G(e){return["table","td","th"].indexOf(D(e))>=0}function H(e){return C(e)&&"fixed"!==R(e).position?e.offsetParent:null}function z(e){for(var t=E(e),r=H(e);r&&G(r)&&"static"===R(r).position;)r=H(r);return r&&("html"===D(r)||"body"===D(r)&&"static"===R(r).position)?t:r||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&C(e)&&"fixed"===R(e).position)return null;var r=L(e);for(k(r)&&(r=r.host);C(r)&&["html","body"].indexOf(D(r))<0;){var n=R(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var q="top",K="bottom",V="right",W="left",Y="auto",J=[q,K,V,W],X="start",Z="end",$="clippingParents",ee="viewport",te="popper",re="reference",ne=J.reduce((function(e,t){return e.concat([t+"-"+X,t+"-"+Z])}),[]),ae=[].concat(J,[Y]).reduce((function(e,t){return e.concat([t,t+"-"+X,t+"-"+Z])}),[]),ie=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function oe(e){var t=new Map,r=new Set,n=[];function a(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&a(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||a(e)})),n}function se(e){var t;return function(){return t||(t=new Promise((function(r){Promise.resolve().then((function(){t=void 0,r(e())}))}))),t}}var ce={placement:"bottom",modifiers:[],strategy:"absolute"};function ue(){for(var e=arguments.length,t=new Array(e),r=0;r=0?"x":"y"}function be(e){var t,r=e.reference,n=e.element,a=e.placement,i=a?le(a):null,o=a?he(a):null,s=r.x+r.width/2-n.width/2,c=r.y+r.height/2-n.height/2;switch(i){case q:t={x:s,y:r.y-n.height};break;case K:t={x:s,y:r.y+r.height};break;case V:t={x:r.x+r.width,y:c};break;case W:t={x:r.x-n.width,y:c};break;default:t={x:r.x,y:r.y}}var u=i?pe(i):null;if(null!=u){var f="y"===u?"height":"width";switch(o){case X:t[u]=t[u]-(r[f]/2-n[f]/2);break;case Z:t[u]=t[u]+(r[f]/2-n[f]/2)}}return t}var me={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ge(e){var t,r=e.popper,n=e.popperRect,a=e.placement,i=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,d=e.isFixed,l=o.x,h=void 0===l?0:l,p=o.y,b=void 0===p?0:p,m="function"===typeof f?f({x:h,y:b}):{x:h,y:b};h=m.x,b=m.y;var g=o.hasOwnProperty("x"),v=o.hasOwnProperty("y"),y=W,A=q,w=window;if(u){var x=z(r),_="clientHeight",C="clientWidth";if(x===E(r)&&"static"!==R(x=T(r)).position&&"absolute"===s&&(_="scrollHeight",C="scrollWidth"),a===q||(a===W||a===V)&&i===Z)A=K,b-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[_])-n.height,b*=c?1:-1;if(a===W||(a===q||a===K)&&i===Z)y=V,h-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[C])-n.width,h*=c?1:-1}var k,B=Object.assign({position:s},u&&me),I=!0===f?function(e){var t=e.x,r=e.y,n=window.devicePixelRatio||1;return{x:S(t*n)/n||0,y:S(r*n)/n||0}}({x:h,y:b}):{x:h,y:b};return h=I.x,b=I.y,c?Object.assign({},B,((k={})[A]=v?"0":"",k[y]=g?"0":"",k.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+b+"px)":"translate3d("+h+"px, "+b+"px, 0)",k)):Object.assign({},B,((t={})[A]=v?b+"px":"",t[y]=g?h+"px":"",t.transform="",t))}var ve={left:"right",right:"left",bottom:"top",top:"bottom"};function ye(e){return e.replace(/left|right|bottom|top/g,(function(e){return ve[e]}))}var Ae={start:"end",end:"start"};function we(e){return e.replace(/start|end/g,(function(e){return Ae[e]}))}function xe(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&k(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ee(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _e(e,t){return t===ee?Ee(function(e){var t=E(e),r=T(e),n=t.visualViewport,a=r.clientWidth,i=r.clientHeight,o=0,s=0;return n&&(a=n.width,i=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=n.offsetLeft,s=n.offsetTop)),{width:a,height:i,x:o+F(e),y:s}}(e)):_(t)?function(e){var t=O(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Ee(function(e){var t,r=T(e),n=M(e),a=null==(t=e.ownerDocument)?void 0:t.body,i=B(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=B(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-n.scrollLeft+F(e),c=-n.scrollTop;return"rtl"===R(a||r).direction&&(s+=B(r.clientWidth,a?a.clientWidth:0)-i),{width:i,height:o,x:s,y:c}}(T(e)))}function Ce(e,t,r){var n="clippingParents"===t?function(e){var t=Q(L(e)),r=["absolute","fixed"].indexOf(R(e).position)>=0&&C(e)?z(e):e;return _(r)?t.filter((function(e){return _(e)&&xe(e,r)&&"body"!==D(e)})):[]}(e):[].concat(t),a=[].concat(n,[r]),i=a[0],o=a.reduce((function(t,r){var n=_e(e,r);return t.top=B(n.top,t.top),t.right=I(n.right,t.right),t.bottom=I(n.bottom,t.bottom),t.left=B(n.left,t.left),t}),_e(e,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function ke(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Be(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function Ie(e,t){void 0===t&&(t={});var r=t,n=r.placement,a=void 0===n?e.placement:n,i=r.boundary,o=void 0===i?$:i,s=r.rootBoundary,c=void 0===s?ee:s,u=r.elementContext,f=void 0===u?te:u,d=r.altBoundary,l=void 0!==d&&d,h=r.padding,p=void 0===h?0:h,b=ke("number"!==typeof p?p:Be(p,J)),m=f===te?re:te,g=e.rects.popper,v=e.elements[l?m:f],y=Ce(_(v)?v:v.contextElement||T(e.elements.popper),o,c),A=O(e.elements.reference),w=be({reference:A,element:g,strategy:"absolute",placement:a}),x=Ee(Object.assign({},g,w)),E=f===te?x:A,C={top:y.top-E.top+b.top,bottom:E.bottom-y.bottom+b.bottom,left:y.left-E.left+b.left,right:E.right-y.right+b.right},k=e.modifiersData.offset;if(f===te&&k){var B=k[a];Object.keys(C).forEach((function(e){var t=[V,K].indexOf(e)>=0?1:-1,r=[q,K].indexOf(e)>=0?"y":"x";C[e]+=B[r]*t}))}return C}function Se(e,t,r){return B(e,I(t,r))}function Oe(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Me(e){return[q,V,K,W].some((function(t){return e[t]>=0}))}var De=fe({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,a=n.scroll,i=void 0===a||a,o=n.resize,s=void 0===o||o,c=E(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach((function(e){e.addEventListener("scroll",r.update,de)})),s&&c.addEventListener("resize",r.update,de),function(){i&&u.forEach((function(e){e.removeEventListener("scroll",r.update,de)})),s&&c.removeEventListener("resize",r.update,de)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=be({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,a=void 0===n||n,i=r.adaptive,o=void 0===i||i,s=r.roundOffsets,c=void 0===s||s,u={placement:le(t.placement),variation:he(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ge(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ge(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},a=t.elements[e];C(a)&&D(a)&&(Object.assign(a.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],a=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});C(n)&&D(n)&&(Object.assign(n.style,i),Object.keys(a).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,a=r.offset,i=void 0===a?[0,0]:a,o=ae.reduce((function(e,r){return e[r]=function(e,t,r){var n=le(e),a=[W,q].indexOf(n)>=0?-1:1,i="function"===typeof r?r(Object.assign({},t,{placement:e})):r,o=i[0],s=i[1];return o=o||0,s=(s||0)*a,[W,V].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}(r,t.rects,i),e}),{}),s=o[t.placement],c=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=o}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=r.mainAxis,i=void 0===a||a,o=r.altAxis,s=void 0===o||o,c=r.fallbackPlacements,u=r.padding,f=r.boundary,d=r.rootBoundary,l=r.altBoundary,h=r.flipVariations,p=void 0===h||h,b=r.allowedAutoPlacements,m=t.options.placement,g=le(m),v=c||(g===m||!p?[ye(m)]:function(e){if(le(e)===Y)return[];var t=ye(e);return[we(e),t,we(t)]}(m)),y=[m].concat(v).reduce((function(e,r){return e.concat(le(r)===Y?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,a=r.boundary,i=r.rootBoundary,o=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=void 0===c?ae:c,f=he(n),d=f?s?ne:ne.filter((function(e){return he(e)===f})):J,l=d.filter((function(e){return u.indexOf(e)>=0}));0===l.length&&(l=d);var h=l.reduce((function(t,r){return t[r]=Ie(e,{placement:r,boundary:a,rootBoundary:i,padding:o})[le(r)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:r,boundary:f,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:b}):r)}),[]),A=t.rects.reference,w=t.rects.popper,x=new Map,E=!0,_=y[0],C=0;C=0,O=S?"width":"height",M=Ie(t,{placement:k,boundary:f,rootBoundary:d,altBoundary:l,padding:u}),D=S?I?V:W:I?K:q;A[O]>w[O]&&(D=ye(D));var T=ye(D),F=[];if(i&&F.push(M[B]<=0),s&&F.push(M[D]<=0,M[T]<=0),F.every((function(e){return e}))){_=k,E=!1;break}x.set(k,F)}if(E)for(var R=function(e){var t=y.find((function(t){var r=x.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return _=t,"break"},P=p?3:1;P>0;P--){if("break"===R(P))break}t.placement!==_&&(t.modifiersData[n]._skip=!0,t.placement=_,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,a=r.mainAxis,i=void 0===a||a,o=r.altAxis,s=void 0!==o&&o,c=r.boundary,u=r.rootBoundary,f=r.altBoundary,d=r.padding,l=r.tether,h=void 0===l||l,p=r.tetherOffset,b=void 0===p?0:p,m=Ie(t,{boundary:c,rootBoundary:u,padding:d,altBoundary:f}),g=le(t.placement),v=he(t.placement),y=!v,A=pe(g),w="x"===A?"y":"x",x=t.modifiersData.popperOffsets,E=t.rects.reference,_=t.rects.popper,C="function"===typeof b?b(Object.assign({},t.rects,{placement:t.placement})):b,k="number"===typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(x){if(i){var M,D="y"===A?q:W,T="y"===A?K:V,F="y"===A?"height":"width",R=x[A],P=R+m[D],N=R-m[T],L=h?-_[F]/2:0,U=v===X?E[F]:_[F],Q=v===X?-_[F]:-E[F],G=t.elements.arrow,H=h&&G?j(G):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=Y[D],Z=Y[T],$=Se(0,E[F],H[F]),ee=y?E[F]/2-L-$-J-k.mainAxis:U-$-J-k.mainAxis,te=y?-E[F]/2+L+$+Z+k.mainAxis:Q+$+Z+k.mainAxis,re=t.elements.arrow&&z(t.elements.arrow),ne=re?"y"===A?re.clientTop||0:re.clientLeft||0:0,ae=null!=(M=null==S?void 0:S[A])?M:0,ie=R+te-ae,oe=Se(h?I(P,R+ee-ae-ne):P,R,h?B(N,ie):N);x[A]=oe,O[A]=oe-R}if(s){var se,ce="x"===A?q:W,ue="x"===A?K:V,fe=x[w],de="y"===w?"height":"width",be=fe+m[ce],me=fe-m[ue],ge=-1!==[q,W].indexOf(g),ve=null!=(se=null==S?void 0:S[w])?se:0,ye=ge?be:fe-E[de]-_[de]-ve+k.altAxis,Ae=ge?fe+E[de]+_[de]-ve-k.altAxis:me,we=h&&ge?function(e,t,r){var n=Se(e,t,r);return n>r?r:n}(ye,fe,Ae):Se(h?ye:be,fe,h?Ae:me);x[w]=we,O[w]=we-fe}t.modifiersData[n]=O}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,a=e.options,i=r.elements.arrow,o=r.modifiersData.popperOffsets,s=le(r.placement),c=pe(s),u=[W,V].indexOf(s)>=0?"height":"width";if(i&&o){var f=function(e,t){return ke("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Be(e,J))}(a.padding,r),d=j(i),l="y"===c?q:W,h="y"===c?K:V,p=r.rects.reference[u]+r.rects.reference[c]-o[c]-r.rects.popper[u],b=o[c]-r.rects.reference[c],m=z(i),g=m?"y"===c?m.clientHeight||0:m.clientWidth||0:0,v=p/2-b/2,y=f[l],A=g-d[u]-f[h],w=g/2-d[u]/2+v,x=Se(y,w,A),E=c;r.modifiersData[n]=((t={})[E]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!==typeof n||(n=t.elements.popper.querySelector(n)))&&xe(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,o=Ie(t,{elementContext:"reference"}),s=Ie(t,{altBoundary:!0}),c=Oe(o,n),u=Oe(s,a,i),f=Me(c),d=Me(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}}]}),Te=r(4108),Fe=r(3),Re=["anchorEl","children","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","TransitionProps"],Pe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"];function Ne(e){return"function"===typeof e?e():e}var je={},Le=s.forwardRef((function(e,t){var r=e.anchorEl,a=e.children,i=e.direction,o=e.disablePortal,c=e.modifiers,u=e.open,d=e.placement,l=e.popperOptions,h=e.popperRef,p=e.TransitionProps,b=Object(y.a)(e,Re),m=s.useRef(null),g=Object(A.a)(m,t),v=s.useRef(null),x=Object(A.a)(v,h),E=s.useRef(x);Object(w.a)((function(){E.current=x}),[x]),s.useImperativeHandle(h,(function(){return v.current}),[]);var _=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(d,i),C=s.useState(_),k=Object(n.a)(C,2),B=k[0],I=k[1];s.useEffect((function(){v.current&&v.current.forceUpdate()})),Object(w.a)((function(){if(r&&u){Ne(r);var e=[{name:"preventOverflow",options:{altBoundary:o}},{name:"flip",options:{altBoundary:o}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:function(e){var t=e.state;I(t.placement)}}];null!=c&&(e=e.concat(c)),l&&null!=l.modifiers&&(e=e.concat(l.modifiers));var t=De(Ne(r),m.current,Object(f.a)({placement:_},l,{modifiers:e}));return E.current(t),function(){t.destroy(),E.current(null)}}}),[r,o,c,u,l,_]);var S={placement:B};return null!==p&&(S.TransitionProps=p),Object(Fe.jsx)("div",Object(f.a)({ref:g,role:"tooltip"},b,{children:"function"===typeof a?a(S):a}))})),Ue=s.forwardRef((function(e,t){var r=e.anchorEl,a=e.children,i=e.container,o=e.direction,c=void 0===o?"ltr":o,u=e.disablePortal,d=void 0!==u&&u,l=e.keepMounted,h=void 0!==l&&l,p=e.modifiers,b=e.open,m=e.placement,g=void 0===m?"bottom":m,v=e.popperOptions,A=void 0===v?je:v,w=e.popperRef,E=e.style,_=e.transition,C=void 0!==_&&_,k=Object(y.a)(e,Pe),B=s.useState(!0),I=Object(n.a)(B,2),S=I[0],O=I[1];if(!h&&!b&&(!C||S))return null;var M=i||(r?Object(x.a)(Ne(r)).body:void 0);return Object(Fe.jsx)(Te.a,{disablePortal:d,container:M,children:Object(Fe.jsx)(Le,Object(f.a)({anchorEl:r,direction:c,disablePortal:d,modifiers:p,ref:t,open:C?!S:b,placement:g,popperOptions:A,popperRef:w},k,{style:Object(f.a)({position:"fixed",top:0,left:0,display:b||!h||C&&!S?null:"none"},E),TransitionProps:C?{in:b,onEnter:function(){O(!1)},onExited:function(){O(!0)}}:null,children:a}))})})),Qe=r(1574),Ge=Object(p.a)(Ue,{name:"MuiPopper",slot:"Root",overridesResolver:function(e,t){return t.root}})({}),He=s.forwardRef((function(e,t){var r=Object(Qe.a)(),n=Object(m.a)({props:e,name:"MuiPopper"});return Object(Fe.jsx)(Ge,Object(o.a)({direction:null==r?void 0:r.direction},n,{ref:t}))})),ze=r(503),qe=r(122),Ke=r(3989).a,Ve=r(569),We=r(496),Ye=r(891),Je=r(1128);function Xe(e){return Object(Ye.a)("MuiTooltip",e)}var Ze=Object(Je.a)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),$e=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","title","TransitionComponent","TransitionProps"];var et=Object(p.a)(He,{name:"MuiTooltip",slot:"Popper",overridesResolver:function(e,t){var r=e.ownerState;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})((function(e){var t,r=e.theme,n=e.ownerState,i=e.open;return Object(o.a)({zIndex:r.zIndex.tooltip,pointerEvents:"none"},!n.disableInteractive&&{pointerEvents:"auto"},!i&&{pointerEvents:"none"},n.arrow&&(t={},Object(a.a)(t,'&[data-popper-placement*="bottom"] .'.concat(Ze.arrow),{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}}),Object(a.a)(t,'&[data-popper-placement*="top"] .'.concat(Ze.arrow),{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}}),Object(a.a)(t,'&[data-popper-placement*="right"] .'.concat(Ze.arrow),Object(o.a)({},n.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}})),Object(a.a)(t,'&[data-popper-placement*="left"] .'.concat(Ze.arrow),Object(o.a)({},n.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})),t))})),tt=Object(p.a)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:function(e,t){var r=e.ownerState;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t["tooltipPlacement".concat(Object(g.a)(r.placement.split("-")[0]))]]}})((function(e){var t,r,n=e.theme,i=e.ownerState;return Object(o.a)({backgroundColor:Object(h.a)(n.palette.grey[700],.92),borderRadius:n.shape.borderRadius,color:n.palette.common.white,fontFamily:n.typography.fontFamily,padding:"4px 8px",fontSize:n.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:n.typography.fontWeightMedium},i.arrow&&{position:"relative",margin:0},i.touch&&{padding:"8px 16px",fontSize:n.typography.pxToRem(14),lineHeight:"".concat((r=16/14,Math.round(1e5*r)/1e5),"em"),fontWeight:n.typography.fontWeightRegular},(t={},Object(a.a)(t,".".concat(Ze.popper,'[data-popper-placement*="left"] &'),Object(o.a)({transformOrigin:"right center"},i.isRtl?Object(o.a)({marginLeft:"14px"},i.touch&&{marginLeft:"24px"}):Object(o.a)({marginRight:"14px"},i.touch&&{marginRight:"24px"}))),Object(a.a)(t,".".concat(Ze.popper,'[data-popper-placement*="right"] &'),Object(o.a)({transformOrigin:"left center"},i.isRtl?Object(o.a)({marginRight:"14px"},i.touch&&{marginRight:"24px"}):Object(o.a)({marginLeft:"14px"},i.touch&&{marginLeft:"24px"}))),Object(a.a)(t,".".concat(Ze.popper,'[data-popper-placement*="top"] &'),Object(o.a)({transformOrigin:"center bottom",marginBottom:"14px"},i.touch&&{marginBottom:"24px"})),Object(a.a)(t,".".concat(Ze.popper,'[data-popper-placement*="bottom"] &'),Object(o.a)({transformOrigin:"center top",marginTop:"14px"},i.touch&&{marginTop:"24px"})),t))})),rt=Object(p.a)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:function(e,t){return t.arrow}})((function(e){var t=e.theme;return{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:Object(h.a)(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}})),nt=!1,at=null;function it(e,t){return function(r){t&&t(r),e(r)}}var ot=s.forwardRef((function(e,t){var r,a,f,d,h,p,y=Object(m.a)({props:e,name:"MuiTooltip"}),A=y.arrow,w=void 0!==A&&A,x=y.children,E=y.components,_=void 0===E?{}:E,C=y.componentsProps,k=void 0===C?{}:C,B=y.describeChild,I=void 0!==B&&B,S=y.disableFocusListener,O=void 0!==S&&S,M=y.disableHoverListener,D=void 0!==M&&M,T=y.disableInteractive,F=void 0!==T&&T,R=y.disableTouchListener,P=void 0!==R&&R,N=y.enterDelay,j=void 0===N?100:N,L=y.enterNextDelay,U=void 0===L?0:L,Q=y.enterTouchDelay,G=void 0===Q?700:Q,H=y.followCursor,z=void 0!==H&&H,q=y.id,K=y.leaveDelay,V=void 0===K?0:K,W=y.leaveTouchDelay,Y=void 0===W?1500:W,J=y.onClose,X=y.onOpen,Z=y.open,$=y.placement,ee=void 0===$?"bottom":$,te=y.PopperComponent,re=y.PopperProps,ne=void 0===re?{}:re,ae=y.title,ie=y.TransitionComponent,oe=void 0===ie?v.a:ie,se=y.TransitionProps,ce=Object(i.a)(y,$e),ue=Object(b.a)(),fe="rtl"===ue.direction,de=s.useState(),le=Object(n.a)(de,2),he=le[0],pe=le[1],be=s.useState(null),me=Object(n.a)(be,2),ge=me[0],ve=me[1],ye=s.useRef(!1),Ae=F||z,we=s.useRef(),xe=s.useRef(),Ee=s.useRef(),_e=s.useRef(),Ce=Object(We.a)({controlled:Z,default:!1,name:"Tooltip",state:"open"}),ke=Object(n.a)(Ce,2),Be=ke[0],Ie=ke[1],Se=Be,Oe=Ke(q),Me=s.useRef(),De=s.useCallback((function(){void 0!==Me.current&&(document.body.style.WebkitUserSelect=Me.current,Me.current=void 0),clearTimeout(_e.current)}),[]);s.useEffect((function(){return function(){clearTimeout(we.current),clearTimeout(xe.current),clearTimeout(Ee.current),De()}}),[De]);var Te=function(e){clearTimeout(at),nt=!0,Ie(!0),X&&!Se&&X(e)},Re=Object(ze.a)((function(e){clearTimeout(at),at=setTimeout((function(){nt=!1}),800+V),Ie(!1),J&&Se&&J(e),clearTimeout(we.current),we.current=setTimeout((function(){ye.current=!1}),ue.transitions.duration.shortest)})),Pe=function(e){ye.current&&"touchstart"!==e.type||(he&&he.removeAttribute("title"),clearTimeout(xe.current),clearTimeout(Ee.current),j||nt&&U?xe.current=setTimeout((function(){Te(e)}),nt?U:j):Te(e))},Ne=function(e){clearTimeout(xe.current),clearTimeout(Ee.current),Ee.current=setTimeout((function(){Re(e)}),V)},je=Object(Ve.a)(),Le=je.isFocusVisibleRef,Ue=je.onBlur,Qe=je.onFocus,Ge=je.ref,Ye=s.useState(!1),Je=Object(n.a)(Ye,2)[1],Ze=function(e){Ue(e),!1===Le.current&&(Je(!1),Ne(e))},ot=function(e){he||pe(e.currentTarget),Qe(e),!0===Le.current&&(Je(!0),Pe(e))},st=function(e){ye.current=!0;var t=x.props;t.onTouchStart&&t.onTouchStart(e)},ct=Pe,ut=Ne;s.useEffect((function(){if(Se)return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||Re(e)}}),[Re,Se]);var ft=Object(qe.a)(pe,t),dt=Object(qe.a)(Ge,ft),lt=Object(qe.a)(x.ref,dt);""===ae&&(Se=!1);var ht=s.useRef({x:0,y:0}),pt=s.useRef(),bt={},mt="string"===typeof ae;I?(bt.title=Se||!mt||D?null:ae,bt["aria-describedby"]=Se?Oe:null):(bt["aria-label"]=mt?ae:null,bt["aria-labelledby"]=Se&&!mt?Oe:null);var gt=Object(o.a)({},bt,ce,x.props,{className:Object(c.default)(ce.className,x.props.className),onTouchStart:st,ref:lt},z?{onMouseMove:function(e){var t=x.props;t.onMouseMove&&t.onMouseMove(e),ht.current={x:e.clientX,y:e.clientY},pt.current&&pt.current.update()}}:{});var vt={};P||(gt.onTouchStart=function(e){st(e),clearTimeout(Ee.current),clearTimeout(we.current),De(),Me.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",_e.current=setTimeout((function(){document.body.style.WebkitUserSelect=Me.current,Pe(e)}),G)},gt.onTouchEnd=function(e){x.props.onTouchEnd&&x.props.onTouchEnd(e),De(),clearTimeout(Ee.current),Ee.current=setTimeout((function(){Re(e)}),Y)}),D||(gt.onMouseOver=it(ct,gt.onMouseOver),gt.onMouseLeave=it(ut,gt.onMouseLeave),Ae||(vt.onMouseOver=ct,vt.onMouseLeave=ut)),O||(gt.onFocus=it(ot,gt.onFocus),gt.onBlur=it(Ze,gt.onBlur),Ae||(vt.onFocus=ot,vt.onBlur=Ze));var yt=s.useMemo((function(){var e,t=[{name:"arrow",enabled:Boolean(ge),options:{element:ge,padding:4}}];return null!=(e=ne.popperOptions)&&e.modifiers&&(t=t.concat(ne.popperOptions.modifiers)),Object(o.a)({},ne.popperOptions,{modifiers:t})}),[ge,ne]),At=Object(o.a)({},y,{isRtl:fe,arrow:w,disableInteractive:Ae,placement:ee,PopperComponentProp:te,touch:ye.current}),wt=function(e){var t=e.classes,r=e.disableInteractive,n=e.arrow,a=e.touch,i=e.placement,o={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",a&&"touch","tooltipPlacement".concat(Object(g.a)(i.split("-")[0]))],arrow:["arrow"]};return Object(u.a)(o,Xe,t)}(At),xt=null!=(r=_.Popper)?r:et,Et=null!=(a=null!=(f=_.Transition)?f:oe)?a:v.a,_t=null!=(d=_.Tooltip)?d:tt,Ct=null!=(h=_.Arrow)?h:rt,kt=l(xt,Object(o.a)({},ne,k.popper),At),Bt=l(Et,Object(o.a)({},se,k.transition),At),It=l(_t,Object(o.a)({},k.tooltip),At),St=l(Ct,Object(o.a)({},k.arrow),At);return Object(Fe.jsxs)(s.Fragment,{children:[s.cloneElement(x,gt),Object(Fe.jsx)(xt,Object(o.a)({as:null!=te?te:He,placement:ee,anchorEl:z?{getBoundingClientRect:function(){return{top:ht.current.y,left:ht.current.x,right:ht.current.x,bottom:ht.current.y,width:0,height:0}}}:he,popperRef:pt,open:!!he&&Se,id:Oe,transition:!0},vt,kt,{className:Object(c.default)(wt.popper,null==ne?void 0:ne.className,null==(p=k.popper)?void 0:p.className),popperOptions:yt,children:function(e){var t,r,n=e.TransitionProps;return Object(Fe.jsx)(Et,Object(o.a)({timeout:ue.transitions.duration.shorter},n,Bt,{children:Object(Fe.jsxs)(_t,Object(o.a)({},It,{className:Object(c.default)(wt.tooltip,null==(t=k.tooltip)?void 0:t.className),children:[ae,w?Object(Fe.jsx)(Ct,Object(o.a)({},St,{className:Object(c.default)(wt.arrow,null==(r=k.arrow)?void 0:r.className),ref:ve})):null]}))}))}}))]})}));t.a=ot},function(e,t,r){"use strict";var n=r(18),a=r(42),i=r(10),o=r(39),s=r(1684),c=r(3989),u=r(35),f=r(52),d=r(4133),l=r(12),h=r(14),p=r(892),b=r(239),m=r(891),g=r(1128),v=r(697);function y(e){return Object(m.a)("MuiFilledInput",e)}var A=Object(n.a)({},v.a,Object(g.a)("MuiFilledInput",["root","underline","input"])),w=r(3),x=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","type"],E=Object(u.a)(b.b,{shouldForwardProp:function(e){return Object(u.b)(e)||"classes"===e},name:"MuiFilledInput",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[].concat(Object(h.a)(Object(b.e)(e,t)),[!r.disableUnderline&&t.underline])}})((function(e){var t,r,a=e.theme,i=e.ownerState,o="light"===a.palette.mode,s=o?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",c=o?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)";return Object(n.a)((t={position:"relative",backgroundColor:c,borderTopLeftRadius:a.shape.borderRadius,borderTopRightRadius:a.shape.borderRadius,transition:a.transitions.create("background-color",{duration:a.transitions.duration.shorter,easing:a.transitions.easing.easeOut}),"&:hover":{backgroundColor:o?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:c}}},Object(l.a)(t,"&.".concat(A.focused),{backgroundColor:c}),Object(l.a)(t,"&.".concat(A.disabled),{backgroundColor:o?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}),t),!i.disableUnderline&&(r={"&:after":{borderBottom:"2px solid ".concat(a.palette[i.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:a.transitions.create("transform",{duration:a.transitions.duration.shorter,easing:a.transitions.easing.easeOut}),pointerEvents:"none"}},Object(l.a)(r,"&.".concat(A.focused,":after"),{transform:"scaleX(1) translateX(0)"}),Object(l.a)(r,"&.".concat(A.error,":after"),{borderBottomColor:a.palette.error.main,transform:"scaleX(1)"}),Object(l.a)(r,"&:before",{borderBottom:"1px solid ".concat(s),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:a.transitions.create("border-bottom-color",{duration:a.transitions.duration.shorter}),pointerEvents:"none"}),Object(l.a)(r,"&:hover:not(.".concat(A.disabled,"):before"),{borderBottom:"1px solid ".concat(a.palette.text.primary)}),Object(l.a)(r,"&.".concat(A.disabled,":before"),{borderBottomStyle:"dotted"}),r),i.startAdornment&&{paddingLeft:12},i.endAdornment&&{paddingRight:12},i.multiline&&Object(n.a)({padding:"25px 12px 8px"},"small"===i.size&&{paddingTop:21,paddingBottom:4},i.hiddenLabel&&{paddingTop:16,paddingBottom:17}))})),_=Object(u.a)(b.a,{name:"MuiFilledInput",slot:"Input",overridesResolver:b.d})((function(e){var t=e.theme,r=e.ownerState;return Object(n.a)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},"small"===r.size&&{paddingTop:21,paddingBottom:4},r.hiddenLabel&&{paddingTop:16,paddingBottom:17},r.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},r.startAdornment&&{paddingLeft:0},r.endAdornment&&{paddingRight:0},r.hiddenLabel&&"small"===r.size&&{paddingTop:8,paddingBottom:9})})),C=i.forwardRef((function(e,t){var r=Object(f.a)({props:e,name:"MuiFilledInput"}),i=r.components,o=void 0===i?{}:i,c=r.componentsProps,u=r.fullWidth,d=void 0!==u&&u,l=r.inputComponent,h=void 0===l?"input":l,m=r.multiline,g=void 0!==m&&m,v=r.type,A=void 0===v?"text":v,C=Object(a.a)(r,x),k=Object(n.a)({},r,{fullWidth:d,inputComponent:h,multiline:g,type:A}),B=function(e){var t=e.classes,r={root:["root",!e.disableUnderline&&"underline"],input:["input"]},a=Object(s.a)(r,y,t);return Object(n.a)({},t,a)}(r),I={root:{ownerState:k},input:{ownerState:k}},S=c?Object(p.a)(c,I):I;return Object(w.jsx)(b.c,Object(n.a)({components:Object(n.a)({Root:E,Input:_},o),componentsProps:S,fullWidth:d,inputComponent:h,multiline:g,ref:t,type:A},C,{classes:B}))}));C.muiName="Input";var k,B=C,I=["children","classes","className","label","notched"],S=Object(u.a)("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),O=Object(u.a)("legend")((function(e){var t=e.ownerState,r=e.theme;return Object(n.a)({float:"unset",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:r.transitions.create("width",{duration:150,easing:r.transitions.easing.easeOut})},t.withLabel&&Object(n.a)({display:"block",width:"auto",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:r.transitions.create("max-width",{duration:50,easing:r.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:r.transitions.create("max-width",{duration:100,easing:r.transitions.easing.easeOut,delay:50})}))}));var M=r(260),D=r(261);function T(e){return Object(m.a)("MuiOutlinedInput",e)}var F=Object(n.a)({},v.a,Object(g.a)("MuiOutlinedInput",["root","notchedOutline","input"])),R=["components","fullWidth","inputComponent","label","multiline","notched","type"],P=Object(u.a)(b.b,{shouldForwardProp:function(e){return Object(u.b)(e)||"classes"===e},name:"MuiOutlinedInput",slot:"Root",overridesResolver:b.e})((function(e){var t,r=e.theme,a=e.ownerState,i="light"===r.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return Object(n.a)((t={position:"relative",borderRadius:r.shape.borderRadius},Object(l.a)(t,"&:hover .".concat(F.notchedOutline),{borderColor:r.palette.text.primary}),Object(l.a)(t,"@media (hover: none)",Object(l.a)({},"&:hover .".concat(F.notchedOutline),{borderColor:i})),Object(l.a)(t,"&.".concat(F.focused," .").concat(F.notchedOutline),{borderColor:r.palette[a.color].main,borderWidth:2}),Object(l.a)(t,"&.".concat(F.error," .").concat(F.notchedOutline),{borderColor:r.palette.error.main}),Object(l.a)(t,"&.".concat(F.disabled," .").concat(F.notchedOutline),{borderColor:r.palette.action.disabled}),t),a.startAdornment&&{paddingLeft:14},a.endAdornment&&{paddingRight:14},a.multiline&&Object(n.a)({padding:"16.5px 14px"},"small"===a.size&&{padding:"8.5px 14px"}))})),N=Object(u.a)((function(e){var t=e.className,r=e.label,i=e.notched,o=Object(a.a)(e,I),s=null!=r&&""!==r,c=Object(n.a)({},e,{notched:i,withLabel:s});return Object(w.jsx)(S,Object(n.a)({"aria-hidden":!0,className:t,ownerState:c},o,{children:Object(w.jsx)(O,{ownerState:c,children:s?Object(w.jsx)("span",{children:r}):k||(k=Object(w.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:function(e,t){return t.notchedOutline}})((function(e){return{borderColor:"light"===e.theme.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}})),j=Object(u.a)(b.a,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:b.d})((function(e){var t=e.theme,r=e.ownerState;return Object(n.a)({padding:"16.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},"small"===r.size&&{padding:"8.5px 14px"},r.multiline&&{padding:0},r.startAdornment&&{paddingLeft:0},r.endAdornment&&{paddingRight:0})})),L=i.forwardRef((function(e,t){var r,o=Object(f.a)({props:e,name:"MuiOutlinedInput"}),c=o.components,u=void 0===c?{}:c,d=o.fullWidth,l=void 0!==d&&d,h=o.inputComponent,p=void 0===h?"input":h,m=o.label,g=o.multiline,v=void 0!==g&&g,y=o.notched,A=o.type,x=void 0===A?"text":A,E=Object(a.a)(o,R),_=function(e){var t=e.classes,r=Object(s.a)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},T,t);return Object(n.a)({},t,r)}(o),C=Object(M.a)(),k=Object(D.a)({props:o,muiFormControl:C,states:["required"]});return Object(w.jsx)(b.c,Object(n.a)({components:Object(n.a)({Root:P,Input:j},u),renderSuffix:function(e){return Object(w.jsx)(N,{className:_.notchedOutline,label:null!=m&&""!==m&&k.required?r||(r=Object(w.jsxs)(i.Fragment,{children:[m,"\xa0","*"]})):m,notched:"undefined"!==typeof y?y:Boolean(e.startAdornment||e.filled||e.focused)})},fullWidth:l,inputComponent:p,multiline:v,ref:t,type:x},E,{classes:Object(n.a)({},_,{notchedOutline:null})}))}));L.muiName="Input";var U=L,Q=r(51);function G(e){return Object(m.a)("MuiFormLabel",e)}var H=Object(g.a)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),z=["children","className","color","component","disabled","error","filled","focused","required"],q=Object(u.a)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return Object(n.a)({},t.root,"secondary"===r.color&&t.colorSecondary,r.filled&&t.filled)}})((function(e){var t,r=e.theme,a=e.ownerState;return Object(n.a)({color:r.palette.text.secondary},r.typography.body1,(t={lineHeight:"1.4375em",padding:0,position:"relative"},Object(l.a)(t,"&.".concat(H.focused),{color:r.palette[a.color].main}),Object(l.a)(t,"&.".concat(H.disabled),{color:r.palette.text.disabled}),Object(l.a)(t,"&.".concat(H.error),{color:r.palette.error.main}),t))})),K=Object(u.a)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:function(e,t){return t.asterisk}})((function(e){var t=e.theme;return Object(l.a)({},"&.".concat(H.error),{color:t.palette.error.main})})),V=i.forwardRef((function(e,t){var r=Object(f.a)({props:e,name:"MuiFormLabel"}),i=r.children,c=r.className,u=r.component,d=void 0===u?"label":u,l=Object(a.a)(r,z),h=Object(M.a)(),p=Object(D.a)({props:r,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]}),b=Object(n.a)({},r,{color:p.color||"primary",component:d,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),m=function(e){var t=e.classes,r=e.color,n=e.focused,a=e.disabled,i=e.error,o=e.filled,c=e.required,u={root:["root","color".concat(Object(Q.a)(r)),a&&"disabled",i&&"error",o&&"filled",n&&"focused",c&&"required"],asterisk:["asterisk",i&&"error"]};return Object(s.a)(u,G,t)}(b);return Object(w.jsxs)(q,Object(n.a)({as:d,ownerState:b,className:Object(o.default)(m.root,c),ref:t},l,{children:[i,p.required&&Object(w.jsxs)(K,{ownerState:b,"aria-hidden":!0,className:m.asterisk,children:["\u2009","*"]})]}))}));function W(e){return Object(m.a)("MuiInputLabel",e)}Object(g.a)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);var Y=["disableAnimation","margin","shrink","variant"],J=Object(u.a)(V,{shouldForwardProp:function(e){return Object(u.b)(e)||"classes"===e},name:"MuiInputLabel",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[Object(l.a)({},"& .".concat(H.asterisk),t.asterisk),t.root,r.formControl&&t.formControl,"small"===r.size&&t.sizeSmall,r.shrink&&t.shrink,!r.disableAnimation&&t.animated,t[r.variant]]}})((function(e){var t=e.theme,r=e.ownerState;return Object(n.a)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},r.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===r.size&&{transform:"translate(0, 17px) scale(1)"},r.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!r.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===r.variant&&Object(n.a)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===r.size&&{transform:"translate(12px, 13px) scale(1)"},r.shrink&&Object(n.a)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===r.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===r.variant&&Object(n.a)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===r.size&&{transform:"translate(14px, 9px) scale(1)"},r.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 24px)",transform:"translate(14px, -9px) scale(0.75)"}))})),X=i.forwardRef((function(e,t){var r=Object(f.a)({name:"MuiInputLabel",props:e}),i=r.disableAnimation,o=void 0!==i&&i,c=r.shrink,u=Object(a.a)(r,Y),d=Object(M.a)(),l=c;"undefined"===typeof l&&d&&(l=d.filled||d.focused||d.adornedStart);var h=Object(D.a)({props:r,muiFormControl:d,states:["size","variant","required"]}),p=Object(n.a)({},r,{disableAnimation:o,formControl:d,shrink:l,size:h.size,variant:h.variant,required:h.required}),b=function(e){var t=e.classes,r=e.formControl,a=e.size,i=e.shrink,o={root:["root",r&&"formControl",!e.disableAnimation&&"animated",i&&"shrink","small"===a&&"sizeSmall",e.variant],asterisk:[e.required&&"asterisk"]},c=Object(s.a)(o,W,t);return Object(n.a)({},t,c)}(p);return Object(w.jsx)(J,Object(n.a)({"data-shrink":l,ownerState:p,ref:t},u,{classes:b}))})),Z=r(25),$=r(495),ee=r(589),te=r(576);function re(e){return Object(m.a)("MuiFormControl",e)}Object(g.a)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var ne=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],ae=Object(u.a)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return Object(n.a)({},t.root,t["margin".concat(Object(Q.a)(r.margin))],r.fullWidth&&t.fullWidth)}})((function(e){var t=e.ownerState;return Object(n.a)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})})),ie=i.forwardRef((function(e,t){var r=Object(f.a)({props:e,name:"MuiFormControl"}),c=r.children,u=r.className,d=r.color,l=void 0===d?"primary":d,h=r.component,p=void 0===h?"div":h,b=r.disabled,m=void 0!==b&&b,g=r.error,v=void 0!==g&&g,y=r.focused,A=r.fullWidth,x=void 0!==A&&A,E=r.hiddenLabel,_=void 0!==E&&E,C=r.margin,k=void 0===C?"none":C,B=r.required,I=void 0!==B&&B,S=r.size,O=void 0===S?"medium":S,M=r.variant,D=void 0===M?"outlined":M,T=Object(a.a)(r,ne),F=Object(n.a)({},r,{color:l,component:p,disabled:m,error:v,fullWidth:x,hiddenLabel:_,margin:k,required:I,size:O,variant:D}),R=function(e){var t=e.classes,r=e.margin,n=e.fullWidth,a={root:["root","none"!==r&&"margin".concat(Object(Q.a)(r)),n&&"fullWidth"]};return Object(s.a)(a,re,t)}(F),P=i.useState((function(){var e=!1;return c&&i.Children.forEach(c,(function(t){if(Object(ee.a)(t,["Input","Select"])){var r=Object(ee.a)(t,["Select"])?t.props.input:t;r&&Object($.a)(r.props)&&(e=!0)}})),e})),N=Object(Z.a)(P,2),j=N[0],L=N[1],U=i.useState((function(){var e=!1;return c&&i.Children.forEach(c,(function(t){Object(ee.a)(t,["Input","Select"])&&Object($.b)(t.props,!0)&&(e=!0)})),e})),G=Object(Z.a)(U,2),H=G[0],z=G[1],q=i.useState(!1),K=Object(Z.a)(q,2),V=K[0],W=K[1];m&&V&&W(!1);var Y=void 0===y||m?V:y,J=i.useCallback((function(){z(!0)}),[]),X={adornedStart:j,setAdornedStart:L,color:l,disabled:m,error:v,filled:H,focused:Y,fullWidth:x,hiddenLabel:_,size:O,onBlur:function(){W(!1)},onEmpty:i.useCallback((function(){z(!1)}),[]),onFilled:J,onFocus:function(){W(!0)},registerEffect:undefined,required:I,variant:D};return Object(w.jsx)(te.a.Provider,{value:X,children:Object(w.jsx)(ae,Object(n.a)({as:p,ownerState:F,className:Object(o.default)(R.root,u),ref:t},T,{children:c}))})}));function oe(e){return Object(m.a)("MuiFormHelperText",e)}var se,ce=Object(g.a)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),ue=["children","className","component","disabled","error","filled","focused","margin","required","variant"],fe=Object(u.a)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,r.size&&t["size".concat(Object(Q.a)(r.size))],r.contained&&t.contained,r.filled&&t.filled]}})((function(e){var t,r=e.theme,a=e.ownerState;return Object(n.a)({color:r.palette.text.secondary},r.typography.caption,(t={textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0},Object(l.a)(t,"&.".concat(ce.disabled),{color:r.palette.text.disabled}),Object(l.a)(t,"&.".concat(ce.error),{color:r.palette.error.main}),t),"small"===a.size&&{marginTop:4},a.contained&&{marginLeft:14,marginRight:14})})),de=i.forwardRef((function(e,t){var r=Object(f.a)({props:e,name:"MuiFormHelperText"}),i=r.children,c=r.className,u=r.component,d=void 0===u?"p":u,l=Object(a.a)(r,ue),h=Object(M.a)(),p=Object(D.a)({props:r,muiFormControl:h,states:["variant","size","disabled","error","filled","focused","required"]}),b=Object(n.a)({},r,{component:d,contained:"filled"===p.variant||"outlined"===p.variant,variant:p.variant,size:p.size,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),m=function(e){var t=e.classes,r=e.contained,n=e.size,a=e.disabled,i=e.error,o=e.filled,c=e.focused,u=e.required,f={root:["root",a&&"disabled",i&&"error",n&&"size".concat(Object(Q.a)(n)),r&&"contained",c&&"focused",o&&"filled",u&&"required"]};return Object(s.a)(f,oe,t)}(b);return Object(w.jsx)(fe,Object(n.a)({as:d,ownerState:b,className:Object(o.default)(m.root,c),ref:t},l,{children:" "===i?se||(se=Object(w.jsx)("span",{className:"notranslate",children:"\u200b"})):i}))})),le=r(876),he=(r(1062),r(1671)),pe=he.a,be=r(4135);function me(e){var t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}var ge=me,ve=r(122),ye=r(438),Ae=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function we(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function xe(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function Ee(e,t){if(void 0===t)return!0;var r=e.innerText;return void 0===r&&(r=e.textContent),0!==(r=r.trim().toLowerCase()).length&&(t.repeating?r[0]===t.keys[0]:0===r.indexOf(t.keys.join("")))}function _e(e,t,r,n,a,i){for(var o=!1,s=a(e,t,!!t&&r);s;){if(s===e.firstChild){if(o)return!1;o=!0}var c=!n&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&Ee(s,i)&&!c)return s.focus(),!0;s=a(e,s,r)}return!1}var Ce=i.forwardRef((function(e,t){var r=e.actions,o=e.autoFocus,s=void 0!==o&&o,c=e.autoFocusItem,u=void 0!==c&&c,f=e.children,d=e.className,l=e.disabledItemsFocusable,h=void 0!==l&&l,p=e.disableListWrap,b=void 0!==p&&p,m=e.onKeyDown,g=e.variant,v=void 0===g?"selectedMenu":g,y=Object(a.a)(e,Ae),A=i.useRef(null),x=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Object(ye.a)((function(){s&&A.current.focus()}),[s]),i.useImperativeHandle(r,(function(){return{adjustStyleForScrollbar:function(e,t){var r=!A.current.style.width;if(e.clientHeight0&&(o-a.lastTime>500?(a.keys=[],a.repeating=!0,a.previousKeyMatched=!0):a.repeating&&i!==a.keys[0]&&(a.repeating=!1)),a.lastTime=o,a.keys.push(i);var s=n&&!a.repeating&&Ee(n,a);a.previousKeyMatched&&(s||_e(t,n,!1,h,we,a))?e.preventDefault():a.previousKeyMatched=!1}m&&m(e)},tabIndex:s?0:-1},y,{children:C}))})),ke=r(4134),Be=r(4106).a,Ie=r(4105),Se=Ie.a,Oe=r(4109),Me=r(867);function De(e){return Object(m.a)("MuiModal",e)}Object(g.a)("MuiModal",["root","hidden"]);var Te=r(49),Fe=r(100),Re=r(1129),Pe=r(1686),Ne=r(4107),je=r(4108),Le=r(1),Ue=r(2);function Qe(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Ge(e){return parseInt(Object(Ie.a)(e).getComputedStyle(e).paddingRight,10)||0}function He(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4?arguments[4]:void 0,i=[t,r].concat(Object(h.a)(n)),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){-1===i.indexOf(e)&&-1===o.indexOf(e.tagName)&&Qe(e,a)}))}function ze(e,t){var r=-1;return e.some((function(e,n){return!!t(e)&&(r=n,!0)})),r}function qe(e,t){var r=[],n=e.container;if(!t.disableScrollLock){if(function(e){var t=Object(he.a)(e);return t.body===e?Object(Ie.a)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(n)){var a=me(Object(he.a)(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight="".concat(Ge(n)+a,"px");var i=Object(he.a)(n).querySelectorAll(".mui-fixed");[].forEach.call(i,(function(e){r.push({value:e.style.paddingRight,property:"padding-right",el:e}),e.style.paddingRight="".concat(Ge(e)+a,"px")}))}var o=n.parentElement,s=Object(Ie.a)(n),c="HTML"===(null==o?void 0:o.nodeName)&&"scroll"===s.getComputedStyle(o).overflowY?o:n;r.push({value:c.style.overflow,property:"overflow",el:c},{value:c.style.overflowX,property:"overflow-x",el:c},{value:c.style.overflowY,property:"overflow-y",el:c}),c.style.overflow="hidden"}return function(){r.forEach((function(e){var t=e.value,r=e.el,n=e.property;t?r.style.setProperty(n,t):r.style.removeProperty(n)}))}}var Ke=function(){function e(){Object(Le.a)(this,e),this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}return Object(Ue.a)(e,[{key:"add",value:function(e,t){var r=this.modals.indexOf(e);if(-1!==r)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Qe(e.modalRef,!1);var n=function(e){var t=[];return[].forEach.call(e.children,(function(e){"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);He(t,e.mount,e.modalRef,n,!0);var a=ze(this.containers,(function(e){return e.container===t}));return-1!==a?(this.containers[a].modals.push(e),r):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:n}),r)}},{key:"mount",value:function(e,t){var r=ze(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),n=this.containers[r];n.restore||(n.restore=qe(n,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var r=ze(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),n=this.containers[r];if(n.modals.splice(n.modals.indexOf(e),1),this.modals.splice(t,1),0===n.modals.length)n.restore&&n.restore(),e.modalRef&&Qe(e.modalRef,!0),He(n.container,e.mount,e.modalRef,n.hiddenSiblings,!1),this.containers.splice(r,1);else{var a=n.modals[n.modals.length-1];a.modalRef&&Qe(a.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}(),Ve=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function We(e){var t=[],r=[];return Array.from(e.querySelectorAll(Ve)).forEach((function(e,n){var a=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==a&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;var t=function(t){return e.ownerDocument.querySelector('input[type="radio"]'.concat(t))},r=t('[name="'.concat(e.name,'"]:checked'));return r||(r=t('[name="'.concat(e.name,'"]'))),r!==e}(e))}(e)&&(0===a?t.push(e):r.push({documentOrder:n,tabIndex:a,node:e}))})),r.sort((function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex})).map((function(e){return e.node})).concat(t)}function Ye(){return!0}var Je=function(e){var t=e.children,r=e.disableAutoFocus,n=void 0!==r&&r,a=e.disableEnforceFocus,o=void 0!==a&&a,s=e.disableRestoreFocus,c=void 0!==s&&s,u=e.getTabbable,f=void 0===u?We:u,d=e.isEnabled,l=void 0===d?Ye:d,h=e.open,p=i.useRef(),b=i.useRef(null),m=i.useRef(null),g=i.useRef(null),v=i.useRef(null),y=i.useRef(!1),A=i.useRef(null),x=Object(Re.a)(t.ref,A),E=i.useRef(null);i.useEffect((function(){h&&A.current&&(y.current=!n)}),[n,h]),i.useEffect((function(){if(h&&A.current){var e=Object(he.a)(A.current);return A.current.contains(e.activeElement)||(A.current.hasAttribute("tabIndex")||A.current.setAttribute("tabIndex",-1),y.current&&A.current.focus()),function(){c||(g.current&&g.current.focus&&(p.current=!0,g.current.focus()),g.current=null)}}}),[h]),i.useEffect((function(){if(h&&A.current){var e=Object(he.a)(A.current),t=function(t){var r=A.current;if(null!==r)if(e.hasFocus()&&!o&&l()&&!p.current){if(!r.contains(e.activeElement)){if(t&&v.current!==t.target||e.activeElement!==v.current)v.current=null;else if(null!==v.current)return;if(!y.current)return;var n=[];if(e.activeElement!==b.current&&e.activeElement!==m.current||(n=f(A.current)),n.length>0){var a,i,s=Boolean((null==(a=E.current)?void 0:a.shiftKey)&&"Tab"===(null==(i=E.current)?void 0:i.key)),c=n[0],u=n[n.length-1];s?u.focus():c.focus()}else r.focus()}}else p.current=!1},r=function(t){E.current=t,!o&&l()&&"Tab"===t.key&&e.activeElement===A.current&&t.shiftKey&&(p.current=!0,m.current.focus())};e.addEventListener("focusin",t),e.addEventListener("keydown",r,!0);var n=setInterval((function(){"BODY"===e.activeElement.tagName&&t()}),50);return function(){clearInterval(n),e.removeEventListener("focusin",t),e.removeEventListener("keydown",r,!0)}}}),[n,o,c,l,h,f]);var _=function(e){null===g.current&&(g.current=e.relatedTarget),y.current=!0};return Object(w.jsxs)(i.Fragment,{children:[Object(w.jsx)("div",{tabIndex:0,onFocus:_,ref:b,"data-test":"sentinelStart"}),i.cloneElement(t,{ref:x,onFocus:function(e){null===g.current&&(g.current=e.relatedTarget),y.current=!0,v.current=e.target;var r=t.props.onFocus;r&&r(e)}}),Object(w.jsx)("div",{tabIndex:0,onFocus:_,ref:m,"data-test":"sentinelEnd"})]})},Xe=["BackdropComponent","BackdropProps","children","classes","className","closeAfterTransition","component","components","componentsProps","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","theme","onTransitionEnter","onTransitionExited"];var Ze=new Ke,$e=i.forwardRef((function(e,t){var r=e.BackdropComponent,n=e.BackdropProps,a=e.children,c=e.classes,u=e.className,f=e.closeAfterTransition,d=void 0!==f&&f,l=e.component,h=void 0===l?"div":l,p=e.components,b=void 0===p?{}:p,m=e.componentsProps,g=void 0===m?{}:m,v=e.container,y=e.disableAutoFocus,A=void 0!==y&&y,x=e.disableEnforceFocus,E=void 0!==x&&x,_=e.disableEscapeKeyDown,C=void 0!==_&&_,k=e.disablePortal,B=void 0!==k&&k,I=e.disableRestoreFocus,S=void 0!==I&&I,O=e.disableScrollLock,M=void 0!==O&&O,D=e.hideBackdrop,T=void 0!==D&&D,F=e.keepMounted,R=void 0!==F&&F,P=e.manager,N=void 0===P?Ze:P,j=e.onBackdropClick,L=e.onClose,U=e.onKeyDown,Q=e.open,G=e.theme,H=e.onTransitionEnter,z=e.onTransitionExited,q=Object(Fe.a)(e,Xe),K=i.useState(!0),V=Object(Z.a)(K,2),W=V[0],Y=V[1],J=i.useRef({}),X=i.useRef(null),$=i.useRef(null),ee=Object(Re.a)($,t),te=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(e),re=function(){return J.current.modalRef=$.current,J.current.mountNode=X.current,J.current},ne=function(){N.mount(re(),{disableScrollLock:M}),$.current.scrollTop=0},ae=Object(Pe.a)((function(){var e=function(e){return"function"===typeof e?e():e}(v)||Object(he.a)(X.current).body;N.add(re(),e),$.current&&ne()})),ie=i.useCallback((function(){return N.isTopModal(re())}),[N]),oe=Object(Pe.a)((function(e){X.current=e,e&&(Q&&ie()?ne():Qe($.current,!0))})),se=i.useCallback((function(){N.remove(re())}),[N]);i.useEffect((function(){return function(){se()}}),[se]),i.useEffect((function(){Q?ae():te&&d||se()}),[Q,se,te,d,ae]);var ce=Object(Te.a)({},e,{classes:c,closeAfterTransition:d,disableAutoFocus:A,disableEnforceFocus:E,disableEscapeKeyDown:C,disablePortal:B,disableRestoreFocus:S,disableScrollLock:M,exited:W,hideBackdrop:T,keepMounted:R}),ue=function(e){var t=e.open,r=e.exited,n=e.classes,a={root:["root",!t&&r&&"hidden"]};return Object(s.a)(a,De,n)}(ce);if(!R&&!Q&&(!te||W))return null;var fe={};void 0===a.props.tabIndex&&(fe.tabIndex="-1"),te&&(fe.onEnter=Object(Ne.a)((function(){Y(!1),H&&H()}),a.props.onEnter),fe.onExited=Object(Ne.a)((function(){Y(!0),z&&z(),d&&se()}),a.props.onExited));var de=b.Root||h,le=g.root||{};return Object(w.jsx)(je.a,{ref:oe,container:v,disablePortal:B,children:Object(w.jsxs)(de,Object(Te.a)({role:"presentation"},le,!Object(Me.a)(de)&&{as:h,ownerState:Object(Te.a)({},ce,le.ownerState),theme:G},q,{ref:ee,onKeyDown:function(e){U&&U(e),"Escape"===e.key&&ie()&&(C||(e.stopPropagation(),L&&L(e,"escapeKeyDown")))},className:Object(o.default)(ue.root,le.className,u),children:[!T&&r?Object(w.jsx)(r,Object(Te.a)({"aria-hidden":!0,open:Q,onClick:function(e){e.target===e.currentTarget&&(j&&j(e),L&&L(e,"backdropClick"))}},n)):null,Object(w.jsx)(Je,{disableEnforceFocus:E,disableAutoFocus:A,disableRestoreFocus:S,isEnabled:ie,open:Q,children:i.cloneElement(a,fe)})]}))})})),et=r(3993),tt=r(313),rt=r(445),nt=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],at={entering:{opacity:1},entered:{opacity:1}},it=i.forwardRef((function(e,t){var r=Object(tt.a)(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},s=e.addEndListener,c=e.appear,u=void 0===c||c,f=e.children,d=e.easing,l=e.in,h=e.onEnter,p=e.onEntered,b=e.onEntering,m=e.onExit,g=e.onExited,v=e.onExiting,y=e.style,A=e.timeout,x=void 0===A?o:A,E=e.TransitionComponent,_=void 0===E?et.a:E,C=Object(a.a)(e,nt),k=i.useRef(null),B=Object(ve.a)(f.ref,t),I=Object(ve.a)(k,B),S=function(e){return function(t){if(e){var r=k.current;void 0===t?e(r):e(r,t)}}},O=S(b),M=S((function(e,t){Object(rt.b)(e);var n=Object(rt.a)({style:y,timeout:x,easing:d},{mode:"enter"});e.style.webkitTransition=r.transitions.create("opacity",n),e.style.transition=r.transitions.create("opacity",n),h&&h(e,t)})),D=S(p),T=S(v),F=S((function(e){var t=Object(rt.a)({style:y,timeout:x,easing:d},{mode:"exit"});e.style.webkitTransition=r.transitions.create("opacity",t),e.style.transition=r.transitions.create("opacity",t),m&&m(e)})),R=S(g);return Object(w.jsx)(_,Object(n.a)({appear:u,in:l,nodeRef:k,onEnter:M,onEntered:D,onEntering:O,onExit:F,onExited:R,onExiting:T,addEndListener:function(e){s&&s(k.current,e)},timeout:x},C,{children:function(e,t){return i.cloneElement(f,Object(n.a)({style:Object(n.a)({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},at[e],y,f.props.style),ref:I},t))}}))}));function ot(e){return Object(m.a)("MuiBackdrop",e)}Object(g.a)("MuiBackdrop",["root","invisible"]);var st=["children","component","components","componentsProps","className","invisible","open","transitionDuration","TransitionComponent"],ct=Object(u.a)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,r.invisible&&t.invisible]}})((function(e){var t=e.ownerState;return Object(n.a)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})})),ut=i.forwardRef((function(e,t){var r,i,c=Object(f.a)({props:e,name:"MuiBackdrop"}),u=c.children,d=c.component,l=void 0===d?"div":d,h=c.components,p=void 0===h?{}:h,b=c.componentsProps,m=void 0===b?{}:b,g=c.className,v=c.invisible,y=void 0!==v&&v,A=c.open,x=c.transitionDuration,E=c.TransitionComponent,_=void 0===E?it:E,C=Object(a.a)(c,st),k=Object(n.a)({},c,{component:l,invisible:y}),B=function(e){var t=e.classes,r={root:["root",e.invisible&&"invisible"]};return Object(s.a)(r,ot,t)}(k);return Object(w.jsx)(_,Object(n.a)({in:A,timeout:x},C,{children:Object(w.jsx)(ct,{"aria-hidden":!0,as:null!=(r=p.Root)?r:l,className:Object(o.default)(B.root,g),ownerState:Object(n.a)({},k,null==(i=m.root)?void 0:i.ownerState),classes:B,ref:t,children:u})}))})),ft=["BackdropComponent","closeAfterTransition","children","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted"],dt=Object(u.a)("div",{name:"MuiModal",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,!r.open&&r.exited&&t.hidden]}})((function(e){var t=e.theme,r=e.ownerState;return Object(n.a)({position:"fixed",zIndex:t.zIndex.modal,right:0,bottom:0,top:0,left:0},!r.open&&r.exited&&{visibility:"hidden"})})),lt=Object(u.a)(ut,{name:"MuiModal",slot:"Backdrop",overridesResolver:function(e,t){return t.backdrop}})({zIndex:-1}),ht=i.forwardRef((function(e,t){var r,o=Object(f.a)({name:"MuiModal",props:e}),s=o.BackdropComponent,c=void 0===s?lt:s,u=o.closeAfterTransition,d=void 0!==u&&u,l=o.children,h=o.components,p=void 0===h?{}:h,b=o.componentsProps,m=void 0===b?{}:b,g=o.disableAutoFocus,v=void 0!==g&&g,y=o.disableEnforceFocus,A=void 0!==y&&y,x=o.disableEscapeKeyDown,E=void 0!==x&&x,_=o.disablePortal,C=void 0!==_&&_,k=o.disableRestoreFocus,B=void 0!==k&&k,I=o.disableScrollLock,S=void 0!==I&&I,O=o.hideBackdrop,M=void 0!==O&&O,D=o.keepMounted,T=void 0!==D&&D,F=Object(a.a)(o,ft),R=i.useState(!0),P=Object(Z.a)(R,2),N=P[0],j=P[1],L={closeAfterTransition:d,disableAutoFocus:v,disableEnforceFocus:A,disableEscapeKeyDown:E,disablePortal:C,disableRestoreFocus:B,disableScrollLock:S,hideBackdrop:M,keepMounted:T},U=function(e){return e.classes}(Object(n.a)({},o,L,{exited:N}));return Object(w.jsx)($e,Object(n.a)({components:Object(n.a)({Root:dt},p),componentsProps:{root:Object(n.a)({},m.root,(!p.Root||!Object(Me.a)(p.Root))&&{ownerState:Object(n.a)({},null==(r=m.root)?void 0:r.ownerState)})},BackdropComponent:c,onTransitionEnter:function(){return j(!1)},onTransitionExited:function(){return j(!0)},ref:t},F,{classes:U},L,{children:l}))}));function pt(e){return Object(m.a)("MuiPopover",e)}Object(g.a)("MuiPopover",["root","paper"]);var bt=["onEntering"],mt=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function gt(e,t){var r=0;return"number"===typeof t?r=t:"center"===t?r=e.height/2:"bottom"===t&&(r=e.height),r}function vt(e,t){var r=0;return"number"===typeof t?r=t:"center"===t?r=e.width/2:"right"===t&&(r=e.width),r}function yt(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function At(e){return"function"===typeof e?e():e}var wt=Object(u.a)(ht,{name:"MuiPopover",slot:"Root",overridesResolver:function(e,t){return t.root}})({}),xt=Object(u.a)(ke.a,{name:"MuiPopover",slot:"Paper",overridesResolver:function(e,t){return t.paper}})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Et=i.forwardRef((function(e,t){var r=Object(f.a)({props:e,name:"MuiPopover"}),c=r.action,u=r.anchorEl,d=r.anchorOrigin,l=void 0===d?{vertical:"top",horizontal:"left"}:d,h=r.anchorPosition,p=r.anchorReference,b=void 0===p?"anchorEl":p,m=r.children,g=r.className,v=r.container,y=r.elevation,A=void 0===y?8:y,x=r.marginThreshold,E=void 0===x?16:x,_=r.open,C=r.PaperProps,k=void 0===C?{}:C,B=r.transformOrigin,I=void 0===B?{vertical:"top",horizontal:"left"}:B,S=r.TransitionComponent,O=void 0===S?Oe.a:S,M=r.transitionDuration,D=void 0===M?"auto":M,T=r.TransitionProps,F=(void 0===T?{}:T).onEntering,R=Object(a.a)(r.TransitionProps,bt),P=Object(a.a)(r,mt),N=i.useRef(),j=Object(ve.a)(N,k.ref),L=Object(n.a)({},r,{anchorOrigin:l,anchorReference:b,elevation:A,marginThreshold:E,PaperProps:k,transformOrigin:I,TransitionComponent:O,transitionDuration:D,TransitionProps:R}),U=function(e){var t=e.classes;return Object(s.a)({root:["root"],paper:["paper"]},pt,t)}(L),Q=i.useCallback((function(){if("anchorPosition"===b)return h;var e=At(u),t=(e&&1===e.nodeType?e:pe(N.current).body).getBoundingClientRect();return{top:t.top+gt(t,l.vertical),left:t.left+vt(t,l.horizontal)}}),[u,l.horizontal,l.vertical,h,b]),G=i.useCallback((function(e){return{vertical:gt(e,I.vertical),horizontal:vt(e,I.horizontal)}}),[I.horizontal,I.vertical]),H=i.useCallback((function(e){var t={width:e.offsetWidth,height:e.offsetHeight},r=G(t);if("none"===b)return{top:null,left:null,transformOrigin:yt(r)};var n=Q(),a=n.top-r.vertical,i=n.left-r.horizontal,o=a+t.height,s=i+t.width,c=Se(At(u)),f=c.innerHeight-E,d=c.innerWidth-E;if(af){var h=o-f;a-=h,r.vertical+=h}if(id){var m=s-d;i-=m,r.horizontal+=m}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(i),"px"),transformOrigin:yt(r)}}),[u,b,Q,G,E]),z=i.useCallback((function(){var e=N.current;if(e){var t=H(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[H]);i.useEffect((function(){_&&z()})),i.useImperativeHandle(c,(function(){return _?{updatePosition:function(){z()}}:null}),[_,z]),i.useEffect((function(){if(_){var e=Be((function(){z()})),t=Se(u);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}}),[u,_,z]);var q=D;"auto"!==D||O.muiSupportAuto||(q=void 0);var K=v||(u?pe(At(u)).body:void 0);return Object(w.jsx)(wt,Object(n.a)({BackdropProps:{invisible:!0},className:Object(o.default)(U.root,g),container:K,open:_,ref:t,ownerState:L},P,{children:Object(w.jsx)(O,Object(n.a)({appear:!0,in:_,onEntering:function(e,t){F&&F(e,t),z()},timeout:q},R,{children:Object(w.jsx)(xt,Object(n.a)({elevation:A},k,{ref:j,className:Object(o.default)(U.paper,k.className),children:m}))}))}))}));function _t(e){return Object(m.a)("MuiMenu",e)}Object(g.a)("MuiMenu",["root","paper","list"]);var Ct=["onEntering"],kt=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],Bt={vertical:"top",horizontal:"right"},It={vertical:"top",horizontal:"left"},St=Object(u.a)(Et,{shouldForwardProp:function(e){return Object(u.b)(e)||"classes"===e},name:"MuiMenu",slot:"Root",overridesResolver:function(e,t){return t.root}})({}),Ot=Object(u.a)(ke.a,{name:"MuiMenu",slot:"Paper",overridesResolver:function(e,t){return t.paper}})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Mt=Object(u.a)(Ce,{name:"MuiMenu",slot:"List",overridesResolver:function(e,t){return t.list}})({outline:0}),Dt=i.forwardRef((function(e,t){var r=Object(f.a)({props:e,name:"MuiMenu"}),c=r.autoFocus,u=void 0===c||c,d=r.children,l=r.disableAutoFocusItem,h=void 0!==l&&l,p=r.MenuListProps,b=void 0===p?{}:p,m=r.onClose,g=r.open,v=r.PaperProps,y=void 0===v?{}:v,A=r.PopoverClasses,x=r.transitionDuration,E=void 0===x?"auto":x,_=r.TransitionProps,C=(void 0===_?{}:_).onEntering,k=r.variant,B=void 0===k?"selectedMenu":k,I=Object(a.a)(r.TransitionProps,Ct),S=Object(a.a)(r,kt),O=Object(tt.a)(),M="rtl"===O.direction,D=Object(n.a)({},r,{autoFocus:u,disableAutoFocusItem:h,MenuListProps:b,onEntering:C,PaperProps:y,transitionDuration:E,TransitionProps:I,variant:B}),T=function(e){var t=e.classes;return Object(s.a)({root:["root"],paper:["paper"],list:["list"]},_t,t)}(D),F=u&&!h&&g,R=i.useRef(null),P=-1;return i.Children.map(d,(function(e,t){i.isValidElement(e)&&(e.props.disabled||("selectedMenu"===B&&e.props.selected||-1===P)&&(P=t))})),Object(w.jsx)(St,Object(n.a)({classes:A,onClose:m,anchorOrigin:{vertical:"bottom",horizontal:M?"right":"left"},transformOrigin:M?Bt:It,PaperProps:Object(n.a)({component:Ot},y,{classes:Object(n.a)({},y.classes,{root:T.paper})}),className:T.root,open:g,ref:t,transitionDuration:E,TransitionProps:Object(n.a)({onEntering:function(e,t){R.current&&R.current.adjustStyleForScrollbar(e,O),C&&C(e,t)}},I),ownerState:D},S,{children:Object(w.jsx)(Mt,Object(n.a)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),m&&m(e,"tabKeyDown"))},actions:R,autoFocus:u&&(-1===P||h),autoFocusItem:F,variant:B},b,{className:Object(o.default)(T.list,b.className),children:d}))}))}));function Tt(e){return Object(m.a)("MuiNativeSelect",e)}var Ft=Object(g.a)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),Rt=["className","disabled","IconComponent","inputRef","variant"],Pt=function(e){var t,r=e.ownerState,a=e.theme;return Object(n.a)((t={MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{backgroundColor:"light"===a.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"}},Object(l.a)(t,"&.".concat(Ft.disabled),{cursor:"default"}),Object(l.a)(t,"&[multiple]",{height:"auto"}),Object(l.a)(t,"&:not([multiple]) option, &:not([multiple]) optgroup",{backgroundColor:a.palette.background.paper}),Object(l.a)(t,"&&&",{paddingRight:24,minWidth:16}),t),"filled"===r.variant&&{"&&&":{paddingRight:32}},"outlined"===r.variant&&{borderRadius:a.shape.borderRadius,"&:focus":{borderRadius:a.shape.borderRadius},"&&&":{paddingRight:32}})},Nt=Object(u.a)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:u.b,overridesResolver:function(e,t){var r=e.ownerState;return[t.select,t[r.variant],Object(l.a)({},"&.".concat(Ft.multiple),t.multiple)]}})(Pt),jt=function(e){var t=e.ownerState,r=e.theme;return Object(n.a)(Object(l.a)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:r.palette.action.active},"&.".concat(Ft.disabled),{color:r.palette.action.disabled}),t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},Lt=Object(u.a)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:function(e,t){var r=e.ownerState;return[t.icon,r.variant&&t["icon".concat(Object(Q.a)(r.variant))],r.open&&t.iconOpen]}})(jt),Ut=i.forwardRef((function(e,t){var r=e.className,c=e.disabled,u=e.IconComponent,f=e.inputRef,d=e.variant,l=void 0===d?"standard":d,h=Object(a.a)(e,Rt),p=Object(n.a)({},e,{disabled:c,variant:l}),b=function(e){var t=e.classes,r=e.variant,n=e.disabled,a=e.multiple,i=e.open,o={select:["select",r,n&&"disabled",a&&"multiple"],icon:["icon","icon".concat(Object(Q.a)(r)),i&&"iconOpen",n&&"disabled"]};return Object(s.a)(o,Tt,t)}(p);return Object(w.jsxs)(i.Fragment,{children:[Object(w.jsx)(Nt,Object(n.a)({ownerState:p,className:Object(o.default)(b.select,r),disabled:c,ref:f||t},h)),e.multiple?null:Object(w.jsx)(Lt,{as:u,ownerState:p,className:b.icon})]})})),Qt=r(496);function Gt(e){return Object(m.a)("MuiSelect",e)}var Ht,zt=Object(g.a)("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),qt=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Kt=Object(u.a)("div",{name:"MuiSelect",slot:"Select",overridesResolver:function(e,t){var r=e.ownerState;return[Object(l.a)({},"&.".concat(zt.select),t.select),Object(l.a)({},"&.".concat(zt.select),t[r.variant]),Object(l.a)({},"&.".concat(zt.multiple),t.multiple)]}})(Pt,Object(l.a)({},"&.".concat(zt.select),{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"})),Vt=Object(u.a)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:function(e,t){var r=e.ownerState;return[t.icon,r.variant&&t["icon".concat(Object(Q.a)(r.variant))],r.open&&t.iconOpen]}})(jt),Wt=Object(u.a)("input",{shouldForwardProp:function(e){return Object(u.c)(e)&&"classes"!==e},name:"MuiSelect",slot:"NativeInput",overridesResolver:function(e,t){return t.nativeInput}})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Yt(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function Jt(e){return null==e||"string"===typeof e&&!e.trim()}var Xt,Zt,$t=i.forwardRef((function(e,t){var r=e["aria-describedby"],c=e["aria-label"],u=e.autoFocus,f=e.autoWidth,d=e.children,l=e.className,h=e.defaultOpen,p=e.defaultValue,b=e.disabled,m=e.displayEmpty,g=e.IconComponent,v=e.inputRef,y=e.labelId,A=e.MenuProps,x=void 0===A?{}:A,E=e.multiple,_=e.name,C=e.onBlur,k=e.onChange,B=e.onClose,I=e.onFocus,S=e.onOpen,O=e.open,M=e.readOnly,D=e.renderValue,T=e.SelectDisplayProps,F=void 0===T?{}:T,R=e.tabIndex,P=e.value,N=e.variant,j=void 0===N?"standard":N,L=Object(a.a)(e,qt),U=Object(Qt.a)({controlled:P,default:p,name:"Select"}),G=Object(Z.a)(U,2),H=G[0],z=G[1],q=Object(Qt.a)({controlled:O,default:h,name:"Select"}),K=Object(Z.a)(q,2),V=K[0],W=K[1],Y=i.useRef(null),J=i.useRef(null),X=i.useState(null),ee=Object(Z.a)(X,2),te=ee[0],re=ee[1],ne=i.useRef(null!=O).current,ae=i.useState(),ie=Object(Z.a)(ae,2),oe=ie[0],se=ie[1],ce=Object(ve.a)(t,v),ue=i.useCallback((function(e){J.current=e,e&&re(e)}),[]);i.useImperativeHandle(ce,(function(){return{focus:function(){J.current.focus()},node:Y.current,value:H}}),[H]),i.useEffect((function(){h&&V&&te&&!ne&&(se(f?null:te.clientWidth),J.current.focus())}),[te,f]),i.useEffect((function(){u&&J.current.focus()}),[u]),i.useEffect((function(){if(y){var e=pe(J.current).getElementById(y);if(e){var t=function(){getSelection().isCollapsed&&J.current.focus()};return e.addEventListener("click",t),function(){e.removeEventListener("click",t)}}}}),[y]);var fe,de,he=function(e,t){e?S&&S(t):B&&B(t),ne||(se(f?null:te.clientWidth),W(e))},be=i.Children.toArray(d),me=function(e){return function(t){var r;if(t.currentTarget.hasAttribute("tabindex")){if(E){r=Array.isArray(H)?H.slice():[];var n=H.indexOf(e.props.value);-1===n?r.push(e.props.value):r.splice(n,1)}else r=e.props.value;if(e.props.onClick&&e.props.onClick(t),H!==r&&(z(r),k)){var a=t.nativeEvent||t,i=new a.constructor(a.type,a);Object.defineProperty(i,"target",{writable:!0,value:{value:r,name:_}}),k(i,e)}E||he(!1,t)}}},ge=null!==te&&V;delete L["aria-invalid"];var ye=[],Ae=!1;(Object($.b)({value:H})||m)&&(D?fe=D(H):Ae=!0);var we=be.map((function(e,t,r){if(!i.isValidElement(e))return null;var n;if(E){if(!Array.isArray(H))throw new Error(Object(le.a)(2));(n=H.some((function(t){return Yt(t,e.props.value)})))&&Ae&&ye.push(e.props.children)}else(n=Yt(H,e.props.value))&&Ae&&(de=e.props.children);if(n&&!0,void 0===e.props.value)return i.cloneElement(e,{"aria-readonly":!0,role:"option"});return i.cloneElement(e,{"aria-selected":n?"true":"false",onClick:me(e),onKeyUp:function(t){" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:void 0===r[0].props.value||!0===r[0].props.disabled?function(){if(H)return n;var t=r.find((function(e){return void 0!==e.props.value&&!0!==e.props.disabled}));return e===t||n}():n,value:void 0,"data-value":e.props.value})}));Ae&&(fe=E?0===ye.length?null:ye.reduce((function(e,t,r){return e.push(t),r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=t.pulsate,a=void 0!==n&&n,i=t.center,o=void 0===i?s||t.pulsate:i,c=t.fakeElement,u=void 0!==c&&c;if("mousedown"===e.type&&_.current)_.current=!1;else{"touchstart"===e.type&&(_.current=!0);var f,d,l,h=u?null:B.current,p=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(o||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)f=Math.round(p.width/2),d=Math.round(p.height/2);else{var b=e.touches?e.touches[0]:e,m=b.clientX,g=b.clientY;f=Math.round(m-p.left),d=Math.round(g-p.top)}if(o)(l=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(l+=1);else{var v=2*Math.max(Math.abs((h?h.clientWidth:0)-f),f)+2,y=2*Math.max(Math.abs((h?h.clientHeight:0)-d),d)+2;l=Math.sqrt(Math.pow(v,2)+Math.pow(y,2))}e.touches?null===k.current&&(k.current=function(){I({pulsate:a,rippleX:f,rippleY:d,rippleSize:l,cb:r})},C.current=setTimeout((function(){k.current&&(k.current(),k.current=null)}),80)):I({pulsate:a,rippleX:f,rippleY:d,rippleSize:l,cb:r})}}),[s,I]),O=o.useCallback((function(){S({},{pulsate:!0})}),[S]),M=o.useCallback((function(e,t){if(clearTimeout(C.current),"touchend"===e.type&&k.current)return k.current(),k.current=null,void(C.current=setTimeout((function(){M(e,t)})));k.current=null,v((function(e){return e.length>0?e.slice(1):e})),x.current=t}),[]);return o.useImperativeHandle(t,(function(){return{pulsate:O,start:S,stop:M}}),[O,S,M]),Object(E.jsx)(U,Object(i.a)({className:Object(l.default)(u.root,R.root,f),ref:B},h,{children:Object(E.jsx)(w.a,{component:null,exit:!0,children:g})}))})),H=G;function z(e){return Object(C.a)("MuiButtonBase",e)}var q,K=Object(k.a)("MuiButtonBase",["root","disabled","focusVisible"]),V=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],W=Object(f.a)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:function(e,t){return t.root}})((q={display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"}},Object(n.a)(q,"&.".concat(K.disabled),{pointerEvents:"none",cursor:"default"}),Object(n.a)(q,"@media print",{colorAdjust:"exact"}),q)),Y=o.forwardRef((function(e,t){var r=Object(d.a)({props:e,name:"MuiButtonBase"}),n=r.action,s=r.centerRipple,c=void 0!==s&&s,f=r.children,h=r.className,p=r.component,y=void 0===p?"button":p,A=r.disabled,w=void 0!==A&&A,x=r.disableRipple,_=void 0!==x&&x,C=r.disableTouchRipple,k=void 0!==C&&C,B=r.focusRipple,I=void 0!==B&&B,S=r.LinkComponent,O=void 0===S?"a":S,M=r.onBlur,D=r.onClick,T=r.onContextMenu,F=r.onDragLeave,R=r.onFocus,P=r.onFocusVisible,N=r.onKeyDown,j=r.onKeyUp,L=r.onMouseDown,U=r.onMouseLeave,Q=r.onMouseUp,G=r.onTouchEnd,q=r.onTouchMove,K=r.onTouchStart,Y=r.tabIndex,J=void 0===Y?0:Y,X=r.TouchRippleProps,Z=r.touchRippleRef,$=r.type,ee=Object(a.a)(r,V),te=o.useRef(null),re=o.useRef(null),ne=Object(m.a)(re,Z),ae=Object(v.a)(),ie=ae.isFocusVisibleRef,oe=ae.onFocus,se=ae.onBlur,ce=ae.ref,ue=o.useState(!1),fe=Object(b.a)(ue,2),de=fe[0],le=fe[1];w&&de&&le(!1),o.useImperativeHandle(n,(function(){return{focusVisible:function(){le(!0),te.current.focus()}}}),[]);var he=o.useState(!1),pe=Object(b.a)(he,2),be=pe[0],me=pe[1];o.useEffect((function(){me(!0)}),[]);var ge=be&&!_&&!w;function ve(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k;return Object(g.a)((function(n){return t&&t(n),!r&&re.current&&re.current[e](n),!0}))}o.useEffect((function(){de&&I&&!_&&be&&re.current.pulsate()}),[_,I,de,be]);var ye=ve("start",L),Ae=ve("stop",T),we=ve("stop",F),xe=ve("stop",Q),Ee=ve("stop",(function(e){de&&e.preventDefault(),U&&U(e)})),_e=ve("start",K),Ce=ve("stop",G),ke=ve("stop",q),Be=ve("stop",(function(e){se(e),!1===ie.current&&le(!1),M&&M(e)}),!1),Ie=Object(g.a)((function(e){te.current||(te.current=e.currentTarget),oe(e),!0===ie.current&&(le(!0),P&&P(e)),R&&R(e)})),Se=function(){var e=te.current;return y&&"button"!==y&&!("A"===e.tagName&&e.href)},Oe=o.useRef(!1),Me=Object(g.a)((function(e){I&&!Oe.current&&de&&re.current&&" "===e.key&&(Oe.current=!0,re.current.stop(e,(function(){re.current.start(e)}))),e.target===e.currentTarget&&Se()&&" "===e.key&&e.preventDefault(),N&&N(e),e.target===e.currentTarget&&Se()&&"Enter"===e.key&&!w&&(e.preventDefault(),D&&D(e))})),De=Object(g.a)((function(e){I&&" "===e.key&&re.current&&de&&!e.defaultPrevented&&(Oe.current=!1,re.current.stop(e,(function(){re.current.pulsate(e)}))),j&&j(e),D&&e.target===e.currentTarget&&Se()&&" "===e.key&&!e.defaultPrevented&&D(e)})),Te=y;"button"===Te&&(ee.href||ee.to)&&(Te=O);var Fe={};"button"===Te?(Fe.type=void 0===$?"button":$,Fe.disabled=w):(ee.href||ee.to||(Fe.role="button"),w&&(Fe["aria-disabled"]=w));var Re=Object(m.a)(ce,te),Pe=Object(m.a)(t,Re);var Ne=Object(i.a)({},r,{centerRipple:c,component:y,disabled:w,disableRipple:_,disableTouchRipple:k,focusRipple:I,tabIndex:J,focusVisible:de}),je=function(e){var t=e.disabled,r=e.focusVisible,n=e.focusVisibleClassName,a=e.classes,i={root:["root",t&&"disabled",r&&"focusVisible"]},o=Object(u.a)(i,z,a);return r&&n&&(o.root+=" ".concat(n)),o}(Ne);return Object(E.jsxs)(W,Object(i.a)({as:Te,className:Object(l.default)(je.root,h),ownerState:Ne,onBlur:Be,onClick:D,onContextMenu:Ae,onFocus:Ie,onKeyDown:Me,onKeyUp:De,onMouseDown:ye,onMouseLeave:Ee,onMouseUp:xe,onDragLeave:we,onTouchEnd:Ce,onTouchMove:ke,onTouchStart:_e,ref:Pe,tabIndex:w?-1:J,type:$},Fe,ee,{children:[f,ge?Object(E.jsx)(H,Object(i.a)({ref:ne,center:c},X)):null]}))})),J=Y;function X(e){return Object(C.a)("MuiButton",e)}var Z=Object(k.a)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","contained","containedInherit","containedPrimary","containedSecondary","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var $=o.createContext({}),ee=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],te=function(e){return Object(i.a)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}})},re=Object(f.a)(J,{shouldForwardProp:function(e){return Object(f.b)(e)||"classes"===e},name:"MuiButton",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t[r.variant],t["".concat(r.variant).concat(Object(s.a)(r.color))],t["size".concat(Object(s.a)(r.size))],t["".concat(r.variant,"Size").concat(Object(s.a)(r.size))],"inherit"===r.color&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth]}})((function(e){var t,r,a,o=e.theme,s=e.ownerState;return Object(i.a)({},o.typography.button,(t={minWidth:64,padding:"6px 16px",borderRadius:(o.vars||o).shape.borderRadius,transition:o.transitions.create(["background-color","box-shadow","border-color","color"],{duration:o.transitions.duration.short}),"&:hover":Object(i.a)({textDecoration:"none",backgroundColor:o.vars?"rgba(".concat(o.vars.palette.text.primaryChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):Object(p.a)(o.palette.text.primary,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===s.variant&&"inherit"!==s.color&&{backgroundColor:o.vars?"rgba(".concat(o.vars.palette[s.color].mainChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):Object(p.a)(o.palette[s.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===s.variant&&"inherit"!==s.color&&{border:"1px solid ".concat((o.vars||o).palette[s.color].main),backgroundColor:o.vars?"rgba(".concat(o.vars.palette[s.color].mainChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):Object(p.a)(o.palette[s.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===s.variant&&{backgroundColor:(o.vars||o).palette.grey.A100,boxShadow:(o.vars||o).shadows[4],"@media (hover: none)":{boxShadow:(o.vars||o).shadows[2],backgroundColor:(o.vars||o).palette.grey[300]}},"contained"===s.variant&&"inherit"!==s.color&&{backgroundColor:(o.vars||o).palette[s.color].dark,"@media (hover: none)":{backgroundColor:(o.vars||o).palette[s.color].main}}),"&:active":Object(i.a)({},"contained"===s.variant&&{boxShadow:(o.vars||o).shadows[8]})},Object(n.a)(t,"&.".concat(Z.focusVisible),Object(i.a)({},"contained"===s.variant&&{boxShadow:(o.vars||o).shadows[6]})),Object(n.a)(t,"&.".concat(Z.disabled),Object(i.a)({color:(o.vars||o).palette.action.disabled},"outlined"===s.variant&&{border:"1px solid ".concat((o.vars||o).palette.action.disabledBackground)},"outlined"===s.variant&&"secondary"===s.color&&{border:"1px solid ".concat((o.vars||o).palette.action.disabled)},"contained"===s.variant&&{color:(o.vars||o).palette.action.disabled,boxShadow:(o.vars||o).shadows[0],backgroundColor:(o.vars||o).palette.action.disabledBackground})),t),"text"===s.variant&&{padding:"6px 8px"},"text"===s.variant&&"inherit"!==s.color&&{color:(o.vars||o).palette[s.color].main},"outlined"===s.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===s.variant&&"inherit"!==s.color&&{color:(o.vars||o).palette[s.color].main,border:o.vars?"1px solid rgba(".concat(o.vars.palette[s.color].mainChannel," / 0.5)"):"1px solid ".concat(Object(p.a)(o.palette[s.color].main,.5))},"contained"===s.variant&&{color:o.vars?o.vars.palette.text.primary:null==(r=(a=o.palette).getContrastText)?void 0:r.call(a,o.palette.grey[300]),backgroundColor:(o.vars||o).palette.grey[300],boxShadow:(o.vars||o).shadows[2]},"contained"===s.variant&&"inherit"!==s.color&&{color:(o.vars||o).palette[s.color].contrastText,backgroundColor:(o.vars||o).palette[s.color].main},"inherit"===s.color&&{color:"inherit",borderColor:"currentColor"},"small"===s.size&&"text"===s.variant&&{padding:"4px 5px",fontSize:o.typography.pxToRem(13)},"large"===s.size&&"text"===s.variant&&{padding:"8px 11px",fontSize:o.typography.pxToRem(15)},"small"===s.size&&"outlined"===s.variant&&{padding:"3px 9px",fontSize:o.typography.pxToRem(13)},"large"===s.size&&"outlined"===s.variant&&{padding:"7px 21px",fontSize:o.typography.pxToRem(15)},"small"===s.size&&"contained"===s.variant&&{padding:"4px 10px",fontSize:o.typography.pxToRem(13)},"large"===s.size&&"contained"===s.variant&&{padding:"8px 22px",fontSize:o.typography.pxToRem(15)},s.fullWidth&&{width:"100%"})}),(function(e){var t;return e.ownerState.disableElevation&&(t={boxShadow:"none","&:hover":{boxShadow:"none"}},Object(n.a)(t,"&.".concat(Z.focusVisible),{boxShadow:"none"}),Object(n.a)(t,"&:active",{boxShadow:"none"}),Object(n.a)(t,"&.".concat(Z.disabled),{boxShadow:"none"}),t)})),ne=Object(f.a)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:function(e,t){var r=e.ownerState;return[t.startIcon,t["iconSize".concat(Object(s.a)(r.size))]]}})((function(e){var t=e.ownerState;return Object(i.a)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},te(t))})),ae=Object(f.a)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:function(e,t){var r=e.ownerState;return[t.endIcon,t["iconSize".concat(Object(s.a)(r.size))]]}})((function(e){var t=e.ownerState;return Object(i.a)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},te(t))})),ie=o.forwardRef((function(e,t){var r=o.useContext($),n=Object(h.a)(r,e),c=Object(d.a)({props:n,name:"MuiButton"}),f=c.children,p=c.color,b=void 0===p?"primary":p,m=c.component,g=void 0===m?"button":m,v=c.className,y=c.disabled,A=void 0!==y&&y,w=c.disableElevation,x=void 0!==w&&w,_=c.disableFocusRipple,C=void 0!==_&&_,k=c.endIcon,B=c.focusVisibleClassName,I=c.fullWidth,S=void 0!==I&&I,O=c.size,M=void 0===O?"medium":O,D=c.startIcon,T=c.type,F=c.variant,R=void 0===F?"text":F,P=Object(a.a)(c,ee),N=Object(i.a)({},c,{color:b,component:g,disabled:A,disableElevation:x,disableFocusRipple:C,fullWidth:S,size:M,type:T,variant:R}),j=function(e){var t=e.color,r=e.disableElevation,n=e.fullWidth,a=e.size,o=e.variant,c=e.classes,f={root:["root",o,"".concat(o).concat(Object(s.a)(t)),"size".concat(Object(s.a)(a)),"".concat(o,"Size").concat(Object(s.a)(a)),"inherit"===t&&"colorInherit",r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["startIcon","iconSize".concat(Object(s.a)(a))],endIcon:["endIcon","iconSize".concat(Object(s.a)(a))]},d=Object(u.a)(f,X,c);return Object(i.a)({},c,d)}(N),L=D&&Object(E.jsx)(ne,{className:j.startIcon,ownerState:N,children:D}),U=k&&Object(E.jsx)(ae,{className:j.endIcon,ownerState:N,children:k});return Object(E.jsxs)(re,Object(i.a)({ownerState:N,className:Object(l.default)(v,r.className),component:g,disabled:A,focusRipple:!C,focusVisibleClassName:Object(l.default)(j.focusVisible,B),ref:t,type:T},P,{classes:j,children:[L,f,U]}))}));function oe(e){return Object(C.a)("MuiCircularProgress",e)}Object(k.a)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var se,ce,ue,fe,de,le,he,pe,be=["className","color","disableShrink","size","style","thickness","value","variant"],me=44,ge=Object(x.c)(de||(de=se||(se=Object(A.a)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),ve=Object(x.c)(le||(le=ce||(ce=Object(A.a)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),ye=Object(f.a)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t[r.variant],t["color".concat(Object(s.a)(r.color))]]}})((function(e){var t=e.ownerState,r=e.theme;return Object(i.a)({display:"inline-block"},"determinate"===t.variant&&{transition:r.transitions.create("transform")},"inherit"!==t.color&&{color:r.palette[t.color].main})}),(function(e){return"indeterminate"===e.ownerState.variant&&Object(x.b)(he||(he=ue||(ue=Object(A.a)(["\n animation: "," 1.4s linear infinite;\n "]))),ge)})),Ae=Object(f.a)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:function(e,t){return t.svg}})({display:"block"}),we=Object(f.a)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:function(e,t){var r=e.ownerState;return[t.circle,t["circle".concat(Object(s.a)(r.variant))],r.disableShrink&&t.circleDisableShrink]}})((function(e){var t=e.ownerState,r=e.theme;return Object(i.a)({stroke:"currentColor"},"determinate"===t.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(function(e){var t=e.ownerState;return"indeterminate"===t.variant&&!t.disableShrink&&Object(x.b)(pe||(pe=fe||(fe=Object(A.a)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),ve)})),xe=o.forwardRef((function(e,t){var r=Object(d.a)({props:e,name:"MuiCircularProgress"}),n=r.className,o=r.color,c=void 0===o?"primary":o,f=r.disableShrink,h=void 0!==f&&f,p=r.size,b=void 0===p?40:p,m=r.style,g=r.thickness,v=void 0===g?3.6:g,y=r.value,A=void 0===y?0:y,w=r.variant,x=void 0===w?"indeterminate":w,_=Object(a.a)(r,be),C=Object(i.a)({},r,{color:c,disableShrink:h,size:b,thickness:v,value:A,variant:x}),k=function(e){var t=e.classes,r=e.variant,n=e.color,a=e.disableShrink,i={root:["root",r,"color".concat(Object(s.a)(n))],svg:["svg"],circle:["circle","circle".concat(Object(s.a)(r)),a&&"circleDisableShrink"]};return Object(u.a)(i,oe,t)}(C),B={},I={},S={};if("determinate"===x){var O=2*Math.PI*((me-v)/2);B.strokeDasharray=O.toFixed(3),S["aria-valuenow"]=Math.round(A),B.strokeDashoffset="".concat(((100-A)/100*O).toFixed(3),"px"),I.transform="rotate(-90deg)"}return Object(E.jsx)(ye,Object(i.a)({className:Object(l.default)(k.root,n),style:Object(i.a)({width:b,height:b},I,m),ownerState:C,ref:t,role:"progressbar"},S,_,{children:Object(E.jsx)(Ae,{className:k.svg,ownerState:C,viewBox:"".concat(22," ").concat(22," ").concat(me," ").concat(me),children:Object(E.jsx)(we,{className:k.circle,style:B,ownerState:C,cx:me,cy:me,r:(me-v)/2,fill:"none",strokeWidth:v})})}))}));function Ee(e){return Object(C.a)("MuiLoadingButton",e)}var _e=Object(k.a)("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),Ce=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],ke=Object(f.a)(ie,{shouldForwardProp:function(e){return function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e}(e)||"classes"===e},name:"MuiLoadingButton",slot:"Root",overridesResolver:function(e,t){return[t.root,t.startIconLoadingStart&&Object(n.a)({},"& .".concat(_e.startIconLoadingStart),t.startIconLoadingStart),t.endIconLoadingEnd&&Object(n.a)({},"& .".concat(_e.endIconLoadingEnd),t.endIconLoadingEnd)]}})((function(e){var t=e.ownerState,r=e.theme;return Object(i.a)(Object(n.a)({},"& .".concat(_e.startIconLoadingStart,", & .").concat(_e.endIconLoadingEnd),{transition:r.transitions.create(["opacity"],{duration:r.transitions.duration.short}),opacity:0}),"center"===t.loadingPosition&&Object(n.a)({transition:r.transitions.create(["background-color","box-shadow","border-color"],{duration:r.transitions.duration.short})},"&.".concat(_e.loading),{color:"transparent"}),"start"===t.loadingPosition&&t.fullWidth&&Object(n.a)({},"& .".concat(_e.startIconLoadingStart,", & .").concat(_e.endIconLoadingEnd),{transition:r.transitions.create(["opacity"],{duration:r.transitions.duration.short}),opacity:0,marginRight:-8}),"end"===t.loadingPosition&&t.fullWidth&&Object(n.a)({},"& .".concat(_e.startIconLoadingStart,", & .").concat(_e.endIconLoadingEnd),{transition:r.transitions.create(["opacity"],{duration:r.transitions.duration.short}),opacity:0,marginLeft:-8}))})),Be=Object(f.a)("div",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:function(e,t){var r=e.ownerState;return[t.loadingIndicator,t["loadingIndicator".concat(Object(s.a)(r.loadingPosition))]]}})((function(e){var t=e.theme,r=e.ownerState;return Object(i.a)({position:"absolute",visibility:"visible",display:"flex"},"start"===r.loadingPosition&&("outlined"===r.variant||"contained"===r.variant)&&{left:"small"===r.size?10:14},"start"===r.loadingPosition&&"text"===r.variant&&{left:6},"center"===r.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:t.palette.action.disabled},"end"===r.loadingPosition&&("outlined"===r.variant||"contained"===r.variant)&&{right:"small"===r.size?10:14},"end"===r.loadingPosition&&"text"===r.variant&&{right:6},"start"===r.loadingPosition&&r.fullWidth&&{position:"relative",left:-10},"end"===r.loadingPosition&&r.fullWidth&&{position:"relative",right:-10})})),Ie=o.forwardRef((function(e,t){var r=Object(d.a)({props:e,name:"MuiLoadingButton"}),n=r.children,f=r.disabled,l=void 0!==f&&f,h=r.id,p=r.loading,b=void 0!==p&&p,m=r.loadingIndicator,g=r.loadingPosition,v=void 0===g?"center":g,y=r.variant,A=void 0===y?"text":y,w=Object(a.a)(r,Ce),x=Object(c.a)(h),_=null!=m?m:Object(E.jsx)(xe,{"aria-labelledby":x,color:"inherit",size:16}),C=Object(i.a)({},r,{disabled:l,loading:b,loadingIndicator:_,loadingPosition:v,variant:A}),k=function(e){var t=e.loading,r=e.loadingPosition,n=e.classes,a={root:["root",t&&"loading"],startIcon:[t&&"startIconLoading".concat(Object(s.a)(r))],endIcon:[t&&"endIconLoading".concat(Object(s.a)(r))],loadingIndicator:["loadingIndicator",t&&"loadingIndicator".concat(Object(s.a)(r))]},o=Object(u.a)(a,Ee,n);return Object(i.a)({},n,o)}(C);return Object(E.jsx)(ke,Object(i.a)({disabled:l||b,id:x,ref:t},w,{variant:A,classes:k,ownerState:C,children:"end"===C.loadingPosition?Object(E.jsxs)(o.Fragment,{children:[n,b&&Object(E.jsx)(Be,{className:k.loadingIndicator,ownerState:C,children:_})]}):Object(E.jsxs)(o.Fragment,{children:[b&&Object(E.jsx)(Be,{className:k.loadingIndicator,ownerState:C,children:_}),n]})}))}));t.a=Ie},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(39),c=r(1684),u=r(4094),f=r(35),d=r(52),l=r(51),h=r(4134),p=r(891),b=r(1128);function m(e){return Object(p.a)("MuiAlert",e)}var g,v=Object(b.a)("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),y=r(4136),A=r(168),w=r(3),x=Object(A.a)(Object(w.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),E=Object(A.a)(Object(w.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),_=Object(A.a)(Object(w.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),C=Object(A.a)(Object(w.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),k=Object(A.a)(Object(w.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),B=["action","children","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"],I=Object(f.a)(h.a,{name:"MuiAlert",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t[r.variant],t["".concat(r.variant).concat(Object(l.a)(r.color||r.severity))]]}})((function(e){var t=e.theme,r=e.ownerState,a="light"===t.palette.mode?u.b:u.d,o="light"===t.palette.mode?u.d:u.b,s=r.color||r.severity;return Object(i.a)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},s&&"standard"===r.variant&&Object(n.a)({color:a(t.palette[s].light,.6),backgroundColor:o(t.palette[s].light,.9)},"& .".concat(v.icon),{color:"dark"===t.palette.mode?t.palette[s].main:t.palette[s].light}),s&&"outlined"===r.variant&&Object(n.a)({color:a(t.palette[s].light,.6),border:"1px solid ".concat(t.palette[s].light)},"& .".concat(v.icon),{color:"dark"===t.palette.mode?t.palette[s].main:t.palette[s].light}),s&&"filled"===r.variant&&{color:"#fff",fontWeight:t.typography.fontWeightMedium,backgroundColor:"dark"===t.palette.mode?t.palette[s].dark:t.palette[s].main})})),S=Object(f.a)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:function(e,t){return t.icon}})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),O=Object(f.a)("div",{name:"MuiAlert",slot:"Message",overridesResolver:function(e,t){return t.message}})({padding:"8px 0"}),M=Object(f.a)("div",{name:"MuiAlert",slot:"Action",overridesResolver:function(e,t){return t.action}})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),D={success:Object(w.jsx)(x,{fontSize:"inherit"}),warning:Object(w.jsx)(E,{fontSize:"inherit"}),error:Object(w.jsx)(_,{fontSize:"inherit"}),info:Object(w.jsx)(C,{fontSize:"inherit"})},T=o.forwardRef((function(e,t){var r=Object(d.a)({props:e,name:"MuiAlert"}),n=r.action,o=r.children,u=r.className,f=r.closeText,h=void 0===f?"Close":f,p=r.color,b=r.icon,v=r.iconMapping,A=void 0===v?D:v,x=r.onClose,E=r.role,_=void 0===E?"alert":E,C=r.severity,T=void 0===C?"success":C,F=r.variant,R=void 0===F?"standard":F,P=Object(a.a)(r,B),N=Object(i.a)({},r,{color:p,severity:T,variant:R}),j=function(e){var t=e.variant,r=e.color,n=e.severity,a=e.classes,i={root:["root","".concat(t).concat(Object(l.a)(r||n)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return Object(c.a)(i,m,a)}(N);return Object(w.jsxs)(I,Object(i.a)({role:_,elevation:0,ownerState:N,className:Object(s.default)(j.root,u),ref:t},P,{children:[!1!==b?Object(w.jsx)(S,{ownerState:N,className:j.icon,children:b||A[T]||D[T]}):null,Object(w.jsx)(O,{ownerState:N,className:j.message,children:o}),null!=n?Object(w.jsx)(M,{className:j.action,children:n}):null,null==n&&x?Object(w.jsx)(M,{ownerState:N,className:j.action,children:Object(w.jsx)(y.a,{size:"small","aria-label":h,title:h,color:"inherit",onClick:x,children:g||(g=Object(w.jsx)(k,{fontSize:"small"}))})}):null]}))}));t.a=T},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(1684),c=r(4094),u=r(25),f=r(39),d=r(51),l=r(35),h=r(496),p=r(260),b=r(4122),m=r(891),g=r(1128);function v(e){return Object(m.a)("PrivateSwitchBase",e)}Object(g.a)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var y=r(3),A=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],w=Object(l.a)(b.a)((function(e){var t=e.ownerState;return Object(i.a)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})})),x=Object(l.a)("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),E=o.forwardRef((function(e,t){var r=e.autoFocus,n=e.checked,o=e.checkedIcon,c=e.className,l=e.defaultChecked,b=e.disabled,m=e.disableFocusRipple,g=void 0!==m&&m,E=e.edge,_=void 0!==E&&E,C=e.icon,k=e.id,B=e.inputProps,I=e.inputRef,S=e.name,O=e.onBlur,M=e.onChange,D=e.onFocus,T=e.readOnly,F=e.required,R=e.tabIndex,P=e.type,N=e.value,j=Object(a.a)(e,A),L=Object(h.a)({controlled:n,default:Boolean(l),name:"SwitchBase",state:"checked"}),U=Object(u.a)(L,2),Q=U[0],G=U[1],H=Object(p.a)(),z=b;H&&"undefined"===typeof z&&(z=H.disabled);var q="checkbox"===P||"radio"===P,K=Object(i.a)({},e,{checked:Q,disabled:z,disableFocusRipple:g,edge:_}),V=function(e){var t=e.classes,r=e.checked,n=e.disabled,a=e.edge,i={root:["root",r&&"checked",n&&"disabled",a&&"edge".concat(Object(d.a)(a))],input:["input"]};return Object(s.a)(i,v,t)}(K);return Object(y.jsxs)(w,Object(i.a)({component:"span",className:Object(f.default)(V.root,c),centerRipple:!0,focusRipple:!g,disabled:z,tabIndex:null,role:void 0,onFocus:function(e){D&&D(e),H&&H.onFocus&&H.onFocus(e)},onBlur:function(e){O&&O(e),H&&H.onBlur&&H.onBlur(e)},ownerState:K,ref:t},j,{children:[Object(y.jsx)(x,Object(i.a)({autoFocus:r,checked:n,defaultChecked:l,className:V.input,disabled:z,id:q&&k,name:S,onChange:function(e){if(!e.nativeEvent.defaultPrevented){var t=e.target.checked;G(t),M&&M(e,t)}},readOnly:T,ref:I,required:F,ownerState:K,tabIndex:R,type:P},"checkbox"===P&&void 0===N?{}:{value:N},B)),Q?o:C]}))})),_=r(168),C=Object(_.a)(Object(y.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),k=Object(_.a)(Object(y.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),B=Object(_.a)(Object(y.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),I=r(52);function S(e){return Object(m.a)("MuiCheckbox",e)}var O=Object(g.a)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]),M=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size"],D=Object(l.a)(E,{shouldForwardProp:function(e){return Object(l.b)(e)||"classes"===e},name:"MuiCheckbox",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,r.indeterminate&&t.indeterminate,"default"!==r.color&&t["color".concat(Object(d.a)(r.color))]]}})((function(e){var t,r=e.theme,a=e.ownerState;return Object(i.a)({color:r.palette.text.secondary},!a.disableRipple&&{"&:hover":{backgroundColor:Object(c.a)("default"===a.color?r.palette.action.active:r.palette[a.color].main,r.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==a.color&&(t={},Object(n.a)(t,"&.".concat(O.checked,", &.").concat(O.indeterminate),{color:r.palette[a.color].main}),Object(n.a)(t,"&.".concat(O.disabled),{color:r.palette.action.disabled}),t))})),T=Object(y.jsx)(k,{}),F=Object(y.jsx)(C,{}),R=Object(y.jsx)(B,{}),P=o.forwardRef((function(e,t){var r,n,c=Object(I.a)({props:e,name:"MuiCheckbox"}),u=c.checkedIcon,f=void 0===u?T:u,l=c.color,h=void 0===l?"primary":l,p=c.icon,b=void 0===p?F:p,m=c.indeterminate,g=void 0!==m&&m,v=c.indeterminateIcon,A=void 0===v?R:v,w=c.inputProps,x=c.size,E=void 0===x?"medium":x,_=Object(a.a)(c,M),C=g?A:b,k=g?A:f,B=Object(i.a)({},c,{color:h,indeterminate:g,size:E}),O=function(e){var t=e.classes,r=e.indeterminate,n=e.color,a={root:["root",r&&"indeterminate","color".concat(Object(d.a)(n))]},o=Object(s.a)(a,S,t);return Object(i.a)({},t,o)}(B);return Object(y.jsx)(D,Object(i.a)({type:"checkbox",inputProps:Object(i.a)({"data-indeterminate":g},w),icon:o.cloneElement(C,{fontSize:null!=(r=C.props.fontSize)?r:E}),checkedIcon:o.cloneElement(k,{fontSize:null!=(n=k.props.fontSize)?n:E}),ownerState:B,ref:t},_,{classes:O}))}));t.a=P},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(39),c=r(1684),u=r(35),f=r(52),d=r(168),l=r(3),h=Object(d.a)(Object(l.jsx)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),p=Object(d.a)(Object(l.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning"),b=r(1688),m=r(891),g=r(1128);function v(e){return Object(m.a)("MuiStepIcon",e)}var y,A=Object(g.a)("MuiStepIcon",["root","active","completed","error","text"]),w=["active","className","completed","error","icon"],x=Object(u.a)(b.a,{name:"MuiStepIcon",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(e){var t,r=e.theme;return t={display:"block",transition:r.transitions.create("color",{duration:r.transitions.duration.shortest}),color:r.palette.text.disabled},Object(n.a)(t,"&.".concat(A.completed),{color:r.palette.primary.main}),Object(n.a)(t,"&.".concat(A.active),{color:r.palette.primary.main}),Object(n.a)(t,"&.".concat(A.error),{color:r.palette.error.main}),t})),E=Object(u.a)("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:function(e,t){return t.text}})((function(e){var t=e.theme;return{fill:t.palette.primary.contrastText,fontSize:t.typography.caption.fontSize,fontFamily:t.typography.fontFamily}})),_=o.forwardRef((function(e,t){var r=Object(f.a)({props:e,name:"MuiStepIcon"}),n=r.active,o=void 0!==n&&n,u=r.className,d=r.completed,b=void 0!==d&&d,m=r.error,g=void 0!==m&&m,A=r.icon,_=Object(a.a)(r,w),C=Object(i.a)({},r,{active:o,completed:b,error:g}),k=function(e){var t=e.classes,r={root:["root",e.active&&"active",e.completed&&"completed",e.error&&"error"],text:["text"]};return Object(c.a)(r,v,t)}(C);if("number"===typeof A||"string"===typeof A){var B=Object(s.default)(u,k.root);return g?Object(l.jsx)(x,Object(i.a)({as:p,className:B,ref:t,ownerState:C},_)):b?Object(l.jsx)(x,Object(i.a)({as:h,className:B,ref:t,ownerState:C},_)):Object(l.jsxs)(x,Object(i.a)({className:B,ref:t,ownerState:C},_,{children:[y||(y=Object(l.jsx)("circle",{cx:"12",cy:"12",r:"12"})),Object(l.jsx)(E,{className:k.text,x:"12",y:"16",textAnchor:"middle",ownerState:C,children:A})]}))}return A})),C=r(440),k=r(578);function B(e){return Object(m.a)("MuiStepLabel",e)}var I=Object(g.a)("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),S=["children","className","componentsProps","error","icon","optional","StepIconComponent","StepIconProps"],O=Object(u.a)("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t[r.orientation]]}})((function(e){var t,r=e.ownerState;return Object(i.a)((t={display:"flex",alignItems:"center"},Object(n.a)(t,"&.".concat(I.alternativeLabel),{flexDirection:"column"}),Object(n.a)(t,"&.".concat(I.disabled),{cursor:"default"}),t),"vertical"===r.orientation&&{textAlign:"left",padding:"8px 0"})})),M=Object(u.a)("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:function(e,t){return t.label}})((function(e){var t,r=e.theme;return Object(i.a)({},r.typography.body2,(t={display:"block",transition:r.transitions.create("color",{duration:r.transitions.duration.shortest})},Object(n.a)(t,"&.".concat(I.active),{color:r.palette.text.primary,fontWeight:500}),Object(n.a)(t,"&.".concat(I.completed),{color:r.palette.text.primary,fontWeight:500}),Object(n.a)(t,"&.".concat(I.alternativeLabel),{textAlign:"center",marginTop:16}),Object(n.a)(t,"&.".concat(I.error),{color:r.palette.error.main}),t))})),D=Object(u.a)("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:function(e,t){return t.iconContainer}})((function(){return Object(n.a)({flexShrink:0,display:"flex",paddingRight:8},"&.".concat(I.alternativeLabel),{paddingRight:0})})),T=Object(u.a)("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:function(e,t){return t.labelContainer}})((function(e){return{width:"100%",color:e.theme.palette.text.secondary}})),F=o.forwardRef((function(e,t){var r=Object(f.a)({props:e,name:"MuiStepLabel"}),n=r.children,u=r.className,d=r.componentsProps,h=void 0===d?{}:d,p=r.error,b=void 0!==p&&p,m=r.icon,g=r.optional,v=r.StepIconComponent,y=r.StepIconProps,A=Object(a.a)(r,S),w=o.useContext(C.a),x=w.alternativeLabel,E=w.orientation,I=o.useContext(k.a),F=I.active,R=I.disabled,P=I.completed,N=I.icon,j=m||N,L=v;j&&!L&&(L=_);var U=Object(i.a)({},r,{active:F,alternativeLabel:x,completed:P,disabled:R,error:b,orientation:E}),Q=function(e){var t=e.classes,r=e.orientation,n=e.active,a=e.completed,i=e.error,o=e.disabled,s=e.alternativeLabel,u={root:["root",r,i&&"error",o&&"disabled",s&&"alternativeLabel"],label:["label",n&&"active",a&&"completed",i&&"error",o&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",s&&"alternativeLabel"],labelContainer:["labelContainer"]};return Object(c.a)(u,B,t)}(U);return Object(l.jsxs)(O,Object(i.a)({className:Object(s.default)(Q.root,u),ref:t,ownerState:U},A,{children:[j||L?Object(l.jsx)(D,{className:Q.iconContainer,ownerState:U,children:Object(l.jsx)(L,Object(i.a)({completed:P,active:F,error:b,icon:j},y))}):null,Object(l.jsxs)(T,{className:Q.labelContainer,ownerState:U,children:[n?Object(l.jsx)(M,Object(i.a)({className:Q.label,ownerState:U},h.label,{children:n})):null,g]})]}))}));F.muiName="StepLabel";t.a=F},function(e,t,r){"use strict";var n=r(1674),a=r.n(n),i=r(1675),o=r.n(i),s=r(348),c=r.n(s),u=r(10),f=r.n(u),d=r(819),l=r.n(d);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t=e.join(".");return b[t]||(b[t]=function(e){var t=e.length;return 0===t||1===t?e:2===t?[e[0],e[1],"".concat(e[0],".").concat(e[1]),"".concat(e[1],".").concat(e[0])]:3===t?[e[0],e[1],e[2],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0])]:t>=4?[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]:void 0}(e)),b[t]}(e.filter((function(e){return"token"!==e}))).reduce((function(e,t){return p(p({},e),r[t])}),t)}function g(e){return e.join(" ")}function v(e){var t=e.node,r=e.stylesheet,n=e.style,a=void 0===n?{}:n,i=e.useInlineStyles,o=e.key,s=t.properties,c=t.type,u=t.tagName,d=t.value;if("text"===c)return d;if(u){var h,b=function(e,t){var r=0;return function(n){return r+=1,n.map((function(n,a){return v({node:n,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(r,"-").concat(a)})}))}}(r,i);if(i){var y=Object.keys(r).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),A=s.className&&s.className.includes("token")?["token"]:[],w=s.className&&A.concat(s.className.filter((function(e){return!y.includes(e)})));h=p(p({},s),{},{className:g(w)||void 0,style:m(s.className,Object.assign({},s.style,a),r)})}else h=p(p({},s),{},{className:g(s.className)});var x=b(t.children);return f.a.createElement(u,l()({key:o},h),x)}}var y=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=0;n2&&void 0!==arguments[2]?arguments[2]:[];return t||u.length>0?function(e,t){return k({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:a,lineProps:r,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:n,wrapLongLines:c})}(e,i,u):function(e,t){if(n&&t&&a){var r=C(s,t,o);e.unshift(_(t,r))}return e}(e,i)}for(var b=function(){var e=f[h],t=e.children[0].value;if(t.match(x)){var r=t.split("\n");r.forEach((function(t,a){var o=n&&d.length+i,s={type:"text",value:"".concat(t,"\n")};if(0===a){var c=p(f.slice(l+1,h).concat(k({children:[s],className:e.properties.className})),o);d.push(c)}else if(a===r.length-1){var u=f[h+1]&&f[h+1].children&&f[h+1].children[0],b={type:"text",value:"".concat(t)};if(u){var m=k({children:[b],className:e.properties.className});f.splice(h+1,0,m)}else{var g=p([b],o,e.properties.className);d.push(g)}}else{var v=p([s],o,e.properties.className);d.push(v)}})),l=h}h++};h code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},function(e){var t=e.language,r=e.children,n=e.style,i=void 0===n?D:n,o=e.customStyle,s=void 0===o?{}:o,c=e.codeTagProps,u=void 0===c?{className:t?"language-".concat(t):void 0,style:w(w({},i['code[class*="language-"]']),i['code[class*="language-'.concat(t,'"]')])}:c,d=e.useInlineStyles,l=void 0===d||d,h=e.showLineNumbers,p=void 0!==h&&h,b=e.showInlineLineNumbers,m=void 0===b||b,g=e.startingLineNumber,v=void 0===g?1:g,A=e.lineNumberContainerStyle,x=e.lineNumberStyle,_=void 0===x?{}:x,C=e.wrapLines,k=e.wrapLongLines,B=void 0!==k&&k,T=e.lineProps,F=void 0===T?{}:T,R=e.renderer,P=e.PreTag,N=void 0===P?"pre":P,j=e.CodeTag,L=void 0===j?"code":j,U=e.code,Q=void 0===U?(Array.isArray(r)?r[0]:r)||"":U,G=e.astGenerator,H=a()(e,y);G=G||M;var z=p?f.a.createElement(E,{containerStyle:A,codeStyle:u.style||{},numberStyle:_,startingLineNumber:v,codeString:Q}):null,q=i.hljs||i['pre[class*="language-"]']||{backgroundColor:"#fff"},K=O(G)?"hljs":"prismjs",V=l?Object.assign({},H,{style:Object.assign({},q,s)}):Object.assign({},H,{className:H.className?"".concat(K," ").concat(H.className):K,style:Object.assign({},s)});if(u.style=w(w({},u.style),{},B?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!G)return f.a.createElement(N,V,z,f.a.createElement(L,u,Q));(void 0===C&&R||B)&&(C=!0),R=R||S;var W=[{type:"text",value:Q}],Y=function(e){var t=e.astGenerator,r=e.language,n=e.code,a=e.defaultCodeValue;if(O(t)){var i=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,r);return"text"===r?{value:a,language:"text"}:i?t.highlight(r,n):t.highlightAuto(n)}try{return r&&"text"!==r?{value:t.highlight(n,r)}:{value:a}}catch(o){return{value:a}}}({astGenerator:G,language:t,code:Q,defaultCodeValue:W});null===Y.language&&(Y.value=W);var J=I(Y,C,F,p,m,v,Y.value.length+v,_,B);return f.a.createElement(N,V,f.a.createElement(L,u,!m&&z,R({rows:J,stylesheet:i,useInlineStyles:l})))});F.supportedLanguages=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apex","apl","applescript","aql","arduino","arff","asciidoc","asm6502","asmatmel","aspnet","autohotkey","autoit","avisynth","avro-idl","bash","basic","batch","bbcode","bicep","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cfscript","chaiscript","cil","clike","clojure","cmake","cobol","coffeescript","concurnas","coq","cpp","crystal","csharp","cshtml","csp","css-extras","css","csv","cypher","d","dart","dataweave","dax","dhall","diff","django","dns-zone-file","docker","dot","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","false","firestore-security-rules","flow","fortran","fsharp","ftl","gap","gcode","gdscript","gedcom","gherkin","git","glsl","gml","gn","go-module","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hoon","hpkp","hsts","http","ichigojam","icon","icu-message-format","idris","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jexl","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keepalived","keyman","kotlin","kumir","kusto","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","log","lolcode","lua","magma","makefile","markdown","markup-templating","markup","matlab","maxscript","mel","mermaid","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nevod","nginx","nim","nix","nsis","objectivec","ocaml","opencl","openqasm","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","promql","properties","protobuf","psl","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","qsharp","r","racket","reason","regex","rego","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","squirrel","stan","stylus","swift","systemd","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tremor","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","uorazor","uri","v","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","web-idl","wiki","wolfram","wren","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];t.a=F},function(e,t,r){"use strict";var n=r(25),a=r(12),i=r(18),o=r(42),s=r(10),c=r(39),u=r(1684),f=r(35),d=r(52),l=r(122),h=r(503),p=r(569),b=r(14),m=r(192),g=r(4129),v=r(481),y=r(3);var A=function(e){var t=e.className,r=e.classes,a=e.pulsate,i=void 0!==a&&a,o=e.rippleX,u=e.rippleY,f=e.rippleSize,d=e.in,l=e.onExited,h=e.timeout,p=s.useState(!1),b=Object(n.a)(p,2),m=b[0],g=b[1],v=Object(c.default)(t,r.ripple,r.rippleVisible,i&&r.ripplePulsate),A={width:f,height:f,top:-f/2+u,left:-f/2+o},w=Object(c.default)(r.child,m&&r.childLeaving,i&&r.childPulsate);return d||m||g(!0),s.useEffect((function(){if(!d&&null!=l){var e=setTimeout(l,h);return function(){clearTimeout(e)}}}),[l,d,h]),Object(y.jsx)("span",{className:v,style:A,children:Object(y.jsx)("span",{className:w})})},w=r(891),x=r(1128);var E,_,C,k,B,I,S,O,M=Object(x.a)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),D=["center","classes","className"],T=Object(v.c)(B||(B=E||(E=Object(m.a)(["\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n"])))),F=Object(v.c)(I||(I=_||(_=Object(m.a)(["\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n"])))),R=Object(v.c)(S||(S=C||(C=Object(m.a)(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])))),P=Object(f.a)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),N=Object(f.a)(A,{name:"MuiTouchRipple",slot:"Ripple"})(O||(O=k||(k=Object(m.a)(["\n opacity: 0;\n position: absolute;\n\n &."," {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n &."," {\n animation-duration: ","ms;\n }\n\n & ."," {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & ."," {\n opacity: 0;\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n & ."," {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ",";\n animation-duration: 2500ms;\n animation-timing-function: ",";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n"]))),M.rippleVisible,T,550,(function(e){return e.theme.transitions.easing.easeInOut}),M.ripplePulsate,(function(e){return e.theme.transitions.duration.shorter}),M.child,M.childLeaving,F,550,(function(e){return e.theme.transitions.easing.easeInOut}),M.childPulsate,R,(function(e){return e.theme.transitions.easing.easeInOut})),j=s.forwardRef((function(e,t){var r=Object(d.a)({props:e,name:"MuiTouchRipple"}),a=r.center,u=void 0!==a&&a,f=r.classes,l=void 0===f?{}:f,h=r.className,p=Object(o.a)(r,D),m=s.useState([]),v=Object(n.a)(m,2),A=v[0],w=v[1],x=s.useRef(0),E=s.useRef(null);s.useEffect((function(){E.current&&(E.current(),E.current=null)}),[A]);var _=s.useRef(!1),C=s.useRef(null),k=s.useRef(null),B=s.useRef(null);s.useEffect((function(){return function(){clearTimeout(C.current)}}),[]);var I=s.useCallback((function(e){var t=e.pulsate,r=e.rippleX,n=e.rippleY,a=e.rippleSize,i=e.cb;w((function(e){return[].concat(Object(b.a)(e),[Object(y.jsx)(N,{classes:{ripple:Object(c.default)(l.ripple,M.ripple),rippleVisible:Object(c.default)(l.rippleVisible,M.rippleVisible),ripplePulsate:Object(c.default)(l.ripplePulsate,M.ripplePulsate),child:Object(c.default)(l.child,M.child),childLeaving:Object(c.default)(l.childLeaving,M.childLeaving),childPulsate:Object(c.default)(l.childPulsate,M.childPulsate)},timeout:550,pulsate:t,rippleX:r,rippleY:n,rippleSize:a},x.current)])})),x.current+=1,E.current=i}),[l]),S=s.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=t.pulsate,a=void 0!==n&&n,i=t.center,o=void 0===i?u||t.pulsate:i,s=t.fakeElement,c=void 0!==s&&s;if("mousedown"===e.type&&_.current)_.current=!1;else{"touchstart"===e.type&&(_.current=!0);var f,d,l,h=c?null:B.current,p=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(o||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)f=Math.round(p.width/2),d=Math.round(p.height/2);else{var b=e.touches?e.touches[0]:e,m=b.clientX,g=b.clientY;f=Math.round(m-p.left),d=Math.round(g-p.top)}if(o)(l=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(l+=1);else{var v=2*Math.max(Math.abs((h?h.clientWidth:0)-f),f)+2,y=2*Math.max(Math.abs((h?h.clientHeight:0)-d),d)+2;l=Math.sqrt(Math.pow(v,2)+Math.pow(y,2))}e.touches?null===k.current&&(k.current=function(){I({pulsate:a,rippleX:f,rippleY:d,rippleSize:l,cb:r})},C.current=setTimeout((function(){k.current&&(k.current(),k.current=null)}),80)):I({pulsate:a,rippleX:f,rippleY:d,rippleSize:l,cb:r})}}),[u,I]),O=s.useCallback((function(){S({},{pulsate:!0})}),[S]),T=s.useCallback((function(e,t){if(clearTimeout(C.current),"touchend"===e.type&&k.current)return k.current(),k.current=null,void(C.current=setTimeout((function(){T(e,t)})));k.current=null,w((function(e){return e.length>0?e.slice(1):e})),E.current=t}),[]);return s.useImperativeHandle(t,(function(){return{pulsate:O,start:S,stop:T}}),[O,S,T]),Object(y.jsx)(P,Object(i.a)({className:Object(c.default)(l.root,M.root,h),ref:B},p,{children:Object(y.jsx)(g.a,{component:null,exit:!0,children:A})}))})),L=j;function U(e){return Object(w.a)("MuiButtonBase",e)}var Q,G=Object(x.a)("MuiButtonBase",["root","disabled","focusVisible"]),H=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],z=Object(f.a)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:function(e,t){return t.root}})((Q={display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"}},Object(a.a)(Q,"&.".concat(G.disabled),{pointerEvents:"none",cursor:"default"}),Object(a.a)(Q,"@media print",{colorAdjust:"exact"}),Q)),q=s.forwardRef((function(e,t){var r=Object(d.a)({props:e,name:"MuiButtonBase"}),a=r.action,f=r.centerRipple,b=void 0!==f&&f,m=r.children,g=r.className,v=r.component,A=void 0===v?"button":v,w=r.disabled,x=void 0!==w&&w,E=r.disableRipple,_=void 0!==E&&E,C=r.disableTouchRipple,k=void 0!==C&&C,B=r.focusRipple,I=void 0!==B&&B,S=r.LinkComponent,O=void 0===S?"a":S,M=r.onBlur,D=r.onClick,T=r.onContextMenu,F=r.onDragLeave,R=r.onFocus,P=r.onFocusVisible,N=r.onKeyDown,j=r.onKeyUp,Q=r.onMouseDown,G=r.onMouseLeave,q=r.onMouseUp,K=r.onTouchEnd,V=r.onTouchMove,W=r.onTouchStart,Y=r.tabIndex,J=void 0===Y?0:Y,X=r.TouchRippleProps,Z=r.touchRippleRef,$=r.type,ee=Object(o.a)(r,H),te=s.useRef(null),re=s.useRef(null),ne=Object(l.a)(re,Z),ae=Object(p.a)(),ie=ae.isFocusVisibleRef,oe=ae.onFocus,se=ae.onBlur,ce=ae.ref,ue=s.useState(!1),fe=Object(n.a)(ue,2),de=fe[0],le=fe[1];x&&de&&le(!1),s.useImperativeHandle(a,(function(){return{focusVisible:function(){le(!0),te.current.focus()}}}),[]);var he=s.useState(!1),pe=Object(n.a)(he,2),be=pe[0],me=pe[1];s.useEffect((function(){me(!0)}),[]);var ge=be&&!_&&!x;function ve(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k;return Object(h.a)((function(n){return t&&t(n),!r&&re.current&&re.current[e](n),!0}))}s.useEffect((function(){de&&I&&!_&&be&&re.current.pulsate()}),[_,I,de,be]);var ye=ve("start",Q),Ae=ve("stop",T),we=ve("stop",F),xe=ve("stop",q),Ee=ve("stop",(function(e){de&&e.preventDefault(),G&&G(e)})),_e=ve("start",W),Ce=ve("stop",K),ke=ve("stop",V),Be=ve("stop",(function(e){se(e),!1===ie.current&&le(!1),M&&M(e)}),!1),Ie=Object(h.a)((function(e){te.current||(te.current=e.currentTarget),oe(e),!0===ie.current&&(le(!0),P&&P(e)),R&&R(e)})),Se=function(){var e=te.current;return A&&"button"!==A&&!("A"===e.tagName&&e.href)},Oe=s.useRef(!1),Me=Object(h.a)((function(e){I&&!Oe.current&&de&&re.current&&" "===e.key&&(Oe.current=!0,re.current.stop(e,(function(){re.current.start(e)}))),e.target===e.currentTarget&&Se()&&" "===e.key&&e.preventDefault(),N&&N(e),e.target===e.currentTarget&&Se()&&"Enter"===e.key&&!x&&(e.preventDefault(),D&&D(e))})),De=Object(h.a)((function(e){I&&" "===e.key&&re.current&&de&&!e.defaultPrevented&&(Oe.current=!1,re.current.stop(e,(function(){re.current.pulsate(e)}))),j&&j(e),D&&e.target===e.currentTarget&&Se()&&" "===e.key&&!e.defaultPrevented&&D(e)})),Te=A;"button"===Te&&(ee.href||ee.to)&&(Te=O);var Fe={};"button"===Te?(Fe.type=void 0===$?"button":$,Fe.disabled=x):(ee.href||ee.to||(Fe.role="button"),x&&(Fe["aria-disabled"]=x));var Re=Object(l.a)(ce,te),Pe=Object(l.a)(t,Re);var Ne=Object(i.a)({},r,{centerRipple:b,component:A,disabled:x,disableRipple:_,disableTouchRipple:k,focusRipple:I,tabIndex:J,focusVisible:de}),je=function(e){var t=e.disabled,r=e.focusVisible,n=e.focusVisibleClassName,a=e.classes,i={root:["root",t&&"disabled",r&&"focusVisible"]},o=Object(u.a)(i,U,a);return r&&n&&(o.root+=" ".concat(n)),o}(Ne);return Object(y.jsxs)(z,Object(i.a)({as:Te,className:Object(c.default)(je.root,g),ownerState:Ne,onBlur:Be,onClick:D,onContextMenu:Ae,onFocus:Ie,onKeyDown:Me,onKeyUp:De,onMouseDown:ye,onMouseLeave:Ee,onMouseUp:xe,onDragLeave:we,onTouchEnd:Ce,onTouchMove:ke,onTouchStart:_e,ref:Pe,tabIndex:x?-1:J,type:$},Fe,ee,{children:[m,ge?Object(y.jsx)(L,Object(i.a)({ref:ne,center:b},X)):null]}))}));t.a=q},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(39),c=r(1684),u=r(867),f=r(4094),d=r(35),l=r(52),h=r(4122),p=r(589),b=r(438),m=r(122),g=r(249),v=r(891),y=r(1128);function A(e){return Object(v.a)("MuiListItem",e)}var w=Object(y.a)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var x=Object(y.a)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function E(e){return Object(v.a)("MuiListItemSecondaryAction",e)}Object(y.a)("MuiListItemSecondaryAction",["root","disableGutters"]);var _=r(3),C=["className"],k=Object(d.a)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,r.disableGutters&&t.disableGutters]}})((function(e){var t=e.ownerState;return Object(i.a)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})})),B=o.forwardRef((function(e,t){var r=Object(l.a)({props:e,name:"MuiListItemSecondaryAction"}),n=r.className,u=Object(a.a)(r,C),f=o.useContext(g.a),d=Object(i.a)({},r,{disableGutters:f.disableGutters}),h=function(e){var t=e.disableGutters,r=e.classes,n={root:["root",t&&"disableGutters"]};return Object(c.a)(n,E,r)}(d);return Object(_.jsx)(k,Object(i.a)({className:Object(s.default)(h.root,n),ownerState:d,ref:t},u))}));B.muiName="ListItemSecondaryAction";var I=B,S=["className"],O=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected"],M=Object(d.a)("div",{name:"MuiListItem",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,r.dense&&t.dense,"flex-start"===r.alignItems&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters,!r.disablePadding&&t.padding,r.button&&t.button,r.hasSecondaryAction&&t.secondaryAction]}})((function(e){var t,r=e.theme,a=e.ownerState;return Object(i.a)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!a.disablePadding&&Object(i.a)({paddingTop:8,paddingBottom:8},a.dense&&{paddingTop:4,paddingBottom:4},!a.disableGutters&&{paddingLeft:16,paddingRight:16},!!a.secondaryAction&&{paddingRight:48}),!!a.secondaryAction&&Object(n.a)({},"& > .".concat(x.root),{paddingRight:48}),(t={},Object(n.a)(t,"&.".concat(w.focusVisible),{backgroundColor:r.palette.action.focus}),Object(n.a)(t,"&.".concat(w.selected),Object(n.a)({backgroundColor:Object(f.a)(r.palette.primary.main,r.palette.action.selectedOpacity)},"&.".concat(w.focusVisible),{backgroundColor:Object(f.a)(r.palette.primary.main,r.palette.action.selectedOpacity+r.palette.action.focusOpacity)})),Object(n.a)(t,"&.".concat(w.disabled),{opacity:r.palette.action.disabledOpacity}),t),"flex-start"===a.alignItems&&{alignItems:"flex-start"},a.divider&&{borderBottom:"1px solid ".concat(r.palette.divider),backgroundClip:"padding-box"},a.button&&Object(n.a)({transition:r.transitions.create("background-color",{duration:r.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:r.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},"&.".concat(w.selected,":hover"),{backgroundColor:Object(f.a)(r.palette.primary.main,r.palette.action.selectedOpacity+r.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:Object(f.a)(r.palette.primary.main,r.palette.action.selectedOpacity)}}),a.hasSecondaryAction&&{paddingRight:48})})),D=Object(d.a)("li",{name:"MuiListItem",slot:"Container",overridesResolver:function(e,t){return t.container}})({position:"relative"}),T=o.forwardRef((function(e,t){var r=Object(l.a)({props:e,name:"MuiListItem"}),n=r.alignItems,f=void 0===n?"center":n,d=r.autoFocus,v=void 0!==d&&d,y=r.button,x=void 0!==y&&y,E=r.children,C=r.className,k=r.component,B=r.components,T=void 0===B?{}:B,F=r.componentsProps,R=void 0===F?{}:F,P=r.ContainerComponent,N=void 0===P?"li":P,j=r.ContainerProps,L=(void 0===j?{}:j).className,U=r.dense,Q=void 0!==U&&U,G=r.disabled,H=void 0!==G&&G,z=r.disableGutters,q=void 0!==z&&z,K=r.disablePadding,V=void 0!==K&&K,W=r.divider,Y=void 0!==W&&W,J=r.focusVisibleClassName,X=r.secondaryAction,Z=r.selected,$=void 0!==Z&&Z,ee=Object(a.a)(r.ContainerProps,S),te=Object(a.a)(r,O),re=o.useContext(g.a),ne={dense:Q||re.dense||!1,alignItems:f,disableGutters:q},ae=o.useRef(null);Object(b.a)((function(){v&&ae.current&&ae.current.focus()}),[v]);var ie=o.Children.toArray(E),oe=ie.length&&Object(p.a)(ie[ie.length-1],["ListItemSecondaryAction"]),se=Object(i.a)({},r,{alignItems:f,autoFocus:v,button:x,dense:ne.dense,disabled:H,disableGutters:q,disablePadding:V,divider:Y,hasSecondaryAction:oe,selected:$}),ce=function(e){var t=e.alignItems,r=e.button,n=e.classes,a=e.dense,i=e.disabled,o={root:["root",a&&"dense",!e.disableGutters&&"gutters",!e.disablePadding&&"padding",e.divider&&"divider",i&&"disabled",r&&"button","flex-start"===t&&"alignItemsFlexStart",e.hasSecondaryAction&&"secondaryAction",e.selected&&"selected"],container:["container"]};return Object(c.a)(o,A,n)}(se),ue=Object(m.a)(ae,t),fe=T.Root||M,de=R.root||{},le=Object(i.a)({className:Object(s.default)(ce.root,de.className,C),disabled:H},te),he=k||"li";return x&&(le.component=k||"div",le.focusVisibleClassName=Object(s.default)(w.focusVisible,J),he=h.a),oe?(he=le.component||k?he:"div","li"===N&&("li"===he?he="div":"li"===le.component&&(le.component="div")),Object(_.jsx)(g.a.Provider,{value:ne,children:Object(_.jsxs)(D,Object(i.a)({as:N,className:Object(s.default)(ce.container,L),ref:ue,ownerState:se},ee,{children:[Object(_.jsx)(fe,Object(i.a)({},de,!Object(u.a)(fe)&&{as:he,ownerState:Object(i.a)({},se,de.ownerState)},le,{children:ie})),ie.pop()]}))})):Object(_.jsx)(g.a.Provider,{value:ne,children:Object(_.jsxs)(fe,Object(i.a)({},de,{as:he,ref:ue,ownerState:se},!Object(u.a)(fe)&&{ownerState:Object(i.a)({},se,de.ownerState)},le,{children:[ie,X&&Object(_.jsx)(I,{children:X})]}))})}));t.a=T},function(e,t,r){"use strict";var n=r(42),a=r(18),i=r(10),o=r(39),s=r(1684),c=r(52),u=r(35),f=r(891),d=r(1128);function l(e){return Object(f.a)("MuiStepper",e)}Object(d.a)("MuiStepper",["root","horizontal","vertical","alternativeLabel"]);var h=r(51),p=r(440),b=r(578);function m(e){return Object(f.a)("MuiStepConnector",e)}Object(d.a)("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);var g=r(3),v=["className"],y=Object(u.a)("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t[r.orientation],r.alternativeLabel&&t.alternativeLabel,r.completed&&t.completed]}})((function(e){var t=e.ownerState;return Object(a.a)({flex:"1 1 auto"},"vertical"===t.orientation&&{marginLeft:12},t.alternativeLabel&&{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"})})),A=Object(u.a)("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:function(e,t){var r=e.ownerState;return[t.line,t["line".concat(Object(h.a)(r.orientation))]]}})((function(e){var t=e.ownerState,r=e.theme;return Object(a.a)({display:"block",borderColor:"light"===r.palette.mode?r.palette.grey[400]:r.palette.grey[600]},"horizontal"===t.orientation&&{borderTopStyle:"solid",borderTopWidth:1},"vertical"===t.orientation&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})})),w=i.forwardRef((function(e,t){var r=Object(c.a)({props:e,name:"MuiStepConnector"}),u=r.className,f=Object(n.a)(r,v),d=i.useContext(p.a),l=d.alternativeLabel,w=d.orientation,x=void 0===w?"horizontal":w,E=i.useContext(b.a),_=E.active,C=E.disabled,k=E.completed,B=Object(a.a)({},r,{alternativeLabel:l,orientation:x,active:_,completed:k,disabled:C}),I=function(e){var t=e.classes,r=e.orientation,n={root:["root",r,e.alternativeLabel&&"alternativeLabel",e.active&&"active",e.completed&&"completed",e.disabled&&"disabled"],line:["line","line".concat(Object(h.a)(r))]};return Object(s.a)(n,m,t)}(B);return Object(g.jsx)(y,Object(a.a)({className:Object(o.default)(I.root,u),ref:t,ownerState:B},f,{children:Object(g.jsx)(A,{className:I.line,ownerState:B})}))})),x=["activeStep","alternativeLabel","children","className","connector","nonLinear","orientation"],E=Object(u.a)("div",{name:"MuiStepper",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t[r.orientation],r.alternativeLabel&&t.alternativeLabel]}})((function(e){var t=e.ownerState;return Object(a.a)({display:"flex"},"horizontal"===t.orientation&&{flexDirection:"row",alignItems:"center"},"vertical"===t.orientation&&{flexDirection:"column"},t.alternativeLabel&&{alignItems:"flex-start"})})),_=Object(g.jsx)(w,{}),C=i.forwardRef((function(e,t){var r=Object(c.a)({props:e,name:"MuiStepper"}),u=r.activeStep,f=void 0===u?0:u,d=r.alternativeLabel,h=void 0!==d&&d,b=r.children,m=r.className,v=r.connector,y=void 0===v?_:v,A=r.nonLinear,w=void 0!==A&&A,C=r.orientation,k=void 0===C?"horizontal":C,B=Object(n.a)(r,x),I=Object(a.a)({},r,{alternativeLabel:h,orientation:k}),S=function(e){var t=e.orientation,r=e.alternativeLabel,n=e.classes,a={root:["root",t,r&&"alternativeLabel"]};return Object(s.a)(a,l,n)}(I),O=i.Children.toArray(b).filter(Boolean),M=O.map((function(e,t){return i.cloneElement(e,Object(a.a)({index:t,last:t+1===O.length},e.props))})),D=i.useMemo((function(){return{activeStep:f,alternativeLabel:h,connector:y,nonLinear:w,orientation:k}}),[f,h,y,w,k]);return Object(g.jsx)(p.a.Provider,{value:D,children:Object(g.jsx)(E,Object(a.a)({ownerState:I,className:Object(o.default)(S.root,m),ref:t},B,{children:M}))})}));t.a=C},function(e,t,r){"use strict";var n=r(14),a=r(12),i=r(42),o=r(18),s=r(10),c=r(39),u=r(182),f=r(3985),d=r(1684),l=r(35),h=r(52);var p=s.createContext(),b=r(891),m=r(1128);function g(e){return Object(b.a)("MuiGrid",e)}var v=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],y=Object(m.a)("MuiGrid",["root","container","item","zeroMinWidth"].concat(Object(n.a)([0,1,2,3,4,5,6,7,8,9,10].map((function(e){return"spacing-xs-".concat(e)}))),Object(n.a)(["column-reverse","column","row-reverse","row"].map((function(e){return"direction-xs-".concat(e)}))),Object(n.a)(["nowrap","wrap-reverse","wrap"].map((function(e){return"wrap-xs-".concat(e)}))),Object(n.a)(v.map((function(e){return"grid-xs-".concat(e)}))),Object(n.a)(v.map((function(e){return"grid-sm-".concat(e)}))),Object(n.a)(v.map((function(e){return"grid-md-".concat(e)}))),Object(n.a)(v.map((function(e){return"grid-lg-".concat(e)}))),Object(n.a)(v.map((function(e){return"grid-xl-".concat(e)}))))),A=r(3),w=["className","columns","columnSpacing","component","container","direction","item","lg","md","rowSpacing","sm","spacing","wrap","xl","xs","zeroMinWidth"];function x(e){var t=parseFloat(e);return"".concat(t).concat(String(e).replace(String(t),"")||"px")}function E(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t||!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[r["spacing-xs-".concat(String(e))]||"spacing-xs-".concat(String(e))];var n=e.xs,a=e.sm,i=e.md,o=e.lg,s=e.xl;return[Number(n)>0&&(r["spacing-xs-".concat(String(n))]||"spacing-xs-".concat(String(n))),Number(a)>0&&(r["spacing-sm-".concat(String(a))]||"spacing-sm-".concat(String(a))),Number(i)>0&&(r["spacing-md-".concat(String(i))]||"spacing-md-".concat(String(i))),Number(o)>0&&(r["spacing-lg-".concat(String(o))]||"spacing-lg-".concat(String(o))),Number(s)>0&&(r["spacing-xl-".concat(String(s))]||"spacing-xl-".concat(String(s)))]}var _=Object(l.a)("div",{name:"MuiGrid",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState,a=r.container,i=r.direction,o=r.item,s=r.lg,c=r.md,u=r.sm,f=r.spacing,d=r.wrap,l=r.xl,h=r.xs,p=r.zeroMinWidth;return[t.root,a&&t.container,o&&t.item,p&&t.zeroMinWidth].concat(Object(n.a)(E(f,a,t)),["row"!==i&&t["direction-xs-".concat(String(i))],"wrap"!==d&&t["wrap-xs-".concat(String(d))],!1!==h&&t["grid-xs-".concat(String(h))],!1!==u&&t["grid-sm-".concat(String(u))],!1!==c&&t["grid-md-".concat(String(c))],!1!==s&&t["grid-lg-".concat(String(s))],!1!==l&&t["grid-xl-".concat(String(l))]])}})((function(e){var t=e.ownerState;return Object(o.a)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})}),(function(e){var t=e.theme,r=e.ownerState,n=Object(u.d)({values:r.direction,breakpoints:t.breakpoints.values});return Object(u.b)({theme:t},n,(function(e){var t={flexDirection:e};return 0===e.indexOf("column")&&(t["& > .".concat(y.item)]={maxWidth:"none"}),t}))}),(function(e){var t=e.theme,r=e.ownerState,n=r.container,i=r.rowSpacing,o={};if(n&&0!==i){var s=Object(u.d)({values:i,breakpoints:t.breakpoints.values});o=Object(u.b)({theme:t},s,(function(e){var r=t.spacing(e);return"0px"!==r?Object(a.a)({marginTop:"-".concat(x(r))},"& > .".concat(y.item),{paddingTop:x(r)}):{}}))}return o}),(function(e){var t=e.theme,r=e.ownerState,n=r.container,i=r.columnSpacing,o={};if(n&&0!==i){var s=Object(u.d)({values:i,breakpoints:t.breakpoints.values});o=Object(u.b)({theme:t},s,(function(e){var r=t.spacing(e);return"0px"!==r?Object(a.a)({width:"calc(100% + ".concat(x(r),")"),marginLeft:"-".concat(x(r))},"& > .".concat(y.item),{paddingLeft:x(r)}):{}}))}return o}),(function(e){var t,r=e.theme,n=e.ownerState;return r.breakpoints.keys.reduce((function(e,a){var i={};if(n[a]&&(t=n[a]),!t)return e;if(!0===t)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{var s=Object(u.d)({values:n.columns,breakpoints:r.breakpoints.values}),c="object"===typeof s?s[a]:s;if(void 0===c||null===c)return e;var f="".concat(Math.round(t/c*1e8)/1e6,"%"),d={};if(n.container&&n.item&&0!==n.columnSpacing){var l=r.spacing(n.columnSpacing);if("0px"!==l){var h="calc(".concat(f," + ").concat(x(l),")");d={flexBasis:h,maxWidth:h}}}i=Object(o.a)({flexBasis:f,flexGrow:0,maxWidth:f},d)}return 0===r.breakpoints.values[a]?Object.assign(e,i):e[r.breakpoints.up(a)]=i,e}),{})})),C=s.forwardRef((function(e,t){var r=Object(h.a)({props:e,name:"MuiGrid"}),a=Object(f.a)(r),u=a.className,l=a.columns,b=a.columnSpacing,m=a.component,v=void 0===m?"div":m,y=a.container,x=void 0!==y&&y,C=a.direction,k=void 0===C?"row":C,B=a.item,I=void 0!==B&&B,S=a.lg,O=void 0!==S&&S,M=a.md,D=void 0!==M&&M,T=a.rowSpacing,F=a.sm,R=void 0!==F&&F,P=a.spacing,N=void 0===P?0:P,j=a.wrap,L=void 0===j?"wrap":j,U=a.xl,Q=void 0!==U&&U,G=a.xs,H=void 0!==G&&G,z=a.zeroMinWidth,q=void 0!==z&&z,K=Object(i.a)(a,w),V=T||N,W=b||N,Y=s.useContext(p),J=x?l||12:Y,X=Object(o.a)({},a,{columns:J,container:x,direction:k,item:I,lg:O,md:D,sm:R,rowSpacing:V,columnSpacing:W,wrap:L,xl:Q,xs:H,zeroMinWidth:q}),Z=function(e){var t=e.classes,r=e.container,a=e.direction,i=e.item,o=e.lg,s=e.md,c=e.sm,u=e.spacing,f=e.wrap,l=e.xl,h=e.xs,p={root:["root",r&&"container",i&&"item",e.zeroMinWidth&&"zeroMinWidth"].concat(Object(n.a)(E(u,r)),["row"!==a&&"direction-xs-".concat(String(a)),"wrap"!==f&&"wrap-xs-".concat(String(f)),!1!==h&&"grid-xs-".concat(String(h)),!1!==c&&"grid-sm-".concat(String(c)),!1!==s&&"grid-md-".concat(String(s)),!1!==o&&"grid-lg-".concat(String(o)),!1!==l&&"grid-xl-".concat(String(l))])};return Object(d.a)(p,g,t)}(X);return Object(A.jsx)(p.Provider,{value:J,children:Object(A.jsx)(_,Object(o.a)({ownerState:X,className:Object(c.default)(Z.root,u),as:v,ref:t},K))})}));t.a=C},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(39),c=r(1684),u=r(4094),f=r(35),d=r(52),l=r(249),h=r(4122),p=r(438),b=r(122),m=r(891),g=r(1128);var v=Object(g.a)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),y=r(1672),A=r(890);function w(e){return Object(m.a)("MuiMenuItem",e)}var x=Object(g.a)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),E=r(3),_=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex"],C=Object(f.a)(h.a,{shouldForwardProp:function(e){return Object(f.b)(e)||"classes"===e},name:"MuiMenuItem",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})((function(e){var t,r=e.theme,a=e.ownerState;return Object(i.a)({},r.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!a.disableGutters&&{paddingLeft:16,paddingRight:16},a.divider&&{borderBottom:"1px solid ".concat(r.palette.divider),backgroundClip:"padding-box"},(t={"&:hover":{textDecoration:"none",backgroundColor:r.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},Object(n.a)(t,"&.".concat(x.selected),Object(n.a)({backgroundColor:Object(u.a)(r.palette.primary.main,r.palette.action.selectedOpacity)},"&.".concat(x.focusVisible),{backgroundColor:Object(u.a)(r.palette.primary.main,r.palette.action.selectedOpacity+r.palette.action.focusOpacity)})),Object(n.a)(t,"&.".concat(x.selected,":hover"),{backgroundColor:Object(u.a)(r.palette.primary.main,r.palette.action.selectedOpacity+r.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:Object(u.a)(r.palette.primary.main,r.palette.action.selectedOpacity)}}),Object(n.a)(t,"&.".concat(x.focusVisible),{backgroundColor:r.palette.action.focus}),Object(n.a)(t,"&.".concat(x.disabled),{opacity:r.palette.action.disabledOpacity}),Object(n.a)(t,"& + .".concat(v.root),{marginTop:r.spacing(1),marginBottom:r.spacing(1)}),Object(n.a)(t,"& + .".concat(v.inset),{marginLeft:52}),Object(n.a)(t,"& .".concat(A.a.root),{marginTop:0,marginBottom:0}),Object(n.a)(t,"& .".concat(A.a.inset),{paddingLeft:36}),Object(n.a)(t,"& .".concat(y.a.root),{minWidth:36}),t),!a.dense&&Object(n.a)({},r.breakpoints.up("sm"),{minHeight:"auto"}),a.dense&&Object(i.a)({minHeight:32,paddingTop:4,paddingBottom:4},r.typography.body2,Object(n.a)({},"& .".concat(y.a.root," svg"),{fontSize:"1.25rem"})))})),k=o.forwardRef((function(e,t){var r=Object(d.a)({props:e,name:"MuiMenuItem"}),n=r.autoFocus,u=void 0!==n&&n,f=r.component,h=void 0===f?"li":f,m=r.dense,g=void 0!==m&&m,v=r.divider,y=void 0!==v&&v,A=r.disableGutters,x=void 0!==A&&A,k=r.focusVisibleClassName,B=r.role,I=void 0===B?"menuitem":B,S=r.tabIndex,O=Object(a.a)(r,_),M=o.useContext(l.a),D={dense:g||M.dense||!1,disableGutters:x},T=o.useRef(null);Object(p.a)((function(){u&&T.current&&T.current.focus()}),[u]);var F,R=Object(i.a)({},r,{dense:D.dense,divider:y,disableGutters:x}),P=function(e){var t=e.disabled,r=e.dense,n=e.divider,a=e.disableGutters,o=e.selected,s=e.classes,u={root:["root",r&&"dense",t&&"disabled",!a&&"gutters",n&&"divider",o&&"selected"]},f=Object(c.a)(u,w,s);return Object(i.a)({},s,f)}(r),N=Object(b.a)(T,t);return r.disabled||(F=void 0!==S?S:-1),Object(E.jsx)(l.a.Provider,{value:D,children:Object(E.jsx)(C,Object(i.a)({ref:N,role:I,tabIndex:F,component:h,focusVisibleClassName:Object(s.default)(P.focusVisible,k)},O,{ownerState:R,classes:P}))})}));t.a=k},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(39),c=r(4095),u=r(1684),f=r(4094),d=r(35),l=r(52),h=r(4122),p=r(51),b=r(891),m=r(1128);function g(e){return Object(b.a)("MuiButton",e)}var v=Object(m.a)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","contained","containedInherit","containedPrimary","containedSecondary","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var y=o.createContext({}),A=r(3),w=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],x=function(e){return Object(i.a)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}})},E=Object(d.a)(h.a,{shouldForwardProp:function(e){return Object(d.b)(e)||"classes"===e},name:"MuiButton",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t[r.variant],t["".concat(r.variant).concat(Object(p.a)(r.color))],t["size".concat(Object(p.a)(r.size))],t["".concat(r.variant,"Size").concat(Object(p.a)(r.size))],"inherit"===r.color&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth]}})((function(e){var t,r,a,o=e.theme,s=e.ownerState;return Object(i.a)({},o.typography.button,(t={minWidth:64,padding:"6px 16px",borderRadius:(o.vars||o).shape.borderRadius,transition:o.transitions.create(["background-color","box-shadow","border-color","color"],{duration:o.transitions.duration.short}),"&:hover":Object(i.a)({textDecoration:"none",backgroundColor:o.vars?"rgba(".concat(o.vars.palette.text.primaryChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):Object(f.a)(o.palette.text.primary,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===s.variant&&"inherit"!==s.color&&{backgroundColor:o.vars?"rgba(".concat(o.vars.palette[s.color].mainChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):Object(f.a)(o.palette[s.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===s.variant&&"inherit"!==s.color&&{border:"1px solid ".concat((o.vars||o).palette[s.color].main),backgroundColor:o.vars?"rgba(".concat(o.vars.palette[s.color].mainChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):Object(f.a)(o.palette[s.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===s.variant&&{backgroundColor:(o.vars||o).palette.grey.A100,boxShadow:(o.vars||o).shadows[4],"@media (hover: none)":{boxShadow:(o.vars||o).shadows[2],backgroundColor:(o.vars||o).palette.grey[300]}},"contained"===s.variant&&"inherit"!==s.color&&{backgroundColor:(o.vars||o).palette[s.color].dark,"@media (hover: none)":{backgroundColor:(o.vars||o).palette[s.color].main}}),"&:active":Object(i.a)({},"contained"===s.variant&&{boxShadow:(o.vars||o).shadows[8]})},Object(n.a)(t,"&.".concat(v.focusVisible),Object(i.a)({},"contained"===s.variant&&{boxShadow:(o.vars||o).shadows[6]})),Object(n.a)(t,"&.".concat(v.disabled),Object(i.a)({color:(o.vars||o).palette.action.disabled},"outlined"===s.variant&&{border:"1px solid ".concat((o.vars||o).palette.action.disabledBackground)},"outlined"===s.variant&&"secondary"===s.color&&{border:"1px solid ".concat((o.vars||o).palette.action.disabled)},"contained"===s.variant&&{color:(o.vars||o).palette.action.disabled,boxShadow:(o.vars||o).shadows[0],backgroundColor:(o.vars||o).palette.action.disabledBackground})),t),"text"===s.variant&&{padding:"6px 8px"},"text"===s.variant&&"inherit"!==s.color&&{color:(o.vars||o).palette[s.color].main},"outlined"===s.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===s.variant&&"inherit"!==s.color&&{color:(o.vars||o).palette[s.color].main,border:o.vars?"1px solid rgba(".concat(o.vars.palette[s.color].mainChannel," / 0.5)"):"1px solid ".concat(Object(f.a)(o.palette[s.color].main,.5))},"contained"===s.variant&&{color:o.vars?o.vars.palette.text.primary:null==(r=(a=o.palette).getContrastText)?void 0:r.call(a,o.palette.grey[300]),backgroundColor:(o.vars||o).palette.grey[300],boxShadow:(o.vars||o).shadows[2]},"contained"===s.variant&&"inherit"!==s.color&&{color:(o.vars||o).palette[s.color].contrastText,backgroundColor:(o.vars||o).palette[s.color].main},"inherit"===s.color&&{color:"inherit",borderColor:"currentColor"},"small"===s.size&&"text"===s.variant&&{padding:"4px 5px",fontSize:o.typography.pxToRem(13)},"large"===s.size&&"text"===s.variant&&{padding:"8px 11px",fontSize:o.typography.pxToRem(15)},"small"===s.size&&"outlined"===s.variant&&{padding:"3px 9px",fontSize:o.typography.pxToRem(13)},"large"===s.size&&"outlined"===s.variant&&{padding:"7px 21px",fontSize:o.typography.pxToRem(15)},"small"===s.size&&"contained"===s.variant&&{padding:"4px 10px",fontSize:o.typography.pxToRem(13)},"large"===s.size&&"contained"===s.variant&&{padding:"8px 22px",fontSize:o.typography.pxToRem(15)},s.fullWidth&&{width:"100%"})}),(function(e){var t;return e.ownerState.disableElevation&&(t={boxShadow:"none","&:hover":{boxShadow:"none"}},Object(n.a)(t,"&.".concat(v.focusVisible),{boxShadow:"none"}),Object(n.a)(t,"&:active",{boxShadow:"none"}),Object(n.a)(t,"&.".concat(v.disabled),{boxShadow:"none"}),t)})),_=Object(d.a)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:function(e,t){var r=e.ownerState;return[t.startIcon,t["iconSize".concat(Object(p.a)(r.size))]]}})((function(e){var t=e.ownerState;return Object(i.a)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},x(t))})),C=Object(d.a)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:function(e,t){var r=e.ownerState;return[t.endIcon,t["iconSize".concat(Object(p.a)(r.size))]]}})((function(e){var t=e.ownerState;return Object(i.a)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},x(t))})),k=o.forwardRef((function(e,t){var r=o.useContext(y),n=Object(c.a)(r,e),f=Object(l.a)({props:n,name:"MuiButton"}),d=f.children,h=f.color,b=void 0===h?"primary":h,m=f.component,v=void 0===m?"button":m,x=f.className,k=f.disabled,B=void 0!==k&&k,I=f.disableElevation,S=void 0!==I&&I,O=f.disableFocusRipple,M=void 0!==O&&O,D=f.endIcon,T=f.focusVisibleClassName,F=f.fullWidth,R=void 0!==F&&F,P=f.size,N=void 0===P?"medium":P,j=f.startIcon,L=f.type,U=f.variant,Q=void 0===U?"text":U,G=Object(a.a)(f,w),H=Object(i.a)({},f,{color:b,component:v,disabled:B,disableElevation:S,disableFocusRipple:M,fullWidth:R,size:N,type:L,variant:Q}),z=function(e){var t=e.color,r=e.disableElevation,n=e.fullWidth,a=e.size,o=e.variant,s=e.classes,c={root:["root",o,"".concat(o).concat(Object(p.a)(t)),"size".concat(Object(p.a)(a)),"".concat(o,"Size").concat(Object(p.a)(a)),"inherit"===t&&"colorInherit",r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["startIcon","iconSize".concat(Object(p.a)(a))],endIcon:["endIcon","iconSize".concat(Object(p.a)(a))]},f=Object(u.a)(c,g,s);return Object(i.a)({},s,f)}(H),q=j&&Object(A.jsx)(_,{className:z.startIcon,ownerState:H,children:j}),K=D&&Object(A.jsx)(C,{className:z.endIcon,ownerState:H,children:D});return Object(A.jsxs)(E,Object(i.a)({ownerState:H,className:Object(s.default)(x,r.className),component:v,disabled:B,focusRipple:!M,focusVisibleClassName:Object(s.default)(z.focusVisible,T),ref:t,type:L},G,{classes:z,children:[q,d,K]}))}));t.a=k},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(39),c=r(1684),u=r(4094),f=r(168),d=r(3),l=Object(f.a)(Object(d.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel"),h=r(122),p=r(51),b=r(4122),m=r(52),g=r(35),v=r(891),y=r(1128);function A(e){return Object(v.a)("MuiChip",e)}var w=Object(y.a)("MuiChip",["root","sizeSmall","sizeMedium","colorPrimary","colorSecondary","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","focusVisible"]),x=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"],E=Object(g.a)("div",{name:"MuiChip",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState,a=r.color,i=r.clickable,o=r.onDelete,s=r.size,c=r.variant;return[Object(n.a)({},"& .".concat(w.avatar),t.avatar),Object(n.a)({},"& .".concat(w.avatar),t["avatar".concat(Object(p.a)(s))]),Object(n.a)({},"& .".concat(w.avatar),t["avatarColor".concat(Object(p.a)(a))]),Object(n.a)({},"& .".concat(w.icon),t.icon),Object(n.a)({},"& .".concat(w.icon),t["icon".concat(Object(p.a)(s))]),Object(n.a)({},"& .".concat(w.icon),t["iconColor".concat(Object(p.a)(a))]),Object(n.a)({},"& .".concat(w.deleteIcon),t.deleteIcon),Object(n.a)({},"& .".concat(w.deleteIcon),t["deleteIcon".concat(Object(p.a)(s))]),Object(n.a)({},"& .".concat(w.deleteIcon),t["deleteIconColor".concat(Object(p.a)(a))]),Object(n.a)({},"& .".concat(w.deleteIcon),t["deleteIconOutlinedColor".concat(Object(p.a)(a))]),t.root,t["size".concat(Object(p.a)(s))],t["color".concat(Object(p.a)(a))],i&&t.clickable,i&&"default"!==a&&t["clickableColor".concat(Object(p.a)(a),")")],o&&t.deletable,o&&"default"!==a&&t["deletableColor".concat(Object(p.a)(a))],t[c],"outlined"===c&&t["outlined".concat(Object(p.a)(a))]]}})((function(e){var t,r=e.theme,a=e.ownerState,o=Object(u.a)(r.palette.text.primary,.26);return Object(i.a)((t={maxWidth:"100%",fontFamily:r.typography.fontFamily,fontSize:r.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:r.palette.text.primary,backgroundColor:r.palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:r.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box"},Object(n.a)(t,"&.".concat(w.disabled),{opacity:r.palette.action.disabledOpacity,pointerEvents:"none"}),Object(n.a)(t,"& .".concat(w.avatar),{marginLeft:5,marginRight:-6,width:24,height:24,color:"light"===r.palette.mode?r.palette.grey[700]:r.palette.grey[300],fontSize:r.typography.pxToRem(12)}),Object(n.a)(t,"& .".concat(w.avatarColorPrimary),{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.dark}),Object(n.a)(t,"& .".concat(w.avatarColorSecondary),{color:r.palette.secondary.contrastText,backgroundColor:r.palette.secondary.dark}),Object(n.a)(t,"& .".concat(w.avatarSmall),{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:r.typography.pxToRem(10)}),Object(n.a)(t,"& .".concat(w.icon),Object(i.a)({color:"light"===r.palette.mode?r.palette.grey[700]:r.palette.grey[300],marginLeft:5,marginRight:-6},"small"===a.size&&{fontSize:18,marginLeft:4,marginRight:-4},"default"!==a.color&&{color:"inherit"})),Object(n.a)(t,"& .".concat(w.deleteIcon),Object(i.a)({WebkitTapHighlightColor:"transparent",color:o,fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:Object(u.a)(o,.4)}},"small"===a.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==a.color&&{color:Object(u.a)(r.palette[a.color].contrastText,.7),"&:hover, &:active":{color:r.palette[a.color].contrastText}})),t),"small"===a.size&&{height:24},"default"!==a.color&&{backgroundColor:r.palette[a.color].main,color:r.palette[a.color].contrastText},a.onDelete&&Object(n.a)({},"&.".concat(w.focusVisible),{backgroundColor:Object(u.a)(r.palette.action.selected,r.palette.action.selectedOpacity+r.palette.action.focusOpacity)}),a.onDelete&&"default"!==a.color&&Object(n.a)({},"&.".concat(w.focusVisible),{backgroundColor:r.palette[a.color].dark}))}),(function(e){var t,r=e.theme,a=e.ownerState;return Object(i.a)({},a.clickable&&(t={userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:Object(u.a)(r.palette.action.selected,r.palette.action.selectedOpacity+r.palette.action.hoverOpacity)}},Object(n.a)(t,"&.".concat(w.focusVisible),{backgroundColor:Object(u.a)(r.palette.action.selected,r.palette.action.selectedOpacity+r.palette.action.focusOpacity)}),Object(n.a)(t,"&:active",{boxShadow:r.shadows[1]}),t),a.clickable&&"default"!==a.color&&Object(n.a)({},"&:hover, &.".concat(w.focusVisible),{backgroundColor:r.palette[a.color].dark}))}),(function(e){var t,r,a=e.theme,o=e.ownerState;return Object(i.a)({},"outlined"===o.variant&&(t={backgroundColor:"transparent",border:"1px solid ".concat("light"===a.palette.mode?a.palette.grey[400]:a.palette.grey[700])},Object(n.a)(t,"&.".concat(w.clickable,":hover"),{backgroundColor:a.palette.action.hover}),Object(n.a)(t,"&.".concat(w.focusVisible),{backgroundColor:a.palette.action.focus}),Object(n.a)(t,"& .".concat(w.avatar),{marginLeft:4}),Object(n.a)(t,"& .".concat(w.avatarSmall),{marginLeft:2}),Object(n.a)(t,"& .".concat(w.icon),{marginLeft:4}),Object(n.a)(t,"& .".concat(w.iconSmall),{marginLeft:2}),Object(n.a)(t,"& .".concat(w.deleteIcon),{marginRight:5}),Object(n.a)(t,"& .".concat(w.deleteIconSmall),{marginRight:3}),t),"outlined"===o.variant&&"default"!==o.color&&(r={color:a.palette[o.color].main,border:"1px solid ".concat(Object(u.a)(a.palette[o.color].main,.7))},Object(n.a)(r,"&.".concat(w.clickable,":hover"),{backgroundColor:Object(u.a)(a.palette[o.color].main,a.palette.action.hoverOpacity)}),Object(n.a)(r,"&.".concat(w.focusVisible),{backgroundColor:Object(u.a)(a.palette[o.color].main,a.palette.action.focusOpacity)}),Object(n.a)(r,"& .".concat(w.deleteIcon),{color:Object(u.a)(a.palette[o.color].main,.7),"&:hover, &:active":{color:a.palette[o.color].main}}),r))})),_=Object(g.a)("span",{name:"MuiChip",slot:"Label",overridesResolver:function(e,t){var r=e.ownerState.size;return[t.label,t["label".concat(Object(p.a)(r))]]}})((function(e){var t=e.ownerState;return Object(i.a)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"small"===t.size&&{paddingLeft:8,paddingRight:8})}));function C(e){return"Backspace"===e.key||"Delete"===e.key}var k=o.forwardRef((function(e,t){var r=Object(m.a)({props:e,name:"MuiChip"}),n=r.avatar,u=r.className,f=r.clickable,g=r.color,v=void 0===g?"default":g,y=r.component,w=r.deleteIcon,k=r.disabled,B=void 0!==k&&k,I=r.icon,S=r.label,O=r.onClick,M=r.onDelete,D=r.onKeyDown,T=r.onKeyUp,F=r.size,R=void 0===F?"medium":F,P=r.variant,N=void 0===P?"filled":P,j=Object(a.a)(r,x),L=o.useRef(null),U=Object(h.a)(L,t),Q=function(e){e.stopPropagation(),M&&M(e)},G=!(!1===f||!O)||f,H="small"===R,z=G||M?b.a:y||"div",q=Object(i.a)({},r,{component:z,disabled:B,size:R,color:v,onDelete:!!M,clickable:G,variant:N}),K=function(e){var t=e.classes,r=e.disabled,n=e.size,a=e.color,i=e.onDelete,o=e.clickable,s=e.variant,u={root:["root",s,r&&"disabled","size".concat(Object(p.a)(n)),"color".concat(Object(p.a)(a)),o&&"clickable",o&&"clickableColor".concat(Object(p.a)(a)),i&&"deletable",i&&"deletableColor".concat(Object(p.a)(a)),"".concat(s).concat(Object(p.a)(a))],label:["label","label".concat(Object(p.a)(n))],avatar:["avatar","avatar".concat(Object(p.a)(n)),"avatarColor".concat(Object(p.a)(a))],icon:["icon","icon".concat(Object(p.a)(n)),"iconColor".concat(Object(p.a)(a))],deleteIcon:["deleteIcon","deleteIcon".concat(Object(p.a)(n)),"deleteIconColor".concat(Object(p.a)(a)),"deleteIconOutlinedColor".concat(Object(p.a)(a))]};return Object(c.a)(u,A,t)}(q),V=z===b.a?Object(i.a)({component:y||"div",focusVisibleClassName:K.focusVisible},M&&{disableRipple:!0}):{},W=null;if(M){var Y=Object(s.default)("default"!==v&&("outlined"===N?K["deleteIconOutlinedColor".concat(Object(p.a)(v))]:K["deleteIconColor".concat(Object(p.a)(v))]),H&&K.deleteIconSmall);W=w&&o.isValidElement(w)?o.cloneElement(w,{className:Object(s.default)(w.props.className,K.deleteIcon,Y),onClick:Q}):Object(d.jsx)(l,{className:Object(s.default)(K.deleteIcon,Y),onClick:Q})}var J=null;n&&o.isValidElement(n)&&(J=o.cloneElement(n,{className:Object(s.default)(K.avatar,n.props.className)}));var X=null;return I&&o.isValidElement(I)&&(X=o.cloneElement(I,{className:Object(s.default)(K.icon,I.props.className)})),Object(d.jsxs)(E,Object(i.a)({as:z,className:Object(s.default)(K.root,u),disabled:!(!G||!B)||void 0,onClick:O,onKeyDown:function(e){e.currentTarget===e.target&&C(e)&&e.preventDefault(),D&&D(e)},onKeyUp:function(e){e.currentTarget===e.target&&(M&&C(e)?M(e):"Escape"===e.key&&L.current&&L.current.blur()),T&&T(e)},ref:U,ownerState:q},V,j,{children:[J||X,Object(d.jsx)(_,{className:Object(s.default)(K.label),ownerState:q,children:S}),W]}))}));t.a=k},function(e,t,r){"use strict";var n=r(100),a=r(49);var i=r(874),o=r(10),s=r.n(o),c=r(590);function u(e,t){var r=Object.create(null);return e&&o.Children.map(e,(function(e){return e})).forEach((function(e){r[e.key]=function(e){return t&&Object(o.isValidElement)(e)?t(e):e}(e)})),r}function f(e,t,r){return null!=r[t]?r[t]:e.props[t]}function d(e,t,r){var n=u(e.children),a=function(e,t){function r(r){return r in t?t[r]:e[r]}e=e||{},t=t||{};var n,a=Object.create(null),i=[];for(var o in e)o in t?i.length&&(a[o]=i,i=[]):i.push(o);var s={};for(var c in t){if(a[c])for(n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,r=e.defaultClassName,h=void 0===r?"MuiBox-root":r,p=e.generateClassName,b=e.styleFunctionSx,m=void 0===b?c.a:b,g=Object(s.a)("div")(m);return i.forwardRef((function(e,r){var i=Object(f.a)(t),s=Object(u.a)(e),c=s.className,b=s.component,m=void 0===b?"div":b,v=Object(a.a)(s,l);return Object(d.jsx)(g,Object(n.a)({as:m,ref:r,className:Object(o.default)(c,p?p(h):h),theme:i},v))}))}({defaultTheme:Object(p.a)(),defaultClassName:"MuiBox-root",generateClassName:h.a.generate});t.a=b},function(e,t,r){"use strict";var n=r(12),a=r(14),i=r(42),o=r(18),s=r(10),c=r(1684),u=r(892),f=r(239),d=r(35),l=r(52),h=r(891),p=r(1128),b=r(697);function m(e){return Object(h.a)("MuiInput",e)}var g=Object(o.a)({},b.a,Object(p.a)("MuiInput",["root","underline","input"])),v=r(3),y=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","type"],A=Object(d.a)(f.b,{shouldForwardProp:function(e){return Object(d.b)(e)||"classes"===e},name:"MuiInput",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[].concat(Object(a.a)(Object(f.e)(e,t)),[!r.disableUnderline&&t.underline])}})((function(e){var t,r=e.theme,a=e.ownerState,i="light"===r.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return Object(o.a)({position:"relative"},a.formControl&&{"label + &":{marginTop:16}},!a.disableUnderline&&(t={"&:after":{borderBottom:"2px solid ".concat(r.palette[a.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:r.transitions.create("transform",{duration:r.transitions.duration.shorter,easing:r.transitions.easing.easeOut}),pointerEvents:"none"}},Object(n.a)(t,"&.".concat(g.focused,":after"),{transform:"scaleX(1) translateX(0)"}),Object(n.a)(t,"&.".concat(g.error,":after"),{borderBottomColor:r.palette.error.main,transform:"scaleX(1)"}),Object(n.a)(t,"&:before",{borderBottom:"1px solid ".concat(i),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:r.transitions.create("border-bottom-color",{duration:r.transitions.duration.shorter}),pointerEvents:"none"}),Object(n.a)(t,"&:hover:not(.".concat(g.disabled,"):before"),{borderBottom:"2px solid ".concat(r.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(i)}}),Object(n.a)(t,"&.".concat(g.disabled,":before"),{borderBottomStyle:"dotted"}),t))})),w=Object(d.a)(f.a,{name:"MuiInput",slot:"Input",overridesResolver:f.d})({}),x=s.forwardRef((function(e,t){var r=Object(l.a)({props:e,name:"MuiInput"}),n=r.disableUnderline,a=r.components,s=void 0===a?{}:a,d=r.componentsProps,h=r.fullWidth,p=void 0!==h&&h,b=r.inputComponent,g=void 0===b?"input":b,x=r.multiline,E=void 0!==x&&x,_=r.type,C=void 0===_?"text":_,k=Object(i.a)(r,y),B=function(e){var t=e.classes,r={root:["root",!e.disableUnderline&&"underline"],input:["input"]},n=Object(c.a)(r,m,t);return Object(o.a)({},t,n)}(r),I={root:{ownerState:{disableUnderline:n}}},S=d?Object(u.a)(d,I):I;return Object(v.jsx)(f.c,Object(o.a)({components:Object(o.a)({Root:A,Input:w},s),componentsProps:S,fullWidth:p,inputComponent:g,multiline:E,ref:t,type:C},k,{classes:B}))}));x.muiName="Input";t.a=x},function(e,t,r){"use strict";var n=r(42),a=r(18),i=r(10),o=r(39),s=r(1684),c=r(4094),u=r(35),f=r(52),d=r(891),l=r(1128);function h(e){return Object(d.a)("MuiPaper",e)}Object(l.a)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var p=r(3),b=["className","component","elevation","square","variant"],m=function(e){return((e<1?5.11916*Math.pow(e,2):4.5*Math.log(e+1)+2)/100).toFixed(2)},g=Object(u.a)("div",{name:"MuiPaper",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t[r.variant],!r.square&&t.rounded,"elevation"===r.variant&&t["elevation".concat(r.elevation)]]}})((function(e){var t=e.theme,r=e.ownerState;return Object(a.a)({backgroundColor:t.palette.background.paper,color:t.palette.text.primary,transition:t.transitions.create("box-shadow")},!r.square&&{borderRadius:t.shape.borderRadius},"outlined"===r.variant&&{border:"1px solid ".concat(t.palette.divider)},"elevation"===r.variant&&Object(a.a)({boxShadow:t.shadows[r.elevation]},"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat(Object(c.a)("#fff",m(r.elevation)),", ").concat(Object(c.a)("#fff",m(r.elevation)),")")}))})),v=i.forwardRef((function(e,t){var r=Object(f.a)({props:e,name:"MuiPaper"}),i=r.className,c=r.component,u=void 0===c?"div":c,d=r.elevation,l=void 0===d?1:d,m=r.square,v=void 0!==m&&m,y=r.variant,A=void 0===y?"elevation":y,w=Object(n.a)(r,b),x=Object(a.a)({},r,{component:u,elevation:l,square:v,variant:A}),E=function(e){var t=e.square,r=e.elevation,n=e.variant,a=e.classes,i={root:["root",n,!t&&"rounded","elevation"===n&&"elevation".concat(r)]};return Object(s.a)(i,h,a)}(x);return Object(p.jsx)(g,Object(a.a)({as:u,ownerState:x,className:Object(o.default)(E.root,i),ref:t},w))}));t.a=v},function(e,t,r){"use strict";var n=r(42),a=r(18),i=r(10),o=r(39),s=r(1684),c=r(35),u=r(52),f=r(249),d=r(891),l=r(1128);function h(e){return Object(d.a)("MuiList",e)}Object(l.a)("MuiList",["root","padding","dense","subheader"]);var p=r(3),b=["children","className","component","dense","disablePadding","subheader"],m=Object(c.a)("ul",{name:"MuiList",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})((function(e){var t=e.ownerState;return Object(a.a)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})})),g=i.forwardRef((function(e,t){var r=Object(u.a)({props:e,name:"MuiList"}),c=r.children,d=r.className,l=r.component,g=void 0===l?"ul":l,v=r.dense,y=void 0!==v&&v,A=r.disablePadding,w=void 0!==A&&A,x=r.subheader,E=Object(n.a)(r,b),_=i.useMemo((function(){return{dense:y}}),[y]),C=Object(a.a)({},r,{component:g,dense:y,disablePadding:w}),k=function(e){var t=e.classes,r={root:["root",!e.disablePadding&&"padding",e.dense&&"dense",e.subheader&&"subheader"]};return Object(s.a)(r,h,t)}(C);return Object(p.jsx)(f.a.Provider,{value:_,children:Object(p.jsxs)(m,Object(a.a)({as:g,className:Object(o.default)(k.root,d),ref:t,ownerState:C},E,{children:[x,c]}))})}));t.a=g},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(39),c=r(1684),u=r(4094),f=r(35),d=r(52),l=r(4122),h=r(51),p=r(891),b=r(1128);function m(e){return Object(p.a)("MuiIconButton",e)}var g=Object(b.a)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),v=r(3),y=["edge","children","className","color","disabled","disableFocusRipple","size"],A=Object(f.a)(l.a,{name:"MuiIconButton",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,"default"!==r.color&&t["color".concat(Object(h.a)(r.color))],r.edge&&t["edge".concat(Object(h.a)(r.edge))],t["size".concat(Object(h.a)(r.size))]]}})((function(e){var t=e.theme,r=e.ownerState;return Object(i.a)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:t.palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!r.disableRipple&&{"&:hover":{backgroundColor:Object(u.a)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===r.edge&&{marginLeft:"small"===r.size?-3:-12},"end"===r.edge&&{marginRight:"small"===r.size?-3:-12})}),(function(e){var t=e.theme,r=e.ownerState;return Object(i.a)({},"inherit"===r.color&&{color:"inherit"},"inherit"!==r.color&&"default"!==r.color&&Object(i.a)({color:t.palette[r.color].main},!r.disableRipple&&{"&:hover":{backgroundColor:Object(u.a)(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}}),"small"===r.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===r.size&&{padding:12,fontSize:t.typography.pxToRem(28)},Object(n.a)({},"&.".concat(g.disabled),{backgroundColor:"transparent",color:t.palette.action.disabled}))})),w=o.forwardRef((function(e,t){var r=Object(d.a)({props:e,name:"MuiIconButton"}),n=r.edge,o=void 0!==n&&n,u=r.children,f=r.className,l=r.color,p=void 0===l?"default":l,b=r.disabled,g=void 0!==b&&b,w=r.disableFocusRipple,x=void 0!==w&&w,E=r.size,_=void 0===E?"medium":E,C=Object(a.a)(r,y),k=Object(i.a)({},r,{edge:o,color:p,disabled:g,disableFocusRipple:x,size:_}),B=function(e){var t=e.classes,r=e.disabled,n=e.color,a=e.edge,i=e.size,o={root:["root",r&&"disabled","default"!==n&&"color".concat(Object(h.a)(n)),a&&"edge".concat(Object(h.a)(a)),"size".concat(Object(h.a)(i))]};return Object(c.a)(o,m,t)}(k);return Object(v.jsx)(A,Object(i.a)({className:Object(s.default)(B.root,f),centerRipple:!0,focusRipple:!x,disabled:g,ref:t,ownerState:k},C,{children:u}))}));t.a=w},function(e,t,r){"use strict";var n=r(18),a=r(42),i=r(10),o=r(39),s=r(1684),c=r(35),u=r(52),f=r(893),d=r(891),l=r(1128);function h(e){return Object(d.a)("MuiAlertTitle",e)}Object(l.a)("MuiAlertTitle",["root"]);var p=r(3),b=["className"],m=Object(c.a)(f.a,{name:"MuiAlertTitle",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(e){return{fontWeight:e.theme.typography.fontWeightMedium,marginTop:-2}})),g=i.forwardRef((function(e,t){var r=Object(u.a)({props:e,name:"MuiAlertTitle"}),i=r.className,c=Object(a.a)(r,b),f=r,d=function(e){var t=e.classes;return Object(s.a)({root:["root"]},h,t)}(f);return Object(p.jsx)(m,Object(n.a)({gutterBottom:!0,component:"div",ownerState:f,ref:t,className:Object(o.default)(d.root,i)},c))}));t.a=g},function(e,t,r){"use strict";var n=r(42),a=r(18),i=r(10),o=r(39),s=r(1684),c=r(35),u=r(52),f=r(51),d=r(4134),l=r(891),h=r(1128);function p(e){return Object(l.a)("MuiAppBar",e)}Object(h.a)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);var b=r(3),m=["className","color","enableColorOnDark","position"],g=Object(c.a)(d.a,{name:"MuiAppBar",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t["position".concat(Object(f.a)(r.position))],t["color".concat(Object(f.a)(r.color))]]}})((function(e){var t=e.theme,r=e.ownerState,n="light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[900];return Object(a.a)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===r.position&&{position:"fixed",zIndex:t.zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===r.position&&{position:"absolute",zIndex:t.zIndex.appBar,top:0,left:"auto",right:0},"sticky"===r.position&&{position:"sticky",zIndex:t.zIndex.appBar,top:0,left:"auto",right:0},"static"===r.position&&{position:"static"},"relative"===r.position&&{position:"relative"},"default"===r.color&&{backgroundColor:n,color:t.palette.getContrastText(n)},r.color&&"default"!==r.color&&"inherit"!==r.color&&"transparent"!==r.color&&{backgroundColor:t.palette[r.color].main,color:t.palette[r.color].contrastText},"inherit"===r.color&&{color:"inherit"},"dark"===t.palette.mode&&!r.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===r.color&&Object(a.a)({backgroundColor:"transparent",color:"inherit"},"dark"===t.palette.mode&&{backgroundImage:"none"}))})),v=i.forwardRef((function(e,t){var r=Object(u.a)({props:e,name:"MuiAppBar"}),i=r.className,c=r.color,d=void 0===c?"primary":c,l=r.enableColorOnDark,h=void 0!==l&&l,v=r.position,y=void 0===v?"fixed":v,A=Object(n.a)(r,m),w=Object(a.a)({},r,{color:d,position:y,enableColorOnDark:h}),x=function(e){var t=e.color,r=e.position,n=e.classes,a={root:["root","color".concat(Object(f.a)(t)),"position".concat(Object(f.a)(r))]};return Object(s.a)(a,p,n)}(w);return Object(b.jsx)(g,Object(a.a)({square:!0,component:"header",ownerState:w,elevation:4,className:Object(o.default)(x.root,i,"fixed"===y&&"mui-fixed"),ref:t},A))}));t.a=v},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(39),c=r(1684),u=r(52),f=r(35),d=r(891),l=r(1128);function h(e){return Object(d.a)("MuiContainer",e)}Object(l.a)("MuiContainer",["root","disableGutters","fixed","maxWidthXs","maxWidthSm","maxWidthMd","maxWidthLg","maxWidthXl"]);var p=r(51),b=r(3),m=["className","component","disableGutters","fixed","maxWidth"],g=Object(f.a)("div",{name:"MuiContainer",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t["maxWidth".concat(Object(p.a)(String(r.maxWidth)))],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}})((function(e){var t=e.theme,r=e.ownerState;return Object(i.a)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!r.disableGutters&&Object(n.a)({paddingLeft:t.spacing(2),paddingRight:t.spacing(2)},t.breakpoints.up("sm"),{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}))}),(function(e){var t=e.theme;return e.ownerState.fixed&&Object.keys(t.breakpoints.values).reduce((function(e,r){var n=t.breakpoints.values[r];return 0!==n&&(e[t.breakpoints.up(r)]={maxWidth:"".concat(n).concat(t.breakpoints.unit)}),e}),{})}),(function(e){var t=e.theme,r=e.ownerState;return Object(i.a)({},"xs"===r.maxWidth&&Object(n.a)({},t.breakpoints.up("xs"),{maxWidth:Math.max(t.breakpoints.values.xs,444)}),r.maxWidth&&"xs"!==r.maxWidth&&Object(n.a)({},t.breakpoints.up(r.maxWidth),{maxWidth:"".concat(t.breakpoints.values[r.maxWidth]).concat(t.breakpoints.unit)}))})),v=o.forwardRef((function(e,t){var r=Object(u.a)({props:e,name:"MuiContainer"}),n=r.className,o=r.component,f=void 0===o?"div":o,d=r.disableGutters,l=void 0!==d&&d,v=r.fixed,y=void 0!==v&&v,A=r.maxWidth,w=void 0===A?"lg":A,x=Object(a.a)(r,m),E=Object(i.a)({},r,{component:f,disableGutters:l,fixed:y,maxWidth:w}),_=function(e){var t=e.classes,r=e.fixed,n=e.disableGutters,a=e.maxWidth,i={root:["root",a&&"maxWidth".concat(Object(p.a)(String(a))),r&&"fixed",n&&"disableGutters"]};return Object(c.a)(i,h,t)}(E);return Object(b.jsx)(g,Object(i.a)({as:f,ownerState:E,className:Object(s.default)(_.root,n),ref:t},x))}));t.a=v},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(39),c=r(1684),u=r(52),f=r(35),d=r(891),l=r(1128);function h(e){return Object(d.a)("MuiToolbar",e)}Object(l.a)("MuiToolbar",["root","gutters","regular","dense"]);var p=r(3),b=["className","component","disableGutters","variant"],m=Object(f.a)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,!r.disableGutters&&t.gutters,t[r.variant]]}})((function(e){var t=e.theme,r=e.ownerState;return Object(i.a)({position:"relative",display:"flex",alignItems:"center"},!r.disableGutters&&Object(n.a)({paddingLeft:t.spacing(2),paddingRight:t.spacing(2)},t.breakpoints.up("sm"),{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}),"dense"===r.variant&&{minHeight:48})}),(function(e){var t=e.theme;return"regular"===e.ownerState.variant&&t.mixins.toolbar})),g=o.forwardRef((function(e,t){var r=Object(u.a)({props:e,name:"MuiToolbar"}),n=r.className,o=r.component,f=void 0===o?"div":o,d=r.disableGutters,l=void 0!==d&&d,g=r.variant,v=void 0===g?"regular":g,y=Object(a.a)(r,b),A=Object(i.a)({},r,{component:f,disableGutters:l,variant:v}),w=function(e){var t=e.classes,r={root:["root",!e.disableGutters&&"gutters",e.variant]};return Object(c.a)(r,h,t)}(A);return Object(p.jsx)(m,Object(i.a)({as:f,className:Object(s.default)(w.root,n),ref:t,ownerState:A},y))}));t.a=g},function(e,t,r){"use strict";var n=r(192),a=r(42),i=r(18),o=r(10),s=r(39),c=r(1684),u=r(481),f=r(51),d=r(52),l=r(35),h=r(891),p=r(1128);function b(e){return Object(h.a)("MuiCircularProgress",e)}Object(p.a)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var m,g,v,y,A,w,x,E,_=r(3),C=["className","color","disableShrink","size","style","thickness","value","variant"],k=44,B=Object(u.c)(A||(A=m||(m=Object(n.a)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),I=Object(u.c)(w||(w=g||(g=Object(n.a)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),S=Object(l.a)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t[r.variant],t["color".concat(Object(f.a)(r.color))]]}})((function(e){var t=e.ownerState,r=e.theme;return Object(i.a)({display:"inline-block"},"determinate"===t.variant&&{transition:r.transitions.create("transform")},"inherit"!==t.color&&{color:r.palette[t.color].main})}),(function(e){return"indeterminate"===e.ownerState.variant&&Object(u.b)(x||(x=v||(v=Object(n.a)(["\n animation: "," 1.4s linear infinite;\n "]))),B)})),O=Object(l.a)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:function(e,t){return t.svg}})({display:"block"}),M=Object(l.a)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:function(e,t){var r=e.ownerState;return[t.circle,t["circle".concat(Object(f.a)(r.variant))],r.disableShrink&&t.circleDisableShrink]}})((function(e){var t=e.ownerState,r=e.theme;return Object(i.a)({stroke:"currentColor"},"determinate"===t.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(function(e){var t=e.ownerState;return"indeterminate"===t.variant&&!t.disableShrink&&Object(u.b)(E||(E=y||(y=Object(n.a)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),I)})),D=o.forwardRef((function(e,t){var r=Object(d.a)({props:e,name:"MuiCircularProgress"}),n=r.className,o=r.color,u=void 0===o?"primary":o,l=r.disableShrink,h=void 0!==l&&l,p=r.size,m=void 0===p?40:p,g=r.style,v=r.thickness,y=void 0===v?3.6:v,A=r.value,w=void 0===A?0:A,x=r.variant,E=void 0===x?"indeterminate":x,B=Object(a.a)(r,C),I=Object(i.a)({},r,{color:u,disableShrink:h,size:m,thickness:y,value:w,variant:E}),D=function(e){var t=e.classes,r=e.variant,n=e.color,a=e.disableShrink,i={root:["root",r,"color".concat(Object(f.a)(n))],svg:["svg"],circle:["circle","circle".concat(Object(f.a)(r)),a&&"circleDisableShrink"]};return Object(c.a)(i,b,t)}(I),T={},F={},R={};if("determinate"===E){var P=2*Math.PI*((k-y)/2);T.strokeDasharray=P.toFixed(3),R["aria-valuenow"]=Math.round(w),T.strokeDashoffset="".concat(((100-w)/100*P).toFixed(3),"px"),F.transform="rotate(-90deg)"}return Object(_.jsx)(S,Object(i.a)({className:Object(s.default)(D.root,n),style:Object(i.a)({width:m,height:m},F,g),ownerState:I,ref:t,role:"progressbar"},R,B,{children:Object(_.jsx)(O,{className:D.svg,ownerState:I,viewBox:"".concat(22," ").concat(22," ").concat(k," ").concat(k),children:Object(_.jsx)(M,{className:D.circle,style:T,ownerState:I,cx:k,cy:k,r:(k-y)/2,fill:"none",strokeWidth:y})})}))}));t.a=D},function(e,t,r){"use strict";var n=r(12),a=r(42),i=r(18),o=r(10),s=r(39),c=r(1684),u=r(260),f=r(893),d=r(51),l=r(35),h=r(52),p=r(891),b=r(1128);function m(e){return Object(p.a)("MuiFormControlLabel",e)}var g=Object(b.a)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error"]),v=r(261),y=r(3),A=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","value"],w=Object(l.a)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[Object(n.a)({},"& .".concat(g.label),t.label),t.root,t["labelPlacement".concat(Object(d.a)(r.labelPlacement))]]}})((function(e){var t=e.theme,r=e.ownerState;return Object(i.a)(Object(n.a)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16},"&.".concat(g.disabled),{cursor:"default"}),"start"===r.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===r.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===r.labelPlacement&&{flexDirection:"column",marginLeft:16},Object(n.a)({},"& .".concat(g.label),Object(n.a)({},"&.".concat(g.disabled),{color:t.palette.text.disabled})))})),x=o.forwardRef((function(e,t){var r=Object(h.a)({props:e,name:"MuiFormControlLabel"}),n=r.className,l=r.componentsProps,p=void 0===l?{}:l,b=r.control,g=r.disabled,x=r.disableTypography,E=r.label,_=r.labelPlacement,C=void 0===_?"end":_,k=Object(a.a)(r,A),B=Object(u.a)(),I=g;"undefined"===typeof I&&"undefined"!==typeof b.props.disabled&&(I=b.props.disabled),"undefined"===typeof I&&B&&(I=B.disabled);var S={disabled:I};["checked","name","onChange","value","inputRef"].forEach((function(e){"undefined"===typeof b.props[e]&&"undefined"!==typeof r[e]&&(S[e]=r[e])}));var O=Object(v.a)({props:r,muiFormControl:B,states:["error"]}),M=Object(i.a)({},r,{disabled:I,labelPlacement:C,error:O.error}),D=function(e){var t=e.classes,r=e.disabled,n=e.labelPlacement,a=e.error,i={root:["root",r&&"disabled","labelPlacement".concat(Object(d.a)(n)),a&&"error"],label:["label",r&&"disabled"]};return Object(c.a)(i,m,t)}(M),T=E;return null==T||T.type===f.a||x||(T=Object(y.jsx)(f.a,Object(i.a)({component:"span",className:D.label},p.typography,{children:T}))),Object(y.jsxs)(w,Object(i.a)({className:Object(s.default)(D.root,n),ownerState:M,ref:t},k,{children:[o.cloneElement(b,S),T]}))}));t.a=x},function(e,t,r){"use strict";var n=r(42),a=r(18),i=r(10),o=r(39),s=r(1684),c=r(440),u=r(578),f=r(52),d=r(35),l=r(891),h=r(1128);function p(e){return Object(l.a)("MuiStep",e)}Object(h.a)("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);var b=r(3),m=["active","children","className","completed","disabled","expanded","index","last"],g=Object(d.a)("div",{name:"MuiStep",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t[r.orientation],r.alternativeLabel&&t.alternativeLabel,r.completed&&t.completed]}})((function(e){var t=e.ownerState;return Object(a.a)({},"horizontal"===t.orientation&&{paddingLeft:8,paddingRight:8},t.alternativeLabel&&{flex:1,position:"relative"})})),v=i.forwardRef((function(e,t){var r=Object(f.a)({props:e,name:"MuiStep"}),d=r.active,l=r.children,h=r.className,v=r.completed,y=r.disabled,A=r.expanded,w=void 0!==A&&A,x=r.index,E=r.last,_=Object(n.a)(r,m),C=i.useContext(c.a),k=C.activeStep,B=C.connector,I=C.alternativeLabel,S=C.orientation,O=C.nonLinear,M=void 0!==d&&d,D=void 0!==v&&v,T=void 0!==y&&y;k===x?M=void 0===d||d:!O&&k>x?D=void 0===v||v:!O&&k :not(:first-of-type)":{marginLeft:8}})})),m=i.forwardRef((function(e,t){var r=Object(u.a)({props:e,name:"MuiCardActions"}),i=r.disableSpacing,c=void 0!==i&&i,f=r.className,d=Object(n.a)(r,p),m=Object(a.a)({},r,{disableSpacing:c}),g=function(e){var t=e.classes,r={root:["root",!e.disableSpacing&&"spacing"]};return Object(s.a)(r,l,t)}(m);return Object(h.jsx)(b,Object(a.a)({className:Object(o.default)(g.root,f),ownerState:m,ref:t},d))}));t.a=m},function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"c",(function(){return y})),r.d(t,"b",(function(){return A}));var n=r(1),a=r(2),i=r(102),o=r.n(i),s=r(4),c=r(11),u=o.a.BN,f=new c.b("bignumber/5.6.2"),d={},l=9007199254740991;var h=!1,p=function(){function e(t,r){Object(n.a)(this,e),t!==d&&f.throwError("cannot call constructor directly; use BigNumber.from",c.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return Object(a.a)(e,[{key:"fromTwos",value:function(e){return m(g(this).fromTwos(e))}},{key:"toTwos",value:function(e){return m(g(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return m(g(this).add(g(e)))}},{key:"sub",value:function(e){return m(g(this).sub(g(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&v("division-by-zero","div"),m(g(this).div(g(t)))}},{key:"mul",value:function(e){return m(g(this).mul(g(e)))}},{key:"mod",value:function(e){var t=g(e);return t.isNeg()&&v("division-by-zero","mod"),m(g(this).umod(t))}},{key:"pow",value:function(e){var t=g(e);return t.isNeg()&&v("negative-power","pow"),m(g(this).pow(t))}},{key:"and",value:function(e){var t=g(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","and"),m(g(this).and(t))}},{key:"or",value:function(e){var t=g(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","or"),m(g(this).or(t))}},{key:"xor",value:function(e){var t=g(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","xor"),m(g(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","mask"),m(g(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","shl"),m(g(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","shr"),m(g(this).shrn(e))}},{key:"eq",value:function(e){return g(this).eq(g(e))}},{key:"lt",value:function(e){return g(this).lt(g(e))}},{key:"lte",value:function(e){return g(this).lte(g(e))}},{key:"gt",value:function(e){return g(this).gt(g(e))}},{key:"gte",value:function(e){return g(this).gte(g(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return g(this).isZero()}},{key:"toNumber",value:function(){try{return g(this).toNumber()}catch(e){v("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return f.throwError("this platform does not support BigInt",c.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,f.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?f.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",c.b.errors.UNEXPECTED_ARGUMENT,{}):f.throwError("BigNumber.toString does not accept parameters",c.b.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(d,b(t)):t.match(/^-?[0-9]+$/)?new e(d,b(new u(t))):f.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&v("underflow","BigNumber.from",t),(t>=l||t<=-l)&&v("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(s.j)(r))return e.from(Object(s.i)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var a=r._hex;if(null==a&&"BigNumber"===r.type&&(a=r.hex),"string"===typeof a&&(Object(s.l)(a)||"-"===a[0]&&Object(s.l)(a.substring(1))))return e.from(a)}return f.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function b(e){if("string"!==typeof e)return b(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&f.throwArgumentError("invalid hex","value",e),"0x00"===(e=b(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function m(e){return p.from(b(e))}function g(e){var t=p.from(e).toHexString();return"-"===t[0]?new u("-"+t.substring(3),16):new u(t.substring(2),16)}function v(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),f.throwError(e,c.b.errors.NUMERIC_FAULT,n)}function y(e){return new u(e,36).toString(16)}function A(e){return new u(e,16).toString(36)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d}));var n,a,i=r(499),o=new(r(441).a)("strings/5.6.0");function s(e,t,r,n,i){if(e===a.BAD_PREFIX||e===a.UNEXPECTED_CONTINUE){for(var o=0,s=t+1;s>6===2;s++)o++;return o}return e===a.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n||(n={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(a||(a={}));var c=Object.freeze({error:function(e,t,r,n,a){return o.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:s,replace:function(e,t,r,n,i){return e===a.OVERLONG?(n.push(i),0):(n.push(65533),s(e,t,r))}});function u(e,t){null==t&&(t=c.error),e=Object(i.a)(e);for(var r=[],n=0;n>7!==0){var s=null,u=null;if(192===(224&o))s=1,u=127;else if(224===(240&o))s=2,u=2047;else{if(240!==(248&o)){n+=t(128===(192&o)?a.UNEXPECTED_CONTINUE:a.BAD_PREFIX,n-1,e,r);continue}s=3,u=65535}if(n-1+s>=e.length)n+=t(a.OVERRUN,n-1,e,r);else{for(var f=o&(1<<8-s-1)-1,d=0;d1114111?n+=t(a.OUT_OF_RANGE,n-1-s,e,r,f):f>=55296&&f<=57343?n+=t(a.UTF16_SURROGATE,n-1-s,e,r,f):f<=u?n+=t(a.OVERLONG,n-1-s,e,r,f):r.push(f))}}else r.push(o)}return r}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;t!=n.current&&(o.checkNormalize(),e=e.normalize(t));for(var r=[],a=0;a>6|192),r.push(63&s|128);else if(55296==(64512&s)){a++;var c=e.charCodeAt(a);if(a>=e.length||56320!==(64512&c))throw new Error("invalid utf-8 string");var u=65536+((1023&s)<<10)+(1023&c);r.push(u>>18|240),r.push(u>>12&63|128),r.push(u>>6&63|128),r.push(63&u|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(63&s|128)}return Object(i.a)(r)}function d(e,t){return u(e,t).map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}},function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d}));var n,a,i=r(68),o=new(r(96).a)("strings/5.6.0");function s(e,t,r,n,i){if(e===a.BAD_PREFIX||e===a.UNEXPECTED_CONTINUE){for(var o=0,s=t+1;s>6===2;s++)o++;return o}return e===a.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n||(n={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(a||(a={}));var c=Object.freeze({error:function(e,t,r,n,a){return o.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:s,replace:function(e,t,r,n,i){return e===a.OVERLONG?(n.push(i),0):(n.push(65533),s(e,t,r))}});function u(e,t){null==t&&(t=c.error),e=Object(i.a)(e);for(var r=[],n=0;n>7!==0){var s=null,u=null;if(192===(224&o))s=1,u=127;else if(224===(240&o))s=2,u=2047;else{if(240!==(248&o)){n+=t(128===(192&o)?a.UNEXPECTED_CONTINUE:a.BAD_PREFIX,n-1,e,r);continue}s=3,u=65535}if(n-1+s>=e.length)n+=t(a.OVERRUN,n-1,e,r);else{for(var f=o&(1<<8-s-1)-1,d=0;d1114111?n+=t(a.OUT_OF_RANGE,n-1-s,e,r,f):f>=55296&&f<=57343?n+=t(a.UTF16_SURROGATE,n-1-s,e,r,f):f<=u?n+=t(a.OVERLONG,n-1-s,e,r,f):r.push(f))}}else r.push(o)}return r}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;t!=n.current&&(o.checkNormalize(),e=e.normalize(t));for(var r=[],a=0;a>6|192),r.push(63&s|128);else if(55296==(64512&s)){a++;var c=e.charCodeAt(a);if(a>=e.length||56320!==(64512&c))throw new Error("invalid utf-8 string");var u=65536+((1023&s)<<10)+(1023&c);r.push(u>>18|240),r.push(u>>12&63|128),r.push(u>>6&63|128),r.push(63&u|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(63&s|128)}return Object(i.a)(r)}function d(e,t){return u(e,t).map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}},function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"c",(function(){return y})),r.d(t,"b",(function(){return A}));var n=r(1),a=r(2),i=r(16),o=r.n(i),s=r(34),c=r(97),u=o.a.BN,f=new c.a("bignumber/5.6.0"),d={},l=9007199254740991;var h=!1,p=function(){function e(t,r){Object(n.a)(this,e),f.checkNew(this instanceof e?this.constructor:void 0,e),t!==d&&f.throwError("cannot call constructor directly; use BigNumber.from",c.a.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return Object(a.a)(e,[{key:"fromTwos",value:function(e){return m(g(this).fromTwos(e))}},{key:"toTwos",value:function(e){return m(g(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return m(g(this).add(g(e)))}},{key:"sub",value:function(e){return m(g(this).sub(g(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&v("division-by-zero","div"),m(g(this).div(g(t)))}},{key:"mul",value:function(e){return m(g(this).mul(g(e)))}},{key:"mod",value:function(e){var t=g(e);return t.isNeg()&&v("division-by-zero","mod"),m(g(this).umod(t))}},{key:"pow",value:function(e){var t=g(e);return t.isNeg()&&v("negative-power","pow"),m(g(this).pow(t))}},{key:"and",value:function(e){var t=g(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","and"),m(g(this).and(t))}},{key:"or",value:function(e){var t=g(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","or"),m(g(this).or(t))}},{key:"xor",value:function(e){var t=g(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","xor"),m(g(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","mask"),m(g(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","shl"),m(g(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","shr"),m(g(this).shrn(e))}},{key:"eq",value:function(e){return g(this).eq(g(e))}},{key:"lt",value:function(e){return g(this).lt(g(e))}},{key:"lte",value:function(e){return g(this).lte(g(e))}},{key:"gt",value:function(e){return g(this).gt(g(e))}},{key:"gte",value:function(e){return g(this).gte(g(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return g(this).isZero()}},{key:"toNumber",value:function(){try{return g(this).toNumber()}catch(e){v("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return f.throwError("this platform does not support BigInt",c.a.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,f.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?f.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",c.a.errors.UNEXPECTED_ARGUMENT,{}):f.throwError("BigNumber.toString does not accept parameters",c.a.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(d,b(t)):t.match(/^-?[0-9]+$/)?new e(d,b(new u(t))):f.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&v("underflow","BigNumber.from",t),(t>=l||t<=-l)&&v("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(s.h)(r))return e.from(Object(s.g)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var a=r._hex;if(null==a&&"BigNumber"===r.type&&(a=r.hex),"string"===typeof a&&(Object(s.j)(a)||"-"===a[0]&&Object(s.j)(a.substring(1))))return e.from(a)}return f.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function b(e){if("string"!==typeof e)return b(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&f.throwArgumentError("invalid hex","value",e),"0x00"===(e=b(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function m(e){return p.from(b(e))}function g(e){var t=p.from(e).toHexString();return"-"===t[0]?new u("-"+t.substring(3),16):new u(t.substring(2),16)}function v(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),f.throwError(e,c.a.errors.NUMERIC_FAULT,n)}function y(e){return new u(e,36).toString(16)}function A(e){return new u(e,16).toString(36)}}]]); +//# sourceMappingURL=2.6eab0e3c.chunk.js.map \ No newline at end of file diff --git a/static/js/2.6eab0e3c.chunk.js.LICENSE.txt b/static/js/2.6eab0e3c.chunk.js.LICENSE.txt new file mode 100644 index 000000000..ccbc6d2d7 --- /dev/null +++ b/static/js/2.6eab0e3c.chunk.js.LICENSE.txt @@ -0,0 +1,452 @@ +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + +/*! + * Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + * Copyright 2022 Fonticons, Inc. + */ + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +/*! + * v2.1.4-104-gc868b3a + * + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +/*! For license information please see web3.min.js.LICENSE.txt */ + +/*! MIT License. Copyright 2015-2018 Richard Moore . See LICENSE.txt. */ + +/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */ + +/*! https://mths.be/punycode v1.4.1 by @mathias */ + +/*! https://mths.be/utf8js v2.1.2 by @mathias */ + +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ + +/*! queue-microtask. MIT License. Feross Aboukhadijeh */ + +/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ + +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ + +/*! typedarray-to-buffer. MIT License. Feross Aboukhadijeh */ + +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** + * [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 + */ + +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */ + +/** + * React Router DOM v6.3.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ + +/** + * Support for translating between Buffer instances and JavaScript + * native types. + * + * {@link module:Layout~Layout|Layout} is the basis of a class + * hierarchy that associates property names with sequences of encoded + * bytes. + * + * Layouts are supported for these scalar (numeric) types: + * * {@link module:Layout~UInt|Unsigned integers in little-endian + * format} with {@link module:Layout.u8|8-bit}, {@link + * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit}, + * {@link module:Layout.u32|32-bit}, {@link + * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit} + * representation ranges; + * * {@link module:Layout~UIntBE|Unsigned integers in big-endian + * format} with {@link module:Layout.u16be|16-bit}, {@link + * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit}, + * {@link module:Layout.u40be|40-bit}, and {@link + * module:Layout.u48be|48-bit} representation ranges; + * * {@link module:Layout~Int|Signed integers in little-endian + * format} with {@link module:Layout.s8|8-bit}, {@link + * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit}, + * {@link module:Layout.s32|32-bit}, {@link + * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit} + * representation ranges; + * * {@link module:Layout~IntBE|Signed integers in big-endian format} + * with {@link module:Layout.s16be|16-bit}, {@link + * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit}, + * {@link module:Layout.s40be|40-bit}, and {@link + * module:Layout.s48be|48-bit} representation ranges; + * * 64-bit integral values that decode to an exact (if magnitude is + * less than 2^53) or nearby integral Number in {@link + * module:Layout.nu64|unsigned little-endian}, {@link + * module:Layout.nu64be|unsigned big-endian}, {@link + * module:Layout.ns64|signed little-endian}, and {@link + * module:Layout.ns64be|unsigned big-endian} encodings; + * * 32-bit floating point values with {@link + * module:Layout.f32|little-endian} and {@link + * module:Layout.f32be|big-endian} representations; + * * 64-bit floating point values with {@link + * module:Layout.f64|little-endian} and {@link + * module:Layout.f64be|big-endian} representations; + * * {@link module:Layout.const|Constants} that take no space in the + * encoded expression. + * + * and for these aggregate types: + * * {@link module:Layout.seq|Sequence}s of instances of a {@link + * module:Layout~Layout|Layout}, with JavaScript representation as + * an Array and constant or data-dependent {@link + * module:Layout~Sequence#count|length}; + * * {@link module:Layout.struct|Structure}s that aggregate a + * heterogeneous sequence of {@link module:Layout~Layout|Layout} + * instances, with JavaScript representation as an Object; + * * {@link module:Layout.union|Union}s that support multiple {@link + * module:Layout~VariantLayout|variant layouts} over a fixed + * (padded) or variable (not padded) span of bytes, using an + * unsigned integer at the start of the data or a separate {@link + * module:Layout.unionLayoutDiscriminator|layout element} to + * determine which layout to use when interpreting the buffer + * contents; + * * {@link module:Layout.bits|BitStructure}s that contain a sequence + * of individual {@link + * module:Layout~BitStructure#addField|BitField}s packed into an 8, + * 16, 24, or 32-bit unsigned integer starting at the least- or + * most-significant bit; + * * {@link module:Layout.cstr|C strings} of varying length; + * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link + * module:Layout~Blob#length|length} raw data. + * + * All {@link module:Layout~Layout|Layout} instances are immutable + * after construction, to prevent internal state from becoming + * inconsistent. + * + * @local Layout + * @local ExternalLayout + * @local GreedyCount + * @local OffsetLayout + * @local UInt + * @local UIntBE + * @local Int + * @local IntBE + * @local NearUInt64 + * @local NearUInt64BE + * @local NearInt64 + * @local NearInt64BE + * @local Float + * @local FloatBE + * @local Double + * @local DoubleBE + * @local Sequence + * @local Structure + * @local UnionDiscriminator + * @local UnionLayoutDiscriminator + * @local Union + * @local VariantLayout + * @local BitStructure + * @local BitField + * @local Boolean + * @local Blob + * @local CString + * @local Constant + * @local bindConstructorLayout + * @module Layout + * @license MIT + * @author Peter A. Bigot + * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub} + */ + +/** + * Support for translating between Uint8Array instances and JavaScript + * native types. + * + * {@link module:Layout~Layout|Layout} is the basis of a class + * hierarchy that associates property names with sequences of encoded + * bytes. + * + * Layouts are supported for these scalar (numeric) types: + * * {@link module:Layout~UInt|Unsigned integers in little-endian + * format} with {@link module:Layout.u8|8-bit}, {@link + * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit}, + * {@link module:Layout.u32|32-bit}, {@link + * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit} + * representation ranges; + * * {@link module:Layout~UIntBE|Unsigned integers in big-endian + * format} with {@link module:Layout.u16be|16-bit}, {@link + * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit}, + * {@link module:Layout.u40be|40-bit}, and {@link + * module:Layout.u48be|48-bit} representation ranges; + * * {@link module:Layout~Int|Signed integers in little-endian + * format} with {@link module:Layout.s8|8-bit}, {@link + * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit}, + * {@link module:Layout.s32|32-bit}, {@link + * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit} + * representation ranges; + * * {@link module:Layout~IntBE|Signed integers in big-endian format} + * with {@link module:Layout.s16be|16-bit}, {@link + * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit}, + * {@link module:Layout.s40be|40-bit}, and {@link + * module:Layout.s48be|48-bit} representation ranges; + * * 64-bit integral values that decode to an exact (if magnitude is + * less than 2^53) or nearby integral Number in {@link + * module:Layout.nu64|unsigned little-endian}, {@link + * module:Layout.nu64be|unsigned big-endian}, {@link + * module:Layout.ns64|signed little-endian}, and {@link + * module:Layout.ns64be|unsigned big-endian} encodings; + * * 32-bit floating point values with {@link + * module:Layout.f32|little-endian} and {@link + * module:Layout.f32be|big-endian} representations; + * * 64-bit floating point values with {@link + * module:Layout.f64|little-endian} and {@link + * module:Layout.f64be|big-endian} representations; + * * {@link module:Layout.const|Constants} that take no space in the + * encoded expression. + * + * and for these aggregate types: + * * {@link module:Layout.seq|Sequence}s of instances of a {@link + * module:Layout~Layout|Layout}, with JavaScript representation as + * an Array and constant or data-dependent {@link + * module:Layout~Sequence#count|length}; + * * {@link module:Layout.struct|Structure}s that aggregate a + * heterogeneous sequence of {@link module:Layout~Layout|Layout} + * instances, with JavaScript representation as an Object; + * * {@link module:Layout.union|Union}s that support multiple {@link + * module:Layout~VariantLayout|variant layouts} over a fixed + * (padded) or variable (not padded) span of bytes, using an + * unsigned integer at the start of the data or a separate {@link + * module:Layout.unionLayoutDiscriminator|layout element} to + * determine which layout to use when interpreting the buffer + * contents; + * * {@link module:Layout.bits|BitStructure}s that contain a sequence + * of individual {@link + * module:Layout~BitStructure#addField|BitField}s packed into an 8, + * 16, 24, or 32-bit unsigned integer starting at the least- or + * most-significant bit; + * * {@link module:Layout.cstr|C strings} of varying length; + * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link + * module:Layout~Blob#length|length} raw data. + * + * All {@link module:Layout~Layout|Layout} instances are immutable + * after construction, to prevent internal state from becoming + * inconsistent. + * + * @local Layout + * @local ExternalLayout + * @local GreedyCount + * @local OffsetLayout + * @local UInt + * @local UIntBE + * @local Int + * @local IntBE + * @local NearUInt64 + * @local NearUInt64BE + * @local NearInt64 + * @local NearInt64BE + * @local Float + * @local FloatBE + * @local Double + * @local DoubleBE + * @local Sequence + * @local Structure + * @local UnionDiscriminator + * @local UnionLayoutDiscriminator + * @local Union + * @local VariantLayout + * @local BitStructure + * @local BitField + * @local Boolean + * @local Blob + * @local CString + * @local Constant + * @local bindConstructorLayout + * @module Layout + * @license MIT + * @author Peter A. Bigot + * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub} + */ + +/** + * [js-sha256]{@link https://github.com/emn178/js-sha256} + * + * @version 0.9.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2014-2017 + * @license MIT + */ + +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.5.7 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2016 + * @license MIT + */ + +/** + * [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 + */ + +/** @license MUI v5.6.1 + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v0.20.2 + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v17.0.2 + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v17.0.2 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v17.0.2 + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v17.0.2 + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + +/** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ diff --git a/static/js/3.b445a58f.chunk.js b/static/js/3.b445a58f.chunk.js new file mode 100644 index 000000000..c67b77bdc --- /dev/null +++ b/static/js/3.b445a58f.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 3.b445a58f.chunk.js.LICENSE.txt */ +(this.webpackJsonpexample=this.webpackJsonpexample||[]).push([[3],{4154:function(t,e){var n,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!==typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return"undefined"!==typeof n},e.toSJIS=function(t){return n(t)}},4155:function(t,e,n){var r=n(4160),i=n(4161);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return i.testNumeric(t)?e.NUMERIC:i.testAlphanumeric(t)?e.ALPHANUMERIC:i.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!==typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(r){return n}}},4156:function(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&"undefined"!==typeof t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!==typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(r){return n}}},4159:function(t,e,n){var r=n(4156),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],a=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return a[4*(t-1)+0];case r.M:return a[4*(t-1)+1];case r.Q:return a[4*(t-1)+2];case r.H:return a[4*(t-1)+3];default:return}}},4160:function(t,e){e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},4161:function(t,e){var n="[0-9]+",r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(r=r.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(i,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var a=new RegExp("^"+r+"$"),o=new RegExp("^"+n+"$"),c=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return a.test(t)},e.testNumeric=function(t){return o.test(t)},e.testAlphanumeric=function(t){return c.test(t)}},4162:function(t,e){function n(t){if("number"===typeof t&&(t=t.toString()),"string"!==typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");var n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});var e="undefined"===typeof t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:r,scale:r?4:i,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){var r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){for(var i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),c=Math.floor((i+2*r.margin)*o),l=r.margin*o,s=[r.color.light,r.color.dark],u=0;u=l&&d>=l&&u>r&1),r<6?t.set(r,8,i,!0):r<8?t.set(r+1,8,i,!0):t.set(a-15+r,8,i,!0),r<8?t.set(8,a-r-1,i,!0):r<9?t.set(8,15-r-1+1,i,!0):t.set(8,15-r-1,i,!0);t.set(a-8,8,1,!0)}function g(t,e,n){var i=new a;n.forEach((function(e){i.put(e.mode.bit,4),i.put(e.getLength(),v.getCharCountIndicator(e.mode,t)),e.write(i)}));var o=8*(r.getSymbolTotalCodewords(t)-u.getTotalCodewordsCount(t,e));for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);for(var c=(o-i.getLengthInBits())/8,l=0;l=0&&c<=6&&(0===s||6===s)||s>=0&&s<=6&&(0===c||6===c)||c>=2&&c<=4&&s>=2&&s<=4?t.set(a+c,o+s,!0,!0):t.set(a+c,o+s,!1,!0))}(w,e),function(t){for(var e=t.size,n=8;n=7&&function(t,e){for(var n,r,i,a=t.size,o=h.getEncodedBits(e),c=0;c<18;c++)n=Math.floor(c/3),r=c%3+a-8-3,i=1===(o>>c&1),t.set(n,r,i,!0),t.set(r,n,i,!0)}(w,e),function(t,e){for(var n=t.size,r=-1,i=n-1,a=7,o=0,c=n-1;c>0;c-=2)for(6===c&&c--;;){for(var l=0;l<2;l++)if(!t.isReserved(i,c-l)){var s=!1;o>>a&1)),t.set(i,c-l,s),-1===--a&&(o++,a=7)}if((i+=r)<0||n<=i){i-=r,r=-r;break}}}(w,v),isNaN(i)&&(i=s.getBestMask(w,p.bind(null,w,n))),s.applyMask(i,w),p(w,n,i),{modules:w,version:e,errorCorrectionLevel:n,maskPattern:i,segments:a}}e.create=function(t,e){if("undefined"===typeof t||""===t)throw new Error("No input text");var n,a,o=i.M;return"undefined"!==typeof e&&(o=i.from(e.errorCorrectionLevel,i.M),n=h.from(e.version),a=s.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),b(t,n,o,a)}},4168:function(t,e){function n(){this.buffer=[],this.length=0}n.prototype={get:function(t){var e=Math.floor(t/8);return 1===(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=n},4169:function(t,e){function n(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}n.prototype.set=function(t,e,n,r){var i=t*this.size+e;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(t,e){return this.data[t*this.size+e]},n.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},n.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=n},4170:function(t,e,n){var r=n(4154).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,n=r(t),i=145===n?26:2*Math.ceil((n-13)/(2*e-2)),a=[n-7],o=1;o=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){for(var e=t.size,r=0,i=0,a=0,o=null,c=null,l=0;l=5&&(r+=n+(i-5)),o=u,i=1),(u=t.get(s,l))===c?a++:(a>=5&&(r+=n+(a-5)),c=u,a=1)}i>=5&&(r+=n+(i-5)),a>=5&&(r+=n+(a-5))}return r},e.getPenaltyN2=function(t){for(var e=t.size,n=0,i=0;i=10&&(1488===r||93===r)&&n++,a=a<<1&2047|t.get(c,o),c>=10&&(1488===a||93===a)&&n++}return n*i},e.getPenaltyN4=function(t){for(var e=0,n=t.data.length,r=0;r0){var a=new Uint8Array(this.degree);return a.set(n,i),a}return n},t.exports=i},4174:function(t,e,n){var r=n(4175);e.mul=function(t,e){for(var n=new Uint8Array(t.length+e.length-1),i=0;i=0;){for(var i=n[0],a=0;a1)return function(t,n){for(var r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,o.MIXED))return r}(t,i);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(var i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}(r.mode,r.getLength(),i)},e.getEncodedBits=function(t){if(!c.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;r.getBCHDigit(e)-l>=0;)e^=7973<=0;)a^=1335<=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(c))},e.rawSplit=function(t){return e.fromArray(f(t,s.isKanjiModeEnabled()))}},4179:function(t,e,n){var r=n(4155);function i(t){this.mode=r.NUMERIC,this.data=t.toString()}i.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);var i=this.data.length-e;i>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*i+1))},t.exports=i},4180:function(t,e,n){var r=n(4155),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function a(t){this.mode=r.ALPHANUMERIC,this.data=t}a.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var n=45*i.indexOf(this.data[e]);n+=i.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(i.indexOf(this.data[e]),6)},t.exports=a},4181:function(t,e,n){var r=n(1690),i=n(4155);function a(t){this.mode=i.BYTE,"string"===typeof t&&(t=r(t)),this.data=new Uint8Array(t)}a.getBitsLength=function(t){return 8*t},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(t){for(var e=0,n=this.data.length;e=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=a},4183:function(t,e,n){var r=n(4162);e.render=function(t,e,n){var i=n,a=e;"undefined"!==typeof i||e&&e.getContext||(i=e,e=void 0),e||(a=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);var o=r.getImageWidth(t.modules.size,i),c=a.getContext("2d"),l=c.createImageData(o,o);return r.qrToImageData(l.data,t,i),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(c,a,o),c.putImageData(l,0,0),a},e.renderToDataURL=function(t,n,r){var i=r;"undefined"!==typeof i||n&&n.getContext||(i=n,n=void 0),i||(i={});var a=e.render(t,n,i),o=i.type||"image/png",c=i.rendererOpts||{};return a.toDataURL(o,c.quality)}},4184:function(t,e,n){var r=n(4162);function i(t,e){var n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function a(t,e,n){var r=t+e;return"undefined"!==typeof n&&(r+=" "+n),r}e.render=function(t,e,n){var o=r.getOptions(e),c=t.modules.size,l=t.modules.data,s=c+2*o.margin,u=o.color.light.a?"':"",d="0&&s>0&&t[l-1]||(r+=o?a("M",s+n,.5+u+n):a("m",i,0),i=0,o=!1),s+1',h='viewBox="0 0 '+s+" "+s+'"',f=''+u+d+"\n";return"function"===typeof n&&n(null,f),f}},4185:function(t,e,n){"use strict";n.r(e),n.d(e,"WcmModal",(function(){return pc})),n.d(e,"WcmQrCode",(function(){return uo}));var r,i,a=n(14),o=n(0),c=n(9),l=n(1),s=n(2),u=n(7),d=n(8),h=n(192),f=n(25),v=n(33),m=n(43),p=window,g=p.ShadowRoot&&(void 0===p.ShadyCSS||p.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,b=Symbol(),w=new WeakMap,y=function(){function t(e,n,r){if(Object(l.a)(this,t),this._$cssResult$=!0,r!==b)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}return Object(s.a)(t,[{key:"styleSheet",get:function(){var t=this.o,e=this.t;if(g&&void 0===t){var n=void 0!==e&&1===e.length;n&&(t=w.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&w.set(e,t))}return t}},{key:"toString",value:function(){return this.cssText}}]),t}(),x=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r>>0,1)}},{key:"_$Eg",value:function(){var t=this;this.constructor.elementProperties.forEach((function(e,n){t.hasOwnProperty(n)&&(t._$Ei.set(n,t[n]),delete t[n])}))}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){g?t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):e.forEach((function(e){var n=document.createElement("style"),r=p.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)}))}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$EO",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$,i=this.constructor._$Ep(t,r);if(void 0!==i&&!0===r.reflect){var a=(void 0!==(null===(n=r.converter)||void 0===n?void 0:n.toAttribute)?r.converter:_).toAttribute(e,r.type);this._$El=t,null==a?this.removeAttribute(i):this.setAttribute(i,a),this._$El=null}}},{key:"_$AK",value:function(t,e){var n,r=this.constructor,i=r._$Ev.get(t);if(void 0!==i&&this._$El!==i){var a=r.getPropertyOptions(i),o="function"==typeof a.converter?{fromAttribute:a.converter}:void 0!==(null===(n=a.converter)||void 0===n?void 0:n.fromAttribute)?a.converter:_;this._$El=i,this[i]=o.fromAttribute(e,a.type),this._$El=null}}},{key:"requestUpdate",value:function(t,e,n){var r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||E)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}},{key:"_$Ej",value:function(){var t=Object(c.a)(Object(o.a)().mark((function t(){var e;return Object(o.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$E_;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])})));return function(){return t.apply(this,arguments)}}()},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var t,e=this;if(this.isUpdatePending){this.hasUpdated,this._$Ei&&(this._$Ei.forEach((function(t,n){return e[n]=t})),this._$Ei=void 0);var n=!1,r=this._$AL;try{(n=this.shouldUpdate(r))?(this.willUpdate(r),null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(r)):this._$Ek()}catch(t){throw n=!1,this._$Ek(),t}n&&this._$AE(r)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$Ek",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$E_}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;void 0!==this._$EC&&(this._$EC.forEach((function(t,n){return e._$EO(n,e[n],t)})),this._$EC=void 0),this._$Ek()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}},{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this.elementProperties.forEach((function(n,r){var i=t._$Ep(r,n);void 0!==i&&(t._$Ev.set(i,r),e.push(i))})),e}},{key:"createProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$;if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){var n="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}},{key:"getPropertyDescriptor",value:function(t,e,n){return{get:function(){return this[e]},set:function(r){var i=this[t];this[e]=r,this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){return this.elementProperties.get(t)||$}},{key:"finalize",value:function(){if(this.hasOwnProperty(I))return!1;this[I]=!0;var t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=Object(a.a)(t.h)),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){var e,n=this.properties,r=[].concat(Object(a.a)(Object.getOwnPropertyNames(n)),Object(a.a)(Object.getOwnPropertySymbols(n))),i=Object(v.a)(r);try{for(i.s();!(e=i.n()).done;){var o=e.value;this.createProperty(o,n[o])}}catch(c){i.e(c)}finally{i.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,r=new Set(t.flat(1/0).reverse()),i=Object(v.a)(r);try{for(i.s();!(n=i.n()).done;){var a=n.value;e.unshift(O(a))}}catch(o){i.e(o)}finally{i.f()}}else void 0!==t&&e.push(O(t));return e}},{key:"_$Ep",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]),n}(Object(m.a)(HTMLElement));M[I]=!0,M.elementProperties=new Map,M.elementStyles=[],M.shadowRootOptions={mode:"open"},null==C||C({ReactiveElement:M}),(null!==(r=j.reactiveElementVersions)&&void 0!==r?r:j.reactiveElementVersions=[]).push("1.6.2");var T=window,P=T.trustedTypes,R=P?P.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,S="$lit$",N="lit$".concat((Math.random()+"").slice(9),"$"),L="?"+N,B="<".concat(L,">"),D=document,U=function(){return D.createComment("")},W=function(t){return null===t||"object"!=typeof t&&"function"!=typeof t},H=Array.isArray,z=function(t){return H(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator])},Z="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,q=/>/g,K=RegExp(">|".concat(Z,"(?:([^\\s\"'>=/]+)(").concat(Z,"*=").concat(Z,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),Y=/'/g,J=/"/g,Q=/^(?:script|style|textarea|title)$/i,G=function(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i":"",o=F,c=0;c"===u[0]?(o=null!=n?n:F,d=-1):void 0===u[1]?d=-2:(d=o.lastIndex-u[2].length,s=u[1],o=void 0===u[3]?K:'"'===u[3]?J:Y):o===J||o===Y?o=K:o===V||o===q?o=F:(o=K,n=void 0);var f=o===K&&t[c+1].startsWith("/>")?" ":"";a+=o===F?l+B:d>=0?(i.push(s),l.slice(0,d)+S+l.slice(d)+N+f):l+N+(-2===d?(i.push(void 0),c):f)}return[it(t,a+(t[r]||"")+(2===e?"":"")),i]},ot=function(){function t(e,n){var r,i=e.strings,o=e._$litType$;Object(l.a)(this,t),this.parts=[];var c=0,s=0,u=i.length-1,d=this.parts,h=at(i,o),m=Object(f.a)(h,2),p=m[0],g=m[1];if(this.el=t.createElement(p,n),rt.currentNode=this.el.content,2===o){var b=this.el.content,w=b.firstChild;w.remove(),b.append.apply(b,Object(a.a)(w.childNodes))}for(;null!==(r=rt.nextNode())&&d.length0){r.textContent=P?P.emptyScript:"";for(var T=0;T2&&void 0!==arguments[2]?arguments[2]:t,c=arguments.length>3?arguments[3]:void 0;if(e===tt)return e;var l=void 0!==c?null===(n=o._$Co)||void 0===n?void 0:n[c]:o._$Cl,s=W(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==s&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===s?l=void 0:(l=new s(t))._$AT(t,o,c),void 0!==c?(null!==(i=(a=o)._$Co)&&void 0!==i?i:a._$Co=[])[c]=l:o._$Cl=l),void 0!==l&&(e=ct(t,l._$AS(t,e.values),l,c)),e}var lt=function(){function t(e,n){Object(l.a)(this,t),this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}return Object(s.a)(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(t){var e,n=this._$AD,r=n.el.content,i=n.parts,a=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:D).importNode(r,!0);rt.currentNode=a;for(var o=rt.nextNode(),c=0,l=0,s=i[0];void 0!==s;){if(c===s.index){var u=void 0;2===s.type?u=new st(o,o.nextSibling,this,t):1===s.type?u=new s.ctor(o,s.name,s.strings,this,t):6===s.type&&(u=new mt(o,this,t)),this._$AV.push(u),s=i[++l]}c!==(null==s?void 0:s.index)&&(o=rt.nextNode(),c++)}return rt.currentNode=D,a}},{key:"v",value:function(t){var e,n=0,r=Object(v.a)(this._$AV);try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}catch(a){r.e(a)}finally{r.f()}}}]),t}(),st=function(){function t(e,n,r,i){var a;Object(l.a)(this,t),this.type=2,this._$AH=et,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=i,this._$Cp=null===(a=null==i?void 0:i.isConnected)||void 0===a||a}return Object(s.a)(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){t=ct(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),W(t)?t===et||null==t||""===t?(this._$AH!==et&&this._$AR(),this._$AH=et):t!==this._$AH&&t!==tt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):z(t)?this.T(t):this._(t)}},{key:"k",value:function(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}},{key:"$",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}},{key:"_",value:function(t){this._$AH!==et&&W(this._$AH)?this._$AA.nextSibling.data=t:this.$(D.createTextNode(t)),this._$AH=t}},{key:"g",value:function(t){var e,n=t.values,r=t._$litType$,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=ot.createElement(it(r.h,r.h[0]),this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.v(n);else{var a=new lt(i,this),o=a.u(this.options);a.v(n),this.$(o),this._$AH=a}}},{key:"_$AC",value:function(t){var e=nt.get(t.strings);return void 0===e&&nt.set(t.strings,e=new ot(t)),e}},{key:"T",value:function(e){H(this._$AH)||(this._$AH=[],this._$AR());var n,r,i=this._$AH,a=0,o=Object(v.a)(e);try{for(o.s();!(r=o.n()).done;){var c=r.value;a===i.length?i.push(n=new t(this.k(U()),this.k(U()),this,this.options)):n=i[a],n._$AI(c),a++}}catch(l){o.e(l)}finally{o.f()}a0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,n);e&&e!==this._$AB;){var r=e.nextSibling;e.remove(),e=r}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),ut=function(){function t(e,n,r,i,a){Object(l.a)(this,t),this.type=1,this._$AH=et,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=a,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=et}return Object(s.a)(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=this.strings,a=!1;if(void 0===i)t=ct(this,t,e,0),(a=!W(t)||t!==this._$AH&&t!==tt)&&(this._$AH=t);else{var o,c,l=t;for(t=i[0],o=0;o1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:et)!==tt){var n=this._$AH,r=t===et&&n!==et||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==et&&(n===et||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}]),n}(ut),mt=function(){function t(e,n,r){Object(l.a)(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}return Object(s.a)(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){ct(this,t)}}]),t}(),pt=T.litHtmlPolyfillSupport;null==pt||pt(ot,st),(null!==(i=T.litHtmlVersions)&&void 0!==i?i:T.litHtmlVersions=[]).push("2.8.0");var gt,bt=n(23),wt=n(41),yt=n(40),xt=window,Ot=xt.trustedTypes,jt=Ot?Ot.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,kt="$lit$",At="lit$".concat((Math.random()+"").slice(9),"$"),Ct="?"+At,_t="<".concat(Ct,">"),Et=document,$t=function(){return Et.createComment("")},It=function(t){return null===t||"object"!=typeof t&&"function"!=typeof t},Mt=Array.isArray,Tt=function(t){return Mt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator])},Pt="[ \t\n\f\r]",Rt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,St=/-->/g,Nt=/>/g,Lt=RegExp(">|".concat(Pt,"(?:([^\\s\"'>=/]+)(").concat(Pt,"*=").concat(Pt,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),Bt=/'/g,Dt=/"/g,Ut=/^(?:script|style|textarea|title)$/i,Wt=function(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i":"",o=Rt,c=0;c"===u[0]?(o=null!=n?n:Rt,d=-1):void 0===u[1]?d=-2:(d=o.lastIndex-u[2].length,s=u[1],o=void 0===u[3]?Lt:'"'===u[3]?Dt:Bt):o===Dt||o===Bt?o=Lt:o===St||o===Nt?o=Rt:(o=Lt,n=void 0);var f=o===Lt&&t[c+1].startsWith("/>")?" ":"";a+=o===Rt?l+_t:d>=0?(i.push(s),l.slice(0,d)+kt+l.slice(d)+At+f):l+At+(-2===d?(i.push(void 0),c):f)}var v=a+(t[r]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==jt?jt.createHTML(v):v,i]},Yt=function(){function t(e,n){var r,i=e.strings,o=e._$litType$;Object(l.a)(this,t),this.parts=[];var c=0,s=0,u=i.length-1,d=this.parts,h=Kt(i,o),m=Object(f.a)(h,2),p=m[0],g=m[1];if(this.el=t.createElement(p,n),qt.currentNode=this.el.content,2===o){var b=this.el.content,w=b.firstChild;w.remove(),b.append.apply(b,Object(a.a)(w.childNodes))}for(;null!==(r=qt.nextNode())&&d.length0){r.textContent=Ot?Ot.emptyScript:"";for(var T=0;T2&&void 0!==arguments[2]?arguments[2]:t,c=arguments.length>3?arguments[3]:void 0;if(e===Zt)return e;var l=void 0!==c?null===(n=o._$Co)||void 0===n?void 0:n[c]:o._$Cl,s=It(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==s&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===s?l=void 0:(l=new s(t))._$AT(t,o,c),void 0!==c?(null!==(i=(a=o)._$Co)&&void 0!==i?i:a._$Co=[])[c]=l:o._$Cl=l),void 0!==l&&(e=Jt(t,l._$AS(t,e.values),l,c)),e}var Qt=function(){function t(e,n){Object(l.a)(this,t),this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}return Object(s.a)(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(t){var e,n=this._$AD,r=n.el.content,i=n.parts,a=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:Et).importNode(r,!0);qt.currentNode=a;for(var o=qt.nextNode(),c=0,l=0,s=i[0];void 0!==s;){if(c===s.index){var u=void 0;2===s.type?u=new Gt(o,o.nextSibling,this,t):1===s.type?u=new s.ctor(o,s.name,s.strings,this,t):6===s.type&&(u=new ie(o,this,t)),this._$AV.push(u),s=i[++l]}c!==(null==s?void 0:s.index)&&(o=qt.nextNode(),c++)}return qt.currentNode=Et,a}},{key:"v",value:function(t){var e,n=0,r=Object(v.a)(this._$AV);try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}catch(a){r.e(a)}finally{r.f()}}}]),t}(),Gt=function(){function t(e,n,r,i){var a;Object(l.a)(this,t),this.type=2,this._$AH=Ft,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=i,this._$Cp=null===(a=null==i?void 0:i.isConnected)||void 0===a||a}return Object(s.a)(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){t=Jt(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),It(t)?t===Ft||null==t||""===t?(this._$AH!==Ft&&this._$AR(),this._$AH=Ft):t!==this._$AH&&t!==Zt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):Tt(t)?this.T(t):this._(t)}},{key:"k",value:function(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}},{key:"$",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}},{key:"_",value:function(t){this._$AH!==Ft&&It(this._$AH)?this._$AA.nextSibling.data=t:this.$(Et.createTextNode(t)),this._$AH=t}},{key:"g",value:function(t){var e,n=t.values,r=t._$litType$,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=Yt.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.v(n);else{var a=new Qt(i,this),o=a.u(this.options);a.v(n),this.$(o),this._$AH=a}}},{key:"_$AC",value:function(t){var e=Vt.get(t.strings);return void 0===e&&Vt.set(t.strings,e=new Yt(t)),e}},{key:"T",value:function(e){Mt(this._$AH)||(this._$AH=[],this._$AR());var n,r,i=this._$AH,a=0,o=Object(v.a)(e);try{for(o.s();!(r=o.n()).done;){var c=r.value;a===i.length?i.push(n=new t(this.k($t()),this.k($t()),this,this.options)):n=i[a],n._$AI(c),a++}}catch(l){o.e(l)}finally{o.f()}a0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,n);e&&e!==this._$AB;){var r=e.nextSibling;e.remove(),e=r}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),Xt=function(){function t(e,n,r,i,a){Object(l.a)(this,t),this.type=1,this._$AH=Ft,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=a,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Ft}return Object(s.a)(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=this.strings,a=!1;if(void 0===i)t=Jt(this,t,e,0),(a=!It(t)||t!==this._$AH&&t!==Zt)&&(this._$AH=t);else{var o,c,l=t;for(t=i[0],o=0;o1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:Ft)!==Zt){var n=this._$AH,r=t===Ft&&n!==Ft||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==Ft&&(n===Ft||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}]),n}(Xt),ie=function(){function t(e,n,r){Object(l.a)(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}return Object(s.a)(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){Jt(this,t)}}]),t}(),ae=xt.litHtmlPolyfillSupport;null==ae||ae(Yt,Gt),(null!==(gt=xt.litHtmlVersions)&&void 0!==gt?gt:xt.litHtmlVersions=[]).push("2.7.4");var oe,ce,le=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.apply(this,arguments)).renderOptions={host:Object(bt.a)(t)},t._$Do=void 0,t}return Object(s.a)(n,[{key:"createRenderRoot",value:function(){var t,e,r=Object(wt.a)(Object(yt.a)(n.prototype),"createRenderRoot",this).call(this);return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=r.firstChild),r}},{key:"update",value:function(t){var e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),Object(wt.a)(Object(yt.a)(n.prototype),"update",this).call(this,t),this._$Do=function(t,e,n){var r,i,a=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e,o=a._$litPart$;if(void 0===o){var c=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;a._$litPart$=o=new Gt(e.insertBefore($t(),c),c,void 0,null!=n?n:{})}return o._$AI(t),o}(e,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;Object(wt.a)(Object(yt.a)(n.prototype),"connectedCallback",this).call(this),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;Object(wt.a)(Object(yt.a)(n.prototype),"disconnectedCallback",this).call(this),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return Zt}}]),n}(M);le.finalized=!0,le._$litElement$=!0,null===(oe=globalThis.litElementHydrateSupport)||void 0===oe||oe.call(globalThis,{LitElement:le});var se=globalThis.litElementPolyfillSupport;null==se||se({LitElement:le});(null!==(ce=globalThis.litElementVersions)&&void 0!==ce?ce:globalThis.litElementVersions=[]).push("3.3.2");var ue=function(t){return function(e){return"function"==typeof e?function(t,e){return customElements.define(t,e),e}(t,e):function(t,e){return{kind:e.kind,elements:e.elements,finisher:function(e){customElements.define(t,e)}}}(t,e)}},de=n(27),he=function(t,e){return"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?Object(de.a)(Object(de.a)({},e),{},{finisher:function(n){n.createProperty(e.key,t)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer:function(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher:function(n){n.createProperty(e.key,t)}}},fe=function(t,e,n){e.constructor.createProperty(n,t)};function ve(t){return function(e,n){return void 0!==n?fe(t,e,n):he(t,e)}}function me(t){return ve(Object(de.a)(Object(de.a)({},t),{},{state:!0}))}var pe;null===(pe=window.HTMLSlotElement)||void 0===pe||pe.prototype.assignedElements;var ge,be=n(486),we=1,ye=function(){function t(e){Object(l.a)(this,t)}return Object(s.a)(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AT",value:function(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}},{key:"_$AS",value:function(t,e){return this.update(t,e)}},{key:"update",value:function(t,e){return this.render.apply(this,Object(a.a)(e))}}]),t}(),xe=(ge=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(t){var r,i;if(Object(l.a)(this,n),r=e.call(this,t),t.type!==we||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");return Object(be.a)(r)}return Object(s.a)(n,[{key:"render",value:function(t){return" "+Object.keys(t).filter((function(e){return t[e]})).join(" ")+" "}},{key:"update",value:function(t,e){var n,r,i=this,a=Object(f.a)(e,1)[0];if(void 0===this.it){for(var o in this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((function(t){return""!==t})))),a)a[o]&&!(null===(n=this.nt)||void 0===n?void 0:n.has(o))&&this.it.add(o);return this.render(a)}var c=t.element.classList;for(var l in this.it.forEach((function(t){t in a||(c.remove(t),i.it.delete(t))})),a){var s=!!a[l];s===this.it.has(l)||(null===(r=this.nt)||void 0===r?void 0:r.has(l))||(s?(c.add(l),this.it.add(l)):(c.remove(l),this.it.delete(l)))}return tt}}]),n}(ye),function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1])||arguments[1];if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(n){}}var Ee=function(t){return t()},$e=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:je.duration;return new Proxy({animations:t.map(Ee).filter(Boolean),duration:n,options:e},Ie)},Ie={get:function(t,e){var n=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return ke.s((null===n||void 0===n?void 0:n[e])||0);case"playbackRate":case"playState":return null===n||void 0===n?void 0:n[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(Me)).catch(Ae)),t.finished;case"stop":return function(){t.animations.forEach((function(t){return _e(t)}))};case"forEachNative":return function(e){t.animations.forEach((function(n){return e(n,t)}))};default:return"undefined"===typeof(null===n||void 0===n?void 0:n[e])?void 0:function(){return t.animations.forEach((function(t){return t[e]()}))}}},set:function(t,e,n){switch(e){case"currentTime":n=ke.ms(n);case"currentTime":case"playbackRate":for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:function(t){var e=[0];return Le(e,t-1),e}(t.length),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ce,r=t.length,i=r-e.length;return i>0&&Le(e,i),function(i){for(var a=0;a0?n=o:e=o}while(Math.abs(a)>He&&++c1&&void 0!==arguments[1]?arguments[1]:"end";return function(n){var r=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,i="end"===e?Math.floor(r):Math.ceil(r);return De(0,1,i/t)}},Ve=function(t){return"function"===typeof t},qe=function(t){return Array.isArray(t)&&Pe(t[0])},Ke={ease:Ze(.25,.1,.25,1),"ease-in":Ze(.42,0,1,1),"ease-in-out":Ze(.42,0,.58,1),"ease-out":Ze(0,0,.58,1)},Ye=/\((.*?)\)/;function Je(t){if(Ve(t))return t;if(qe(t))return Ze.apply(void 0,Object(a.a)(t));if(Ke[t])return Ke[t];if(t.startsWith("steps")){var e=Ye.exec(t);if(e){var n=e[1].split(",");return Fe(parseFloat(n[0]),n[1].trim())}}return Ce}var Qe=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.easing,o=i.duration,c=void 0===o?je.duration:o,s=i.delay,u=void 0===s?je.delay:s,d=i.endDelay,h=void 0===d?je.endDelay:d,f=i.repeat,v=void 0===f?je.repeat:f,m=i.offset,p=i.direction,g=void 0===p?"normal":p;if(Object(l.a)(this,t),this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=Ce,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((function(t,e){n.resolve=t,n.reject=e})),a=a||je.easing,Te(a)){var b=a.createAnimation(r);a=b.easing,r=b.keyframes||r,c=b.duration||c}this.repeat=v,this.easing=Re(a)?Ce:Je(a),this.updateDuration(c);var w=Ue(r,m,Re(a)?a.map(Je):Ce);this.tick=function(t){var r,i=0;i=void 0!==n.pauseTime?n.pauseTime:(t-n.startTime)*n.rate,n.t=i,i/=1e3,i=Math.max(i-u,0),"finished"===n.playState&&void 0===n.pauseTime&&(i=n.totalDuration);var a=i/n.duration,o=Math.floor(a),c=a%1;!c&&a>=1&&(c=1),1===c&&o--;var l=o%2;("reverse"===g||"alternate"===g&&l||"alternate-reverse"===g&&!l)&&(c=1-c);var s=i>=n.totalDuration?1:Math.min(c,1),d=w(n.easing(s));e(d),void 0===n.pauseTime&&("finished"===n.playState||i>=n.totalDuration+h)?(n.playState="finished",null===(r=n.resolve)||void 0===r||r.call(n,d)):"idle"!==n.playState&&(n.frameRequestId=requestAnimationFrame(n.tick))},this.play()}return Object(s.a)(t,[{key:"play",value:function(){var t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}},{key:"pause",value:function(){this.playState="paused",this.pauseTime=this.t}},{key:"finish",value:function(){this.playState="finished",this.tick(0)}},{key:"stop",value:function(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}},{key:"cancel",value:function(){this.stop(),this.tick(this.cancelTimestamp)}},{key:"reverse",value:function(){this.rate*=-1}},{key:"commitStyles",value:function(){}},{key:"updateDuration",value:function(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}},{key:"currentTime",get:function(){return this.t},set:function(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}},{key:"playbackRate",get:function(){return this.rate},set:function(t){this.rate=t}}]),t}();var Ge=n(12),Xe=function(){function t(){Object(l.a)(this,t)}return Object(s.a)(t,[{key:"setAnimation",value:function(t){var e=this;this.animation=t,null===t||void 0===t||t.finished.then((function(){return e.clearAnimation()})).catch((function(){}))}},{key:"clearAnimation",value:function(){this.animation=this.generator=void 0}}]),t}(),tn=new WeakMap;function en(t){return tn.has(t)||tn.set(t,{transforms:[],values:new Map}),tn.get(t)}var nn=["","X","Y","Z"],rn={x:"translateX",y:"translateY",z:"translateZ"},an={syntax:"",initialValue:"0deg",toDefaultUnit:function(t){return t+"deg"}},on={translate:{syntax:"",initialValue:"0px",toDefaultUnit:function(t){return t+"px"}},rotate:an,scale:{syntax:"",initialValue:1,toDefaultUnit:Ce},skew:an},cn=new Map,ln=function(t){return"--motion-".concat(t)},sn=["x","y","z"];["translate","scale","rotate","skew"].forEach((function(t){nn.forEach((function(e){sn.push(t+e),cn.set(ln(t+e),on[t])}))}));var un=function(t,e){return sn.indexOf(t)-sn.indexOf(e)},dn=new Set(sn),hn=function(t){return dn.has(t)},fn=function(t,e){rn[e]&&(e=rn[e]);var n,r,i=en(t).transforms;r=e,-1===(n=i).indexOf(r)&&n.push(r),t.style.transform=vn(i)},vn=function(t){return t.sort(un).reduce(mn,"").trim()},mn=function(t,e){return"".concat(t," ").concat(e,"(var(").concat(ln(e),"))")},pn=function(t){return t.startsWith("--")},gn=new Set;var bn=function(t,e){return document.createElement("div").animate(t,e)},wn={cssRegisterProperty:function(){return"undefined"!==typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty")},waapi:function(){return Object.hasOwnProperty.call(Element.prototype,"animate")},partialKeyframes:function(){try{bn({opacity:[1]})}catch(t){return!1}return!0},finished:function(){return Boolean(bn({opacity:[0,1]},{duration:.001}).finished)},linearEasing:function(){try{bn({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},yn={},xn={},On=function(t){xn[t]=function(){return void 0===yn[t]&&(yn[t]=wn[t]()),yn[t]}};for(var jn in wn)On(jn);var kn=function(t,e){return Ve(t)?xn.linearEasing()?"linear(".concat(function(t,e){for(var n="",r=Math.round(e/.015),i=0;i3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4?arguments[4]:void 0,o=window.__MOTION_DEV_TOOLS_RECORD,c=!1!==i.record&&o,l=i.duration,s=void 0===l?je.duration:l,u=i.delay,d=void 0===u?je.delay:u,h=i.endDelay,f=void 0===h?je.endDelay:h,v=i.repeat,m=void 0===v?je.repeat:v,p=i.easing,g=void 0===p?je.easing:p,b=i.persist,w=void 0!==b&&b,y=i.direction,x=i.offset,O=i.allowWebkitAcceleration,j=void 0!==O&&O,k=en(t),A=hn(e),C=xn.waapi();A&&fn(t,e);var _=_n(e),E=function(t,e){return t.has(e)||t.set(e,new Xe),t.get(e)}(k.values,_),$=cn.get(_);return _e(E.animation,!(Te(g)&&E.generator)&&!1!==i.record),function(){var l=function(){var e,n;return null!==(n=null!==(e=En.get(t,_))&&void 0!==e?e:null===$||void 0===$?void 0:$.initialValue)&&void 0!==n?n:0},u=function(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=(t=function(t,e){var n;return"string"===typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}(t)).length;Boolean(r),Boolean(e);for(var i=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return $e([function(){var n=new Qe(t,[0,1],e);return n.finished.catch((function(){})),n}],e,e.duration)}function Nn(t,e,n){return(Ve(t)?Sn:Rn)(t,e,n)}var Ln,Bn,Dn,Un,Wn,Hn,zn,Zn,Fn,Vn,qn,Kn,Yn,Jn,Qn,Gn,Xn,tr,er,nr,rr,ir,ar,or,cr,lr,sr,ur,dr,hr,fr,vr,mr,pr,gr,br,wr,yr,xr,Or,jr,kr,Ar,Cr,_r,Er,$r,Ir,Mr,Tr,Pr,Rr,Sr,Nr,Lr,Br,Dr,Ur,Wr,Hr,zr,Zr,Fr,Vr,qr,Kr,Yr,Jr,Qr,Gr,Xr,ti,ei,ni,ri,ii,ai,oi,ci,li,si,ui,di,hi,fi,vi,mi,pi,gi,bi,wi,yi,xi,Oi,ji,ki,Ai,Ci,_i,Ei,$i,Ii,Mi,Ti,Pi,Ri,Si,Ni,Li,Bi,Di,Ui,Wi,Hi,zi,Zi,Fi,Vi,qi,Ki,Yi,Ji,Qi,Gi,Xi,ta,ea,na,ra,ia,aa=function(t){return null!=t?t:et},oa=n(4165),ca=n.n(oa),la=Object.defineProperty,sa=Object.getOwnPropertySymbols,ua=Object.prototype.hasOwnProperty,da=Object.prototype.propertyIsEnumerable,ha=function(t,e,n){return e in t?la(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},fa=function(t,e){for(var n in e||(e={}))ua.call(e,n)&&ha(t,n,e[n]);if(sa){var r,i=Object(v.a)(sa(e));try{for(i.s();!(r=i.n()).done;){n=r.value;da.call(e,n)&&ha(t,n,e[n])}}catch(a){i.e(a)}finally{i.f()}}return t};var va={getPreset:function(t){return{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}[t]},setTheme:function(){var t=document.querySelector(":root"),e=Oe.h.state.themeVariables;if(t){var n=fa(fa(fa({},function(){var t,e={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[null!=(t=Oe.h.state.themeMode)?t:"dark"];return{"--wcm-color-fg-1":e.foreground[1],"--wcm-color-fg-2":e.foreground[2],"--wcm-color-fg-3":e.foreground[3],"--wcm-color-bg-1":e.background[1],"--wcm-color-bg-2":e.background[2],"--wcm-color-bg-3":e.background[3],"--wcm-color-overlay":e.overlay}}()),{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}),e);Object.entries(n).forEach((function(e){var n=Object(f.a)(e,2),r=n[0],i=n[1];return t.style.setProperty(r,i)}))}},globalCss:x(Ln||(Ln=Object(h.a)(["*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}"])))},ma=x(Bn||(Bn=Object(h.a)(["button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}"]))),pa=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,ba=function(t,e,n,r){for(var i,a=r>1?void 0:r?ga(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&pa(e,n,a),a},wa=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.apply(this,arguments)).disabled=!1,t.iconLeft=void 0,t.iconRight=void 0,t.onClick=function(){return null},t.variant="default",t}return Object(s.a)(n,[{key:"render",value:function(){var t={"wcm-icon-left":void 0!==this.iconLeft,"wcm-icon-right":void 0!==this.iconRight,"wcm-ghost":"ghost"===this.variant,"wcm-outline":"outline"===this.variant},e="inverse";return"ghost"===this.variant&&(e="secondary"),"outline"===this.variant&&(e="accent"),Ht(Dn||(Dn=Object(h.a)(['"])),xe(t),this.disabled,this.onClick,this.iconLeft,e,this.iconRight)}}]),n}(le);wa.styles=[va.globalCss,ma],ba([ve({type:Boolean})],wa.prototype,"disabled",2),ba([ve()],wa.prototype,"iconLeft",2),ba([ve()],wa.prototype,"iconRight",2),ba([ve()],wa.prototype,"onClick",2),ba([ve()],wa.prototype,"variant",2),wa=ba([ue("wcm-button")],wa);var ya=x(Un||(Un=Object(h.a)([":host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}"]))),xa=Object.defineProperty,Oa=Object.getOwnPropertyDescriptor,ja=function(t,e,n,r){for(var i,a=r>1?void 0:r?Oa(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&xa(e,n,a),a},ka=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.apply(this,arguments)).disabled=!1,t.variant="primary",t}return Object(s.a)(n,[{key:"render",value:function(){var t={"wcm-secondary":"secondary"===this.variant};return Ht(Wn||(Wn=Object(h.a)([''])),this.disabled,xe(t))}}]),n}(le);ka.styles=[va.globalCss,ya],ja([ve({type:Boolean})],ka.prototype,"disabled",2),ja([ve()],ka.prototype,"variant",2),ka=ja([ue("wcm-button-big")],ka);var Aa=x(Hn||(Hn=Object(h.a)([":host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}"]))),Ca=Object.defineProperty,_a=Object.getOwnPropertyDescriptor,Ea=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"render",value:function(){return Ht(zn||(zn=Object(h.a)(["
"])))}}]),n}(le);Ea.styles=[va.globalCss,Aa],Ea=function(t,e,n,r){for(var i,a=r>1?void 0:r?_a(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Ca(e,n,a),a}([ue("wcm-info-footer")],Ea);var $a={CROSS_ICON:X(Zn||(Zn=Object(h.a)(['']))),WALLET_CONNECT_LOGO:X(Fn||(Fn=Object(h.a)(['']))),WALLET_CONNECT_ICON:X(Vn||(Vn=Object(h.a)(['']))),WALLET_CONNECT_ICON_COLORED:X(qn||(qn=Object(h.a)(['']))),BACK_ICON:X(Kn||(Kn=Object(h.a)(['']))),COPY_ICON:X(Yn||(Yn=Object(h.a)(['']))),RETRY_ICON:X(Jn||(Jn=Object(h.a)(['']))),DESKTOP_ICON:X(Qn||(Qn=Object(h.a)(['']))),MOBILE_ICON:X(Gn||(Gn=Object(h.a)(['']))),ARROW_DOWN_ICON:X(Xn||(Xn=Object(h.a)(['']))),ARROW_UP_RIGHT_ICON:X(tr||(tr=Object(h.a)(['']))),ARROW_RIGHT_ICON:X(er||(er=Object(h.a)(['']))),QRCODE_ICON:X(nr||(nr=Object(h.a)(['']))),SCAN_ICON:X(rr||(rr=Object(h.a)(['']))),CHECKMARK_ICON:X(ir||(ir=Object(h.a)(['']))),SEARCH_ICON:X(ar||(ar=Object(h.a)(['']))),WALLET_PLACEHOLDER:X(or||(or=Object(h.a)(['']))),GLOBE_ICON:X(cr||(cr=Object(h.a)([''])))},Ia=x(lr||(lr=Object(h.a)([".wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}"]))),Ma=Object.defineProperty,Ta=Object.getOwnPropertyDescriptor,Pa=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"render",value:function(){return Ht(sr||(sr=Object(h.a)(['
','
"])),$a.WALLET_CONNECT_LOGO,Oe.e.close,$a.CROSS_ICON)}}]),n}(le);Pa.styles=[va.globalCss,Ia],Pa=function(t,e,n,r){for(var i,a=r>1?void 0:r?Ta(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Ma(e,n,a),a}([ue("wcm-modal-backcard")],Pa);var Ra=x(ur||(ur=Object(h.a)(["main{padding:20px;padding-top:0;width:100%}"]))),Sa=Object.defineProperty,Na=Object.getOwnPropertyDescriptor,La=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"render",value:function(){return Ht(dr||(dr=Object(h.a)(["
"])))}}]),n}(le);La.styles=[va.globalCss,Ra],La=function(t,e,n,r){for(var i,a=r>1?void 0:r?Na(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Sa(e,n,a),a}([ue("wcm-modal-content")],La);var Ba=x(hr||(hr=Object(h.a)(["footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}"]))),Da=Object.defineProperty,Ua=Object.getOwnPropertyDescriptor,Wa=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"render",value:function(){return Ht(fr||(fr=Object(h.a)(["
"])))}}]),n}(le);Wa.styles=[va.globalCss,Ba],Wa=function(t,e,n,r){for(var i,a=r>1?void 0:r?Ua(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Da(e,n,a),a}([ue("wcm-modal-footer")],Wa);var Ha=x(vr||(vr=Object(h.a)(["header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}"]))),za=Object.defineProperty,Za=Object.getOwnPropertyDescriptor,Fa=function(t,e,n,r){for(var i,a=r>1?void 0:r?Za(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&za(e,n,a),a},Va=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.apply(this,arguments)).title="",t.onAction=void 0,t.actionIcon=void 0,t.border=!1,t}return Object(s.a)(n,[{key:"backBtnTemplate",value:function(){return Ht(mr||(mr=Object(h.a)(['"])),Oe.g.goBack,$a.BACK_ICON)}},{key:"actionBtnTemplate",value:function(){return Ht(pr||(pr=Object(h.a)(['"])),this.onAction,this.actionIcon)}},{key:"render",value:function(){var t={"wcm-border":this.border},e=Oe.g.state.history.length>1,n=this.title?Ht(gr||(gr=Object(h.a)(['',""])),this.title):Ht(br||(br=Object(h.a)([""])));return Ht(wr||(wr=Object(h.a)(['
'," "," ","
"])),xe(t),e?this.backBtnTemplate():null,n,this.onAction?this.actionBtnTemplate():null)}}]),n}(le);Va.styles=[va.globalCss,Ha],Fa([ve()],Va.prototype,"title",2),Fa([ve()],Va.prototype,"onAction",2),Fa([ve()],Va.prototype,"actionIcon",2),Fa([ve({type:Boolean})],Va.prototype,"border",2),Va=Fa([ue("wcm-modal-header")],Va);var qa={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement:function(t,e){var n=t.renderRoot.querySelector(e);if(!n)throw new Error("".concat(e," not found"));return n},getWalletIcon:function(t){var e=t.id,n=t.image_id,r=Oe.a.state.walletImages;return null!=r&&r[e]?r[e]:n?Oe.d.getWalletImageUrl(n):""},getWalletName:function(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&t.length>8?"".concat(t.substring(0,8),".."):t},isMobileAnimation:function(){return window.innerWidth<=qa.MOBILE_BREAKPOINT},preloadImage:function(t){return Object(c.a)(Object(o.a)().mark((function e(){var n;return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Promise((function(e,n){var r=new Image;r.onload=e,r.onerror=n,r.crossOrigin="anonymous",r.src=t})),e.abrupt("return",Promise.race([n,Oe.b.wait(3e3)]));case 2:case"end":return e.stop()}}),e)})))()},getErrorMessage:function(t){return t instanceof Error?t.message:"Unknown Error"},debounce:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var r=arguments.length,i=new Array(r),a=0;a1&&void 0!==arguments[1]?arguments[1]:8;return t.length<=e?t:"".concat(t.substring(0,4),"...").concat(t.substring(t.length-4))},setRecentWallet:function(t){try{localStorage.setItem(qa.WCM_RECENT_WALLET_DATA,JSON.stringify(t))}catch(e){console.info("Unable to set recent wallet")}},getRecentWallet:function(){try{var t=localStorage.getItem(qa.WCM_RECENT_WALLET_DATA);return t?JSON.parse(t):void 0}catch(e){console.info("Unable to get recent wallet")}},caseSafeIncludes:function(t,e){return t.toUpperCase().includes(e.toUpperCase())},openWalletExplorerUrl:function(){Oe.b.openHref(qa.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms:function(){var t=Oe.b.getWalletRouterData(),e=t.desktop,n=t.mobile,r=Boolean(null===e||void 0===e?void 0:e.native),i=Boolean(null===e||void 0===e?void 0:e.universal);return{isDesktop:r,isMobile:Boolean(null===n||void 0===n?void 0:n.native)||Boolean(null===n||void 0===n?void 0:n.universal),isWeb:i}},goToConnectingView:function(t){Oe.g.setData({Wallet:t});var e=Oe.b.isMobile(),n=qa.getCachedRouterWalletPlatforms(),r=n.isDesktop,i=n.isWeb,a=n.isMobile;e?a?Oe.g.push("MobileConnecting"):i?Oe.g.push("WebConnecting"):Oe.g.push("InstallWallet"):r?Oe.g.push("DesktopConnecting"):i?Oe.g.push("WebConnecting"):a?Oe.g.push("MobileQrcodeConnecting"):Oe.g.push("InstallWallet")}},Ka=x(yr||(yr=Object(h.a)([".wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}"]))),Ya=Object.defineProperty,Ja=Object.getOwnPropertyDescriptor,Qa=function(t,e,n,r){for(var i,a=r>1?void 0:r?Ja(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Ya(e,n,a),a},Ga=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.call(this)).view=Oe.g.state.view,t.prevView=Oe.g.state.view,t.unsubscribe=void 0,t.oldHeight="0px",t.resizeObserver=void 0,t.unsubscribe=Oe.g.subscribe((function(e){t.view!==e.view&&t.onChangeRoute()})),t}return Object(s.a)(n,[{key:"firstUpdated",value:function(){var t=this;this.resizeObserver=new ResizeObserver((function(e){var n=Object(f.a)(e,1)[0],r="".concat(n.contentRect.height,"px");"0px"!==t.oldHeight&&Nn(t.routerEl,{height:[t.oldHeight,r]},{duration:.2}),t.oldHeight=r})),this.resizeObserver.observe(this.contentEl)}},{key:"disconnectedCallback",value:function(){var t,e;null==(t=this.unsubscribe)||t.call(this),null==(e=this.resizeObserver)||e.disconnect()}},{key:"routerEl",get:function(){return qa.getShadowRootElement(this,".wcm-router")}},{key:"contentEl",get:function(){return qa.getShadowRootElement(this,".wcm-content")}},{key:"viewTemplate",value:function(){switch(this.view){case"ConnectWallet":return Ht(xr||(xr=Object(h.a)([""])));case"DesktopConnecting":return Ht(Or||(Or=Object(h.a)([""])));case"MobileConnecting":return Ht(jr||(jr=Object(h.a)([""])));case"WebConnecting":return Ht(kr||(kr=Object(h.a)([""])));case"MobileQrcodeConnecting":return Ht(Ar||(Ar=Object(h.a)([""])));case"WalletExplorer":return Ht(Cr||(Cr=Object(h.a)([""])));case"Qrcode":return Ht(_r||(_r=Object(h.a)([""])));case"InstallWallet":return Ht(Er||(Er=Object(h.a)([""])));default:return Ht($r||($r=Object(h.a)(["
Not Found
"])))}}},{key:"onChangeRoute",value:function(){var t=Object(c.a)(Object(o.a)().mark((function t(){return Object(o.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Nn(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished;case 2:this.view=Oe.g.state.view,Nn(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05});case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"render",value:function(){return Ht(Ir||(Ir=Object(h.a)(['
',"
"])),this.viewTemplate())}}]),n}(le);Ga.styles=[va.globalCss,Ka],Qa([me()],Ga.prototype,"view",2),Qa([me()],Ga.prototype,"prevView",2),Ga=Qa([ue("wcm-modal-router")],Ga);var Xa=x(Mr||(Mr=Object(h.a)(["div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}"]))),to=Object.defineProperty,eo=Object.getOwnPropertyDescriptor,no=function(t,e,n,r){for(var i,a=r>1?void 0:r?eo(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&to(e,n,a),a},ro=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.call(this)).open=!1,t.unsubscribe=void 0,t.timeout=void 0,t.unsubscribe=Oe.i.subscribe((function(e){e.open?(t.open=!0,t.timeout=setTimeout((function(){return Oe.i.closeToast()}),2200)):(t.open=!1,clearTimeout(t.timeout))})),t}return Object(s.a)(n,[{key:"disconnectedCallback",value:function(){var t;null==(t=this.unsubscribe)||t.call(this),clearTimeout(this.timeout),Oe.i.closeToast()}},{key:"render",value:function(){var t=Oe.i.state,e=t.message,n=t.variant,r={"wcm-success":"success"===n,"wcm-error":"error"===n};return this.open?Ht(Tr||(Tr=Object(h.a)(['
'," ",'',"
"])),xe(r),"success"===n?$a.CHECKMARK_ICON:null,"error"===n?$a.CROSS_ICON:null,e):null}}]),n}(le);ro.styles=[va.globalCss,Xa],no([me()],ro.prototype,"open",2),ro=no([ue("wcm-modal-toast")],ro);function io(t,e,n){return t!==e&&(t-e<0?e-t:t-e)<=n+.1}var ao=function(t,e,n){var r="#141414",i=[],a=function(t,e){var n=Array.prototype.slice.call(ca.a.create(t,{errorCorrectionLevel:e}).modules.data,0),r=Math.sqrt(n.length);return n.reduce((function(t,e,n){return(n%r===0?t.push([e]):t[t.length-1].push(e))&&t}),[])}(t,"Q"),o=e/a.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];c.forEach((function(t){for(var e=t.x,n=t.y,l=(a.length-7)*o*e,s=(a.length-7)*o*n,u=0;u'])),u%2===0?r:"#ffffff",d,.45*d,.45*d,d,l+o*u,s+o*u))}}));var l=Math.floor((n+25)/o),s=a.length/2-l/2,u=a.length/2+l/2-1,d=[];a.forEach((function(t,e){t.forEach((function(t,n){if(a[e][n]&&!(e<7&&n<7||e>a.length-8&&n<7||e<7&&n>a.length-8)&&!(e>s&&es&&n'])),n,t,r,o/2.5))}))})),Object.entries(m).filter((function(t){var e=Object(f.a)(t,2);e[0];return e[1].length>1})).map((function(t){var e=Object(f.a)(t,2),n=e[0],r=e[1],i=r.filter((function(t){return r.some((function(e){return io(t,e,o)}))}));return[Number(n),i]})).map((function(t){var e=Object(f.a)(t,2),n=e[0],r=e[1];r.sort((function(t,e){return t'])),n,n,a,c,r,o/1.25))}))})),i},oo=x(Nr||(Nr=Object(h.a)(["@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}"]))),co=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,so=function(t,e,n,r){for(var i,a=r>1?void 0:r?lo(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&co(e,n,a),a},uo=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.apply(this,arguments)).uri="",t.size=0,t.imageId=void 0,t.walletId=void 0,t.imageUrl=void 0,t}return Object(s.a)(n,[{key:"svgTemplate",value:function(){var t="light"===Oe.h.state.themeMode?this.size:this.size-36;return zt(Lr||(Lr=Object(h.a)(['',""])),t,t,ao(this.uri,t,t/4))}},{key:"render",value:function(){var t={"wcm-dark":"dark"===Oe.h.state.themeMode};return Ht(Br||(Br=Object(h.a)(['
'," ","
"])),"width: ".concat(this.size,"px"),xe(t),this.walletId||this.imageUrl?Ht(Dr||(Dr=Object(h.a)([''])),aa(this.walletId),aa(this.imageId),aa(this.imageUrl)):$a.WALLET_CONNECT_ICON_COLORED,this.svgTemplate())}}]),n}(le);uo.styles=[va.globalCss,oo],so([ve()],uo.prototype,"uri",2),so([ve({type:Number})],uo.prototype,"size",2),so([ve()],uo.prototype,"imageId",2),so([ve()],uo.prototype,"walletId",2),so([ve()],uo.prototype,"imageUrl",2),uo=so([ue("wcm-qrcode")],uo);var ho=x(Ur||(Ur=Object(h.a)([":host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}"]))),fo=Object.defineProperty,vo=Object.getOwnPropertyDescriptor,mo=function(t,e,n,r){for(var i,a=r>1?void 0:r?vo(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&fo(e,n,a),a},po=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.apply(this,arguments)).onChange=function(){return null},t}return Object(s.a)(n,[{key:"render",value:function(){return Ht(Wr||(Wr=Object(h.a)([' ',""])),this.onChange,$a.SEARCH_ICON)}}]),n}(le);po.styles=[va.globalCss,ho],mo([ve()],po.prototype,"onChange",2),po=mo([ue("wcm-search-input")],po);var go=x(Hr||(Hr=Object(h.a)(["@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}"]))),bo=Object.defineProperty,wo=Object.getOwnPropertyDescriptor,yo=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"render",value:function(){return Ht(zr||(zr=Object(h.a)([''])))}}]),n}(le);yo.styles=[va.globalCss,go],yo=function(t,e,n,r){for(var i,a=r>1?void 0:r?wo(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&bo(e,n,a),a}([ue("wcm-spinner")],yo);var xo=x(Zr||(Zr=Object(h.a)(["span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}"]))),Oo=Object.defineProperty,jo=Object.getOwnPropertyDescriptor,ko=function(t,e,n,r){for(var i,a=r>1?void 0:r?jo(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Oo(e,n,a),a},Ao=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.apply(this,arguments)).variant="medium-regular",t.color="primary",t}return Object(s.a)(n,[{key:"render",value:function(){var t={"wcm-big-bold":"big-bold"===this.variant,"wcm-medium-regular":"medium-regular"===this.variant,"wcm-small-regular":"small-regular"===this.variant,"wcm-small-thin":"small-thin"===this.variant,"wcm-xsmall-regular":"xsmall-regular"===this.variant,"wcm-xsmall-bold":"xsmall-bold"===this.variant,"wcm-color-primary":"primary"===this.color,"wcm-color-secondary":"secondary"===this.color,"wcm-color-tertiary":"tertiary"===this.color,"wcm-color-inverse":"inverse"===this.color,"wcm-color-accnt":"accent"===this.color,"wcm-color-error":"error"===this.color};return Ht(Fr||(Fr=Object(h.a)([''])),xe(t))}}]),n}(le);Ao.styles=[va.globalCss,xo],ko([ve()],Ao.prototype,"variant",2),ko([ve()],Ao.prototype,"color",2),Ao=ko([ue("wcm-text")],Ao);var Co=x(Vr||(Vr=Object(h.a)(["button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}"]))),_o=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,$o=function(t,e,n,r){for(var i,a=r>1?void 0:r?Eo(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&_o(e,n,a),a},Io=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.apply(this,arguments)).onClick=function(){return null},t.name="",t.walletId="",t.label=void 0,t.imageId=void 0,t.installed=!1,t.recent=!1,t}return Object(s.a)(n,[{key:"sublabelTemplate",value:function(){return this.recent?Ht(qr||(qr=Object(h.a)(['RECENT']))):this.installed?Ht(Kr||(Kr=Object(h.a)(['INSTALLED']))):null}},{key:"handleClick",value:function(){Oe.c.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}},{key:"render",value:function(){var t;return Ht(Yr||(Yr=Object(h.a)(['"])),this.handleClick.bind(this),this.walletId,aa(this.imageId),null!=(t=this.label)?t:qa.getWalletName(this.name,!0),this.sublabelTemplate())}}]),n}(le);Io.styles=[va.globalCss,Co],$o([ve()],Io.prototype,"onClick",2),$o([ve()],Io.prototype,"name",2),$o([ve()],Io.prototype,"walletId",2),$o([ve()],Io.prototype,"label",2),$o([ve()],Io.prototype,"imageId",2),$o([ve({type:Boolean})],Io.prototype,"installed",2),$o([ve({type:Boolean})],Io.prototype,"recent",2),Io=$o([ue("wcm-wallet-button")],Io);var Mo=x(Jr||(Jr=Object(h.a)([":host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}"]))),To=Object.defineProperty,Po=Object.getOwnPropertyDescriptor,Ro=function(t,e,n,r){for(var i,a=r>1?void 0:r?Po(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&To(e,n,a),a},So=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.apply(this,arguments)).walletId="",t.imageId=void 0,t.imageUrl=void 0,t}return Object(s.a)(n,[{key:"render",value:function(){var t,e=null!=(t=this.imageUrl)&&t.length?this.imageUrl:qa.getWalletIcon({id:this.walletId,image_id:this.imageId});return Ht(Qr||(Qr=Object(h.a)(["",""])),e.length?Ht(Gr||(Gr=Object(h.a)(['
','
'])),e,this.id):$a.WALLET_PLACEHOLDER)}}]),n}(le);So.styles=[va.globalCss,Mo],Ro([ve()],So.prototype,"walletId",2),Ro([ve()],So.prototype,"imageId",2),Ro([ve()],So.prototype,"imageUrl",2),So=Ro([ue("wcm-wallet-image")],So);var No=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,Bo=function(t,e,n,r){for(var i,a=r>1?void 0:r?Lo(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&No(e,n,a),a},Do=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.call(this)).preload=!0,t.preloadData(),t}return Object(s.a)(n,[{key:"loadImages",value:function(){var t=Object(c.a)(Object(o.a)().mark((function t(e){return Object(o.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,t.t0=null!=e&&e.length,!t.t0){t.next=5;break}return t.next=5,Promise.all(e.map(function(){var t=Object(c.a)(Object(o.a)().mark((function t(e){return Object(o.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",qa.preloadImage(e));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 5:t.next=10;break;case 7:t.prev=7,t.t1=t.catch(0),console.info("Unsuccessful attempt at preloading some images",e);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}()},{key:"preloadListings",value:function(){var t=Object(c.a)(Object(o.a)().mark((function t(){var e,n;return Object(o.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Oe.a.state.enableExplorer){t.next=9;break}return t.next=3,Oe.d.getRecomendedWallets();case 3:return Oe.f.setIsDataLoaded(!0),e=Oe.d.state.recomendedWallets,n=e.map((function(t){return qa.getWalletIcon(t)})),t.next=7,this.loadImages(n);case 7:t.next=10;break;case 9:Oe.f.setIsDataLoaded(!0);case 10:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"preloadCustomImages",value:function(){var t=Object(c.a)(Object(o.a)().mark((function t(){var e;return Object(o.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=qa.getCustomImageUrls(),t.next=3,this.loadImages(e);case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"preloadData",value:function(){var t=Object(c.a)(Object(o.a)().mark((function t(){return Object(o.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,t.t0=this.preload,!t.t0){t.next=6;break}return this.preload=!1,t.next=6,Promise.all([this.preloadListings(),this.preloadCustomImages()]);case 6:t.next=11;break;case 8:t.prev=8,t.t1=t.catch(0),console.error(t.t1),Oe.i.openToast("Failed preloading","error");case 11:case"end":return t.stop()}}),t,this,[[0,8]])})));return function(){return t.apply(this,arguments)}}()}]),n}(le);Bo([me()],Do.prototype,"preload",2),Do=Bo([ue("wcm-explorer-context")],Do);var Uo=Object.defineProperty,Wo=Object.getOwnPropertyDescriptor,Ho=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.call(this)).unsubscribeTheme=void 0,va.setTheme(),t.unsubscribeTheme=Oe.h.subscribe(va.setTheme),t}return Object(s.a)(n,[{key:"disconnectedCallback",value:function(){var t;null==(t=this.unsubscribeTheme)||t.call(this)}}]),n}(le);Ho=function(t,e,n,r){for(var i,a=r>1?void 0:r?Wo(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Uo(e,n,a),a}([ue("wcm-theme-context")],Ho);var zo=x(Xr||(Xr=Object(h.a)(["@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}"]))),Zo=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,Vo=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"onGoToQrcode",value:function(){Oe.g.push("Qrcode")}},{key:"render",value:function(){var t=Oe.d.state.recomendedWallets,e=[].concat(Object(a.a)(t),Object(a.a)(t)),n=2*Oe.b.RECOMMENDED_WALLET_AMOUNT;return Ht(ti||(ti=Object(h.a)(['
','WalletConnect
','
Select Wallet
Choose WalletConnect to see supported apps on your device'])),this.onGoToQrcode,$a.QRCODE_ICON,$a.MOBILE_ICON,Object(a.a)(Array(n)).map((function(t,n){var r=e[n%e.length];return r?Ht(ei||(ei=Object(h.a)([''])),r.id,r.image_id):$a.WALLET_PLACEHOLDER})),qa.handleAndroidLinking)}}]),n}(le);Vo.styles=[va.globalCss,zo],Vo=function(t,e,n,r){for(var i,a=r>1?void 0:r?Fo(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Zo(e,n,a),a}([ue("wcm-android-wallet-selection")],Vo);var qo=x(ni||(ni=Object(h.a)(["@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}"]))),Ko=Object.defineProperty,Yo=Object.getOwnPropertyDescriptor,Jo=function(t,e,n,r){for(var i,a=r>1?void 0:r?Yo(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Ko(e,n,a),a},Qo=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.apply(this,arguments)).walletId=void 0,t.imageId=void 0,t.isError=!1,t.isStale=!1,t.label="",t}return Object(s.a)(n,[{key:"svgLoaderTemplate",value:function(){var t,e,n=null!=(e=null==(t=Oe.h.state.themeVariables)?void 0:t["--wcm-wallet-icon-large-border-radius"])?e:va.getPreset("--wcm-wallet-icon-large-border-radius"),r=0;r=n.includes("%")?.88*parseInt(n,10):parseInt(n,10);var i=317-1.57*(r*=1.17),a=425-1.8*r;return Ht(ri||(ri=Object(h.a)([''])),r,i,a)}},{key:"render",value:function(){var t={"wcm-error":this.isError,"wcm-stale":this.isStale};return Ht(ii||(ii=Object(h.a)(['
','
',""])),xe(t),this.svgLoaderTemplate(),aa(this.walletId),aa(this.imageId),this.isError?"error":"primary",this.isError?"Connection declined":this.label)}}]),n}(le);Qo.styles=[va.globalCss,qo],Jo([ve()],Qo.prototype,"walletId",2),Jo([ve()],Qo.prototype,"imageId",2),Jo([ve({type:Boolean})],Qo.prototype,"isError",2),Jo([ve({type:Boolean})],Qo.prototype,"isStale",2),Jo([ve()],Qo.prototype,"label",2),Qo=Jo([ue("wcm-connector-waiting")],Qo);var Go={manualWallets:function(){var t,e,n=Oe.a.state,r=n.mobileWallets,i=n.desktopWallets,a=null==(t=Go.recentWallet())?void 0:t.id,o=Oe.b.isMobile()?r:i,c=null===o||void 0===o?void 0:o.filter((function(t){return a!==t.id}));return null!=(e=Oe.b.isMobile()?null===c||void 0===c?void 0:c.map((function(t){var e=t.id,n=t.name,r=t.links;return{id:e,name:n,mobile:r,links:r}})):null===c||void 0===c?void 0:c.map((function(t){var e=t.id,n=t.name,r=t.links;return{id:e,name:n,desktop:r,links:r}})))?e:[]},recentWallet:function(){return qa.getRecentWallet()},recomendedWallets:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]||null==(t=Go.recentWallet())?void 0:t.id;return Oe.d.state.recomendedWallets.filter((function(t){return e!==t.id}))}},Xo={onConnecting:function(t){qa.goToConnectingView(t)},manualWalletsTemplate:function(){var t=this;return Go.manualWallets().map((function(e){return Ht(ai||(ai=Object(h.a)([''])),e.id,e.name,(function(){return t.onConnecting(e)}))}))},recomendedWalletsTemplate:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Go.recomendedWallets(e).map((function(e){return Ht(oi||(oi=Object(h.a)([''])),e.name,e.id,e.image_id,(function(){return t.onConnecting(e)}))}))},recentWalletTemplate:function(){var t=this,e=Go.recentWallet();if(e)return Ht(ci||(ci=Object(h.a)([''])),e.name,e.id,aa(e.image_id),!0,(function(){return t.onConnecting(e)}))}},tc=x(li||(li=Object(h.a)([".wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}"]))),ec=Object.defineProperty,nc=Object.getOwnPropertyDescriptor,rc=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"render",value:function(){var t=Oe.a.state,e=t.explorerExcludedWalletIds,n=t.enableExplorer,r="ALL"!==e&&n,i=Xo.manualWalletsTemplate(),o=Xo.recomendedWalletsTemplate(),c=[Xo.recentWalletTemplate()].concat(Object(a.a)(i),Object(a.a)(o)),l=(c=c.filter(Boolean)).length>4||r,s=[];s=l?c.slice(0,3):c;var u=Boolean(s.length);return Ht(si||(si=Object(h.a)(['
','Mobile
','Scan with your wallet
',""])),!0,qa.handleUriCopy,$a.COPY_ICON,$a.MOBILE_ICON,$a.SCAN_ICON,u?Ht(ui||(ui=Object(h.a)(['
','Desktop
'," ","
"])),$a.DESKTOP_ICON,s,l?Ht(di||(di=Object(h.a)([""]))):null):null)}}]),n}(le);rc.styles=[va.globalCss,tc],rc=function(t,e,n,r){for(var i,a=r>1?void 0:r?nc(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&ec(e,n,a),a}([ue("wcm-desktop-wallet-selection")],rc);var ic=x(hi||(hi=Object(h.a)(["div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}"]))),ac=Object.defineProperty,oc=Object.getOwnPropertyDescriptor,cc=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"render",value:function(){var t=Oe.a.state,e=t.termsOfServiceUrl,n=t.privacyPolicyUrl;return(null!==e&&void 0!==e?e:n)?Ht(fi||(fi=Object(h.a)(['
By connecting your wallet to this app, you agree to the app\'s '," "," ","
"])),e?Ht(vi||(vi=Object(h.a)(['Terms of Service'])),e):null,e&&n?"and":null,n?Ht(mi||(mi=Object(h.a)(['Privacy Policy'])),n):null):null}}]),n}(le);cc.styles=[va.globalCss,ic],cc=function(t,e,n,r){for(var i,a=r>1?void 0:r?oc(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&ac(e,n,a),a}([ue("wcm-legal-notice")],cc);var lc=x(pi||(pi=Object(h.a)(["div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}"]))),sc=Object.defineProperty,uc=Object.getOwnPropertyDescriptor,dc=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"onQrcode",value:function(){Oe.g.push("Qrcode")}},{key:"render",value:function(){var t=Oe.a.state,e=t.explorerExcludedWalletIds,n=t.enableExplorer,r="ALL"!==e&&n,i=Xo.manualWalletsTemplate(),o=Xo.recomendedWalletsTemplate(),c=[Xo.recentWalletTemplate()].concat(Object(a.a)(i),Object(a.a)(o)),l=(c=c.filter(Boolean)).length>8||r,s=[];s=l?c.slice(0,7):c;var u=Boolean(s.length);return Ht(gi||(gi=Object(h.a)(['',""])),this.onQrcode,$a.QRCODE_ICON,u?Ht(bi||(bi=Object(h.a)(["
"," ","
"])),s,l?Ht(wi||(wi=Object(h.a)([""]))):null):null)}}]),n}(le);dc.styles=[va.globalCss,lc],dc=function(t,e,n,r){for(var i,a=r>1?void 0:r?uc(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&sc(e,n,a),a}([ue("wcm-mobile-wallet-selection")],dc);var hc=x(yi||(yi=Object(h.a)([":host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}"]))),fc=Object.defineProperty,vc=Object.getOwnPropertyDescriptor,mc=function(t,e,n,r){for(var i,a=r>1?void 0:r?vc(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&fc(e,n,a),a},pc=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.call(this)).open=!1,t.active=!1,t.unsubscribeModal=void 0,t.abortController=void 0,t.unsubscribeModal=Oe.e.subscribe((function(e){e.open?t.onOpenModalEvent():t.onCloseModalEvent()})),t}return Object(s.a)(n,[{key:"disconnectedCallback",value:function(){var t;null==(t=this.unsubscribeModal)||t.call(this)}},{key:"overlayEl",get:function(){return qa.getShadowRootElement(this,".wcm-overlay")}},{key:"containerEl",get:function(){return qa.getShadowRootElement(this,".wcm-container")}},{key:"toggleBodyScroll",value:function(t){if(document.querySelector("body"))if(t){var e=document.getElementById("wcm-styles");null===e||void 0===e||e.remove()}else document.head.insertAdjacentHTML("beforeend",'')}},{key:"onCloseModal",value:function(t){t.target===t.currentTarget&&Oe.e.close()}},{key:"onOpenModalEvent",value:function(){var t=this;this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout(Object(c.a)(Object(o.a)().mark((function e(){var n;return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=qa.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]},.1,.2,e.next=3,Promise.all([Nn(t.overlayEl,{opacity:[0,1]},{delay:.1,duration:.2}).finished,Nn(t.containerEl,n,{delay:.1,duration:.2}).finished]);case 3:t.active=!0;case 4:case"end":return e.stop()}}),e)}))),0)}},{key:"onCloseModalEvent",value:function(){var t=Object(c.a)(Object(o.a)().mark((function t(){var e;return Object(o.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.toggleBodyScroll(!0),this.removeKeyboardEvents(),e=qa.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]},.2,t.next=4,Promise.all([Nn(this.overlayEl,{opacity:[1,0]},{duration:.2}).finished,Nn(this.containerEl,e,{duration:.2}).finished]);case 4:this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1;case 7:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addKeyboardEvents",value:function(){var t=this;this.abortController=new AbortController,window.addEventListener("keydown",(function(e){var n;"Escape"===e.key?Oe.e.close():"Tab"===e.key&&(null!=(n=e.target)&&n.tagName.includes("wcm-")||t.containerEl.focus())}),this.abortController),this.containerEl.focus()}},{key:"removeKeyboardEvents",value:function(){var t;null==(t=this.abortController)||t.abort(),this.abortController=void 0}},{key:"render",value:function(){var t={"wcm-overlay":!0,"wcm-active":this.active};return Ht(xi||(xi=Object(h.a)(['
',"
"])),xe(t),this.onCloseModal,this.open?Ht(Oi||(Oi=Object(h.a)(['
']))):null)}}]),n}(le);pc.styles=[va.globalCss,hc],mc([me()],pc.prototype,"open",2),mc([me()],pc.prototype,"active",2),pc=mc([ue("wcm-modal")],pc);var gc=x(ji||(ji=Object(h.a)(["div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}"]))),bc=Object.defineProperty,wc=Object.getOwnPropertyDescriptor,yc=function(t,e,n,r){for(var i,a=r>1?void 0:r?wc(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&bc(e,n,a),a},xc=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.apply(this,arguments)).isMobile=!1,t.isDesktop=!1,t.isWeb=!1,t.isRetry=!1,t}return Object(s.a)(n,[{key:"onMobile",value:function(){Oe.b.isMobile()?Oe.g.replace("MobileConnecting"):Oe.g.replace("MobileQrcodeConnecting")}},{key:"onDesktop",value:function(){Oe.g.replace("DesktopConnecting")}},{key:"onWeb",value:function(){Oe.g.replace("WebConnecting")}},{key:"render",value:function(){return Ht(ki||(ki=Object(h.a)(["
"," "," "," ","
"])),this.isRetry?Ht(Ai||(Ai=Object(h.a)([""]))):null,this.isMobile?Ht(Ci||(Ci=Object(h.a)(['Mobile'])),this.onMobile,$a.MOBILE_ICON):null,this.isDesktop?Ht(_i||(_i=Object(h.a)(['Desktop'])),this.onDesktop,$a.DESKTOP_ICON):null,this.isWeb?Ht(Ei||(Ei=Object(h.a)(['Web'])),this.onWeb,$a.GLOBE_ICON):null)}}]),n}(le);xc.styles=[va.globalCss,gc],yc([ve({type:Boolean})],xc.prototype,"isMobile",2),yc([ve({type:Boolean})],xc.prototype,"isDesktop",2),yc([ve({type:Boolean})],xc.prototype,"isWeb",2),yc([ve({type:Boolean})],xc.prototype,"isRetry",2),xc=yc([ue("wcm-platform-selection")],xc);var Oc=x($i||($i=Object(h.a)(["button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}"]))),jc=Object.defineProperty,kc=Object.getOwnPropertyDescriptor,Ac=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"onClick",value:function(){Oe.g.push("WalletExplorer")}},{key:"render",value:function(){var t=Oe.d.state.recomendedWallets,e=Go.manualWallets(),n=[].concat(Object(a.a)(t),Object(a.a)(e)).reverse().slice(0,4);return Ht(Ii||(Ii=Object(h.a)([''])),this.onClick,n.map((function(t){var e=qa.getWalletIcon(t);if(e)return Ht(Mi||(Mi=Object(h.a)([''])),e);var n=qa.getWalletIcon({id:t.id});return n?Ht(Ti||(Ti=Object(h.a)([''])),n):$a.WALLET_PLACEHOLDER})),Object(a.a)(Array(4-n.length)).map((function(){return $a.WALLET_PLACEHOLDER})))}}]),n}(le);Ac.styles=[va.globalCss,Oc],Ac=function(t,e,n,r){for(var i,a=r>1?void 0:r?kc(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&jc(e,n,a),a}([ue("wcm-view-all-wallets-button")],Ac);var Cc=x(Pi||(Pi=Object(h.a)([".wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}"]))),_c=Object.defineProperty,Ec=Object.getOwnPropertyDescriptor,$c=function(t,e,n,r){for(var i,a=r>1?void 0:r?Ec(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&_c(e,n,a),a},Ic=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.call(this)).walletId="",t.imageId="",t.uri="",setTimeout((function(){var e=Oe.f.state.walletConnectUri;t.uri=e}),0),t}return Object(s.a)(n,[{key:"overlayEl",get:function(){return qa.getShadowRootElement(this,".wcm-qr-container")}},{key:"render",value:function(){return Ht(Ri||(Ri=Object(h.a)(['
',"
"])),this.uri?Ht(Si||(Si=Object(h.a)([''])),this.overlayEl.offsetWidth,this.uri,aa(this.walletId),aa(this.imageId)):Ht(Ni||(Ni=Object(h.a)([""]))))}}]),n}(le);Ic.styles=[va.globalCss,Cc],$c([ve()],Ic.prototype,"walletId",2),$c([ve()],Ic.prototype,"imageId",2),$c([me()],Ic.prototype,"uri",2),Ic=$c([ue("wcm-walletconnect-qr")],Ic);var Mc=Object.defineProperty,Tc=Object.getOwnPropertyDescriptor,Pc=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"viewTemplate",value:function(){return Oe.b.isAndroid()?Ht(Li||(Li=Object(h.a)([""]))):Oe.b.isMobile()?Ht(Bi||(Bi=Object(h.a)([""]))):Ht(Di||(Di=Object(h.a)([""])))}},{key:"render",value:function(){return Ht(Ui||(Ui=Object(h.a)(["",""])),this.viewTemplate())}}]),n}(le);Pc.styles=[va.globalCss],Pc=function(t,e,n,r){for(var i,a=r>1?void 0:r?Tc(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Mc(e,n,a),a}([ue("wcm-connect-wallet-view")],Pc);var Rc=x(Wi||(Wi=Object(h.a)(["wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}"]))),Sc=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,Lc=function(t,e,n,r){for(var i,a=r>1?void 0:r?Nc(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Sc(e,n,a),a},Bc=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.call(this)).isError=!1,t.openDesktopApp(),t}return Object(s.a)(n,[{key:"onFormatAndRedirect",value:function(t){var e=Oe.b.getWalletRouterData(),n=e.desktop,r=e.name,i=null===n||void 0===n?void 0:n.native;if(i){var a=Oe.b.formatNativeUrl(i,t,r);Oe.b.openHref(a,"_self")}}},{key:"openDesktopApp",value:function(){var t=Oe.f.state.walletConnectUri,e=Oe.b.getWalletRouterData();qa.setRecentWallet(e),t&&this.onFormatAndRedirect(t)}},{key:"render",value:function(){var t=Oe.b.getWalletRouterData(),e=t.name,n=t.id,r=t.image_id,i=qa.getCachedRouterWalletPlatforms(),a=i.isMobile,o=i.isWeb;return Ht(Hi||(Hi=Object(h.a)(['','Retry'])),e,qa.handleUriCopy,$a.COPY_ICON,n,aa(r),"Continue in ".concat(e,"..."),this.isError,"Connection can continue loading if ".concat(e," is not installed on your device"),a,o,!0,this.openDesktopApp.bind(this),$a.RETRY_ICON)}}]),n}(le);Bc.styles=[va.globalCss,Rc],Lc([me()],Bc.prototype,"isError",2),Bc=Lc([ue("wcm-desktop-connecting-view")],Bc);var Dc=x(zi||(zi=Object(h.a)(["wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}"]))),Uc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,Hc=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"onInstall",value:function(t){t&&Oe.b.openHref(t,"_blank")}},{key:"render",value:function(){var t=this,e=Oe.b.getWalletRouterData(),n=e.name,r=e.id,i=e.image_id,a=e.homepage;return Ht(Zi||(Zi=Object(h.a)(['','Download'])),n,r,aa(i),!0,"Download ".concat(n," to continue. If multiple browser extensions are installed, disable non ").concat(n," ones and try again"),(function(){return t.onInstall(a)}),$a.ARROW_DOWN_ICON)}}]),n}(le);Hc.styles=[va.globalCss,Dc],Hc=function(t,e,n,r){for(var i,a=r>1?void 0:r?Wc(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Uc(e,n,a),a}([ue("wcm-install-wallet-view")],Hc);var zc=x(Fi||(Fi=Object(h.a)(["wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}"]))),Zc=Object.defineProperty,Fc=Object.getOwnPropertyDescriptor,Vc=function(t,e,n,r){for(var i,a=r>1?void 0:r?Fc(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Zc(e,n,a),a},qc=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.call(this)).isError=!1,t.openMobileApp(),t}return Object(s.a)(n,[{key:"onFormatAndRedirect",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Oe.b.getWalletRouterData(),r=n.mobile,i=n.name,a=null===r||void 0===r?void 0:r.native,o=null===r||void 0===r?void 0:r.universal;if(a&&!e){var c=Oe.b.formatNativeUrl(a,t,i);Oe.b.openHref(c,"_self")}else if(o){var l=Oe.b.formatUniversalUrl(o,t,i);Oe.b.openHref(l,"_self")}}},{key:"openMobileApp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=Oe.f.state.walletConnectUri,n=Oe.b.getWalletRouterData();qa.setRecentWallet(n),e&&this.onFormatAndRedirect(e,t)}},{key:"onGoToAppStore",value:function(t){t&&Oe.b.openHref(t,"_blank")}},{key:"render",value:function(){var t=this,e=Oe.b.getWalletRouterData(),n=e.name,r=e.id,i=e.image_id,a=e.app,o=e.mobile,c=qa.getCachedRouterWalletPlatforms().isWeb,l=null===a||void 0===a?void 0:a.ios,s=null===o||void 0===o?void 0:o.universal;return Ht(Vi||(Vi=Object(h.a)(['Retry','
','
App Store
'])),n,r,aa(i),this.isError,c,!0,(function(){return t.openMobileApp(!1)}),$a.RETRY_ICON,s?Ht(qi||(qi=Object(h.a)(['Still doesn\'t work? Try this alternate link'])),(function(){return t.openMobileApp(!0)})):null,r,aa(i),"Get ".concat(n),$a.ARROW_RIGHT_ICON,(function(){return t.onGoToAppStore(l)}))}}]),n}(le);qc.styles=[va.globalCss,zc],Vc([me()],qc.prototype,"isError",2),qc=Vc([ue("wcm-mobile-connecting-view")],qc);var Kc=x(Ki||(Ki=Object(h.a)(["wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}"]))),Yc=Object.defineProperty,Jc=Object.getOwnPropertyDescriptor,Qc=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"render",value:function(){var t=Oe.b.getWalletRouterData(),e=t.name,n=t.id,r=t.image_id,i=qa.getCachedRouterWalletPlatforms(),a=i.isDesktop,o=i.isWeb;return Ht(Yi||(Yi=Object(h.a)(['',''])),e,qa.handleUriCopy,$a.COPY_ICON,n,aa(r),"Scan this QR Code with your phone's camera or inside ".concat(e," app"),a,o)}}]),n}(le);Qc.styles=[va.globalCss,Kc],Qc=function(t,e,n,r){for(var i,a=r>1?void 0:r?Jc(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Yc(e,n,a),a}([ue("wcm-mobile-qr-connecting-view")],Qc);var Gc=Object.defineProperty,Xc=Object.getOwnPropertyDescriptor,tl=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){return Object(l.a)(this,n),e.apply(this,arguments)}return Object(s.a)(n,[{key:"render",value:function(){return Ht(Ji||(Ji=Object(h.a)([''])),qa.handleUriCopy,$a.COPY_ICON)}}]),n}(le);tl.styles=[va.globalCss],tl=function(t,e,n,r){for(var i,a=r>1?void 0:r?Xc(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&Gc(e,n,a),a}([ue("wcm-qrcode-view")],tl);var el=x(Qi||(Qi=Object(h.a)(["wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}"]))),nl=Object.defineProperty,rl=Object.getOwnPropertyDescriptor,il=function(t,e,n,r){for(var i,a=r>1?void 0:r?rl(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&nl(e,n,a),a},al=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.apply(this,arguments)).loading=!Oe.d.state.wallets.listings.length,t.firstFetch=!Oe.d.state.wallets.listings.length,t.search="",t.endReached=!1,t.intersectionObserver=void 0,t.searchDebounce=qa.debounce((function(e){e.length>=1?(t.firstFetch=!0,t.endReached=!1,t.search=e,Oe.d.resetSearch(),t.fetchWallets()):t.search&&(t.search="",t.endReached=t.isLastPage(),Oe.d.resetSearch())})),t}return Object(s.a)(n,[{key:"firstUpdated",value:function(){this.createPaginationObserver()}},{key:"disconnectedCallback",value:function(){var t;null==(t=this.intersectionObserver)||t.disconnect()}},{key:"placeholderEl",get:function(){return qa.getShadowRootElement(this,".wcm-placeholder-block")}},{key:"createPaginationObserver",value:function(){var t=this;this.intersectionObserver=new IntersectionObserver((function(e){Object(f.a)(e,1)[0].isIntersecting&&(!t.search||!t.firstFetch)&&t.fetchWallets()})),this.intersectionObserver.observe(this.placeholderEl)}},{key:"isLastPage",value:function(){var t=Oe.d.state,e=t.wallets,n=t.search,r=this.search?n:e,i=r.listings,a=r.total;return a<=40||i.length>=a}},{key:"fetchWallets",value:function(){var t=Object(c.a)(Object(o.a)().mark((function t(){var e,n,r,i,l,s,u,d,h,f,v,m;return Object(o.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Oe.d.state,r=n.wallets,i=n.search,l=this.search?i:r,s=l.listings,u=l.total,d=l.page,this.endReached||!(this.firstFetch||u>40&&s.length=3,c=Xo.manualWalletsTemplate(),l=Xo.recomendedWalletsTemplate(!0);o&&(c=c.filter((function(e){var n=e.values;return qa.caseSafeIncludes(n[0],t.search)})),l=l.filter((function(e){var n=e.values;return qa.caseSafeIncludes(n[0],t.search)})));var s=!this.loading&&!i.length&&!l.length,u={"wcm-loading":a,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":s};return Ht(Gi||(Gi=Object(h.a)(['
'," "," ",'
'," ","
"])),this.onSearchChange.bind(this),xe(u),a?null:c,a?null:l,a?null:i.map((function(e){return Ht(Xi||(Xi=Object(h.a)(["",""])),e?Ht(ta||(ta=Object(h.a)([''])),e.image_id,e.name,e.id,(function(){return t.onConnect(e)})):null)})),s?Ht(ea||(ea=Object(h.a)(['No results found']))):null,!s&&this.loading?Ht(na||(na=Object(h.a)([""]))):null)}}]),n}(le);al.styles=[va.globalCss,el],il([me()],al.prototype,"loading",2),il([me()],al.prototype,"firstFetch",2),il([me()],al.prototype,"search",2),il([me()],al.prototype,"endReached",2),al=il([ue("wcm-wallet-explorer-view")],al);var ol=x(ra||(ra=Object(h.a)(["wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}"]))),cl=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,sl=function(t,e,n,r){for(var i,a=r>1?void 0:r?ll(e,n):e,o=t.length-1;o>=0;o--)(i=t[o])&&(a=(r?i(e,n,a):i(a))||a);return r&&a&&cl(e,n,a),a},ul=function(t){Object(u.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(l.a)(this,n),(t=e.call(this)).isError=!1,t.openWebWallet(),t}return Object(s.a)(n,[{key:"onFormatAndRedirect",value:function(t){var e=Oe.b.getWalletRouterData(),n=e.desktop,r=e.name,i=null===n||void 0===n?void 0:n.universal;if(i){var a=Oe.b.formatUniversalUrl(i,t,r);Oe.b.openHref(a,"_blank")}}},{key:"openWebWallet",value:function(){var t=Oe.f.state.walletConnectUri,e=Oe.b.getWalletRouterData();qa.setRecentWallet(e),t&&this.onFormatAndRedirect(t)}},{key:"render",value:function(){var t=Oe.b.getWalletRouterData(),e=t.name,n=t.id,r=t.image_id,i=qa.getCachedRouterWalletPlatforms(),a=i.isMobile,o=i.isDesktop,c=Oe.b.isMobile();return Ht(ia||(ia=Object(h.a)(['','Retry'])),e,qa.handleUriCopy,$a.COPY_ICON,n,aa(r),"Continue in ".concat(e,"..."),this.isError,"".concat(e," web app has opened in a new tab. Go there, accept the connection, and come back"),a,!c&&o,!0,this.openWebWallet.bind(this),$a.RETRY_ICON)}}]),n}(le);ul.styles=[va.globalCss,ol],sl([me()],ul.prototype,"isError",2),ul=sl([ue("wcm-web-connecting-view")],ul)}}]); +//# sourceMappingURL=3.b445a58f.chunk.js.map \ No newline at end of file diff --git a/static/js/3.b445a58f.chunk.js.LICENSE.txt b/static/js/3.b445a58f.chunk.js.LICENSE.txt new file mode 100644 index 000000000..b6ce9bd68 --- /dev/null +++ b/static/js/3.b445a58f.chunk.js.LICENSE.txt @@ -0,0 +1,17 @@ +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ diff --git a/static/js/4.e7bff840.chunk.js b/static/js/4.e7bff840.chunk.js new file mode 100644 index 000000000..e83381400 --- /dev/null +++ b/static/js/4.e7bff840.chunk.js @@ -0,0 +1,2 @@ +(this.webpackJsonpexample=this.webpackJsonpexample||[]).push([[4],{3994:function(e,t,n){"use strict";n.r(t),n.d(t,"WalletConnectModal",(function(){return s}));var r=n(0),o=n(9),a=n(1),c=n(2),i=n(4158),s=function(){function e(t){Object(a.a)(this,e),this.openModal=i.e.open,this.closeModal=i.e.close,this.subscribeModal=i.e.subscribe,this.setTheme=i.h.setThemeConfig,i.h.setThemeConfig(t),i.a.setConfig(t),this.initUi()}return Object(c.a)(e,[{key:"initUi",value:function(){var e=Object(o.a)(Object(r.a)().mark((function e(){var t;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(typeof window<"u")){e.next=5;break}return e.next=3,n.e(3).then(n.bind(null,4185));case 3:t=document.createElement("wcm-modal"),document.body.insertAdjacentElement("beforeend",t),i.f.setIsUiLoaded(!0);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}]),e}()},4158:function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"d",(function(){return H})),n.d(t,"e",(function(){return J})),n.d(t,"f",(function(){return h})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return Z})),n.d(t,"i",(function(){return ee}));var r=n(14),o=n(33),a=n(0),c=n(9),i=n(25),s=n(4163),u=Object(s.proxy)({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),l={state:u,subscribe:function(e){return Object(s.subscribe)(u,(function(){return e(u)}))},push:function(e,t){e!==u.view&&(u.view=e,t&&(u.data=t),u.history.push(e))},reset:function(e){u.view=e,u.history=[e]},replace:function(e){u.history.length>1&&(u.history[u.history.length-1]=e,u.view=e)},goBack:function(){if(u.history.length>1){u.history.pop();var e=u.history.slice(-1),t=Object(i.a)(e,1)[0];u.view=t}},setData:function(e){u.data=e}},f={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:function(){return typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/.test(navigator.userAgent))},isAndroid:function(){return f.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos:function(){var e=navigator.userAgent.toLowerCase();return f.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:function(e){return e.startsWith("http://")||e.startsWith("https://")},isArray:function(e){return Array.isArray(e)&&e.length>0},formatNativeUrl:function(e,t,n){if(f.isHttpUrl(e))return this.formatUniversalUrl(e,t,n);var r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r="".concat(r,"://")),r.endsWith("/")||(r="".concat(r,"/")),this.setWalletConnectDeepLink(r,n);var o=encodeURIComponent(t);return"".concat(r,"wc?uri=").concat(o)},formatUniversalUrl:function(e,t,n){if(!f.isHttpUrl(e))return this.formatNativeUrl(e,t,n);var r=e;r.endsWith("/")||(r="".concat(r,"/")),this.setWalletConnectDeepLink(r,n);var o=encodeURIComponent(t);return"".concat(r,"wc?uri=").concat(o)},wait:function(e){return Object(c.a)(Object(a.a)().mark((function t(){return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){setTimeout(t,e)})));case 1:case"end":return t.stop()}}),t)})))()},openHref:function(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink:function(e,t){try{localStorage.setItem(f.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch(n){console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink:function(e){try{var t=e.split("?"),n=Object(i.a)(t,1)[0];localStorage.setItem(f.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:n,name:"Android"}))}catch(r){console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink:function(){try{localStorage.removeItem(f.WALLETCONNECT_DEEPLINK_CHOICE)}catch(e){console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage:function(){try{typeof localStorage<"u"&&localStorage.setItem(f.WCM_VERSION,"2.6.2")}catch(e){console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData:function(){var e,t=null==(e=l.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},d=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),p=Object(s.proxy)({enabled:d,userSessionId:"",events:[],connectedWalletId:void 0}),b={state:p,subscribe:function(e){return Object(s.subscribe)(p.events,(function(){return e(Object(s.snapshot)(p.events[p.events.length-1]))}))},initialize:function(){p.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(p.userSessionId=crypto.randomUUID())},setConnectedWalletId:function(e){p.connectedWalletId=e},click:function(e){if(p.enabled){var t={type:"CLICK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},track:function(e){if(p.enabled){var t={type:"TRACK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},view:function(e){if(p.enabled){var t={type:"VIEW",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}}},v=Object(s.proxy)({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),h={state:v,subscribe:function(e){return Object(s.subscribe)(v,(function(){return e(v)}))},setChains:function(e){v.chains=e},setWalletConnectUri:function(e){v.walletConnectUri=e},setIsCustomDesktop:function(e){v.isCustomDesktop=e},setIsCustomMobile:function(e){v.isCustomMobile=e},setIsDataLoaded:function(e){v.isDataLoaded=e},setIsUiLoaded:function(e){v.isUiLoaded=e},setIsAuth:function(e){v.isAuth=e}},O=Object(s.proxy)({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),y={state:O,subscribe:function(e){return Object(s.subscribe)(O,(function(){return e(O)}))},setConfig:function(e){var t,n;b.initialize(),h.setChains(e.chains),h.setIsAuth(Boolean(e.enableAuthMode)),h.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),h.setIsCustomDesktop(Boolean(null==(n=e.desktopWallets)?void 0:n.length)),f.setModalVersionInStorage(),Object.assign(O,e)}},m=Object.defineProperty,g=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,I=function(e,t,n){return t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},k=function(e,t){for(var n in t||(t={}))j.call(t,n)&&I(e,n,t[n]);if(g){var r,a=Object(o.a)(g(t));try{for(a.s();!(r=a.n()).done;){n=r.value;w.call(t,n)&&I(e,n,t[n])}}catch(c){a.e(c)}finally{a.f()}}return e},C="https://explorer-api.walletconnect.com",W="wcm",E="js-2.6.2";function x(e,t){return A.apply(this,arguments)}function A(){return(A=Object(c.a)(Object(a.a)().mark((function e(t,n){var r,o;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=k({sdkType:W,sdkVersion:E},n),(o=new URL(t,C)).searchParams.append("projectId",y.state.projectId),Object.entries(r).forEach((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];r&&o.searchParams.append(n,String(r))})),e.next=5,fetch(o);case 5:return e.abrupt("return",e.sent.json());case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var L=function(e){return Object(c.a)(Object(a.a)().mark((function t(){return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",x("/w3m/v1/getDesktopListings",e));case 1:case"end":return t.stop()}}),t)})))()},P=function(e){return Object(c.a)(Object(a.a)().mark((function t(){return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",x("/w3m/v1/getMobileListings",e));case 1:case"end":return t.stop()}}),t)})))()},D=function(e){return Object(c.a)(Object(a.a)().mark((function t(){return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",x("/w3m/v1/getAllListings",e));case 1:case"end":return t.stop()}}),t)})))()},M=function(e){return"".concat(C,"/w3m/v1/getWalletImage/").concat(e,"?projectId=").concat(y.state.projectId,"&sdkType=").concat(W,"&sdkVersion=").concat(E)},S=function(e){return"".concat(C,"/w3m/v1/getAssetImage/").concat(e,"?projectId=").concat(y.state.projectId,"&sdkType=").concat(W,"&sdkVersion=").concat(E)},U=Object.defineProperty,R=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,_=function(e,t,n){return t in e?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},K=function(e,t){for(var n in t||(t={}))T.call(t,n)&&_(e,n,t[n]);if(R){var r,a=Object(o.a)(R(t));try{for(a.s();!(r=a.n()).done;){n=r.value;N.call(t,n)&&_(e,n,t[n])}}catch(c){a.e(c)}finally{a.f()}}return e},V=f.isMobile(),B=Object(s.proxy)({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),H={state:B,getRecomendedWallets:function(){return Object(c.a)(Object(a.a)().mark((function e(){var t,n,r,o,c,i,s,u,l,d,p,b,v,O,m;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=y.state,n=t.explorerRecommendedWalletIds,r=t.explorerExcludedWalletIds,"NONE"!==n&&("ALL"!==r||n)){e.next=3;break}return e.abrupt("return",B.recomendedWallets);case 3:if(!f.isArray(n)){e.next=13;break}return o={recommendedIds:n.join(",")},e.next=7,D(o);case 7:c=e.sent,i=c.listings,(s=Object.values(i)).sort((function(e,t){return n.indexOf(e.id)-n.indexOf(t.id)})),B.recomendedWallets=s,e.next=31;break;case 13:if(u=h.state,l=u.chains,d=u.isAuth,p=null===l||void 0===l?void 0:l.join(","),b=f.isArray(r),v={page:1,sdks:d?"auth_v1":void 0,entries:f.RECOMMENDED_WALLET_AMOUNT,chains:p,version:2,excludedIds:b?r.join(","):void 0},!V){e.next=25;break}return e.next=22,P(v);case 22:e.t0=e.sent,e.next=28;break;case 25:return e.next=27,L(v);case 27:e.t0=e.sent;case 28:O=e.t0,m=O.listings,B.recomendedWallets=Object.values(m);case 31:return e.abrupt("return",B.recomendedWallets);case 32:case"end":return e.stop()}}),e)})))()},getWallets:function(e){return Object(c.a)(Object(a.a)().mark((function t(){var n,o,c,i,s,u,l,d,p,b,v,O;return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=K({},e),o=y.state,c=o.explorerRecommendedWalletIds,i=o.explorerExcludedWalletIds,s=B.recomendedWallets,"ALL"!==i){t.next=3;break}return t.abrupt("return",B.wallets);case 3:if(s.length?n.excludedIds=s.map((function(e){return e.id})).join(","):f.isArray(c)&&(n.excludedIds=c.join(",")),f.isArray(i)&&(n.excludedIds=[n.excludedIds,i].filter(Boolean).join(",")),h.state.isAuth&&(n.sdks="auth_v1"),u=e.page,l=e.search,!V){t.next=12;break}return t.next=9,P(n);case 9:t.t0=t.sent,t.next=15;break;case 12:return t.next=14,L(n);case 14:t.t0=t.sent;case 15:return d=t.t0,p=d.listings,b=d.total,v=Object.values(p),O=l?"search":"wallets",t.abrupt("return",(B[O]={listings:[].concat(Object(r.a)(B[O].listings),v),total:b,page:null!==u&&void 0!==u?u:1},{listings:v,total:b}));case 21:case"end":return t.stop()}}),t)})))()},getWalletImageUrl:function(e){return M(e)},getAssetImageUrl:function(e){return S(e)},resetSearch:function(){B.search={listings:[],total:0,page:1}}},z=Object(s.proxy)({open:!1}),J={state:z,subscribe:function(e){return Object(s.subscribe)(z,(function(){return e(z)}))},open:function(e){return Object(c.a)(Object(a.a)().mark((function t(){return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){var n=h.state,r=n.isUiLoaded,o=n.isDataLoaded;if(f.removeWalletConnectDeepLink(),h.setWalletConnectUri(null===e||void 0===e?void 0:e.uri),h.setChains(null===e||void 0===e?void 0:e.chains),l.reset("ConnectWallet"),r&&o)z.open=!0,t();else var a=setInterval((function(){var e=h.state;e.isUiLoaded&&e.isDataLoaded&&(clearInterval(a),z.open=!0,t())}),200)})));case 1:case"end":return t.stop()}}),t)})))()},close:function(){z.open=!1}},q=Object.defineProperty,F=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,X=function(e,t,n){return t in e?q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n};var Y=Object(s.proxy)({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),Z={state:Y,subscribe:function(e){return Object(s.subscribe)(Y,(function(){return e(Y)}))},setThemeConfig:function(e){var t=e.themeMode,n=e.themeVariables;t&&(Y.themeMode=t),n&&(Y.themeVariables=function(e,t){for(var n in t||(t={}))G.call(t,n)&&X(e,n,t[n]);if(F){var r,a=Object(o.a)(F(t));try{for(a.s();!(r=a.n()).done;)n=r.value,Q.call(t,n)&&X(e,n,t[n])}catch(c){a.e(c)}finally{a.f()}}return e}({},n))}},$=Object(s.proxy)({open:!1,message:"",variant:"success"}),ee={state:$,subscribe:function(e){return Object(s.subscribe)($,(function(){return e($)}))},openToast:function(e,t){$.open=!0,$.message=e,$.variant=t},closeToast:function(){$.open=!1}}},4163:function(e,t,n){"use strict";var r=n(4164),o=function(e){return"object"===typeof e&&null!==e},a=new WeakMap,c=new WeakSet,i=function(e,t,n,i,s,u,l,f,d){return void 0===e&&(e=Object.is),void 0===t&&(t=function(e,t){return new Proxy(e,t)}),void 0===n&&(n=function(e){return o(e)&&!c.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)}),void 0===i&&(i=function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}}),void 0===s&&(s=new WeakMap),void 0===u&&(u=function(e){function t(t,n,r){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t,n){void 0===n&&(n=i);var o=s.get(e);if((null==o?void 0:o[0])===t)return o[1];var l=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return r.markToTrack(l,!0),s.set(e,[t,l]),Reflect.ownKeys(e).forEach((function(t){if(!Object.getOwnPropertyDescriptor(l,t)){var o=Reflect.get(e,t),i={value:o,enumerable:!0,configurable:!0};if(c.has(o))r.markToTrack(o,!1);else if(o instanceof Promise)delete i.value,i.get=function(){return n(o)};else if(a.has(o)){var s=a.get(o),f=s[0],d=s[1];i.value=u(f,d(),n)}Object.defineProperty(l,t,i)}})),Object.preventExtensions(l)}))),void 0===l&&(l=new WeakMap),void 0===f&&(f=[1,1]),void 0===d&&(d=function(i){if(!o(i))throw new Error("object required");var s=l.get(i);if(s)return s;var p=f[0],b=new Set,v=function(e,t){void 0===t&&(t=++f[0]),p!==t&&(p=t,b.forEach((function(n){return n(e,t)})))},h=f[1],O=function(e){return function(t,n){var r=[].concat(t);r[1]=[e].concat(r[1]),v(r,n)}},y=new Map,m=function(e){var t,n=y.get(e);n&&(y.delete(e),null==(t=n[1])||t.call(n))},g=Array.isArray(i)?[]:Object.create(Object.getPrototypeOf(i)),j=t(g,{deleteProperty:function(e,t){var n=Reflect.get(e,t);m(t);var r=Reflect.deleteProperty(e,t);return r&&v(["delete",[t],n]),r},set:function(t,i,s,u){var f=Reflect.has(t,i),p=Reflect.get(t,i,u);if(f&&(e(p,s)||l.has(s)&&e(p,l.get(s))))return!0;m(i),o(s)&&(s=r.getUntracked(s)||s);var h=s;if(s instanceof Promise)s.then((function(e){s.status="fulfilled",s.value=e,v(["resolve",[i],e])})).catch((function(e){s.status="rejected",s.reason=e,v(["reject",[i],e])}));else{!a.has(s)&&n(s)&&(h=d(s));var g=!c.has(h)&&a.get(h);g&&function(e,t){if(b.size){var n=t[3](O(e));y.set(e,[t,n])}else y.set(e,[t])}(i,g)}return Reflect.set(t,i,h,u),v(["set",[i],s,p]),!0}});l.set(i,j);var w=[g,function(e){return void 0===e&&(e=++f[1]),h===e||b.size||(h=e,y.forEach((function(t){var n=t[0][1](e);n>p&&(p=n)}))),p},u,function(e){b.add(e),1===b.size&&y.forEach((function(e,t){var n=e[0];e[1];var r=n[3](O(t));y.set(t,[n,r])}));return function(){b.delete(e),0===b.size&&y.forEach((function(e,t){var n=e[0],r=e[1];r&&(r(),y.set(t,[n]))}))}}];return a.set(j,w),Reflect.ownKeys(i).forEach((function(e){var t=Object.getOwnPropertyDescriptor(i,e);"value"in t&&(j[e]=i[e],delete t.value,delete t.writable),Object.defineProperty(g,e,t)})),j}),[d,a,c,e,t,n,i,s,u,l,f]},s=i()[0];var u=i;t.getVersion=function(e){var t=a.get(e);return null==t?void 0:t[1]()},t.proxy=function(e){return void 0===e&&(e={}),s(e)},t.ref=function(e){return c.add(e),e},t.snapshot=function(e,t){var n=a.get(e),r=n[0],o=n[1];return(0,n[2])(r,o(),t)},t.subscribe=function(e,t,n){var r,o=a.get(e),c=[],i=o[3],s=!1,u=i((function(e){c.push(e),n?t(c.splice(0)):r||(r=Promise.resolve().then((function(){r=void 0,s&&t(c.splice(0))})))}));return s=!0,function(){s=!1,u()}},t.unstable_buildProxyFunction=u},4164:function(e,t,n){"use strict";n.r(t),n.d(t,"affectedToPathList",(function(){return w})),n.d(t,"createProxy",(function(){return O})),n.d(t,"getUntracked",(function(){return g})),n.d(t,"isChanged",(function(){return y})),n.d(t,"markToTrack",(function(){return j})),n.d(t,"replaceNewProxy",(function(){return I})),n.d(t,"trackMemo",(function(){return m}));var r=n(14),o=n(33),a=n(25),c=Symbol(),i=Symbol(),s="a",u="w",l=function(e,t){return new Proxy(e,t)},f=Object.getPrototypeOf,d=new WeakMap,p=function(e){return e&&(d.has(e)?d.get(e):f(e)===Object.prototype||f(e)===Array.prototype)},b=function(e){return"object"==typeof e&&null!==e},v=function(e){if(Array.isArray(e))return Array.from(e);var t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach((function(e){e.configurable=!0})),Object.create(f(e),t)},h=function(e){return e[i]||e},O=function e(t,n,r,o){if(!p(t))return t;var f=o&&o.get(t);if(!f){var d=h(t);f=function(e){return Object.values(Object.getOwnPropertyDescriptors(e)).some((function(e){return!e.configurable&&!e.writable}))}(d)?[d,v(d)]:[d],null==o||o.set(t,f)}var b=f,O=Object(a.a)(b,2),y=O[0],m=O[1],g=r&&r.get(y);return g&&g[1].f===!!m||(g=function(t,n){var r={f:n},o=!1,a=function(e,n){if(!o){var a=r[s].get(t);if(a||(a={},r[s].set(t,a)),e===u)a[u]=!0;else{var c=a[e];c||(c=new Set,a[e]=c),c.add(n)}}},l={get:function(n,o){return o===i?t:(a("k",o),e(Reflect.get(n,o),r[s],r.c,r.t))},has:function(e,n){return n===c?(o=!0,r[s].delete(t),!0):(a("h",n),Reflect.has(e,n))},getOwnPropertyDescriptor:function(e,t){return a("o",t),Reflect.getOwnPropertyDescriptor(e,t)},ownKeys:function(e){return a(u),Reflect.ownKeys(e)}};return n&&(l.set=l.deleteProperty=function(){return!1}),[l,r]}(y,!!m),g[1].p=l(m||y,g[0]),r&&r.set(y,g)),g[1][s]=n,g[1].c=r,g[1].t=o,g[1].p},y=function e(t,n,r,a){if(Object.is(t,n))return!1;if(!b(t)||!b(n))return!0;var c=r.get(h(t));if(!c)return!0;if(a){var i=a.get(t);if(i&&i.n===n)return i.g;a.set(t,{n:n,g:!1})}var s=null;try{var l,f=Object(o.a)(c.h||[]);try{for(f.s();!(l=f.n()).done;){var d=l.value;if(s=Reflect.has(t,d)!==Reflect.has(n,d))return s}}catch(j){f.e(j)}finally{f.f()}if(!0===c[u]){if(s=function(e,t){var n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some((function(e,t){return e!==r[t]}))}(t,n),s)return s}else{var p,v=Object(o.a)(c.o||[]);try{for(v.s();!(p=v.n()).done;){var O=p.value;if(s=!!Reflect.getOwnPropertyDescriptor(t,O)!=!!Reflect.getOwnPropertyDescriptor(n,O))return s}}catch(j){v.e(j)}finally{v.f()}}var y,m=Object(o.a)(c.k||[]);try{for(m.s();!(y=m.n()).done;){var g=y.value;if(s=e(t[g],n[g],r,a))return s}}catch(j){m.e(j)}finally{m.f()}return null===s&&(s=!0),s}finally{a&&a.set(t,{n:n,g:s})}},m=function(e){return!!p(e)&&c in e},g=function(e){return p(e)&&e[i]||null},j=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];d.set(e,t)},w=function(e,t,n){var o=[],a=new WeakSet;return function e(c,i){if(!a.has(c)){b(c)&&a.add(c);var s=b(c)&&t.get(h(c));if(s){var l,f;if(null==(l=s.h)||l.forEach((function(e){var t=":has(".concat(String(e),")");o.push(i?[].concat(Object(r.a)(i),[t]):[t])})),!0===s[u]){var d=":ownKeys";o.push(i?[].concat(Object(r.a)(i),[d]):[d])}else{var p;null==(p=s.o)||p.forEach((function(e){var t=":hasOwn(".concat(String(e),")");o.push(i?[].concat(Object(r.a)(i),[t]):[t])}))}null==(f=s.k)||f.forEach((function(t){n&&!("value"in(Object.getOwnPropertyDescriptor(c,t)||{}))||e(c[t],i?[].concat(Object(r.a)(i),[t]):[t])}))}else i&&o.push(i)}}(e),o},I=function(e){l=e}}}]); +//# sourceMappingURL=4.e7bff840.chunk.js.map \ No newline at end of file diff --git a/static/js/main.4918d51a.chunk.js b/static/js/main.4918d51a.chunk.js new file mode 100644 index 000000000..a87ee12eb --- /dev/null +++ b/static/js/main.4918d51a.chunk.js @@ -0,0 +1,2 @@ +(this.webpackJsonpexample=this.webpackJsonpexample||[]).push([[0],{1168:function(e,t,n){"use strict";var r=n(20).default,a=n(37).default,i=n(38).default,s=n(21).default,o=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.MappedConnectionProvider=t.MappedOptionConnectionProvider=t.AbstractConnectionProvider=void 0;var u=n(19),c=n(162),d=n(607),p=function(){function e(){s(this,e)}return o(e,[{key:"map",value:function(e){return new y(this,e)}},{key:"mapOption",value:function(e){return new l(this,e)}}]),e}();t.AbstractConnectionProvider=p;var l=function(e){a(n,e);var t=i(n);function n(e,r){var a;return s(this,n),(a=t.call(this)).source=e,a.mapper=r,a}return o(n,[{key:"getId",value:function(){return this.source.getId()}},{key:"getConnection",value:function(){return this.source.getConnection()}},{key:"isAutoConnected",value:function(){return this.source.isAutoConnected()}},{key:"getOption",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.source.getOption();case 2:return t=e.sent,e.abrupt("return",t?this.mapper(t):void 0);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"isConnected",value:function(){return this.source.isConnected()}}]),n}(p);t.MappedOptionConnectionProvider=l;var y=function(e){a(n,e);var t=i(n);function n(e,r){var a;return s(this,n),(a=t.call(this)).source=e,a.mapper=r,a}return o(n,[{key:"getId",value:function(){return this.source.getId()}},{key:"getProvider",value:function(){return this.source}},{key:"getConnection",value:function(){var e=this;return this.source.getConnection().pipe((0,c.switchMap)((function(t){return u.__awaiter(e,void 0,void 0,r().mark((function e(){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("connected"!==t.status){e.next=7;break}return e.next=3,this.mapper(t.connection);case 3:return n=e.sent,e.abrupt("return",(0,d.getStateConnected)({connection:n,disconnect:t.disconnect}));case 7:return e.abrupt("return",t);case 8:case"end":return e.stop()}}),e,this)})))})))}},{key:"isAutoConnected",value:function(){return this.source.isAutoConnected()}},{key:"getOption",value:function(){return this.source.getOption()}},{key:"isConnected",value:function(){return this.source.isConnected()}}]),n}(p);t.MappedConnectionProvider=y},1172:function(e,t,n){"use strict";var r=n(48).default,a=n(111).default;Object.defineProperty(t,"__esModule",{value:!0}),t.validateBlockchain=t.getEntityData=t.extractId=t.extractBlockchain=t.extractBlockchainFromAssetType=void 0;var i=n(45);t.extractBlockchainFromAssetType=function(e){if(!e)throw new Error("Asset type is expected");return"blockchain"in e&&e.blockchain?e.blockchain:"contract"in e&&e.contract?o(e.contract):void 0};var s=Object.values(i.Blockchain);function o(e){var t=e.indexOf(":");if(-1===t)throw new Error("Unable to extract blockchain from ".concat(e));var n,r=e.substring(0,t),i=a(s);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o===r)return o}}catch(u){i.e(u)}finally{i.f()}throw new Error("Unable to extract blockchain from ".concat(e))}function u(e){if(!(e in i.Blockchain))throw new Error('Value: "'.concat(e,'" is not a supported blockchain type'));return e}t.extractBlockchain=o,t.extractId=function(e){var t=e.indexOf(":");if(-1===t)throw new Error("Unable to extract blockchain from ".concat(e));return e.substring(t+1)},t.getEntityData=function(e){if(!e)throw new Error("Entity has not been specified");var t=e.split(":"),n=r(t,2),a=n[0],i=n[1];return{blockchain:u(a),address:i}},t.validateBlockchain=u},1173:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(19).__exportStar(n(1869),t)},1175:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=t.promiseToObservable=t.cache=void 0;var r=n(143),a=n(162);t.cache=function(e){var t=void 0;return new r.Observable((function(n){void 0===t&&(t=e()),t.then((function(e){return n.next(e)})).catch((function(e){t=void 0,n.error(e)}))}))},t.promiseToObservable=function(e){return(0,r.from)(e).pipe((0,a.mergeMap)((function(e){return e})))},t.noop=function(){}},1176:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ethAccounts=t.getAddress=void 0;var i=n(19),s=n(1177),o=n(1178);function u(e){return i.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,s.providerRequest)(e,"eth_accounts"));case 1:case"end":return t.stop()}}),t)})))}t.getAddress=function(e){return(0,o.getObservable)(e,u,(function(e){return a(e,1)[0]}),"accountsChanged")},t.ethAccounts=u},1177:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.providerRequest=void 0;var a=n(19);function i(e,t,n){return new Promise((function(r,a){try{!function(e,t,n){if(null===e||"object"!==typeof e)throw new Error("No send method defined");if("function"===typeof e.sendAsync)e.sendAsync(t,n);else{if("function"!==typeof e.send)throw new Error("No send method defined");e.send(t,n)}}(e,{jsonrpc:"2.0",id:(new Date).getTime(),method:t,params:n},(function(e,t){var n=e||(null===t||void 0===t?void 0:t.error);n&&a(n),(null===t||void 0===t?void 0:t.result)&&r(t.result),a(new Error("Can't handle JSON-RPC request"))}))}catch(i){a(i)}}))}t.providerRequest=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return a.__awaiter(this,void 0,void 0,r().mark((function a(){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("object"===typeof e&&null!==e){r.next=2;break}throw new Error("Provider is not an object");case 2:if("function"===typeof e.request){r.next=4;break}return r.abrupt("return",i(e,t,n));case 4:return r.abrupt("return",e.request({method:t,params:n}));case 5:case"end":return r.stop()}}),a)})))}},1178:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getObservable=void 0;var a=n(19),i=n(143);t.getObservable=function(e,t,n,s){var o=this;return"on"in e?new i.Observable((function(r){var a=function(e){r.next(n(e))};t(e).then(a).catch((function(e){return r.error(e)})),e.on(s,a),"removeListener"in e&&r.add((function(){e.removeListener(s,a)}))})):(0,i.from)(a.__awaiter(o,void 0,void 0,r().mark((function a(){var i;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t(e);case 2:return i=r.sent,r.abrupt("return",n(i));case 4:case"end":return r.stop()}}),a)}))))}},1179:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getChainId=void 0;var a=n(19),i=n(1177),s=n(1178);function o(e){return a.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,i.providerRequest)(e,"eth_chainId"));case 1:case"end":return t.stop()}}),t)})))}t.getChainId=function(e){return(0,s.getObservable)(e,o,(function(e){return parseInt(e)}),"chainChanged")}},1180:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRaribleWallet=void 0;var r=n(1181),a=n(2002),i=n(89),s=n(89),o=n(89);t.getRaribleWallet=function(e){if((0,s.isBlockchainWallet)(e))return e;if("personalSign"in(t=e)&&"getFrom"in t&&"getChainId"in t)return new i.EthereumWallet(e);var t;if(function(e){return"signTransaction"in e&&"signAllTransactions"in e&&"publicKey"in e}(e))return new i.SolanaWallet(e);if(function(e){return"sign"in e&&"kind"in e&&"public_key"in e}(e))return new i.TezosWallet(e);if(function(e){return"authz"in e&&"send"in e&&"currentUser"in e}(e))return new i.FlowWallet(e);if(function(e){return"link"in e&&"network"in e&&"getConnectionData"in e}(e))return new o.ImmutableXWallet(e);if(function(e){return"eth"in e&&"utils"in e&&"signTransaction"in e.eth&&"getChainId"in e.eth}(e))return new i.EthereumWallet(new r.Web3Ethereum({web3:e}));if(function(e){return"provider"in e&&"signMessage"in e&&"signTransaction"in e&&e._isSigner&&"_signTypedData"in e}(e))return new i.EthereumWallet(new a.EthersEthereum(e));throw new Error("Unsupported provider")}},1181:function(e,t,n){"use strict";var r=n(48).default,a=n(78).default,i=n(20).default,s=n(21).default,o=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrentProviderId=t.Web3Transaction=t.Web3FunctionCall=t.Web3Contract=t.Web3Ethereum=void 0;var u=n(19),c=n(1182),d=n(64),p=n(1206),l=n(298),y=n(1184),f=n(1977),m=n(1978),b=n(1979),v=function(){function e(t){s(this,e),this.config=t,this.send=this.send.bind(this),this.getFrom=this.getFrom.bind(this)}return o(e,[{key:"createContract",value:function(e,t){return new h(this.config,new this.config.web3.eth.Contract(e,t))}},{key:"send",value:function(e,t){return u.__awaiter(this,void 0,void 0,i().mark((function n(){return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,(0,f.providerRequest)(this.config.web3.currentProvider,e,t);case 3:return n.abrupt("return",n.sent);case 6:return n.prev=6,n.t0=n.catch(0),n.t1=c.EthereumProviderError,n.t2=Object,n.t3=Object,n.t4={},n.next=14,k(this.config);case 14:throw n.t5=n.sent,n.t6=n.t3.assign.call(n.t3,n.t4,n.t5),n.t7={error:n.t0,method:"Web3Ethereum.send",data:{method:e,params:t}},n.t8=n.t2.assign.call(n.t2,n.t6,n.t7),new n.t1(n.t8);case 19:case"end":return n.stop()}}),n,this,[[0,6]])})))}},{key:"personalSign",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n,r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getFrom();case 3:return n=t.sent,t.next=6,this.config.web3.eth.personal.sign(e,n,"");case 6:return r=t.sent,(0,c.filterErrors)(r),t.abrupt("return",r);case 11:return t.prev=11,t.t0=t.catch(0),t.t1=c.EthereumProviderError,t.t2=Object,t.t3=Object,t.t4={},t.next=19,k(this.config);case 19:throw t.t5=t.sent,t.t6=t.t3.assign.call(t.t3,t.t4,t.t5),t.t7={error:t.t0,method:"Web3Ethereum.personalSign",data:{message:e}},t.t8=t.t2.assign.call(t.t2,t.t6,t.t7),new t.t1(t.t8);case 24:case"end":return t.stop()}}),t,this,[[0,11]])})))}},{key:"signTypedData",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getFrom();case 3:return n=t.sent,t.next=6,(0,c.signTypedData)(this.send,n,e);case 6:return t.abrupt("return",t.sent);case 9:return t.prev=9,t.t0=t.catch(0),t.t1=c.EthereumProviderError,t.t2=Object,t.t3=Object,t.t4={},t.next=17,k(this.config);case 17:throw t.t5=t.sent,t.t6=t.t3.assign.call(t.t3,t.t4,t.t5),t.t7={method:"Web3Ethereum.signTypedData",error:t.t0,data:e},t.t8=t.t2.assign.call(t.t2,t.t6,t.t7),new t.t1(t.t8);case 22:case"end":return t.stop()}}),t,this,[[0,9]])})))}},{key:"getFrom",value:function(){return u.__awaiter(this,void 0,void 0,i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,w(this.config.web3,this.config.from);case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.t1=c.EthereumProviderError,e.t2=Object,e.t3=Object,e.t4={},e.next=14,k(this.config);case 14:throw e.t5=e.sent,e.t6=e.t3.assign.call(e.t3,e.t4,e.t5),e.t7={method:"Web3Ethereum.getFrom",error:e.t0,data:null},e.t8=e.t2.assign.call(e.t2,e.t6,e.t7),new e.t1(e.t8);case 19:case"end":return e.stop()}}),e,this,[[0,6]])})))}},{key:"encodeParameter",value:function(e,t){try{return this.config.web3.eth.abi.encodeParameter(e,t)}catch(n){throw new c.EthereumProviderError(Object.assign(Object.assign({},x(this.config)),{method:"Web3Ethereum.encodeParameter",error:n,data:{type:e,parameter:t}}))}}},{key:"decodeParameter",value:function(e,t){try{return this.config.web3.eth.abi.decodeParameters([e],t)}catch(n){throw new c.EthereumProviderError(Object.assign(Object.assign({},x(this.config)),{method:"Web3Ethereum.decodeParameter",error:n,data:{type:e,data:t}}))}}},{key:"getBalance",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n,r=this;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,l.conditionalRetry)(5,3e3,(function(){return r.config.web3.eth.getBalance(e)}),(function(e){return(null===e||void 0===e?void 0:e.message)===l.FAILED_TO_FETCH_ERROR}));case 3:return n=t.sent,t.abrupt("return",(0,d.toBigNumber)(n));case 7:return t.prev=7,t.t0=t.catch(0),t.t1=c.EthereumProviderError,t.t2=Object,t.t3=Object,t.t4={},t.next=15,k(this.config);case 15:throw t.t5=t.sent,t.t6=t.t3.assign.call(t.t3,t.t4,t.t5),t.t7={method:"Web3Ethereum.getBalance",error:t.t0,data:{address:e}},t.t8=t.t2.assign.call(t.t2,t.t6,t.t7),new t.t1(t.t8);case 20:case"end":return t.stop()}}),t,this,[[0,7]])})))}},{key:"getChainId",value:function(){return u.__awaiter(this,void 0,void 0,i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.config.web3.eth.getChainId();case 3:return e.abrupt("return",+e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),new c.EthereumProviderError(Object.assign(Object.assign({},x(this.config)),{method:"Web3Ethereum.getChainId",error:e.t0,data:null}));case 9:case"end":return e.stop()}}),e,this,[[0,6]])})))}},{key:"getWeb3Instance",value:function(){return this.config.web3}},{key:"getCurrentProvider",value:function(){return this.config.web3.currentProvider}}]),e}();t.Web3Ethereum=v;var h=function(){function e(t,n){s(this,e),this.config=t,this.contract=n}return o(e,[{key:"functionCall",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n,a,s,o,u,d=this;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,l.conditionalRetry)(5,3e3,(function(){return d.sendMethod.estimateGas(e)}),(function(e){return(null===e||void 0===e?void 0:e.message)===l.FAILED_TO_FETCH_ERROR}));case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),n=null,a=null,s=void 0,t.prev=9,t.t1=l.promiseSettledRequest,t.t2=this.getCallInfo(),t.t3=this.config.web3.eth.getChainId(),t.next=15,this.getData();case 15:return t.t4=t.sent,t.t5=[t.t2,t.t3,t.t4],t.next=19,(0,t.t1)(t.t5);case 19:o=t.sent,u=r(o,3),n=u[0],s=u[1],a=u[2],t.next=28;break;case 26:t.prev=26,t.t6=t.catch(9);case 28:return t.t7=c.EthereumProviderError,t.t8=Object,t.t9=Object,t.t10={},t.next=34,k(this.config);case 34:throw t.t11=t.sent,t.t12=t.t9.assign.call(t.t9,t.t10,t.t11),t.t13={method:"Web3FunctionCall.estimateGas",chainId:s,error:t.t0,data:Object.assign(Object.assign({},n),{options:e,data:a})},t.t14=t.t8.assign.call(t.t8,t.t12,t.t13),new t.t7(t.t14);case 39:case"end":return t.stop()}}),t,this,[[0,6],[9,26]])})))}},{key:"call",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n,a,s,o,u,d=this;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=this.getGasOptions(e),t.next=4,(0,l.conditionalRetry)(5,3e3,(function(){return d.sendMethod.call(Object.assign({from:d.config.from},n))}),(function(e){return(null===e||void 0===e?void 0:e.message)===l.FAILED_TO_FETCH_ERROR}));case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),a=null,s=null,t.prev=11,t.next=14,(0,l.promiseSettledRequest)([this.getCallInfo(),this.getData()]);case 14:o=t.sent,u=r(o,2),a=u[0],s=u[1],t.next=22;break;case 20:t.prev=20,t.t1=t.catch(11);case 22:return t.t2=c.EthereumProviderError,t.t3=Object,t.t4=Object,t.t5={},t.next=28,k(this.config);case 28:throw t.t6=t.sent,t.t7=t.t4.assign.call(t.t4,t.t5,t.t6),t.t8={method:"Web3FunctionCall.call",error:t.t0,data:Object.assign(Object.assign({},a||{}),{data:s,options:e,gasOptions:n})},t.t9=t.t3.assign.call(t.t3,t.t7,t.t8),new t.t2(t.t9);case 33:case"end":return t.stop()}}),t,this,[[0,7],[11,20]])})))}},{key:"_send",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getGasOptions(e);return u.__awaiter(this,void 0,void 0,i().mark((function n(){var a,s,o,u,p,l,y,f,b,v,h,T,w,k,O,_,E;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([this.getCallInfo(),this.config.web3.eth.getChainId()]);case 2:return a=n.sent,s=r(a,2),o=s[0],u=s[1],n.prev=6,n.next=9,this.getData();case 9:if(p=n.sent,l=(0,d.toAddress)(o.from),!e.additionalData){n.next=26;break}return y=(0,d.toBinary)(e.additionalData).slice(2),f=(0,d.toBinary)(p).slice(2),b="0x".concat(f).concat(y),v=Object.assign({from:l,to:this.contractAddress,data:b,value:e.value},t),h=this.config.web3.eth.sendTransaction(v),T=(0,m.toPromises)(h),n.t0=this,n.next=21,T.hash;case 21:return n.t1=n.sent,n.next=24,n.t0.getTransaction.call(n.t0,n.t1);case 24:return w=n.sent,n.abrupt("return",new g(T.receipt,(0,d.toWord)(w.hash),(0,d.toBinary)(b),w.nonce,l,this.contractAddress,this.contract.options.jsonInterface));case 26:return k=Object.assign({from:l,value:e.value},t),O=this.sendMethod.send(k),_=(0,m.toPromises)(O),n.t2=this,n.next=32,_.hash;case 32:return n.t3=n.sent,n.next=35,n.t2.getTransaction.call(n.t2,n.t3);case 35:return E=n.sent,n.abrupt("return",new g(_.receipt,(0,d.toWord)(E.hash),(0,d.toBinary)(p),E.nonce,l,this.contractAddress));case 39:throw n.prev=39,n.t4=n.catch(6),new c.EthereumProviderError(Object.assign(Object.assign({},x(this.config)),{method:"Web3FunctionCall.send",error:n.t4,chainId:u,data:Object.assign(Object.assign({},o),{options:e,gasOptions:t,data:p,hash:undefined})}));case 42:case"end":return n.stop()}}),n,this,[[6,39]])})))}},{key:"send",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u.__awaiter(this,void 0,void 0,i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._send(e);case 3:case 11:return t.abrupt("return",t.sent);case 6:if(t.prev=6,t.t0=t.catch(0),!(0,y.hasMessage)(t.t0)||!(null===t.t0||void 0===t.t0?void 0:t.t0.message.toLowerCase().includes("missing or invalid parameters"))){t.next=12;break}return t.next=11,this._send(e,{});case 12:throw t.t0;case 13:case"end":return t.stop()}}),t,this,[[0,6]])})))}},{key:"getGasOptions",value:function(e){var t,n={gasPrice:null},r=(null===(t=e.gasPrice)||void 0===t?void 0:t.toString())||this.config.gasPrice;"undefined"!==typeof r&&(n.gasPrice=r);var a=e.gas||this.config.gas;return"undefined"!==typeof a&&(n.gas=a),n}},{key:"getTransaction",value:function(e){var t=this;return(0,p.backOff)((function(){return u.__awaiter(t,void 0,void 0,i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config.web3.eth.getTransaction(e);case 2:if(n=t.sent){t.next=5;break}throw new Error("No transaction found");case 5:return t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})))}),{maxDelay:5e3,numOfAttempts:20,delayFirstAttempt:!0,startingDelay:300})}},{key:"getFrom",value:function(){return u.__awaiter(this,void 0,void 0,i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",w(this.config.web3,this.config.from));case 1:case"end":return e.stop()}}),e,this)})))}}]),e}();t.Web3FunctionCall=T;var g=function(){function e(t,n,r,a,i,o,u){s(this,e),this.receipt=t,this.hash=n,this.data=r,this.nonce=a,this.from=i,this.to=o,this.contractAbi=u}return o(e,[{key:"wait",value:function(){return u.__awaiter(this,void 0,void 0,i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.receipt;case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),new c.EthereumProviderError({provider:c.Provider.WEB3,method:"Web3Transaction.wait",error:e.t0,data:{hash:this.hash,data:this.data,nonce:this.nonce,from:this.from,to:this.to}});case 9:case"end":return e.stop()}}),e,this,[[0,6]])})))}},{key:"getEvents",value:function(){return u.__awaiter(this,void 0,void 0,i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.wait();case 2:if(!this.to||!this.contractAbi){e.next=4;break}return e.abrupt("return",(0,b.getTransactionReceiptEvents)(this.receipt,this.to,this.contractAbi));case 4:return e.next=6,(0,b.getContractMethodReceiptEvents)(this.receipt);case 6:if(e.t0=e.sent,e.t0){e.next=9;break}e.t0=[];case 9:return e.abrupt("return",e.t0);case 10:case"end":return e.stop()}}),e,this)})))}}]),e}();function w(e,t){return u.__awaiter(this,void 0,void 0,i().mark((function n(){var a,s,o;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!t){n.next=2;break}return n.abrupt("return",t);case 2:return n.next=4,e.eth.getAccounts();case 4:if(a=n.sent,s=r(a,1),o=s[0]){n.next=9;break}throw new Error("Wallet is not connected");case 9:return n.abrupt("return",o);case 10:case"end":return n.stop()}}),n)})))}function k(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n,a,s,o,u;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,l.promiseSettledRequest)([w(e.web3,e.from),e.web3.eth.getChainId(),e.web3.eth.getBlockNumber()]);case 2:return n=t.sent,a=r(n,3),s=a[0],o=a[1],u=a[2],t.abrupt("return",Object.assign(Object.assign({},x(e)),{chainId:o,signer:s,blockNumber:u}));case 8:case"end":return t.stop()}}),t)})))}function x(e){return{provider:c.Provider.WEB3,providerId:O(e.web3)}}function O(e){return e&&(0,l.getDappType)(e.currentProvider)||l.DappType.Unknown}t.Web3Transaction=g,t.getCurrentProviderId=O},1182:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterErrors=t.signTypedData=void 0;var r=n(19);r.__exportStar(n(1183),t),r.__exportStar(n(1890),t);var a=n(1184);Object.defineProperty(t,"signTypedData",{enumerable:!0,get:function(){return a.signTypedData}}),Object.defineProperty(t,"filterErrors",{enumerable:!0,get:function(){return a.filterErrors}})},1183:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Provider=t.SignTypedDataMethodEnum=void 0,function(e){e.V4="eth_signTypedData_v4",e.V3="eth_signTypedData_v3",e.DEFAULT="eth_signTypedData"}(t.SignTypedDataMethodEnum||(t.SignTypedDataMethodEnum={})),function(e){e.WEB3="web3",e.ETHERS="ethers"}(t.Provider||(t.Provider={}))},1184:function(e,t,n){"use strict";(function(e){var r=n(21).default,a=n(22).default,i=n(203).default,s=n(37).default,o=n(38).default,u=n(193).default,c=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SignTypedDataError=t.hasMessage=t.filterErrors=t.signTypedData=void 0;var d=n(19),p=n(1185),l=n(1183);function y(e,t,n){return d.__awaiter(this,void 0,void 0,c().mark((function r(){var a,i;return c().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=p.TypedDataUtils.sign(n),r.t0=b,r.next=4,e("eth_sign",[t,"0x".concat(a.toString("hex"))]);case 4:return r.t1=r.sent,(i=(0,r.t0)(r.t1)).writeInt8(i[64]+4,64),r.abrupt("return","0x".concat(i.toString("hex")));case 8:case"end":return r.stop()}}),r)})))}function f(e){var t,n;if("object"===typeof(n=e)&&null!==n&&"code"in n){if([4900,4001,4901,4100].includes(e.code))throw e;if(m(e)&&(null===(t=e.message)||void 0===t?void 0:t.includes("User denied message signature.")))throw e}if(m(e)){var r=function(e){if(!e||"string"!==typeof e)return;try{return JSON.parse(e)}catch(t){return}}(e.message);r&&f(r)}}function m(e){return"object"===typeof e&&null!==e&&"message"in e}function b(t){return t.startsWith("0x")?e.from(t.substring(2),"hex"):e.from(t,"hex")}t.signTypedData=function(e,t,n){return d.__awaiter(this,void 0,void 0,c().mark((function r(){var a,i;return c().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=[],r.prev=1,r.next=4,e(l.SignTypedDataMethodEnum.V4,[t,JSON.stringify(n)]);case 4:return f(i=r.sent),r.abrupt("return",i);case 9:if(r.prev=9,r.t0=r.catch(1),a.push(r.t0),f(r.t0),r.prev=13,console.error("got error while executing sign typed data v4",r.t0),"object"!==typeof(s=r.t0)||null===s||!("message"in s)||"MetaMask Message Signature: Error: Not supported on this device"!==r.t0.message){r.next=21;break}return r.next=18,y(e,t,n);case 18:case 24:case 34:return r.abrupt("return",r.sent);case 21:return r.prev=21,r.next=24,e(l.SignTypedDataMethodEnum.V3,[t,JSON.stringify(n)]);case 27:return r.prev=27,r.t1=r.catch(21),console.error("got error while executing sign typed data v3",r.t1),a.push(r.t1),f(r.t1),r.next=34,e(l.SignTypedDataMethodEnum.DEFAULT,[t,n]);case 35:r.next=40;break;case 37:throw r.prev=37,r.t2=r.catch(13),new v({error:r.t2,data:{signer:t,data:n,errorsStack:a}});case 40:case"end":return r.stop()}var s}),r,null,[[1,9],[13,37],[21,27]])})))},t.filterErrors=f,t.hasMessage=m;var v=function(e){s(n,e);var t=o(n);function n(e){var a,s,o,u;return r(this,n),a=t.call(this,n.getErrorMessage(e)),Object.setPrototypeOf(i(a),n.prototype),a.name="SignTypedDataError",a.error=null===e||void 0===e?void 0:e.error,a.data=null===e||void 0===e?void 0:e.data,a.code=(null===(s=null===e||void 0===e?void 0:e.error)||void 0===s?void 0:s.code)||(null===(u=null===(o=null===e||void 0===e?void 0:e.error)||void 0===o?void 0:o.error)||void 0===u?void 0:u.code)||void 0,a}return a(n,null,[{key:"getErrorMessage",value:function(e){var t;return"string"===typeof e.error?e.error:(null===(t=null===e||void 0===e?void 0:e.error)||void 0===t?void 0:t.message)||(null===e||void 0===e?void 0:e.message)||"SignTypedDataError"}}]),n}(u(Error));t.SignTypedDataError=v}).call(this,n(15).Buffer)},1224:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEthereumConfig=t.configDictionary=void 0;var r=n(2034),a=n(2040),i=n(2041),s=n(2042),o=n(2043),u=n(2044),c=n(2045),d=n(2046),p=n(2047),l=n(2048);t.configDictionary={mainnet:r.mainnetConfig,mumbai:a.mumbaiConfig,polygon:i.polygonConfig,"dev-ethereum":s.devEthereumConfig,"dev-polygon":o.devPolygonConfig,"staging-polygon":d.stagingPolygonConfig,mantle:l.mantleConfig,"testnet-mantle":p.mantleTestnetConfig,testnet:u.testnetEthereumConfig,staging:c.stagingEthereumConfig},t.getEthereumConfig=function(e){return t.configDictionary[e]}},1228:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.approveErc20=void 0;var a=n(19),i=n(176),s=n(521),o=(0,i.toBn)(2).pow(256).minus(1);t.approveErc20=function(e,t,n,u,c,d){var p=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];return a.__awaiter(this,void 0,void 0,r().mark((function a(){var l,y,f;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}throw new Error("Wallet undefined");case 2:return l=(0,s.createErc20Contract)(e,n),r.t0=i.toBn,r.next=6,l.functionCall("allowance",u,c).call();case 6:if(r.t1=r.sent,y=(0,r.t0)(r.t1),f=(0,i.toBn)(d),!y.lt(f)){r.next=17;break}if(p){r.next=14;break}return r.abrupt("return",t(l.functionCall("approve",c,f.toFixed())));case 14:return r.abrupt("return",t(l.functionCall("approve",c,o.toFixed())));case 15:r.next=18;break;case 17:return r.abrupt("return",void 0);case 18:case"end":return r.stop()}}),a)})))}},1229:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.approveErc721=void 0;var a=n(19),i=n(617);t.approveErc721=function(e,t,n,s,o){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var u,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}throw new Error("Wallet undefined");case 2:return u=(0,i.createErc721Contract)(e,n),r.prev=3,r.next=6,u.functionCall("isApprovedForAll",s,o).call();case 6:c=r.sent,r.next=12;break;case 9:r.prev=9,r.t0=r.catch(3),c=!1;case 12:if(c){r.next=16;break}return r.next=15,t(u.functionCall("setApprovalForAll",o,!0));case 15:return r.abrupt("return",r.sent);case 16:return r.abrupt("return",void 0);case 17:case"end":return r.stop()}}),a,null,[[3,9]])})))}},1230:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.approveErc1155=void 0;var a=n(19),i=n(618);t.approveErc1155=function(e,t,n,s,o){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var u,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}throw new Error("Wallet undefined");case 2:return u=(0,i.createErc1155Contract)(e,n),r.prev=3,r.next=6,u.functionCall("isApprovedForAll",s,o).call();case 6:c=r.sent,r.next=12;break;case 9:r.prev=9,r.t0=r.catch(3),c=!1;case 12:if(c){r.next=14;break}return r.abrupt("return",t(u.functionCall("setApprovalForAll",o,!0)));case 14:return r.abrupt("return",void 0);case 15:case"end":return r.stop()}}),a,null,[[3,9]])})))}},1231:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toLegacyAssetType=void 0;var r=n(73);t.toLegacyAssetType=function(e){switch(e.assetClass){case"ETH":return{token:r.ZERO_ADDRESS,tokenId:(0,r.toBigNumber)("0"),assetType:0};case"ERC20":return{token:e.contract,tokenId:(0,r.toBigNumber)("0"),assetType:1};case"ERC721":return{token:e.contract,tokenId:e.tokenId,assetType:3};case"ERC1155":return{token:e.contract,tokenId:e.tokenId,assetType:2};default:throw new Error("Unsupported")}}},1235:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUri=void 0,t.sanitizeUri=function(e,t){var n=function(e){return e.replace("https://ipfs.daonomic.com","ipfs:/").replace("https://ipfs.rarible.com","ipfs:/")}(e);if(!t)throw new Error("uri is not defined");if(!t.startsWith(n))throw new Error("uri must start with: ".concat(n));return t.slice(n.length)||""}},1236:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockchainFromChainId=void 0,t.getBlockchainFromChainId=function(e){switch(e){case 1:case 3:case 4:case 5:case 17:case 200500:case 300500:return"ETHEREUM";case 137:case 80001:case 200501:case 300501:return"POLYGON";case 5e3:case 5001:return"MANTLE";default:throw new Error("ChainID from config could not be recognized")}}},1237:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getTokenId=void 0;var a=n(19),i=n(1238);t.getTokenId=function(e,t,n,s){return a.__awaiter(this,void 0,void 0,r().mark((function a(){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0===s){r.next=2;break}return r.abrupt("return",s);case 2:return r.abrupt("return",(0,i.wrapInRetry)((function(){return e.generateNftTokenId({collection:t,minter:n})})));case 3:case"end":return r.stop()}}),a)})))}},1238:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapInRetry=t.delay=t.retry=void 0;var r=n(298);function a(e){return new Promise((function(t){return setTimeout(t,e)}))}t.retry=function e(t,n,r){return r().catch((function(i){if(0===t)throw i;return a(n).then((function(){return e(t-1,n,r)}))}))},t.delay=a,t.wrapInRetry=function(e){return(0,r.conditionalRetry)(5,3e3,e,(function(e){return(null===e||void 0===e?void 0:e.message)===r.FAILED_TO_FETCH_ERROR}))}},1239:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getCreators=t.mintErc1155v2=t.mintErc1155v1=t.mintErc721v3=t.mintErc721v2=t.mintErc721v1=void 0;var a=n(19),i=n(73),s=n(1240),o=n(1235),u=n(619),c=n(1237),d=n(620),p=n(456),l=n(734);function y(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(e.creators&&e.creators.length>0)){n.next=2;break}return n.abrupt("return",e.creators);case 2:return n.t0=i.toAddress,n.next=5,t.getFrom();case 5:return n.t1=n.sent,a=(0,n.t0)(n.t1),n.abrupt("return",[{account:a,value:1e4}]);case 8:case"end":return n.stop()}}),n)})))}function f(e){return Object.assign({type:u.MintResponseTypeEnum.ON_CHAIN},e)}t.mintErc721v1=function(e,t,n,u){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var l,y,m,b,v,h,T,g,w,k,x;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=i.toAddress,r.next=3,e.getFrom();case 3:return r.t1=r.sent,l=(0,r.t0)(r.t1),r.next=7,(0,d.getErc721Contract)(e,p.ERC721VersionEnum.ERC721V1,u.collection.id);case 7:return y=r.sent,r.next=10,(0,c.getTokenId)(n,u.collection.id,l,u.nftTokenId);case 10:return m=r.sent,b=m.tokenId,v=m.signature,h=v.v,T=v.r,g=v.s,r.next=14,y.functionCall("tokenURIPrefix").call();case 14:return w=r.sent,k=(0,o.sanitizeUri)(w,u.uri),r.next=18,t(y.functionCall("mint",b,h,T,g,k));case 18:return x=r.sent,r.abrupt("return",f({transaction:x,tokenId:b,contract:u.collection.id,owner:l,itemId:(0,s.createItemId)(u.collection.id,b)}));case 20:case"end":return r.stop()}}),a)})))},t.mintErc721v2=function(e,t,n,u){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var l,y,m,b,v,h,T,g,w,k,x,O;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=i.toAddress,r.next=3,e.getFrom();case 3:return r.t1=r.sent,l=(0,r.t0)(r.t1),r.next=7,(0,d.getErc721Contract)(e,p.ERC721VersionEnum.ERC721V2,u.collection.id);case 7:return y=r.sent,r.next=10,(0,c.getTokenId)(n,u.collection.id,l,u.nftTokenId);case 10:return m=r.sent,b=m.tokenId,v=m.signature,h=v.v,T=v.r,g=v.s,w=(u.royalties||[]).map((function(e){return{recipient:e.account,value:e.value}})),r.next=15,y.functionCall("tokenURIPrefix").call();case 15:return k=r.sent,x=(0,o.sanitizeUri)(k,u.uri),r.next=19,t(y.functionCall("mint",b,h,T,g,w,x));case 19:return O=r.sent,r.abrupt("return",f({transaction:O,tokenId:b,contract:u.collection.id,owner:l,itemId:(0,s.createItemId)(u.collection.id,b)}));case 21:case"end":return r.stop()}}),a)})))},t.mintErc721v3=function(e,t,n,i){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var u,l,m,b,v,h,T,g,w;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,y(i,e);case 2:return u=r.sent,l=u[0].account,r.next=6,(0,d.getErc721Contract)(e,p.ERC721VersionEnum.ERC721V3,i.collection.id);case 6:return m=r.sent,r.next=9,m.functionCall("baseURI").call();case 9:return b=r.sent,v=(0,o.sanitizeUri)(b,i.uri),r.next=13,(0,c.getTokenId)(n,i.collection.id,l,i.nftTokenId);case 13:return h=r.sent,T=h.tokenId,g={tokenId:T,tokenURI:v,creators:u,royalties:i.royalties||[],signatures:["0x"]},r.next=18,t(m.functionCall("mintAndTransfer",g,l));case 18:return w=r.sent,r.abrupt("return",f({transaction:w,tokenId:T,contract:i.collection.id,owner:l,itemId:(0,s.createItemId)(i.collection.id,T)}));case 20:case"end":return r.stop()}}),a)})))},t.mintErc1155v1=function(e,t,n,u){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var d,y,m,b,v,h,T,g,w,k,x,O;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=i.toAddress,r.next=3,e.getFrom();case 3:return r.t1=r.sent,d=(0,r.t0)(r.t1),r.next=7,(0,l.getErc1155Contract)(e,p.ERC1155VersionEnum.ERC1155V1,u.collection.id);case 7:return y=r.sent,r.next=10,(0,c.getTokenId)(n,u.collection.id,d,u.nftTokenId);case 10:return m=r.sent,b=m.tokenId,v=m.signature,h=v.v,T=v.r,g=v.s,w=(u.royalties||[]).map((function(e){return{recipient:e.account,value:e.value}})),r.next=15,y.functionCall("tokenURIPrefix").call();case 15:return k=r.sent,x=(0,o.sanitizeUri)(k,u.uri),r.next=19,t(y.functionCall("mint",b,h,T,g,w,u.supply,x));case 19:return O=r.sent,r.abrupt("return",f({transaction:O,tokenId:b,contract:u.collection.id,owner:d,itemId:(0,s.createItemId)(u.collection.id,b)}));case 21:case"end":return r.stop()}}),a)})))},t.mintErc1155v2=function(e,t,n,i){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var u,d,m,b,v,h,T,g,w;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,y(i,e);case 2:return u=r.sent,d=u[0].account,r.next=6,(0,l.getErc1155Contract)(e,p.ERC1155VersionEnum.ERC1155V2,i.collection.id);case 6:return m=r.sent,r.next=9,(0,c.getTokenId)(n,i.collection.id,d,i.nftTokenId);case 9:return b=r.sent,v=b.tokenId,r.next=13,m.functionCall("baseURI").call();case 13:return h=r.sent,T=(0,o.sanitizeUri)(h,i.uri),g={tokenId:v,tokenURI:T,supply:i.supply,creators:u,royalties:i.royalties||[],signatures:["0x"]},r.next=18,t(m.functionCall("mintAndTransfer",g,d,i.supply));case 18:return w=r.sent,r.abrupt("return",f({transaction:w,tokenId:v,contract:i.collection.id,owner:d,itemId:(0,s.createItemId)(i.collection.id,v)}));case 20:case"end":return r.stop()}}),a)})))},t.getCreators=y},1240:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createItemId=void 0,t.createItemId=function(e,t){return"".concat(e,":").concat(t)}},1250:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXCHANGEV1_E2E_ADDRESS=t.EXCHANGEV1_ABI=t.createExchangeV1Contract=void 0,t.createExchangeV1Contract=function(e,n){return e.createContract(t.EXCHANGEV1_ABI,n)},t.EXCHANGEV1_ABI=[{inputs:[{internalType:"contract TransferProxy",name:"_transferProxy",type:"address"},{internalType:"contract TransferProxyForDeprecated",name:"_transferProxyForDeprecated",type:"address"},{internalType:"contract ERC20TransferProxy",name:"_erc20TransferProxy",type:"address"},{internalType:"contract ExchangeStateV1",name:"_state",type:"address"},{internalType:"contract ExchangeOrdersHolderV1",name:"_ordersHolder",type:"address"},{internalType:"address payable",name:"_beneficiary",type:"address"},{internalType:"address",name:"_buyerFeeSigner",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sellToken",type:"address"},{indexed:!0,internalType:"uint256",name:"sellTokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"sellValue",type:"uint256"},{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"buyToken",type:"address"},{indexed:!1,internalType:"uint256",name:"buyTokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"buyValue",type:"uint256"},{indexed:!1,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"salt",type:"uint256"}],name:"Buy",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sellToken",type:"address"},{indexed:!0,internalType:"uint256",name:"sellTokenId",type:"uint256"},{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"buyToken",type:"address"},{indexed:!1,internalType:"uint256",name:"buyTokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"salt",type:"uint256"}],name:"Cancel",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{constant:!0,inputs:[],name:"beneficiary",outputs:[{internalType:"address payable",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"buyerFeeSigner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"erc20TransferProxy",outputs:[{internalType:"contract ERC20TransferProxy",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"isOwner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"ordersHolder",outputs:[{internalType:"contract ExchangeOrdersHolderV1",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"state",outputs:[{internalType:"contract ExchangeStateV1",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"transferProxy",outputs:[{internalType:"contract TransferProxy",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"transferProxyForDeprecated",outputs:[{internalType:"contract TransferProxyForDeprecated",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address payable",name:"newBeneficiary",type:"address"}],name:"setBeneficiary",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newBuyerFeeSigner",type:"address"}],name:"setBuyerFeeSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{components:[{components:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"salt",type:"uint256"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"sellAsset",type:"tuple"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"buyAsset",type:"tuple"}],internalType:"struct ExchangeDomainV1.OrderKey",name:"key",type:"tuple"},{internalType:"uint256",name:"selling",type:"uint256"},{internalType:"uint256",name:"buying",type:"uint256"},{internalType:"uint256",name:"sellerFee",type:"uint256"}],internalType:"struct ExchangeDomainV1.Order",name:"order",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct ExchangeDomainV1.Sig",name:"sig",type:"tuple"},{internalType:"uint256",name:"buyerFee",type:"uint256"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct ExchangeDomainV1.Sig",name:"buyerFeeSig",type:"tuple"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"buyer",type:"address"}],name:"exchange",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{components:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"salt",type:"uint256"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"sellAsset",type:"tuple"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"buyAsset",type:"tuple"}],internalType:"struct ExchangeDomainV1.OrderKey",name:"key",type:"tuple"}],name:"cancel",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{components:[{components:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"salt",type:"uint256"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"sellAsset",type:"tuple"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"buyAsset",type:"tuple"}],internalType:"struct ExchangeDomainV1.OrderKey",name:"key",type:"tuple"},{internalType:"uint256",name:"selling",type:"uint256"},{internalType:"uint256",name:"buying",type:"uint256"},{internalType:"uint256",name:"sellerFee",type:"uint256"}],internalType:"struct ExchangeDomainV1.Order",name:"order",type:"tuple"},{internalType:"uint256",name:"fee",type:"uint256"}],name:"prepareBuyerFeeMessage",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!0,inputs:[{components:[{components:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"salt",type:"uint256"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"sellAsset",type:"tuple"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"buyAsset",type:"tuple"}],internalType:"struct ExchangeDomainV1.OrderKey",name:"key",type:"tuple"},{internalType:"uint256",name:"selling",type:"uint256"},{internalType:"uint256",name:"buying",type:"uint256"},{internalType:"uint256",name:"sellerFee",type:"uint256"}],internalType:"struct ExchangeDomainV1.Order",name:"order",type:"tuple"}],name:"prepareMessage",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"pure",type:"function"}],t.EXCHANGEV1_E2E_ADDRESS="0x087a4Af184bC0189cFE55f2293a77EFe7A4f247C"},1251:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXCHANGEV2_ABI=t.createExchangeV2Contract=void 0,t.createExchangeV2Contract=function(e,n){return e.createContract(t.EXCHANGEV2_ABI,n)},t.EXCHANGEV2_ABI=[{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"}],name:"Cancel",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"leftHash",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"rightHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newLeftFill",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newRightFill",type:"uint256"}],name:"Match",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes4",name:"assetType",type:"bytes4"},{indexed:!1,internalType:"address",name:"matcher",type:"address"}],name:"MatcherChange",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes4",name:"assetType",type:"bytes4"},{indexed:!1,internalType:"address",name:"proxy",type:"address"}],name:"ProxyChange",type:"event"},{inputs:[{components:[{internalType:"address",name:"maker",type:"address"},{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"makeAsset",type:"tuple"},{internalType:"address",name:"taker",type:"address"},{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"takeAsset",type:"tuple"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"uint256",name:"start",type:"uint256"},{internalType:"uint256",name:"end",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibOrder.Order",name:"order",type:"tuple"}],name:"cancel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"bidMaker",type:"address"},{internalType:"uint256",name:"bidNftAmount",type:"uint256"},{internalType:"bytes4",name:"nftAssetClass",type:"bytes4"},{internalType:"bytes",name:"nftData",type:"bytes"},{internalType:"uint256",name:"bidPaymentAmount",type:"uint256"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"uint256",name:"bidSalt",type:"uint256"},{internalType:"uint256",name:"bidStart",type:"uint256"},{internalType:"uint256",name:"bidEnd",type:"uint256"},{internalType:"bytes4",name:"bidDataType",type:"bytes4"},{internalType:"bytes",name:"bidData",type:"bytes"},{internalType:"bytes",name:"bidSignature",type:"bytes"},{internalType:"uint256",name:"sellOrderPaymentAmount",type:"uint256"},{internalType:"uint256",name:"sellOrderNftAmount",type:"uint256"},{internalType:"bytes",name:"sellOrderData",type:"bytes"}],internalType:"struct LibDirectTransfer.AcceptBid",name:"direct",type:"tuple"}],name:"directAcceptBid",outputs:[],stateMutability:"payable",type:"function",payable:!0},{inputs:[{components:[{internalType:"address",name:"sellOrderMaker",type:"address"},{internalType:"uint256",name:"sellOrderNftAmount",type:"uint256"},{internalType:"bytes4",name:"nftAssetClass",type:"bytes4"},{internalType:"bytes",name:"nftData",type:"bytes"},{internalType:"uint256",name:"sellOrderPaymentAmount",type:"uint256"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"uint256",name:"sellOrderSalt",type:"uint256"},{internalType:"uint256",name:"sellOrderStart",type:"uint256"},{internalType:"uint256",name:"sellOrderEnd",type:"uint256"},{internalType:"bytes4",name:"sellOrderDataType",type:"bytes4"},{internalType:"bytes",name:"sellOrderData",type:"bytes"},{internalType:"bytes",name:"sellOrderSignature",type:"bytes"},{internalType:"uint256",name:"buyOrderPaymentAmount",type:"uint256"},{internalType:"uint256",name:"buyOrderNftAmount",type:"uint256"},{internalType:"bytes",name:"buyOrderData",type:"bytes"}],internalType:"struct LibDirectTransfer.Purchase",name:"direct",type:"tuple"}],name:"directPurchase",outputs:[],stateMutability:"payable",type:"function",payable:!0},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"fills",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function",constant:!0},{inputs:[{components:[{internalType:"address",name:"maker",type:"address"},{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"makeAsset",type:"tuple"},{internalType:"address",name:"taker",type:"address"},{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"takeAsset",type:"tuple"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"uint256",name:"start",type:"uint256"},{internalType:"uint256",name:"end",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibOrder.Order",name:"orderLeft",type:"tuple"},{internalType:"bytes",name:"signatureLeft",type:"bytes"},{components:[{internalType:"address",name:"maker",type:"address"},{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"makeAsset",type:"tuple"},{internalType:"address",name:"taker",type:"address"},{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"takeAsset",type:"tuple"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"uint256",name:"start",type:"uint256"},{internalType:"uint256",name:"end",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibOrder.Order",name:"orderRight",type:"tuple"},{internalType:"bytes",name:"signatureRight",type:"bytes"}],name:"matchOrders",outputs:[],stateMutability:"payable",type:"function",payable:!0},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"royaltiesRegistry",outputs:[{internalType:"contract IRoyaltiesProvider",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[{internalType:"bytes4",name:"assetType",type:"bytes4"},{internalType:"address",name:"matcher",type:"address"}],name:"setAssetMatcher",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IRoyaltiesProvider",name:"newRoyaltiesRegistry",type:"address"}],name:"setRoyaltiesRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"assetType",type:"bytes4"},{internalType:"address",name:"proxy",type:"address"}],name:"setTransferProxy",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_transferProxy",type:"address"},{internalType:"address",name:"_erc20TransferProxy",type:"address"},{internalType:"uint256",name:"newProtocolFee",type:"uint256"},{internalType:"address",name:"newDefaultFeeReceiver",type:"address"},{internalType:"contract IRoyaltiesProvider",name:"newRoyaltiesProvider",type:"address"}],name:"__ExchangeV2_init",outputs:[],stateMutability:"nonpayable",type:"function"}]},1252:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OPENSEA_EXCHANGE_ABI=t.createOpenseaContract=void 0,t.createOpenseaContract=function(e,n){return e.createContract(t.OPENSEA_EXCHANGE_ABI,n)},t.OPENSEA_EXCHANGE_ABI=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"tokenTransferProxy",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"target",type:"address"},{name:"calldata",type:"bytes"},{name:"extradata",type:"bytes"}],name:"staticCall",outputs:[{name:"result",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newMinimumMakerProtocolFee",type:"uint256"}],name:"changeMinimumMakerProtocolFee",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newMinimumTakerProtocolFee",type:"uint256"}],name:"changeMinimumTakerProtocolFee",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"array",type:"bytes"},{name:"desired",type:"bytes"},{name:"mask",type:"bytes"}],name:"guardedArrayReplace",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!0,inputs:[],name:"minimumTakerProtocolFee",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"codename",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"}],name:"calculateCurrentPrice_",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newProtocolFeeRecipient",type:"address"}],name:"changeProtocolFeeRecipient",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"buyCalldata",type:"bytes"},{name:"buyReplacementPattern",type:"bytes"},{name:"sellCalldata",type:"bytes"},{name:"sellReplacementPattern",type:"bytes"}],name:"orderCalldataCanMatch",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"},{name:"v",type:"uint8"},{name:"r",type:"bytes32"},{name:"s",type:"bytes32"}],name:"validateOrder_",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"incrementNonce",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"basePrice",type:"uint256"},{name:"extra",type:"uint256"},{name:"listingTime",type:"uint256"},{name:"expirationTime",type:"uint256"}],name:"calculateFinalPrice",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"protocolFeeRecipient",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"}],name:"hashOrder_",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[14]"},{name:"uints",type:"uint256[18]"},{name:"feeMethodsSidesKindsHowToCalls",type:"uint8[8]"},{name:"calldataBuy",type:"bytes"},{name:"calldataSell",type:"bytes"},{name:"replacementPatternBuy",type:"bytes"},{name:"replacementPatternSell",type:"bytes"},{name:"staticExtradataBuy",type:"bytes"},{name:"staticExtradataSell",type:"bytes"}],name:"ordersCanMatch_",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"},{name:"orderbookInclusionDesired",type:"bool"}],name:"approveOrder_",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"registry",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"minimumMakerProtocolFee",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"}],name:"hashToSign_",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"nonces",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"bytes32"}],name:"cancelledOrFinalized",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"exchangeToken",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"},{name:"v",type:"uint8"},{name:"r",type:"bytes32"},{name:"s",type:"bytes32"}],name:"cancelOrder_",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"addrs",type:"address[14]"},{name:"uints",type:"uint256[18]"},{name:"feeMethodsSidesKindsHowToCalls",type:"uint8[8]"},{name:"calldataBuy",type:"bytes"},{name:"calldataSell",type:"bytes"},{name:"replacementPatternBuy",type:"bytes"},{name:"replacementPatternSell",type:"bytes"},{name:"staticExtradataBuy",type:"bytes"},{name:"staticExtradataSell",type:"bytes"},{name:"vs",type:"uint8[2]"},{name:"rssMetadata",type:"bytes32[5]"}],name:"atomicMatch_",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"}],name:"validateOrderParameters_",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"INVERSE_BASIS_POINT",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[14]"},{name:"uints",type:"uint256[18]"},{name:"feeMethodsSidesKindsHowToCalls",type:"uint8[8]"},{name:"calldataBuy",type:"bytes"},{name:"calldataSell",type:"bytes"},{name:"replacementPatternBuy",type:"bytes"},{name:"replacementPatternSell",type:"bytes"},{name:"staticExtradataBuy",type:"bytes"},{name:"staticExtradataSell",type:"bytes"}],name:"calculateMatchPrice_",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"hash",type:"bytes32"}],name:"approvedOrders",outputs:[{name:"approved",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"},{name:"v",type:"uint8"},{name:"r",type:"bytes32"},{name:"s",type:"bytes32"},{name:"nonce",type:"uint256"}],name:"cancelOrderWithNonce_",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"registryAddress",type:"address"},{name:"tokenTransferProxyAddress",type:"address"},{name:"tokenAddress",type:"address"},{name:"protocolFeeAddress",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"hash",type:"bytes32"},{indexed:!1,name:"exchange",type:"address"},{indexed:!0,name:"maker",type:"address"},{indexed:!1,name:"taker",type:"address"},{indexed:!1,name:"makerRelayerFee",type:"uint256"},{indexed:!1,name:"takerRelayerFee",type:"uint256"},{indexed:!1,name:"makerProtocolFee",type:"uint256"},{indexed:!1,name:"takerProtocolFee",type:"uint256"},{indexed:!0,name:"feeRecipient",type:"address"},{indexed:!1,name:"feeMethod",type:"uint8"},{indexed:!1,name:"side",type:"uint8"},{indexed:!1,name:"saleKind",type:"uint8"},{indexed:!1,name:"target",type:"address"}],name:"OrderApprovedPartOne",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"hash",type:"bytes32"},{indexed:!1,name:"howToCall",type:"uint8"},{indexed:!1,name:"calldata",type:"bytes"},{indexed:!1,name:"replacementPattern",type:"bytes"},{indexed:!1,name:"staticTarget",type:"address"},{indexed:!1,name:"staticExtradata",type:"bytes"},{indexed:!1,name:"paymentToken",type:"address"},{indexed:!1,name:"basePrice",type:"uint256"},{indexed:!1,name:"extra",type:"uint256"},{indexed:!1,name:"listingTime",type:"uint256"},{indexed:!1,name:"expirationTime",type:"uint256"},{indexed:!1,name:"salt",type:"uint256"},{indexed:!1,name:"orderbookInclusionDesired",type:"bool"}],name:"OrderApprovedPartTwo",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"hash",type:"bytes32"}],name:"OrderCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"buyHash",type:"bytes32"},{indexed:!1,name:"sellHash",type:"bytes32"},{indexed:!0,name:"maker",type:"address"},{indexed:!0,name:"taker",type:"address"},{indexed:!1,name:"price",type:"uint256"},{indexed:!0,name:"metadata",type:"bytes32"}],name:"OrdersMatched",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"maker",type:"address"},{indexed:!1,name:"newNonce",type:"uint256"}],name:"NonceIncremented",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"previousOwner",type:"address"}],name:"OwnershipRenounced",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"previousOwner",type:"address"},{indexed:!0,name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"}]},1253:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.toStructLegacyOrderKey=t.toStructLegacyOrder=t.RaribleV1OrderHandler=void 0;var s=n(19),o=n(73),u=n(121),c=n(616),d=n(738),p=n(1250),l=n(1231),y=n(737),f=n(362),m=n(941),b=function(){function e(t,n,r,i,s,o){a(this,e),this.ethereum=t,this.orderApi=n,this.send=r,this.config=i,this.getBaseOrderFeeConfig=s,this.sdkConfig=o}return i(e,[{key:"invert",value:function(e,t){var n=(0,m.invertOrder)(e.order,e.amount,t);return n.data={dataType:"LEGACY",fee:e.originFee},n}},{key:"approve",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.ethereum){n.next=2;break}throw new Error("Wallet undefined");case 2:return a=(0,d.getAssetWithFee)(e.make,this.getOrderFee(e)),n.next=5,(0,f.waitTx)((0,c.approve)(this.ethereum,this.send,this.config.transferProxies,e.maker,a,t));case 5:case"end":return n.stop()}}),n,this)})))}},{key:"getBaseOrderFee",value:function(){return s.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getBaseOrderFeeConfig("RARIBLE_V1"));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getOrderFee",value:function(e){return e.data.fee}},{key:"getTransactionData",value:function(e,t,n){var a;return s.__awaiter(this,void 0,void 0,r().mark((function i(){var s,c,d,l;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.ethereum){r.next=2;break}throw new Error("Wallet undefined");case 2:return r.next=4,this.orderApi.buyerFeeSignature({fee:t.data.fee,orderForm:(i=e,Object.assign(Object.assign({},i),{salt:(0,o.toBigNumber)((0,u.toBn)(i.salt).toString()),signature:i.signature||(0,o.toBinary)("0x")}))});case 4:return s=r.sent,c=(0,p.createExchangeV1Contract)(this.ethereum,this.config.exchange.v1),d=c.functionCall("exchange",h(e),(0,y.toVrs)(e.signature),t.data.fee,(0,y.toVrs)(s),t.take.value,null!==(a=n.payout)&&void 0!==a?a:o.ZERO_ADDRESS),l=v(t),r.abrupt("return",{functionCall:d,options:l});case 9:case"end":return r.stop()}var i}),i,this)})))}}]),e}();function v(e){return"ETH"===e.make.assetType.assetClass?{value:(0,d.getAssetWithFee)(e.make,e.data.fee).value}:{}}function h(e){if("RARIBLE_V1"!==e.type)throw new Error("Not supported type: ".concat(e.type));var t=e.data;if("LEGACY"!==t.dataType)throw new Error("Not supported data type: ".concat(t.dataType));return{key:T(e),selling:e.make.value,buying:e.take.value,sellerFee:t.fee}}function T(e){return{owner:e.maker,salt:e.salt,sellAsset:(0,l.toLegacyAssetType)(e.make.assetType),buyAsset:(0,l.toLegacyAssetType)(e.take.assetType)}}t.RaribleV1OrderHandler=b,t.toStructLegacyOrder=h,t.toStructLegacyOrderKey=T},1254:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERC1155_VALIDATOR_TAKE_REPLACEMENT=t.ERC1155_TAKE_REPLACEMENT=t.ERC1155_VALIDATOR_MAKE_REPLACEMENT=t.ERC1155_MAKE_REPLACEMENT=t.ERC721_VALIDATOR_TAKE_REPLACEMENT=t.ERC721_TAKE_REPLACEMENT=t.ERC721_VALIDATOR_MAKE_REPLACEMENT=t.ERC721_MAKE_REPLACEMENT=t.convertOpenSeaOrderToDTO=void 0;var r=n(73),a=n(121),i=n(407),s=n(2247);function o(e){switch(e.assetClass){case"ETH":return r.ZERO_ADDRESS;case"ERC20":return e.contract;default:return}}t.convertOpenSeaOrderToDTO=function(e,t){var n=function(e){var t=o(e.make.assetType);if(void 0!==t)return t;var n=o(e.take.assetType);if(void 0!==n)return n;return}(t);if(!n)throw new Error("Maker or taker should have an ERC20 asset");var u=function(e){if((0,i.isNft)(e.make.assetType))return e.make.assetType.contract;if((0,i.isNft)(e.take.assetType))return e.take.assetType.contract;return}(t);if(!u)throw new Error("Maker or taker should have an NFT asset");var c,d=t.data.callData,p=t.data.replacementPattern,l=t.make.assetType,y=t.take.assetType;if("ERC721"===l.assetClass)c=(0,r.toBigNumber)(t.take.value);else if("ERC1155"===l.assetClass)c=(0,r.toBigNumber)(t.take.value);else if("ERC721"===y.assetClass)c=(0,r.toBigNumber)(t.make.value);else{if("ERC1155"!==y.assetClass)throw new Error("should never happen");c=(0,r.toBigNumber)(t.make.value)}return{exchange:(0,r.toAddress)(t.data.exchange),maker:(0,r.toAddress)(t.maker),taker:(0,r.toAddress)(t.taker||r.ZERO_ADDRESS),makerRelayerFee:(0,r.toBigNumber)(t.data.makerRelayerFee),takerRelayerFee:(0,r.toBigNumber)(t.data.takerRelayerFee),makerProtocolFee:(0,r.toBigNumber)(t.data.makerProtocolFee),takerProtocolFee:(0,r.toBigNumber)(t.data.takerProtocolFee),feeRecipient:t.data.feeRecipient,feeMethod:s.OrderOpenSeaV1DataV1FeeMethod[t.data.feeMethod],side:s.OrderOpenSeaV1DataV1Side[t.data.side],saleKind:s.OrderOpenSeaV1DataV1SaleKind[t.data.saleKind],target:t.data.target||u,howToCall:s.OrderOpenSeaV1DataV1HowToCall[t.data.howToCall],calldata:d,replacementPattern:p,staticTarget:t.data.staticTarget,staticExtradata:t.data.staticExtraData,paymentToken:n,basePrice:c,extra:(0,r.toBigNumber)(t.data.extra),listingTime:(0,r.toBigNumber)(String(t.start||0)),expirationTime:(0,r.toBigNumber)(String(t.end||0)),salt:(0,r.toBigNumber)((0,a.toBn)(t.salt).toString(10))}},t.ERC721_MAKE_REPLACEMENT=(0,r.toBinary)("0x000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000"),t.ERC721_VALIDATOR_MAKE_REPLACEMENT=(0,r.toBinary)("0x000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),t.ERC721_TAKE_REPLACEMENT=(0,r.toBinary)("0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),t.ERC721_VALIDATOR_TAKE_REPLACEMENT=(0,r.toBinary)("0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),t.ERC1155_MAKE_REPLACEMENT=(0,r.toBinary)("0x000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),t.ERC1155_VALIDATOR_MAKE_REPLACEMENT=(0,r.toBinary)("0x000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),t.ERC1155_TAKE_REPLACEMENT=(0,r.toBinary)("0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),t.ERC1155_VALIDATOR_TAKE_REPLACEMENT=(0,r.toBinary)("0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")},1255:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findGcd=t.gcd=void 0;var r=n(121);t.gcd=function(e,n){var a=(0,r.toBn)(e),i=(0,r.toBn)(n);return a.eq(0)?i:(0,t.gcd)(i.mod(e),a)};t.findGcd=function(e){for(var n=(0,r.toBn)(e[0]),a=1;a1)){n.next=7;break}throw new Error("x2y2 supports max up to 2 origin fee value");case 7:return i=(0,p.originFeeValueConvert)(e.originFees),s=i.totalFeeBasisPoints,c=i.encodedFeesValue,d=i.feeAddresses,l=(0,p.calcValueWithFees)((0,o.toBigNumber)(e.order.take.value),s),n.next=11,this.getWrapperData(e,c,l.toString());case 11:return y=n.sent,f=a.functionCall("singlePurchase",y.data,d[0],d[1]),n.abrupt("return",{functionCall:f,options:y.options});case 14:case"end":return n.stop()}}),n,this)})))}},{key:"getTransactionDataForExchangeWrapper",value:function(e,t,n){return s.__awaiter(this,void 0,void 0,r().mark((function a(){var i,s,u;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=(0,p.originFeeValueConvert)(t),s=i.totalFeeBasisPoints,u=(0,p.calcValueWithFees)((0,o.toBigNumber)(e.order.take.value),s),r.abrupt("return",this.getWrapperData(e,n,u.toString()));case 3:case"end":return r.stop()}}),a,this)})))}},{key:"getWrapperData",value:function(e,t,n){return s.__awaiter(this,void 0,void 0,r().mark((function a(){var i;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.ethereum){r.next=2;break}throw new Error("Wallet undefined");case 2:return r.next=4,d.X2Y2Utils.getOrderSign(this.apis,{sender:this.config.exchange.wrapper,orderId:e.order.data.orderId,currency:o.ZERO_ADDRESS,price:e.order.take.value});case 4:return i=r.sent,r.abrupt("return",{data:{marketId:c.ExchangeWrapperOrderType.X2Y2,amount:e.order.take.value,fees:t,data:i},options:{value:n}});case 6:case"end":return r.stop()}}),a,this)})))}},{key:"getBaseOrderFee",value:function(){return this.getBaseOrderFeeConfig("X2Y2")}},{key:"getOrderFee",value:function(){return 0}}]),e}();t.X2Y2OrderHandler=l},1263:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.encodeLooksRareData=t.LooksrareOrderHandler=void 0;var s=n(19),o=n(176),u=n(73),c=n(615),d=n(302),p=n(737),l=n(457),y=n(241),f=n(407),m=n(458),b=n(363),v=n(948),h=function(){function e(t,n,r,i,s,o,u){a(this,e),this.ethereum=t,this.send=n,this.config=r,this.getBaseOrderFeeConfig=i,this.env=s,this.apis=o,this.sdkConfig=u}return i(e,[{key:"convertMakerOrderToLooksrare",value:function(e,t){var n,r,a,i,s=e.take,c=e.make;if((0,o.toBn)(t).gt(c.value))throw new Error("Amount should be less or equal to ".concat(c.value.toString()));if(!(0,f.isNft)(c.assetType))throw new Error("Only sell orders are supported. Make=".concat(c.assetType.assetClass," is not NFT"));if(n=!0,r=c.assetType.contract,a=c.assetType.tokenId.toString(),"ETH"===s.assetType.assetClass)i=u.ZERO_ADDRESS;else{if("ERC20"!==s.assetType.assetClass)throw new Error("Take asset should be ETH or ERC-20 contract");i=s.assetType.contract}if(!e.signature)throw new Error("Signature is null");var d=(0,p.toVrs)(e.signature||"0x");return Object.assign({isOrderAsk:n,signer:e.maker,collection:r,price:s.value,tokenId:a,amount:t,strategy:e.data.strategy,currency:i,nonce:e.data.nonce,startTime:e.start||0,endTime:e.end||0,minPercentageToAsk:e.data.minPercentageToAsk,params:e.data.params||"0x"},d)}},{key:"getFulfillWrapperData",value:function(e,t,n){return T((0,d.getRequiredWallet)(this.ethereum),e,t,(0,y.id32)(n).substring(0,10))}},{key:"prepareTransactionData",value:function(e,t,n){var a;return s.__awaiter(this,void 0,void 0,r().mark((function i(){var s,u,d,p,l,y,f,h,T,g,w,k;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.ethereum){r.next=2;break}throw new Error("Wallet undefined");case 2:if(!(e.originFees&&e.originFees.length>2)){r.next=4;break}throw new Error("Origin fees recipients shouldn't be greater than 2");case 4:if((s=this.convertMakerOrderToLooksrare(e.order,e.amount)).currency=this.config.weth,u={isOrderAsk:!1,taker:this.config.exchange.wrapper,price:s.price,tokenId:s.tokenId,minPercentageToAsk:s.minPercentageToAsk,params:s.params},d=this.getFulfillWrapperData(s,u,e.order.make.assetType.assetClass),p=(0,b.originFeeValueConvert)(t),l=p.totalFeeBasisPoints,y=p.encodedFeesValue,f=p.feeAddresses,h=(0,b.calcValueWithFees)((0,c.toBigNumber)(s.price.toString()),l),T=null!==n&&void 0!==n?n:y,g={marketId:m.ExchangeWrapperOrderType.LOOKSRARE_ORDERS,amount:s.price.toString(),fees:T,data:d},!e.addRoyalty){r.next=17;break}return r.next=15,this.apis.nftItem.getNftItemRoyaltyById({itemId:"".concat(s.collection,":").concat(s.tokenId)});case 15:(null===(w=r.sent.royalty)||void 0===w?void 0:w.length)&&(g.data=(0,v.encodeDataWithRoyalties)({royalties:w,data:d,provider:this.ethereum}),k=(0,v.getRoyaltiesAmount)(w,null!==(a=s.price.toString())&&void 0!==a?a:0),h=(0,o.toBn)(h.plus(k).toString()),g.fees=(0,v.addFeeDependsOnExternalFee)(e.originFees,n));case 17:return r.abrupt("return",{requestData:{data:g,options:{value:h.toString()}},feeAddresses:f});case 18:case"end":return r.stop()}}),i,this)})))}},{key:"getTransactionDataForExchangeWrapper",value:function(e,t,n){return s.__awaiter(this,void 0,void 0,r().mark((function a(){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.prepareTransactionData(e,t,n);case 2:return r.abrupt("return",r.sent.requestData);case 3:case"end":return r.stop()}}),a,this)})))}},{key:"getTransactionData",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,s,o,u;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.prepareTransactionData(e,e.originFees,void 0);case 2:return n=t.sent,a=n.requestData,i=n.feeAddresses,s=(0,d.getRequiredWallet)(this.ethereum),o=(0,l.createExchangeWrapperContract)(s,this.config.exchange.wrapper),u=o.functionCall("singlePurchase",a.data,i[0],i[1]),t.abrupt("return",{functionCall:u,options:{value:a.options.value.toString()}});case 9:case"end":return t.stop()}}),t,this)})))}},{key:"getBaseOrderFee",value:function(){return this.getBaseOrderFeeConfig("LOOKSRARE")}},{key:"getOrderFee",value:function(){return 0}}]),e}();function T(e,t,n,r){var a=e.encodeParameter(g,{makerOrder:t,takerOrder:n,typeNft:r});return"0x".concat(a.slice(66))}t.LooksrareOrderHandler=h,t.encodeLooksRareData=T;var g={components:[{components:[{name:"isOrderAsk",type:"bool"},{name:"taker",type:"address"},{name:"price",type:"uint256"},{name:"tokenId",type:"uint256"},{name:"minPercentageToAsk",type:"uint256"},{name:"params",type:"bytes"}],name:"takerOrder",type:"tuple"},{components:[{name:"isOrderAsk",type:"bool"},{name:"signer",type:"address"},{name:"collection",type:"address"},{name:"price",type:"uint256"},{name:"tokenId",type:"uint256"},{name:"amount",type:"uint256"},{name:"strategy",type:"address"},{name:"currency",type:"address"},{name:"nonce",type:"uint256"},{name:"startTime",type:"uint256"},{name:"endTime",type:"uint256"},{name:"minPercentageToAsk",type:"uint256"},{name:"params",type:"bytes"},{name:"v",type:"uint8"},{name:"r",type:"bytes32"},{name:"s",type:"bytes32"}],name:"makerOrder",type:"tuple"},{name:"typeNft",type:"bytes4"}],name:"data",type:"tuple"}},1264:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.AmmOrderHandler=void 0;var s=n(19),o=n(302),u=n(457),c=n(458),d=n(2294),p=n(948),l=function(){function e(t,n,r,i,s,o,u){var c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{directBuy:!1};a(this,e),this.ethereum=t,this.send=n,this.config=r,this.getBaseOrderFeeConfig=i,this.apis=s,this.env=o,this.sdkConfig=u,this.options=c}return i(e,[{key:"getTransactionData",value:function(e){var t;return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,s,d,l,y,f,m;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=(0,o.getRequiredWallet)(this.ethereum),n.next=3,this.getTransactionDataDirectBuy(e);case 3:if(i=n.sent,!this.options.directBuy){n.next=10;break}if(!(null===(t=e.originFees)||void 0===t?void 0:t.length)){n.next=7;break}throw new Error("Origin fees not supported for sudoswap direct buy");case 7:return n.abrupt("return",{functionCall:i.functionCall,options:i.options});case 10:return s=(0,u.createExchangeWrapperContract)(a,this.config.exchange.wrapper),n.t0=p.getMarketData,n.t1=this.ethereum,n.t2=this.apis,n.t3=c.ExchangeWrapperOrderType.AAM,n.t4=e,n.next=18,i.functionCall.getData();case 18:return n.t5=n.sent,n.t6=i.options,n.t7={data:n.t5,options:n.t6},n.t8={marketId:n.t3,request:n.t4,fillData:n.t7},n.next=24,(0,n.t0)(n.t1,n.t2,n.t8);case 24:return d=n.sent,l=d.data,y=d.options,f=d.originFees.feeAddresses,m=s.functionCall("singlePurchase",l,f[0],f[1]),n.abrupt("return",{functionCall:m,options:y});case 30:case"end":return n.stop()}}),n,this)})))}},{key:"getTransactionDataDirectBuy",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(0,o.getRequiredWallet)(this.ethereum),t.t0=e.order.data.dataType,t.next="SUDOSWAP_AMM_DATA_V1"===t.t0?4:8;break;case 4:return t.next=6,d.SudoswapFill.getDirectFillData(n,e,this.config);case 6:return a=t.sent,t.abrupt("break",9);case 8:throw new Error("Unsupported order data type "+e.order.data.dataType);case 9:return t.abrupt("return",{functionCall:a.functionCall,options:a.options});case 10:case"end":return t.stop()}}),t,this)})))}},{key:"getTransactionDataForExchangeWrapper",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,s,o;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("ETH"===e.order.take.assetType.assetClass){n.next=2;break}throw new Error("Unsupported asset type for take asset "+e.order.take.assetType.assetClass);case 2:return n.next=4,this.getTransactionDataDirectBuy(e);case 4:return a=n.sent,n.t0=p.getMarketData,n.t1=this.ethereum,n.t2=this.apis,n.t3=c.ExchangeWrapperOrderType.AAM,n.t4=e,n.next=12,a.functionCall.getData();case 12:return n.t5=n.sent,n.t6=a.options,n.t7={data:n.t5,options:n.t6},n.t8=t,n.t9={marketId:n.t3,request:n.t4,fillData:n.t7,feeValue:n.t8},n.next=19,(0,n.t0)(n.t1,n.t2,n.t9);case 19:return i=n.sent,s=i.data,o=i.options,n.abrupt("return",{data:s,options:o});case 23:case"end":return n.stop()}}),n,this)})))}},{key:"getBaseOrderFee",value:function(){return this.getBaseOrderFeeConfig("AMM")}},{key:"getOrderFee",value:function(){return 0}}]),e}();t.AmmOrderHandler=l},1265:function(e,t,n){"use strict";var r=n(111).default,a=n(20).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.OrderValidatorCode=t.getTakerParamsTypes=t.CollectionType=t.StrategyType=t.QuoteType=t.LooksrareV2OrderHandler=void 0;var o,u,c,d=n(19),p=n(73),l=n(615),y=n(176),f=n(1232),m=n(1260),b=n(302),v=n(457),h=n(407),T=n(2297),g=n(458),w=n(363),k=n(948),x=function(){function e(t,n,r,a,s,o){i(this,e),this.ethereum=t,this.send=n,this.config=r,this.getBaseOrderFeeConfig=a,this.env=s,this.apis=o}return s(e,[{key:"convertMakerOrderToLooksrare",value:function(e,t){var n,r,a,i=e.take,s=e.make;if((0,y.toBn)(t).gt(s.value))throw new Error("Amount should be less or equal to ".concat(s.value.toString()));if(!(0,h.isNft)(s.assetType))throw new Error("Only sell orders are supported. Make=".concat(s.assetType.assetClass," is not NFT"));if(n=s.assetType.contract,r=s.assetType.tokenId.toString(),"ETH"===i.assetType.assetClass)a=p.ZERO_ADDRESS;else{if("ERC20"!==i.assetType.assetClass)throw new Error("Take asset should be ETH or ERC-20 contract");a=i.assetType.contract}if(!e.signature)throw new Error("Signature is null");return{quoteType:_(e.data.quoteType),globalNonce:e.data.globalNonce,subsetNonce:e.data.subsetNonce,orderNonce:e.data.orderNonce,collection:n,currency:a,signer:e.maker,strategyId:e.data.strategyId,collectionType:E(e.make.assetType),startTime:e.start||0,endTime:e.end||0,price:i.value,additionalParameters:e.data.additionalParameters,amounts:[t.toString()],itemIds:[r]}}},{key:"prepareTransaction",value:function(e,t){var n;return d.__awaiter(this,void 0,void 0,a().mark((function r(){var i,s,u,c,d,l,y,f,v;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=(0,b.getRequiredWallet)(this.ethereum),this.config.exchange.looksrareV2){r.next=3;break}throw new Error("Looksrare V2 contract does not exist");case 3:if(!(t&&t.length>1)){r.next=5;break}throw new Error("Origin fees recipients shouldn't be greater than 1");case 5:if(s=(0,m.createLooksrareV2Exchange)(i,this.config.exchange.looksrareV2),u=this.convertMakerOrderToLooksrare(e.order,e.amount),c=u.quoteType===o.Ask?"executeTakerBid":"executeTakerAsk",this.config.looksrareOrderValidatorV2){r.next=10;break}throw new Error("Looksrare order validator V2 does not exist");case 10:return d=(0,T.createLooksrareV2Validator)(i,this.config.looksrareOrderValidatorV2),l=e.order.data.merkleRoot?{root:e.order.data.merkleRoot,proof:e.order.data.merkleProof}:{root:"0x0000000000000000000000000000000000000000000000000000000000000000",proof:[]},r.next=14,d.functionCall("checkMakerOrderValidity",u,e.order.signature,l).call();case 14:if(y=r.sent,!(f=y.filter((function(e){return!!+e})).map((function(e){return O[+e]}))).length){r.next=18;break}throw new Error("Order validation errors: ".concat(f.join(", ")));case 18:return r.t0=s,r.t1=c,r.next=22,i.getFrom();case 22:return r.t2=r.sent,r.t3={recipient:r.t2,additionalParameters:"0x"},r.t4=u,r.t5=e.order.signature,r.t6=l,r.t7=(null===t||void 0===t?void 0:t.length)&&t[0]?null===(n=t[0])||void 0===n?void 0:n.account:p.ZERO_ADDRESS,v=r.t0.functionCall.call(r.t0,r.t1,r.t3,r.t4,r.t5,r.t6,r.t7),r.abrupt("return",{functionCall:v,rawOrder:u});case 30:case"end":return r.stop()}}),r,this)})))}},{key:"getTransactionDataForExchangeWrapper",value:function(e,t,n){return d.__awaiter(this,void 0,void 0,a().mark((function r(){return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.prepareTransactionData(e,t,n);case 2:return r.abrupt("return",r.sent.requestData);case 3:case"end":return r.stop()}}),r,this)})))}},{key:"getTransactionData",value:function(e){return d.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r,i,s,o,u;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.prepareTransactionData(e,e.originFees,void 0);case 2:return n=t.sent,r=n.requestData,i=n.feeAddresses,s=(0,b.getRequiredWallet)(this.ethereum),o=(0,v.createExchangeWrapperContract)(s,this.config.exchange.wrapper),u=o.functionCall("singlePurchase",r.data,i[0],i[1]),t.abrupt("return",{functionCall:u,options:{value:r.options.value.toString()}});case 9:case"end":return t.stop()}}),t,this)})))}},{key:"prepareTransactionData",value:function(e,t,n){return d.__awaiter(this,void 0,void 0,a().mark((function i(){var s,o,u,c,d,p,f,m,v,h,T,x,O,_,E,A,C;return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.prepareTransaction(e,t);case 2:return s=a.sent,o=s.functionCall,u=s.rawOrder,c=u.price.toString(),d=(0,w.originFeeValueConvert)(t),p=d.totalFeeBasisPoints,f=d.encodedFeesValue,m=d.feeAddresses,v=(0,w.calcValueWithFees)((0,l.toBigNumber)(c),p),h=null!==n&&void 0!==n?n:f,a.t0=g.ExchangeWrapperOrderType.LOOKSRARE_V2_ORDERS,a.t1=c,a.t2=h,a.next=14,o.getData();case 14:if(a.t3=a.sent,T={marketId:a.t0,amount:a.t1,fees:a.t2,data:a.t3},!e.addRoyalty){a.next=49;break}x=[],O=r(u.itemIds),a.prev=19,O.s();case 21:if((_=O.n()).done){a.next=29;break}return E=_.value,a.next=25,this.apis.nftItem.getNftItemRoyaltyById({itemId:"".concat(u.collection,":").concat(E)});case 25:(null===(A=a.sent.royalty)||void 0===A?void 0:A.length)&&(x=x.concat(A));case 27:a.next=21;break;case 29:a.next=34;break;case 31:a.prev=31,a.t4=a.catch(19),O.e(a.t4);case 34:return a.prev=34,O.f(),a.finish(34);case 37:if(!(null===x||void 0===x?void 0:x.length)){a.next=49;break}return a.t5=k.encodeDataWithRoyalties,a.t6=x,a.next=42,o.getData();case 42:a.t7=a.sent,a.t8=(0,b.getRequiredWallet)(this.ethereum),a.t9={royalties:a.t6,data:a.t7,provider:a.t8},T.data=(0,a.t5)(a.t9),C=(0,k.getRoyaltiesAmount)(x,null!==c&&void 0!==c?c:0),v=(0,y.toBn)(v.plus(C).toString()),T.fees=(0,k.addFeeDependsOnExternalFee)(e.originFees,n);case 49:return a.abrupt("return",{requestData:{data:T,options:{value:v.toString()}},feeAddresses:m});case 50:case"end":return a.stop()}}),i,this,[[19,31,34,37]])})))}},{key:"getBaseOrderFee",value:function(){return this.getBaseOrderFeeConfig("LOOKSRARE")}}]),e}();t.LooksrareV2OrderHandler=x,function(e){e[e.Bid=0]="Bid",e[e.Ask=1]="Ask"}(o=t.QuoteType||(t.QuoteType={})),function(e){e[e.standard=0]="standard",e[e.collection=1]="collection",e[e.collectionWithMerkleTree=2]="collectionWithMerkleTree"}(u=t.StrategyType||(t.StrategyType={})),function(e){e[e.ERC721=0]="ERC721",e[e.ERC1155=1]="ERC1155"}(c=t.CollectionType||(t.CollectionType={}));var O;function _(e){if(e===f.OrderLooksRareDataV2QuoteType.BID)return o.Bid;if(e===f.OrderLooksRareDataV2QuoteType.ASK)return o.Ask;throw new Error("Unexpected QuoteType=".concat(e))}function E(e){if("ERC721"===e.assetClass)return c.ERC721;if("ERC1155"===e.assetClass)return c.ERC1155;throw new Error("Wrong collection type: ".concat(e.assetClass,", expected ERC721 or ERC1155"))}t.getTakerParamsTypes=function(e){return e===u.standard?[]:e===u.collection?["uint256"]:e===u.collectionWithMerkleTree?["uint256","bytes32[]"]:[]},function(e){e[e.ORDER_EXPECTED_TO_BE_VALID=0]="ORDER_EXPECTED_TO_BE_VALID",e[e.CURRENCY_NOT_ALLOWED=101]="CURRENCY_NOT_ALLOWED",e[e.STRATEGY_NOT_IMPLEMENTED=111]="STRATEGY_NOT_IMPLEMENTED",e[e.STRATEGY_INVALID_QUOTE_TYPE=112]="STRATEGY_INVALID_QUOTE_TYPE",e[e.STRATEGY_NOT_ACTIVE=113]="STRATEGY_NOT_ACTIVE",e[e.MAKER_ORDER_INVALID_STANDARD_SALE=201]="MAKER_ORDER_INVALID_STANDARD_SALE",e[e.MAKER_ORDER_PERMANENTLY_INVALID_NON_STANDARD_SALE=211]="MAKER_ORDER_PERMANENTLY_INVALID_NON_STANDARD_SALE",e[e.MAKER_ORDER_INVALID_CURRENCY_NON_STANDARD_SALE=212]="MAKER_ORDER_INVALID_CURRENCY_NON_STANDARD_SALE",e[e.MAKER_ORDER_TEMPORARILY_INVALID_NON_STANDARD_SALE=213]="MAKER_ORDER_TEMPORARILY_INVALID_NON_STANDARD_SALE",e[e.USER_SUBSET_NONCE_CANCELLED=301]="USER_SUBSET_NONCE_CANCELLED",e[e.USER_ORDER_NONCE_EXECUTED_OR_CANCELLED=311]="USER_ORDER_NONCE_EXECUTED_OR_CANCELLED",e[e.USER_ORDER_NONCE_IN_EXECUTION_WITH_OTHER_HASH=312]="USER_ORDER_NONCE_IN_EXECUTION_WITH_OTHER_HASH",e[e.INVALID_USER_GLOBAL_BID_NONCE=321]="INVALID_USER_GLOBAL_BID_NONCE",e[e.INVALID_USER_GLOBAL_ASK_NONCE=322]="INVALID_USER_GLOBAL_ASK_NONCE",e[e.ORDER_HASH_PROOF_NOT_IN_MERKLE_TREE=401]="ORDER_HASH_PROOF_NOT_IN_MERKLE_TREE",e[e.MERKLE_PROOF_PROOF_TOO_LARGE=402]="MERKLE_PROOF_PROOF_TOO_LARGE",e[e.INVALID_SIGNATURE_LENGTH=411]="INVALID_SIGNATURE_LENGTH",e[e.INVALID_S_PARAMETER_EOA=412]="INVALID_S_PARAMETER_EOA",e[e.INVALID_V_PARAMETER_EOA=413]="INVALID_V_PARAMETER_EOA",e[e.NULL_SIGNER_EOA=414]="NULL_SIGNER_EOA",e[e.INVALID_SIGNER_EOA=415]="INVALID_SIGNER_EOA",e[e.MISSING_IS_VALID_SIGNATURE_FUNCTION_EIP1271=421]="MISSING_IS_VALID_SIGNATURE_FUNCTION_EIP1271",e[e.SIGNATURE_INVALID_EIP1271=422]="SIGNATURE_INVALID_EIP1271",e[e.START_TIME_GREATER_THAN_END_TIME=501]="START_TIME_GREATER_THAN_END_TIME",e[e.TOO_LATE_TO_EXECUTE_ORDER=502]="TOO_LATE_TO_EXECUTE_ORDER",e[e.TOO_EARLY_TO_EXECUTE_ORDER=503]="TOO_EARLY_TO_EXECUTE_ORDER",e[e.SAME_ITEM_ID_IN_BUNDLE=601]="SAME_ITEM_ID_IN_BUNDLE",e[e.ERC20_BALANCE_INFERIOR_TO_PRICE=611]="ERC20_BALANCE_INFERIOR_TO_PRICE",e[e.ERC20_APPROVAL_INFERIOR_TO_PRICE=612]="ERC20_APPROVAL_INFERIOR_TO_PRICE",e[e.ERC721_ITEM_ID_DOES_NOT_EXIST=621]="ERC721_ITEM_ID_DOES_NOT_EXIST",e[e.ERC721_ITEM_ID_NOT_IN_BALANCE=622]="ERC721_ITEM_ID_NOT_IN_BALANCE",e[e.ERC721_NO_APPROVAL_FOR_ALL_OR_ITEM_ID=623]="ERC721_NO_APPROVAL_FOR_ALL_OR_ITEM_ID",e[e.ERC1155_BALANCE_OF_DOES_NOT_EXIST=631]="ERC1155_BALANCE_OF_DOES_NOT_EXIST",e[e.ERC1155_BALANCE_OF_ITEM_ID_INFERIOR_TO_AMOUNT=632]="ERC1155_BALANCE_OF_ITEM_ID_INFERIOR_TO_AMOUNT",e[e.ERC1155_IS_APPROVED_FOR_ALL_DOES_NOT_EXIST=633]="ERC1155_IS_APPROVED_FOR_ALL_DOES_NOT_EXIST",e[e.ERC1155_NO_APPROVAL_FOR_ALL=634]="ERC1155_NO_APPROVAL_FOR_ALL",e[e.POTENTIAL_INVALID_COLLECTION_TYPE_SHOULD_BE_ERC721=701]="POTENTIAL_INVALID_COLLECTION_TYPE_SHOULD_BE_ERC721",e[e.POTENTIAL_INVALID_COLLECTION_TYPE_SHOULD_BE_ERC1155=702]="POTENTIAL_INVALID_COLLECTION_TYPE_SHOULD_BE_ERC1155",e[e.NO_TRANSFER_MANAGER_APPROVAL_BY_USER_FOR_EXCHANGE=801]="NO_TRANSFER_MANAGER_APPROVAL_BY_USER_FOR_EXCHANGE",e[e.TRANSFER_MANAGER_APPROVAL_REVOKED_BY_OWNER_FOR_EXCHANGE=802]="TRANSFER_MANAGER_APPROVAL_REVOKED_BY_OWNER_FOR_EXCHANGE",e[e.BUNDLE_ERC2981_NOT_SUPPORTED=901]="BUNDLE_ERC2981_NOT_SUPPORTED",e[e.CREATOR_FEE_TOO_HIGH=902]="CREATOR_FEE_TOO_HIGH"}(O=t.OrderValidatorCode||(t.OrderValidatorCode={}))},1266:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getDecimals=void 0;var a=n(19),i=n(521);t.getDecimals=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=t.assetClass,n.next="ETH"===n.t0?3:"ERC20"===n.t0?4:8;break;case 3:return n.abrupt("return",18);case 4:return n.next=6,(0,i.createErc20Contract)(e,t.contract).functionCall("decimals").call();case 6:return a=n.sent,n.abrupt("return",Number(a));case 8:throw new Error("Asset type should be either ETH or ERC-20, received=".concat(JSON.stringify(t)));case 9:case"end":return n.stop()}}),n)})))}},1267:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePartValue=t.validateParts=void 0;var r=n(73);function a(e){if(isNaN(e)||e>1e4||e<0)throw new Error("Part value should be valid and in range 0-10000");return e}t.validateParts=function(e){return(null===e||void 0===e?void 0:e.map((function(e){return{account:(0,r.toAddress)(e.account),value:a(e.value)}})))||[]},t.validatePartValue=a},1271:function(e,t,n){"use strict";var r=n(203).default,a=n(37).default,i=n(38).default,s=n(193).default,o=n(20).default,u=n(21).default,c=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedBlockchainError=t.UnsupportedCollectionError=t.LazyMintIsNotSupportedError=t.getCollection=t.EthereumMint=void 0;var d=n(19),p=n(115),l=d.__importStar(n(931)),y=n(931),f=n(619),m=n(1171),b=n(1272),v=n(64),h=n(749),T=n(176),g=n(146),w=n(45),k=n(614),x=n(253),O=n(253),_=function(){function e(t,n,r){u(this,e),this.sdk=t,this.apis=n,this.network=r,this.blockchain=(0,O.getEVMBlockchain)(r),this.prepare=this.prepare.bind(this),this.mintBasic=this.mintBasic.bind(this)}return c(e,[{key:"handleSubmit",value:function(e,t,n){var r,a;if(e.lazyMint&&!this.isSupportsLazyMint(t))throw new R(t.type);var i=null!==(r=e.lazyMint)&&void 0!==r&&r,s=null!==(a=e.supply)&&void 0!==a?a:1;if(l.isErc721v3Collection(t))return this.sdk.nft.mint({collection:t,uri:e.uri,lazy:i,royalties:this.toPart(e.royalties),creators:this.toPart(e.creators),nftTokenId:n});if(l.isErc721v2Collection(t))return this.sdk.nft.mint({collection:t,uri:e.uri,royalties:this.toPart(e.royalties),nftTokenId:n});if(l.isErc721v1Collection(t))return this.sdk.nft.mint({collection:t,uri:e.uri,nftTokenId:n});if(l.isErc1155v2Collection(t))return this.sdk.nft.mint({collection:t,uri:e.uri,supply:s,lazy:i,royalties:this.toPart(e.royalties),creators:this.toPart(e.creators),nftTokenId:n});if(l.isErc1155v1Collection(t))return this.sdk.nft.mint({collection:t,uri:e.uri,supply:s,royalties:this.toPart(e.royalties),nftTokenId:n});throw new Error("Unsupported NFT Collection")}},{key:"toPart",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(e){return{account:(0,O.convertToEthereumAddress)(e.account),value:(0,T.toBn)(e.value).toNumber()}}))}},{key:"isSupportsRoyalties",value:function(e){switch(e.type){case h.NftCollectionType.ERC721:return(0,y.isErc721v3Collection)(e)||(0,y.isErc721v2Collection)(e);case h.NftCollectionType.ERC1155:return!0;default:throw new Error("Unrecognized collection type")}}},{key:"isSupportsLazyMint",value:function(e){return this.blockchain===w.Blockchain.ETHEREUM&&((0,y.isErc721v3Collection)(e)||(0,y.isErc1155v2Collection)(e))}},{key:"prepare",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n,r,a=this;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,E(this.apis.collection,e);case 2:return n=t.sent,r=A(n),t.abrupt("return",{multiple:n.type===w.CollectionType.ERC1155,supportsRoyalties:this.isSupportsRoyalties(r),supportsLazyMint:this.isSupportsLazyMint(r),submit:p.Action.create({id:"mint",run:function(t){return d.__awaiter(a,void 0,void 0,o().mark((function n(){var a;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.handleSubmit(t,r,S(e.tokenId));case 2:a=n.sent,n.t0=a.type,n.next=n.t0===f.MintResponseTypeEnum.ON_CHAIN?6:n.t0===f.MintResponseTypeEnum.OFF_CHAIN?7:8;break;case 6:return n.abrupt("return",{type:k.MintType.ON_CHAIN,itemId:(0,O.convertEthereumItemId)(a.itemId,this.blockchain),transaction:new g.BlockchainEthereumTransaction(a.transaction,this.network)});case 7:return n.abrupt("return",{type:k.MintType.OFF_CHAIN,itemId:(0,O.convertEthereumItemId)(a.itemId,this.blockchain)});case 8:throw new Error("Unrecognized mint response type");case 9:case"end":return n.stop()}}),n,this)})))}})});case 5:case"end":return t.stop()}}),t,this)})))}},{key:"mintBasic",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.prepare(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"preprocessMeta",value:function(e){var t,n;if(!(0,x.isEVMBlockchain)(e.blockchain))throw new P(e.blockchain);return{name:e.name,description:e.description,image:null===(t=e.image)||void 0===t?void 0:t.url,animation_url:null===(n=e.animation)||void 0===n?void 0:n.url,external_url:e.external,attributes:e.attributes}}}]),e}();function E(e,t){return d.__awaiter(this,void 0,void 0,o().mark((function n(){return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!("collection"in t)){n.next=2;break}return n.abrupt("return",t.collection);case 2:return n.abrupt("return",e.getCollectionById({collection:t.collectionId}));case 3:case"end":return n.stop()}}),n)})))}function A(e){var t,n,r;if(r=e.type,!I.includes(r))throw new j(e.type);return Object.assign(Object.assign({},e),{status:C(e.status),id:(0,v.toAddress)((0,O.convertToEthereumAddress)(e.id)),type:h.NftCollectionType[e.type],owner:e.owner?(0,O.convertToEthereumAddress)(e.owner):void 0,features:null===(t=e.features)||void 0===t?void 0:t.map((function(e){return h.NftCollectionFeatures[e]})),minters:null===(n=e.minters)||void 0===n?void 0:n.map((function(e){return(0,O.convertToEthereumAddress)(e)}))})}function C(e){switch(e){case void 0:return;case m.CollectionStatus.ERROR:return b.NftCollectionStatus.ERROR;case m.CollectionStatus.PENDING:return b.NftCollectionStatus.PENDING;case m.CollectionStatus.CONFIRMED:return b.NftCollectionStatus.CONFIRMED;default:throw new Error("Unknown Collection Status (".concat(e,")"))}}t.EthereumMint=_,t.getCollection=E;var I=[w.CollectionType.ERC721,w.CollectionType.ERC1155];function S(e){if(e)return{tokenId:(0,v.toBigNumber)(e.tokenId),signature:e.signature}}var R=function(e){a(n,e);var t=i(n);function n(e){var a;return u(this,n),(a=t.call(this,"Lazy minting is not supported for ".concat(e))).name="LazyMintIsNotSupportedError",Object.setPrototypeOf(r(a),n.prototype),a}return c(n)}(s(Error));t.LazyMintIsNotSupportedError=R;var j=function(e){a(n,e);var t=i(n);function n(e){var a;return u(this,n),(a=t.call(this,'Collection with type "'.concat(e,'" not supported'))).name="UnsupportedCollectionError",Object.setPrototypeOf(r(a),n.prototype),a}return c(n)}(s(Error));t.UnsupportedCollectionError=j;var P=function(e){a(n,e);var t=i(n);function n(e){var a;return u(this,n),(a=t.call(this,"".concat(e," is not supported"))).name="UnsupportedBlockchainError",Object.setPrototypeOf(r(a),n.prototype),a}return c(n)}(s(Error));t.UnsupportedBlockchainError=P},1291:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getSdkContext=void 0;var a=n(19),i=n(954),s=n(2564);t.getSdkContext=function(e){return a.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=Object,t.t1={service:i.loggerConfig.service,environment:e.env,sessionId:e.sessionId,"@version":s.version},!e.wallet){t.next=8;break}return t.next=5,(0,i.getWalletInfo)(e.wallet);case 5:t.t2=t.sent,t.next=9;break;case 8:t.t2={};case 9:return t.t3=t.t2,n=t.t0.assign.call(t.t0,t.t1,t.t3),void 0!==e.providerId&&(n.providerId=e.providerId),void 0!==e.providerMeta&&(n.providerMeta=JSON.stringify(e.providerMeta)),void 0!==e.apiKey&&(n.apiKey=e.apiKey),t.abrupt("return",n);case 15:case"end":return t.stop()}}),t)})))}},1292:function(e,t,n){"use strict";var r=n(20).default,a=n(78).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaSdk=void 0;var o=n(19),u=n(32),c=n(2581),d=n(1296),p=n(2583),l=n(2584),y=n(2638),f=n(2684),m=n(2686),b=n(2689),v=function(){function e(t,n,r){i(this,e),this.connection=t,this.cluster=n,this.logging=r,this.debugLogger=new c.DebugLogger(r.debug),this.account=new b.SolanaAccountSdk(t,this.debugLogger),this.balances=new p.SolanaBalancesSdk(t,this.debugLogger),this.nft=new l.SolanaNftSdk(t,this.debugLogger,this.account),this.order=new y.SolanaOrderSdk(t,this.debugLogger),this.collection=new f.SolanaCollectionSdk(t,this.debugLogger),this.auctionHouse=new m.SolanaAuctionHouseSdk(t,this.debugLogger)}return s(e,[{key:"confirmTransaction",value:function(){var e;return(e=this.connection).confirmTransaction.apply(e,arguments)}},{key:"unionInstructionsAndSend",value:function(e,t,n){return o.__awaiter(this,void 0,void 0,r().mark((function i(){var s;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,d.sendTransactionWithRetry)(this.connection,e,t.reduce((function(e,t){return e.push.apply(e,a(t.data.instructions)),e}),[]),t.reduce((function(e,t){return e.push.apply(e,a(t.data.signers)),e}),[]),n,this.debugLogger);case 2:return s=r.sent,t.forEach((function(e){var t;null===(t=e.onSubmit)||void 0===t||t.call(e,s)})),r.abrupt("return",s);case 5:case"end":return r.stop()}}),i,this)})))}}],[{key:"create",value:function(t){var n,r;return new e(new u.Connection(null!==(n=t.connection.endpoint)&&void 0!==n?n:(0,u.clusterApiUrl)(t.connection.cluster),null!==(r=t.connection.commitmentOrConfig)&&void 0!==r?r:"confirmed"),t.connection.cluster,{debug:!!t.debug})}}]),e}();t.SolanaSdk=v},1296:function(e,t,n){"use strict";var r=n(20).default,a=n(111).default;Object.defineProperty(t,"__esModule",{value:!0}),t.sendSignedTransaction=t.sendTransactionWithRetry=t.DEFAULT_TIMEOUT=void 0;var i=n(19),s=n(32),o=n(752);function u(e,n){var a=e.signedTransaction,s=e.connection,u=e.timeout,p=void 0===u?t.DEFAULT_TIMEOUT:u;return i.__awaiter(this,void 0,void 0,r().mark((function e(){var t,u,l,y,f,m,b,v,h,T=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.serialize(),u=(0,o.getUnixTs)(),l=0,e.next=5,s.sendRawTransaction(t,{skipPreflight:!0});case 5:return y=e.sent,null===n||void 0===n||n.log("Started awaiting confirmation for",y),f=!1,i.__awaiter(T,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f||!((0,o.getUnixTs)()-u=0)){e.next=47;break}if(!(h=b.logs[v]).startsWith("Program log: ")){e.next=44;break}throw null===n||void 0===n||n.log(b.logs),new Error("Transaction failed: "+h.slice(13));case 44:--v,e.next=39;break;case 47:throw new Error(JSON.stringify(b.err));case 48:null===n||void 0===n||n.error("Got this far.");case 49:return e.prev=49,f=!0,e.finish(49);case 52:return null===n||void 0===n||n.log("Latency (ms)",y,(0,o.getUnixTs)()-u),e.abrupt("return",{txId:y,slot:l});case 54:case"end":return e.stop()}}),e,null,[[9,21,49,52],[27,33]])})))}function c(e,t,n,a){return i.__awaiter(this,void 0,void 0,r().mark((function i(){var s,o,u,c,d;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e._recentBlockhash(e._disableBlockhashCaching);case 2:return t.recentBlockhash=r.sent,s=t.serializeMessage(),o=t._serialize(s),u=o.toString("base64"),c=[u,{encoding:"base64",commitment:n}],r.next=10,e._rpcRequest("simulateTransaction",c,a);case 10:if(!(d=r.sent).error){r.next=13;break}throw new Error("failed to simulate transaction: "+d.error.message);case 13:return r.abrupt("return",d.result);case 14:case"end":return r.stop()}}),i)})))}function d(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"recent",s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u=arguments.length>5?arguments[5]:void 0;return i.__awaiter(this,void 0,void 0,r().mark((function c(){var d,p,l,y=this;return r().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return d=!1,p={slot:0,confirmations:0,err:null},l=0,c.next=5,new Promise((function(c,f){return i.__awaiter(y,void 0,void 0,r().mark((function y(){var m=this;return r().wrap((function(y){for(;;)switch(y.prev=y.next){case 0:setTimeout((function(){d||(d=!0,null===u||void 0===u||u.log("Rejecting for timeout..."),f({timeout:!0}))}),t);try{l=n.onSignature(e,(function(e,t){d=!0,p={err:e.err,slot:t.slot,confirmations:0},e.err?(null===u||void 0===u||u.log("Rejected via websocket",e.err),f(p)):(null===u||void 0===u||u.log("Resolved via websocket",e),c(p))}),a)}catch(b){d=!0,null===u||void 0===u||u.error("WS error in setup",e,b)}case 2:if(d||!s){y.next=8;break}return i.__awaiter(m,void 0,void 0,r().mark((function t(){var a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.getSignatureStatuses([e]);case 3:a=t.sent,p=a&&a.value[0],d||(p?p.err?(null===u||void 0===u||u.error("REST error for",e,p),d=!0,f(p.err)):p.confirmations?(null===u||void 0===u||u.log("REST confirmation for",e,p),d=!0,c(p)):null===u||void 0===u||u.log("REST no confirmations for",e,p):null===u||void 0===u||u.log("REST null result for",e,p)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),d||null===u||void 0===u||u.error("REST connection error: txid",e,t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])}))),y.next=6,(0,o.sleep)(2e3);case 6:y.next=2;break;case 8:case"end":return y.stop()}}),y)})))}));case 5:return p=c.sent,n._signatureSubscriptions[l]&&n.removeSignatureListener(l),d=!0,null===u||void 0===u||u.log("Returning status",p),c.abrupt("return",p);case 10:case"end":return c.stop()}}),c)})))}t.DEFAULT_TIMEOUT=6e4,t.sendTransactionWithRetry=function(e,t,n,o,c,d){return i.__awaiter(this,void 0,void 0,r().mark((function i(){var p,l,y,f;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return p=new s.Transaction({feePayer:t.publicKey}),n.forEach((function(e){return p.add(e)})),r.next=4,e.getLatestBlockhash(c);case 4:if(p.recentBlockhash=r.sent.blockhash,!(o.length>0)){r.next=27;break}return r.next=8,t.signTransaction(p);case 8:l=a(o),r.prev=9,l.s();case 11:if((y=l.n()).done){r.next=17;break}return f=y.value,r.next=15,f.signTransaction(p);case 15:r.next=11;break;case 17:r.next=22;break;case 19:r.prev=19,r.t0=r.catch(9),l.e(r.t0);case 22:return r.prev=22,l.f(),r.finish(22);case 25:r.next=29;break;case 27:return r.next=29,t.signTransaction(p);case 29:return r.next=31,u({connection:e,signedTransaction:p},d);case 31:return r.abrupt("return",r.sent);case 32:case"end":return r.stop()}}),i,null,[[9,19,22,25]])})))},t.sendSignedTransaction=u},1320:function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=1320},1358:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransferResponse=void 0,t.getTransferResponse=function(e){switch(e.status){case"success":return{status:e.status,txId:e.txId};case"error":throw new Error(e.message);default:throw new Error("Should never happen")}}},1359:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getBalance=void 0;var a=n(19),i=n(121);t.getBalance=function(e,t,n,s){return a.__awaiter(this,void 0,void 0,r().mark((function e(){var a,o,u,c,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=18,e.next=3,t.balance.getAllBalances({ownerAddress:n});case 3:if(o=e.sent,u=o.result,"ETH"!==s.assetClass){e.next=11;break}if(!(c=u.find((function(e){return""===e.token_address})))){e.next=9;break}return e.abrupt("return",(0,i.toBn)(c.balance.toString()).dividedBy(Math.pow(10,a)));case 9:e.next=15;break;case 11:if("ERC20"!==s.assetClass){e.next=15;break}if(!(d=u.find((function(e){var t;return(null===(t=e.token_address)||void 0===t?void 0:t.toLowerCase())===s.contract.toLowerCase()})))){e.next=15;break}return e.abrupt("return",(0,i.toBn)(d.balance.toString()).dividedBy(Math.pow(10,a)));case 15:return e.abrupt("return",(0,i.toBn)("0"));case 16:case"end":return e.stop()}}),e)})))}},1360:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IMX_ENV_CONFIG=t.IMX_CONFIG=void 0;var r=n(1361);t.IMX_CONFIG={mainnet:{apiAddressV1:"https://api.x.immutable.com/v1",apiAddressV2:"https://api.x.immutable.com/v2"},goerli:{apiAddressV1:"https://api.sandbox.x.immutable.com/v1",apiAddressV2:"https://api.sandbox.x.immutable.com/v2"}},t.IMX_ENV_CONFIG={testnet:Object.assign(Object.assign({},r.IMX_NETWORK_CONFIG.goerli),t.IMX_CONFIG.goerli),prod:Object.assign(Object.assign({},r.IMX_NETWORK_CONFIG.mainnet),t.IMX_CONFIG.mainnet)}},1361:function(e,t,n){"use strict";var r=n(20).default,a=n(204).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.IMX_ENV_CONFIG=t.IMX_NETWORK_CONFIG=t.ImxWallet=void 0;var o=n(19),u=n(963),c=n(2811),d=n(2812);Object.defineProperty(t,"IMX_ENV_CONFIG",{enumerable:!0,get:function(){return d.IMX_ENV_CONFIG}}),Object.defineProperty(t,"IMX_NETWORK_CONFIG",{enumerable:!0,get:function(){return d.IMX_NETWORK_CONFIG}});var p,l=function(){function e(t){var n=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.ImxWalletProviderEnum.NONE,l=arguments.length>2?arguments[2]:void 0,y=arguments.length>3&&void 0!==arguments[3]?arguments[3]:localStorage;i(this,e),this.env=t,this.provider=s,this.iframeOptions=l,this.storage=y,this.state=Object.keys(p).reduce((function(e,t){return Object.assign(Object.assign({},e),a({},t,n.storage.getItem(t)||""))}),{}),this.status=this.state[p.IMX_ADDRESS]?"connected":"disconnected",this.network=Object.assign(Object.assign({},d.IMX_ENV_CONFIG[this.env]),{env:this.env}),this.link=new u.Link(this.network.linkAddress,this.iframeOptions,"v3"),this.connect=function(){return o.__awaiter(n,void 0,void 0,r().mark((function e(){var t,n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.link.setup(this.getSetupOptions());case 3:if(!(t=e.sent).address||!t.starkPublicKey){e.next=12;break}return this.status="connected",this.state=(a(n={},p.IMX_ADDRESS,t.address),a(n,p.IMX_STARK_KEY,t.starkPublicKey),a(n,p.IMX_ETH_NETWORK,t.ethNetwork),a(n,p.IMX_PROVIDER,t.providerPreference),n),this.setValue(p.IMX_ADDRESS,t.address),this.setValue(p.IMX_STARK_KEY,t.starkPublicKey),this.setValue(p.IMX_ETH_NETWORK,t.ethNetwork),this.setValue(p.IMX_PROVIDER,t.providerPreference),e.abrupt("return",t);case 12:throw new Error("There is no address or starkAddress in response");case 15:throw e.prev=15,e.t0=e.catch(0),console.error("Connection failed with reason",e.t0),e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,15]])})))},this.disconnect=function(){Object.keys(p).forEach((function(e){return n.setValue(e,"")})),n.status="disconnected"},this.getConnectionData=function(){return{address:n.state[p.IMX_ADDRESS],starkPublicKey:n.state[p.IMX_STARK_KEY],ethNetwork:n.state[p.IMX_ETH_NETWORK],providerPreference:n.state[p.IMX_PROVIDER],link:n.link,status:n.status}}}return s(e,[{key:"getSetupOptions",value:function(){return this.provider?{providerPreference:u.ProviderPreference[this.provider]}:{}}},{key:"setValue",value:function(e,t){return this.state[e]=t,this.storage.setItem(e,t)}}]),e}();t.ImxWallet=l,function(e){e.IMX_STARK_KEY="IMX_STARK_KEY",e.IMX_ADDRESS="IMX_ADDRESS",e.IMX_PROVIDER="IMX_PROVIDER",e.IMX_ETH_NETWORK="IMX_ETH_NETWORK"}(p||(p={}))},1362:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.calcBuyerBaseFee=t.getTakeAssetType=t.unionPartsToParts=t.convertToEthereumAddress=t.getPreparedOrder=void 0;var i=n(19),s=n(45),o=n(300),u=n(64),c=n(267);function d(e){if(!(0,o.isRealBlockchainSpecified)(e))throw new Error("Not a union or contract address: "+e);var t=e.split(":"),n=r(t,2),a=n[0],i=n[1];if(a!==s.Blockchain.ETHEREUM&&a!==s.Blockchain.IMMUTABLEX)throw new Error("Not an Ethereum/Immutablex address");return(0,u.toAddress)(i)}t.getPreparedOrder=function(e,t){return i.__awaiter(this,void 0,void 0,a().mark((function n(){return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!("order"in e)){n.next=2;break}return n.abrupt("return",e.order);case 2:if(!("orderId"in e)){n.next=4;break}return n.abrupt("return",t.order.getOrderById({id:e.orderId}));case 4:throw new Error("Incorrect request");case 5:case"end":return n.stop()}}),n)})))},t.convertToEthereumAddress=d,t.unionPartsToParts=function(e){return(null===e||void 0===e?void 0:e.map((function(e){return{account:d(e.account),value:e.value}})))||[]},t.getTakeAssetType=function(e){var t=(0,c.getCurrencyAssetType)(e);switch(t["@type"]){case"ERC20":return{assetClass:t["@type"],contract:d(t.contract)};case"ETH":return{assetClass:t["@type"]};default:throw new Error("Invalid take asset type")}},t.calcBuyerBaseFee=function(e){if("IMMUTABLEX_RARIBLE_V1"!==e.data["@type"])throw new Error('Unsupported order type "'.concat(e.data["@type"],'", expected "IMMUTABLEX_RARIBLE_V1"'));return(e.data.originFees||[]).reduce((function(e,t){return e+t.value}),0)}},1373:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=t.retry=void 0;var r=n(907);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return r.retry}}),Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return r.delay}})},1374:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFlowCurrencyFromAssetType=void 0;var r=n(269);t.getFlowCurrencyFromAssetType=function(e){if("FLOW_FT"===e["@type"])return(0,r.getFungibleTokenName)(e.contract);throw new Error("Invalid asset type")}},1375:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getSimpleFlowFungibleBalance=void 0;var a=n(19),i=n(631),s=n(986),o=n(176),u=n(1374),c=n(269);t.getSimpleFlowFungibleBalance=function(e,t,n){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var d,p,l;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return d=(0,c.parseFlowAddressFromUnionAddress)(t),p=(0,u.getFlowCurrencyFromAssetType)(n),r.next=4,(0,i.getFungibleBalanceSimple)({network:s.ENV_CONFIG[e].network,address:d,currency:p});case 4:return l=r.sent,r.abrupt("return",(0,o.toBn)(l));case 6:case"end":return r.stop()}}),a)})))}},1377:function(e,t){},146:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19);r.__exportStar(n(2474),t),r.__exportStar(n(2475),t),r.__exportStar(n(2476),t),r.__exportStar(n(2477),t),r.__exportStar(n(2478),t),r.__exportStar(n(2479),t)},1495:function(e,t){},1528:function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=1528},1622:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19);r.__exportStar(n(2939),t),r.__exportStar(n(2940),t)},1639:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(19).__exportStar(n(3013),t)},1644:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default,s=n(37).default,o=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.NFIDConnectionProvider=void 0;var u=n(19),c=n(162),d=n(178),p=n(178),l=n(178),y=n(3488),f="NFID",m=function(e){s(n,e);var t=o(n);function n(e){var r;return a(this,n),(r=t.call(this)).config=e,r.instance=(0,p.cache)((function(){return r._connect()})),r.connection=r.instance.pipe((0,c.mergeMap)((function(e){return(0,d.connectToWeb3)(e.provider,{disconnect:function(){return e.disconnect()}})})),(0,c.startWith)((0,l.getStateConnecting)({providerId:f}))),r}return i(n,[{key:"_connect",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y.nfid.init(this.config);case 2:return e.next=4,y.nfid.login();case 4:return e.abrupt("return",y.nfid);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"getId",value:function(){return f}},{key:"getConnection",value:function(){return this.connection}},{key:"getOption",value:function(){return Promise.resolve(f)}},{key:"isAutoConnected",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)})))}},{key:"isConnected",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.instance.pipe((0,c.first)()).toPromise();case 2:return t=e.sent,e.abrupt("return",t.isIframeInstantiated&&t.isAuthenticated);case 4:case"end":return e.stop()}}),e,this)})))}}]),n}(l.AbstractConnectionProvider);t.NFIDConnectionProvider=m},1645:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19);r.__exportStar(n(3492),t),r.__exportStar(n(3493),t)},1650:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default,s=n(37).default,o=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TorusConnectionProvider=void 0;var u=n(19),c=n(162),d=n(178),p="torus",l=function(e){s(l,e);var t=o(l);function l(e){var n;return a(this,l),(n=t.call(this)).config=e,n.instance=(0,d.cache)((function(){return n._connect()})),n.connection=n.instance.pipe((0,c.mergeMap)((function(e){return(0,d.connectToWeb3)(e.provider,{disconnect:function(){return e.cleanUp()}})})),(0,c.startWith)((0,d.getStateConnecting)({providerId:p}))),n}return i(l,[{key:"_connect",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){var t,a,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then((function(){return u.__importStar(n(3501))}));case 2:return t=e.sent,a=t.default,i=new a,e.next=7,i.init(this.config);case 7:return e.next=9,i.login();case 9:return e.abrupt("return",i);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"getId",value:function(){return p}},{key:"getConnection",value:function(){return this.connection}},{key:"getOption",value:function(){return Promise.resolve(p)}},{key:"isAutoConnected",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)})))}},{key:"isConnected",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.instance.pipe((0,c.first)()).toPromise();case 2:return t=e.sent,e.abrupt("return",!(!(null===t||void 0===t?void 0:t.isInitialized)||!(null===t||void 0===t?void 0:t.isLoggedIn)));case 4:case"end":return e.stop()}}),e,this)})))}}]),l}(d.AbstractConnectionProvider);t.TorusConnectionProvider=l},1657:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default,s=n(203).default,o=n(37).default,u=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkConnectionProvider=void 0;var c=n(19),d=n(143),p=n(162),l=n(178),y="walletlink",f=function(e){o(f,e);var t=u(f);function f(e,n){var i;return a(this,f),(i=t.call(this)).config=e,i.walletLinkOptions=n,i.instance=(0,l.cache)((function(){return i._connect()})),i.connection=(0,d.defer)((function(){return i.instance.pipe((0,p.mergeMap)((function(e){return(0,l.connectToWeb3)(e.walletLinkWeb3Provider,{disconnect:function(){return c.__awaiter(s(i),void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.walletLink.disconnect());case 1:case"end":return t.stop()}}),t)})))}})})),(0,p.startWith)((0,l.getStateConnecting)({providerId:y})))})),i}return i(f,[{key:"_connect",value:function(){return c.__awaiter(this,void 0,void 0,r().mark((function e(){var t,a,i,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then((function(){return c.__importStar(n(3553))}));case 2:return t=e.sent,a=t.default,i=new a(this.walletLinkOptions),s=i.makeWeb3Provider(this.config.url,this.config.networkId),e.next=8,s.enable();case 8:return e.abrupt("return",{walletLink:i,walletLinkWeb3Provider:s});case 9:case"end":return e.stop()}}),e,this)})))}},{key:"getId",value:function(){return y}},{key:"getConnection",value:function(){return this.connection}},{key:"getOption",value:function(){return Promise.resolve(y)}},{key:"isAutoConnected",value:function(){return c.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)})))}},{key:"isConnected",value:function(){var e;return c.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.instance.pipe((0,p.first)()).toPromise();case 2:if(t.t1=e=t.sent,t.t0=null===t.t1,t.t0){t.next=6;break}t.t0=void 0===e;case 6:if(!t.t0){t.next=10;break}t.t2=void 0,t.next=11;break;case 10:t.t2=e.walletLinkWeb3Provider.isConnected();case 11:return t.abrupt("return",!!t.t2);case 12:case"end":return t.stop()}}),t,this)})))}}]),f}(l.AbstractConnectionProvider);t.WalletLinkConnectionProvider=f},1658:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default,i=n(21).default,s=n(22).default,o=n(37).default,u=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.PhantomConnectionProvider=void 0;var c=n(19),d=n(143),p=n(143),l=n(162),y=n(178),f=n(178),m=n(3612);c.__exportStar(n(3613),t);var b="phantom",v=function(e){o(n,e);var t=u(n);function n(e){var r;return i(this,n),(r=t.call(this)).config=e,r.instance=(0,y.cache)((function(){return r._connect()})),r.connection=r.instance.pipe((0,l.mergeMap)((function(e){return r.toConnectState(e)})),(0,l.startWith)((0,y.getStateConnecting)({providerId:b}))),r}return s(n,[{key:"_connect",value:function(){return c.__awaiter(this,void 0,void 0,a().mark((function e(){var t,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,m.waitUntil)((function(){return"solana"in window}),100,1e3);case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:if(!("solana"in window)){e.next=14;break}if(t=window,!(n=t.solana).isPhantom){e.next=14;break}return e.next=13,n.connect(this.config);case 13:return e.abrupt("return",n);case 14:throw new Error("No solana provider found");case 15:case"end":return e.stop()}}),e,this,[[0,5]])})))}},{key:"getConnectedStatus",value:function(e){return new d.Observable((function(t){function n(){t.next("connected")}function r(){t.next("disconnected")}t.next("connected"),e.on("connect",n),e.on("disconnect",r),t.add((function(){e.removeListener("connect",n),e.removeListener("disconnect",r)}))}))}},{key:"getAddress",value:function(e){var t=this;return new d.Observable((function(n){var r;n.next(null===(r=e.publicKey)||void 0===r?void 0:r.toString()),e.on("accountChanged",(function(r){return c.__awaiter(t,void 0,void 0,a().mark((function t(){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=4;break}n.next(r.toString()),t.next=7;break;case 4:return t.next=6,e.connect();case 6:n.next(null===(i=e.publicKey)||void 0===i?void 0:i.toString());case 7:case"end":return t.stop()}}),t)})))}))}))}},{key:"toConnectState",value:function(e){return(0,p.combineLatest)([this.getAddress(e),this.getConnectedStatus(e)]).pipe((0,l.distinctUntilChanged)((function(e,t){return e[0]===t[0]&&e[1]===t[1]})),(0,l.map)((function(t){var n=r(t,2),a=n[0];if("connected"===n[1]&&a&&e.publicKey){var i={address:a,publicKey:e.publicKey,signTransaction:e.signTransaction,signAllTransactions:e.signAllTransactions,signMessage:e.signMessage};return(0,f.getStateConnected)({connection:i})}return(0,f.getStateDisconnected)()})))}},{key:"getId",value:function(){return b}},{key:"getConnection",value:function(){return this.connection}},{key:"getOption",value:function(){return Promise.resolve(b)}},{key:"isAutoConnected",value:function(){return c.__awaiter(this,void 0,void 0,a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)})))}},{key:"isConnected",value:function(){return c.__awaiter(this,void 0,void 0,a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.instance.pipe((0,l.first)()).toPromise();case 2:return t=e.sent,e.abrupt("return",!!(null===t||void 0===t?void 0:t.isConnected));case 4:case"end":return e.stop()}}),e,this)})))}}]),n}(y.AbstractConnectionProvider);t.PhantomConnectionProvider=v},1659:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default,i=n(21).default,s=n(22).default,o=n(37).default,u=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SolflareConnectionProvider=void 0;var c=n(19),d=n(143),p=n(162),l=n(178),y=c.__importDefault(n(3981));c.__exportStar(n(3619),t);var f="solflare",m=function(e){o(n,e);var t=u(n);function n(e){var r;return i(this,n),(r=t.call(this)).config=e,r.init(),r}return s(n,[{key:"init",value:function(){var e=this;this.instance=(0,l.cache)((function(){return e._connect()})),this.connection=this.instance.pipe((0,p.mergeMap)((function(t){return e.toConnectState(t,(function(){return t.disconnect()}))})),(0,p.startWith)((0,l.getStateConnecting)({providerId:f})))}},{key:"_connect",value:function(){return c.__awaiter(this,void 0,void 0,a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new y.default(this.config),e.next=3,t.connect();case 3:return e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"getConnectedStatus",value:function(e){var t=this;return new d.Observable((function(n){n.next("connected");var r=function(){n.next("connected")},a=function(){t.init(),n.next("disconnected")};e.on("connect",r),e.on("disconnect",a),n.add((function(){e.removeListener("connect",r),e.removeListener("disconnect",a)}))}))}},{key:"getAddress",value:function(e){return new d.Observable((function(t){var n;t.next(null===(n=e.publicKey)||void 0===n?void 0:n.toString())}))}},{key:"toConnectState",value:function(e,t){return(0,d.combineLatest)([this.getAddress(e),this.getConnectedStatus(e)]).pipe((0,p.distinctUntilChanged)((function(e,t){return e[0]===t[0]&&e[1]===t[1]})),(0,p.map)((function(n){var a=r(n,2),i=a[0];if("connected"===a[1]&&i&&e.publicKey){var s={address:i,publicKey:e.publicKey,signTransaction:e.signTransaction.bind(e),signAllTransactions:e.signAllTransactions.bind(e),signMessage:e.signMessage.bind(e)};return(0,l.getStateConnected)({connection:s,disconnect:t})}return(0,l.getStateDisconnected)()})))}},{key:"getId",value:function(){return f}},{key:"getConnection",value:function(){return this.connection}},{key:"getOption",value:function(){return Promise.resolve(f)}},{key:"isAutoConnected",value:function(){return c.__awaiter(this,void 0,void 0,a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)})))}},{key:"isConnected",value:function(){return c.__awaiter(this,void 0,void 0,a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.instance.pipe((0,p.first)()).toPromise();case 2:return t=e.sent,e.abrupt("return",!!(null===t||void 0===t?void 0:t.isConnected));case 4:case"end":return e.stop()}}),e,this)})))}}]),n}(l.AbstractConnectionProvider);t.SolflareConnectionProvider=m},1661:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default,i=n(21).default,s=n(22).default,o=n(37).default,u=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ImmutableXLinkConnectionProvider=void 0;var c=n(19),d=n(143),p=n(162),l=n(1361),y=n(178),f="immutablex",m=function(e){o(n,e);var t=u(n);function n(e){var r;return i(this,n),(r=t.call(this)).config=e,r.instance=(0,y.cache)((function(){return r._connect()})),r.connection=(0,d.defer)((function(){return r.instance.pipe((0,p.mergeMap)((function(e){return r.toConnectState(e.wallet)})),(0,p.startWith)((0,y.getStateConnecting)({providerId:f})))})),r}return s(n,[{key:"_connect",value:function(){return c.__awaiter(this,void 0,void 0,a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("connected"===(t=new l.ImxWallet(this.config.env)).getConnectionData().status){e.next=4;break}return e.next=4,t.connect();case 4:return e.abrupt("return",{wallet:t});case 5:case"end":return e.stop()}}),e,this)})))}},{key:"getId",value:function(){return f}},{key:"getAddress",value:function(e){return new d.Observable((function(t){t.next(e.getConnectionData().address)}))}},{key:"getConnectedStatus",value:function(e){return new d.Observable((function(e){e.next("connected")}))}},{key:"toConnectState",value:function(e){var t=this;return(0,d.combineLatest)([this.getAddress(e),this.getConnectedStatus(e)]).pipe((0,p.distinctUntilChanged)((function(e,t){return e[0]===t[0]&&e[1]===t[1]})),(0,p.map)((function(n){var i=r(n,2),s=i[0];if("connected"===i[1]&&s){var o={address:s,wallet:e};return(0,y.getStateConnected)({connection:o,disconnect:function(){return c.__awaiter(t,void 0,void 0,a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.disconnect();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))}})}return(0,y.getStateDisconnected)()})))}},{key:"getConnection",value:function(){return this.connection}},{key:"getOption",value:function(){return Promise.resolve(f)}},{key:"isAutoConnected",value:function(){return c.__awaiter(this,void 0,void 0,a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)})))}},{key:"isConnected",value:function(){var e;return c.__awaiter(this,void 0,void 0,a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.instance.pipe((0,p.first)()).toPromise();case 2:if(t.t1=e=t.sent,t.t0=null===t.t1,t.t0){t.next=6;break}t.t0=void 0===e;case 6:if(!t.t0){t.next=10;break}t.t2=void 0,t.next=11;break;case 10:t.t2=e.wallet.getConnectionData().status;case 11:return t.t3=t.t2,t.abrupt("return","connected"===t.t3);case 13:case"end":return t.stop()}}),t,this)})))}}]),n}(y.AbstractConnectionProvider);t.ImmutableXLinkConnectionProvider=m},1662:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default,i=n(21).default,s=n(22).default,o=n(37).default,u=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.auth0Login=t.MattelConnectionProvider=void 0;var c=n(19),d=n(178),p=n(143),l=n(162),y=n(45),f="mattel",m=function(e){o(m,e);var y=u(m);function m(e){var t;return i(this,m),(t=y.call(this)).config=e,t.instance=(0,d.cache)((function(){return t._connect()})),t.connection=t.instance.pipe((0,l.mergeMap)((function(e){return t.toConnectState(e)})),(0,l.startWith)((0,d.getStateConnecting)({providerId:f}))),t}return s(m,[{key:"setPopupConfig",value:function(e){var t;this.config.options=Object.assign(Object.assign({},this.config.options),{auth0PopupOptions:Object.assign(Object.assign({},(null===(t=this.config.options)||void 0===t?void 0:t.auth0PopupOptions)||{}),e||{})})}},{key:"toConnectState",value:function(e){var n=this,r=e.magic,i=e.fcl,s=e.auth0,o=function(){return c.__awaiter(n,void 0,void 0,a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([r.user.logout(),r.wallet.disconnect()]);case 2:return e.next=4,s.logout(Object.assign({clientId:this.config.auth0ClientId,logoutParams:{returnTo:window.location.href}},(null===(t=this.config.options)||void 0===t?void 0:t.auth0LogoutOptions)||{}));case 4:case"end":return e.stop()}}),e,this)})))};return(0,p.defer)((function(){return c.__awaiter(n,void 0,void 0,a().mark((function e(){var n,o,u,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,b(r);case 3:if(!e.sent){e.next=8;break}return e.next=6,r.user.getInfo();case 6:return o=e.sent,e.abrupt("return",{user:o,fcl:i,auth:r.flow.authorization});case 8:return e.next=10,(0,t.auth0Login)({auth0ClientId:this.config.auth0ClientId,auth0Domain:this.config.auth0Domain,auth0RedirectUrl:this.config.auth0RedirectUrl,auth0:s,auth0PopupOptions:null===(n=this.config.options)||void 0===n?void 0:n.auth0PopupOptions});case 10:if(!(u=e.sent)){e.next=14;break}return e.next=14,r.openid.loginWithOIDC({jwt:u,providerId:this.config.magicProviderId});case 14:return e.next=16,r.user.getInfo();case 16:return c=e.sent,e.abrupt("return",{user:c,fcl:i,auth:r.flow.authorization});case 20:return e.prev=20,e.t0=e.catch(0),e.abrupt("return",{error:e.t0});case 23:case"end":return e.stop()}}),e,this,[[0,20]])})))})).pipe((0,l.map)((function(e){var t;return e&&"error"in e?(0,d.getStateDisconnected)({error:e.error}):(null===(t=null===e||void 0===e?void 0:e.user)||void 0===t?void 0:t.publicAddress)?(0,d.getStateConnected)({connection:{fcl:e.fcl,address:e.user.publicAddress,auth:e.auth,magic:r},disconnect:o}):(0,d.getStateDisconnected)()})))}},{key:"_connect",value:function(){var e;return c.__awaiter(this,void 0,void 0,a().mark((function t(){var i,s,o,u,d,p,l,y,f;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([Promise.resolve().then((function(){return c.__importStar(n(3628))})),Promise.resolve().then((function(){return c.__importStar(n(3629))})),Promise.resolve().then((function(){return c.__importStar(n(3630))})),Promise.resolve().then((function(){return c.__importStar(n(682))})),Promise.resolve().then((function(){return c.__importStar(n(1529))}))]);case 2:return i=t.sent,s=r(i,5),o=s[0].Magic,u=s[1].FlowExtension,d=s[2].OpenIdExtension,p=s[3],l=s[4],y=new o(this.config.magicAPIKey,{extensions:[new d,new u({rpcUrl:this.config.accessNode,network:this.config.network})]}),p.config().put("accessNode.api",this.config.accessNode).put("env",this.config.network),t.next=13,l.createAuth0Client(Object.assign({domain:this.config.auth0Domain,clientId:this.config.auth0ClientId},(null===(e=this.config.options)||void 0===e?void 0:e.auth0ClientOptions)||{}));case 13:return f=t.sent,t.abrupt("return",{fcl:p,magic:y,auth0:f});case 15:case"end":return t.stop()}}),t,this)})))}},{key:"getId",value:function(){return f}},{key:"getConnection",value:function(){return this.connection}},{key:"getOption",value:function(){return Promise.resolve(f)}},{key:"isAutoConnected",value:function(){return c.__awaiter(this,void 0,void 0,a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)})))}},{key:"isConnected",value:function(){return c.__awaiter(this,void 0,void 0,a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.instance.pipe((0,l.first)()).toPromise();case 2:return t=e.sent,e.next=5,null===t||void 0===t?void 0:t.fcl.currentUser();case 5:return e.abrupt("return",!!e.sent);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"isAuth0Authenticated",value:function(){return c.__awaiter(this,void 0,void 0,a().mark((function e(){var t,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.instance.pipe((0,l.first)()).toPromise();case 2:return t=e.sent,n=t.auth0,e.abrupt("return",n.isAuthenticated());case 5:case"end":return e.stop()}}),e,this)})))}},{key:"sardinePurchase",value:function(e){return c.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.instance.pipe((0,l.first)()).toPromise();case 2:if(!(n=t.sent)){t.next=7;break}return t.abrupt("return",n.magic.nft.purchase({nft:Object.assign({blockchainNftId:v(e.orderId),contractAddress:v(e.orderMaker),network:"flow",platform:"mattel",type:"nft_secondary"},e.purchaseOptions.nft),identityPrefill:e.purchaseOptions.identityPrefill||{}}));case 7:throw new Error("Context is not prepared");case 8:case"end":return t.stop()}}),t,this)})))}}]),m}(d.AbstractConnectionProvider);t.MattelConnectionProvider=m;function b(e){return c.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new Promise((function(e,t){n=setTimeout((function(){return t(new Error("Session Checking Timed Out"))}),1e4)})),t.abrupt("return",Promise.race([e.user.isLoggedIn(),r]).then((function(e){return clearTimeout(n),e})));case 2:case"end":return t.stop()}}),t)})))}function v(e){var t=e.split(":"),n=r(t,2),a=n[0],i=n[1];if(a!==y.Blockchain.FLOW)throw new Error("Not Flow entity ".concat(i));return i}t.auth0Login=function(e){var t=e.auth0,r=e.auth0RedirectUrl,i=e.auth0ClientId,s=e.auth0Domain,o=e.auth0PopupOptions;return c.__awaiter(void 0,void 0,void 0,a().mark((function e(){var u,d,p,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.isAuthenticated();case 3:u=e.sent,e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),u=!1;case 9:if(u){e.next=23;break}return e.prev=10,e.next=13,t.loginWithPopup(Object.assign({authorizationParams:{domain:s,clientId:i,redirect_uri:r},timeoutInSeconds:180},o||{}));case 13:e.next=23;break;case 15:return e.prev=15,e.t1=e.catch(10),e.next=19,Promise.resolve().then((function(){return c.__importStar(n(1529))}));case 19:throw d=e.sent,p=d.PopupTimeoutError,e.t1 instanceof p&&e.t1.popup.close(),e.t1;case 23:return e.next=25,t.getIdTokenClaims();case 25:return l=e.sent,e.abrupt("return",null===l||void 0===l?void 0:l.__raw);case 27:case"end":return e.stop()}}),e,null,[[0,6],[10,15]])})))}},1663:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default,s=n(37).default,o=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletConnectConnectionProviderV2=void 0;var u=n(19),c=n(162),d=n(178),p="walletconnect_v2",l=function(e){s(l,e);var t=o(l);function l(e){var n;return a(this,l),(n=t.call(this)).config=e,n.instance=(0,d.cache)((function(){return n._connect()})),n.connection=n.instance.pipe((0,c.mergeMap)((function(e){return(0,d.connectToWeb3)(e,{disconnect:function(){return e.disconnect()}})})),(0,c.startWith)((0,d.getStateConnecting)({providerId:p}))),n}return i(l,[{key:"_connect",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){var t,a,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then((function(){return u.__importStar(n(3631))}));case 2:return t=e.sent,a=t.EthereumProvider,e.next=6,a.init(this.config);case 6:return i=e.sent,e.next=9,i.enable();case 9:return e.abrupt("return",i);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"getId",value:function(){return p}},{key:"getConnection",value:function(){return this.connection}},{key:"getOption",value:function(){return Promise.resolve(p)}},{key:"isAutoConnected",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)})))}},{key:"isConnected",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.instance.pipe((0,c.first)()).toPromise();case 2:return t=e.sent,e.abrupt("return",!!(null===t||void 0===t?void 0:t.connected));case 4:case"end":return e.stop()}}),e,this)})))}}]),l}(d.AbstractConnectionProvider);t.WalletConnectConnectionProviderV2=l},1678:function(e,t,n){"use strict";(function(e){var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAssetType=t.OffRampClient=void 0;var s=n(19),o=s.__importDefault(n(119)),u=n(45),c=n(298),d="https://crypto.sardine.ai",p="https://crypto.sandbox.sardine.ai",l=function(){function t(e,n,i){var c=this;a(this,t),this.clientId=e,this.clientSecret=n,this.availableBlockchains=[u.Blockchain.ETHEREUM,u.Blockchain.POLYGON].map((function(e){return e.toLowerCase()}));var l="prod"===i;this.offrampUrl=l?d:p,this.client=o.default.create({baseURL:l?"https://api.sardine.ai/v1":"https://api.sandbox.sardine.ai/v1",headers:{"Content-Type":"application/json"}}),this.client.interceptors.request.use((function(e){return s.__awaiter(c,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.headers.Authorization="Basic ".concat(this.getBase64Token()),t.abrupt("return",e);case 2:case"end":return t.stop()}}),t,this)})))}))}return i(t,[{key:"getBase64Token",value:function(){var t="".concat(this.clientId,":").concat(this.clientSecret);return new e(t).toString("base64")}},{key:"getToken",value:function(){return s.__awaiter(this,void 0,void 0,r().mark((function e(){var t,n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.clientToken&&this.expiresAt&&new Date1&&void 0!==arguments[1]&&arguments[1]?e:e.toLowerCase();return!!i.includes(n)||t.CANCEL_MESSAGES.some((function(e){return null===n||void 0===n?void 0:n.includes(e)}))}t.isCancelCode=s,t.isCancelMessage=o,t.isInfoLevel=function(e){var n;if(!(null===e||void 0===e?void 0:e.message)||"string"!==typeof(null===e||void 0===e?void 0:e.message))return!1;var r=null===e||void 0===e?void 0:e.message.toLowerCase();return!(!s(null===(n=null===e||void 0===e?void 0:e.error)||void 0===n?void 0:n.code)&&!o(r,!0))||t.COMMON_INFO_MESSAGES.some((function(e){return null===r||void 0===r?void 0:r.includes(e)}))},t.isEVMWarning=function(e){if((null===e||void 0===e?void 0:e.name)&&["WrongNetworkWarning","InsufficientFundsError"].includes(null===e||void 0===e?void 0:e.name))return!0;var t=null===e||void 0===e?void 0:e.message.toLowerCase();return a.some((function(e){return null===t||void 0===t?void 0:t.includes(e)}))},t.isTezosWarning=function(e){var t,n="TezosProviderError"===e.name?e.error:e;return"UnknownBeaconError"===(null===n||void 0===n?void 0:n.name)&&"Aborted"===(null===n||void 0===n?void 0:n.title)||"NotGrantedTempleWalletError"===(null===n||void 0===n?void 0:n.name)||"NoAddressBeaconError"===(null===n||void 0===n?void 0:n.name)||"NoPrivateKeyBeaconError"===(null===n||void 0===n?void 0:n.name)||"BroadcastBeaconError"===(null===n||void 0===n?void 0:n.name)||"MissedBlockDuringConfirmationError"===(null===n||void 0===n?void 0:n.name)||"Error: timeout of 30000ms exceeded"===(null===n||void 0===n?void 0:n.message)||(null===(t=null===e||void 0===e?void 0:e.message)||void 0===t?void 0:t.endsWith("does not have enough funds for transaction"))},t.isSolanaWarning=function(e){var t;return"User rejected the request."===(null===e||void 0===e?void 0:e.name)||4001===(null===(t=null===e||void 0===e?void 0:e.error)||void 0===t?void 0:t.code)},t.FLOW_WARN_MESSAGES=["[Error Code: 1007] invalid proposal key","User rejected signature"],t.isFlowWarning=function(e){return t.FLOW_WARN_MESSAGES.some((function(t){var n;return null===(n=null===e||void 0===e?void 0:e.message)||void 0===n?void 0:n.includes(t)}))},t.getBlockchainByConnectorId=function(e){switch(e){case"beacon":return r.BlockchainGroup.TEZOS;case"fcl":case"mattel":return r.BlockchainGroup.FLOW;case"phantom":case"solflare":return r.BlockchainGroup.SOLANA;case"injected":case"fortmatic":case"iframe":case"immutablex":case"mew":case"portis":case"torus":case"walletconnect":case"walletlink":return r.BlockchainGroup.ETHEREUM;default:return}}},178:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19);r.__exportStar(n(1168),t),r.__exportStar(n(1749),t),r.__exportStar(n(607),t),r.__exportStar(n(1882),t),r.__exportStar(n(1884),t),r.__exportStar(n(1885),t),r.__exportStar(n(1886),t),r.__exportStar(n(1175),t)},1867:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.promiseSettledRequest=void 0;var a=n(19);t.promiseSettledRequest=function(e){return a.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.allSettled(e);case 2:return n=t.sent,t.abrupt("return",n.map((function(e){return"fulfilled"===e.status?e.value:void 0})));case 4:case"end":return t.stop()}}),t)})))}},1868:function(e,t,n){"use strict";function r(e){return new Promise((function(t){return setTimeout(t,e)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.conditionalRetry=t.delay=t.retry=void 0,t.retry=function e(t,n,a){return a().catch((function(i){if(0===t)throw i;return r(n).then((function(){return e(t-1,n,a)}))}))},t.delay=r,t.conditionalRetry=function e(t,n,a,i){return a().catch((function(s){if(0===t||!i(s))throw s;return r(n).then((function(){return e(t-1,n,a,i)}))}))}},1869:function(e,t,n){"use strict";var r=n(22).default,a=n(21).default,i=n(203).default,s=n(37).default,o=n(38).default,u=n(193).default;Object.defineProperty(t,"__esModule",{value:!0}),t.FAILED_TO_FETCH_ERROR=t.UserCancelError=t.WrappedError=t.WalletIsUndefinedError=void 0;var c=n(907),d=function(e){s(n,e);var t=o(n);function n(){var e;return a(this,n),(e=t.call(this,"Wallet is not defined")).name="WalletIsUndefinedError",Object.setPrototypeOf(i(e),n.prototype),e}return r(n)}(u(Error));t.WalletIsUndefinedError=d;var p=function(e){s(n,e);var t=o(n);function n(e,r){var s;return a(this,n),(s=t.call(this,r)).__IS_WRAPPED_ERROR__=!0,Object.setPrototypeOf(i(s),n.prototype),s.error=e,s}return r(n,null,[{key:"isWrappedError",value:function(e){if(e instanceof n)return!0;if((0,c.isObjectLike)(e)){if("WrappedError"===e.constructor.name)return!0;if(e.__IS_WRAPPED_ERROR__)return!0}return!1}}]),n}(u(Error));t.WrappedError=p;var l=function(e){s(n,e);var t=o(n);function n(e){var r;return a(this,n),(r=t.call(this,e,"Request cancelled by user")).__IS_WRAPPED_ERROR__=!0,r.name="UserCancelError",Object.setPrototypeOf(i(r),n.prototype),r}return r(n)}(p);t.UserCancelError=l,t.FAILED_TO_FETCH_ERROR="Failed to fetch"},1870:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorLogLevel=t.LogLevelConnector=t.createLogger=t.loggerConfig=void 0;var a,i=n(19),s=n(1871),o=n(298),u=n(45),c=n(1880),d=n(1881);function p(){var e;return i.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,c.getFingerprint)();case 2:return a=n.sent,n.abrupt("return",{service:t.loggerConfig.service,"@version":d.version,environment:"prod",domain:null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.host,fingerprint:a});case 4:case"end":return n.stop()}}),n)})))}t.loggerConfig={service:"wallet-connector",elkUrl:"https://logging.rarible.com/"},t.createLogger=function(){var e=this;return new s.RemoteLogger((function(n){return i.__awaiter(e,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,window.fetch(t.loggerConfig.elkUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)});case 2:case"end":return e.stop()}}),e)})))}),{initialContext:p(),dropBatchInterval:1e3,maxByteSize:30720})},function(e){e.ERROR="CONNECTOR_ERROR",e.WARNING="CONNECTOR_WARNING",e.INFO="CONNECTOR_INFO",e.SUCCESS="CONNECTOR_SUCCESS"}(a=t.LogLevelConnector||(t.LogLevelConnector={})),t.getErrorLogLevel=function(e,t){if(!t)return a.ERROR;var n=(0,o.getBlockchainByConnectorId)(t);return(0,o.isInfoLevel)(e)?a.INFO:n===u.BlockchainGroup.ETHEREUM&&(0,o.isEVMWarning)(e)||n===u.BlockchainGroup.TEZOS&&(0,o.isTezosWarning)(e)||n===u.BlockchainGroup.SOLANA&&(0,o.isSolanaWarning)(e)?a.WARNING:a.ERROR}},1880:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getFingerprint=t.UNRECOGNIZED=void 0;var a=n(19),i=a.__importDefault(n(3983));t.UNRECOGNIZED="UNRECOGNIZED",t.getFingerprint=function(){return a.__awaiter(this,void 0,void 0,r().mark((function e(){var n,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.default.load();case 3:return n=e.sent,e.next=6,n.get();case 6:return a=e.sent,e.abrupt("return",a.visitorId);case 10:return e.prev=10,e.t0=e.catch(0),e.abrupt("return",t.UNRECOGNIZED);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))}},1881:function(e){e.exports=JSON.parse('{"name":"@rarible/connector","version":"0.13.55","homepage":"","license":"ISC","publishConfig":{"access":"public"},"main":"build/index.js","types":"build/index.d.ts","files":["build"],"scripts":{"build":"tsc --project tsconfig-build.json","clean":"rimraf ./build","test":"jest --runInBand --forceExit","verify":"tsc --noEmit"},"dependencies":{"@fingerprintjs/fingerprintjs":"^3.3.6","@rarible/logger":"~0.9.12","@rarible/sdk-common":"^0.13.55"},"devDependencies":{"@types/jest":"^27.0.2","identity-obj-proxy":"^3.0.0","jest":"^27.2.4","jest-junit":"^15.0.0","ts-jest":"^27.0.3","typescript":"^4.8.4"},"peerDependencies":{"rxjs":">= 6.6.7 < 8.0.0","tslib":"^2.3.1"}}')},1882:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InjectedWeb3ConnectionProvider=t.DappType=void 0;var r=n(1883);Object.defineProperty(t,"DappType",{enumerable:!0,get:function(){return r.DappType}}),Object.defineProperty(t,"InjectedWeb3ConnectionProvider",{enumerable:!0,get:function(){return r.InjectedWeb3ConnectionProvider}})},1883:function(e,t,n){"use strict";var r=n(111).default,a=n(20).default,i=n(48).default,s=n(21).default,o=n(22).default,u=n(37).default,c=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.DappType=t.detectErrorCode=t.InjectedWeb3ConnectionProvider=void 0;var d=n(19),p=n(143),l=n(162),y=n(298);Object.defineProperty(t,"DappType",{enumerable:!0,get:function(){return y.DappType}});var f=n(1168),m=n(1175),b=n(607),v=n(1176),h=n(1179),T="injected",g=function(e){u(n,e);var t=c(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{prefer:[]};return s(this,n),(e=t.call(this)).config=r,e.connection=(0,p.defer)((function(){return function(e){return d.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r,s=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=k(e)){t.next=3;break}throw new Error("Injected provider not available");case 3:return t.next=5,(0,v.ethAccounts)(n);case 5:if((r=t.sent)&&0!==r.length){t.next=9;break}return t.next=9,w(n);case 9:n.on("disconnect",(function(e){return d.__awaiter(s,void 0,void 0,a().mark((function t(){var r,s;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!x(1013,e)){t.next=8;break}return t.next=3,n.request({method:"eth_accounts"});case 3:if(r=t.sent,s=i(r,1),!s[0]){t.next=8;break}return t.abrupt("return");case 8:case"end":return t.stop()}}),t)})))}));case 10:case"end":return t.stop()}}),t)})))}(r)})).pipe((0,l.mergeMap)((function(){return(0,m.promiseToObservable)(function(e){return d.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=k(e),t.abrupt("return",(0,p.combineLatest)([(0,v.getAddress)(n),(0,h.getChainId)(n)]).pipe((0,l.map)((function(e){var t=i(e,2),r=t[0],a=t[1];return r?{chainId:a,address:r,provider:n}:void 0}))));case 2:case"end":return t.stop()}}),t)})))}(r))})),(0,l.map)((function(e){if(e){return(0,b.getStateConnected)({connection:e,disconnect:function(){return"close"in e.provider?e.provider.close():"disconnect"in e.provider?e.provider.disconnect():Promise.resolve()}})}return(0,b.getStateDisconnected)()})),(0,l.startWith)((0,b.getStateConnecting)({providerId:T}))),e}return o(n,[{key:"getId",value:function(){return T}},{key:"getConnection",value:function(){return this.connection}},{key:"getOption",value:function(){var e=k(this.config);return Promise.resolve((0,y.getDappType)(e))}},{key:"isAutoConnected",value:function(){var e=k(this.config),t=(0,y.getDappType)(e);return Promise.resolve(function(e){if(!e)return!1;var t=new Set([y.DappType.Dapper]),n=new Set([y.DappType.Generic,y.DappType.Metamask,y.DappType.Coinbase]);return!(t.has(e)||n.has(e))}(t))}},{key:"isConnected",value:function(){return d.__awaiter(this,void 0,void 0,a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===(t=k(this.config))){e.next=5;break}return e.abrupt("return",(0,v.ethAccounts)(t).then((function(e){return void 0!==i(e,1)[0]})));case 5:return e.abrupt("return",Promise.resolve(!1));case 6:case"end":return e.stop()}}),e,this)})))}}]),n}(f.AbstractConnectionProvider);function w(e){return d.__awaiter(this,void 0,void 0,a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("function"!==typeof e.request){t.next=22;break}return t.prev=1,t.next=4,e.request({method:"eth_requestAccounts"});case 4:case 13:t.next=20;break;case 6:if(t.prev=6,t.t0=t.catch(1),!t.t0||!("code"in t.t0)||4001!==t.t0.code){t.next=10;break}return t.abrupt("return");case 10:return t.prev=10,t.next=13,e.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]});case 15:if(t.prev=15,t.t1=t.catch(10),"function"!==typeof e.enable){t.next=20;break}return t.next=20,e.enable();case 20:t.next=25;break;case 22:if("function"!==typeof e.enable){t.next=25;break}return t.next=25,e.enable();case 25:return t.abrupt("return",e);case 26:case"end":return t.stop()}}),t,null,[[1,6],[10,15]])})))}function k(e){var t,n=e.prefer,a=void 0,i="undefined"!==typeof window?window:void 0;if(!i)return a;if(i.ethereum){if(Array.isArray(i.ethereum.providers))if(Array.isArray(n)&&n.length){var s,o=r(n);try{var u=function(){var e=s.value,t=i.ethereum.providers.find((function(t){return(0,y.getDappType)(t)===e}));if(t)return a=t,"break"};for(o.s();!(s=o.n()).done;){if("break"===u())break}}catch(c){o.e(c)}finally{o.f()}}else a=i.ethereum.providers[0];(a=a||i.ethereum).autoRefreshOnNetworkChange=!1}else(null===(t=i.web3)||void 0===t?void 0:t.currentProvider)&&(a=i.web3.currentProvider);return a}function x(e,t){return("object"===typeof t&&null!==t&&"code"in t?t.code:void 0)===e}t.InjectedWeb3ConnectionProvider=g,t.detectErrorCode=x},1884:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1885:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1886:function(e,t,n){"use strict";var r=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.connectToWeb3=void 0;var a=n(143),i=n(162),s=n(607),o=n(1176),u=n(1179),c=n(1887);t.connectToWeb3=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.combineLatest)([(0,o.getAddress)(e),(0,u.getChainId)(e),(0,c.getConnectedStatus)(e)]).pipe((0,i.distinctUntilChanged)((function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]})),(0,i.map)((function(n){var a=r(n,3),i=a[0],o=a[1];if("connected"===a[2]&&i){var u={chainId:o,address:i,provider:e,disconnect:t.disconnect};return(0,s.getStateConnected)({connection:u})}return(0,s.getStateDisconnected)()})))}},1887:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getConnectedStatus=void 0;var r=n(143);t.getConnectedStatus=function(e){return"on"in e?new r.Observable((function(t){function n(){t.next("disconnected")}t.next("connected"),e.on("disconnected",n),"removeListener"in e&&t.add((function(){e.removeListener("disconnected",n)}))})):(0,r.concat)((0,r.of)("connected"),r.NEVER)}},1889:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletType=void 0,function(e){e.ETHEREUM="ETHEREUM",e.SOLANA="SOLANA",e.TEZOS="TEZOS",e.FLOW="FLOW",e.IMMUTABLEX="IMMUTABLEX"}(t.WalletType||(t.WalletType={}))},1890:function(e,t,n){"use strict";var r=n(21).default,a=n(22).default,i=n(203).default,s=n(37).default,o=n(38).default,u=n(193).default;Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=void 0;var c=function(e){s(n,e);var t=o(n);function n(e){var a,s,o,u,c;return r(this,n),a=t.call(this,n.getErrorMessage(null===e||void 0===e?void 0:e.error)),Object.setPrototypeOf(i(a),n.prototype),a.name="EthereumProviderError",a.error=null===e||void 0===e?void 0:e.error,(null===(s=null===e||void 0===e?void 0:e.error)||void 0===s?void 0:s.stack)&&(a.stack=a.getNewStack(null===e||void 0===e?void 0:e.error)),a.provider=null===e||void 0===e?void 0:e.provider,a.data=null===e||void 0===e?void 0:e.data,a.method=null===e||void 0===e?void 0:e.method,a.code=(null===(o=null===e||void 0===e?void 0:e.error)||void 0===o?void 0:o.code)||(null===(c=null===(u=null===e||void 0===e?void 0:e.error)||void 0===u?void 0:u.error)||void 0===c?void 0:c.code)||(null===e||void 0===e?void 0:e.code),a.signer=null===e||void 0===e?void 0:e.signer,a.chainId=null===e||void 0===e?void 0:e.chainId,a.providerId=null===e||void 0===e?void 0:e.providerId,a.blockNumber=null===e||void 0===e?void 0:e.blockNumber,a}return a(n,[{key:"getNewStack",value:function(e){var t;try{return(null===(t=this.stack)||void 0===t?void 0:t.split("\n").slice(0,2).join("\n"))+"\n"+e.stack||this.stack}catch(n){return this.stack||e.stack}}}],[{key:"getErrorMessage",value:function(e){return"string"===typeof e?e:(null===e||void 0===e?void 0:e.message)||"EthereumProviderError"}}]),n}(u(Error));t.EthereumProviderError=c},1894:function(e,t){},1896:function(e,t){},1908:function(e,t){},1909:function(e,t){},1932:function(e,t){},1937:function(e,t){},1939:function(e,t){},1955:function(e,t){},1977:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.providerRequest=void 0;var a=n(19);function i(e,t,n){return new Promise((function(r,a){try{!function(e,t,n){if(null===e||"object"!==typeof e)throw new Error("No send method defined");if("function"===typeof e.sendAsync)e.sendAsync(t,n);else{if("function"!==typeof e.send)throw new Error("No send method defined");e.send(t,n)}}(e,{jsonrpc:"2.0",id:(new Date).getTime(),method:t,params:n},(function(e,t){var n=e||(null===t||void 0===t?void 0:t.error);n&&a(n),(null===t||void 0===t?void 0:t.result)&&r(t.result),a(new Error("Can't handle JSON-RPC request"))}))}catch(i){a(i)}}))}t.providerRequest=function(e,t,n){return a.__awaiter(this,void 0,void 0,r().mark((function a(){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("object"===typeof e&&null!==e){r.next=2;break}throw new Error("Provider is not an object");case 2:if("function"===typeof e.request){r.next=4;break}return r.abrupt("return",i(e,t,n));case 4:return r.abrupt("return",e.request({method:t,params:n}));case 5:case"end":return r.stop()}}),a)})))}},1978:function(e,t,n){"use strict";function r(e){return new Promise((function(t,n){var r=setTimeout((function(){return n(new Error("PromiEvent timeout"))}),18e5);e.once("error",(function(e){n(e),clearTimeout(r)})),e.once("receipt",(function(e){t(e),clearTimeout(r)}))}))}function a(e){return new Promise((function(t,n){var r=setTimeout((function(){return n(new Error("PromiEvent timeout"))}),18e5);e.once("error",(function(e){n(e),clearTimeout(r)})),e.once("transactionHash",(function(e){t(e),clearTimeout(r)}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.getPromiEventHashPromise=t.getPromiEventReceiptPromise=t.toPromises=void 0,t.toPromises=function(e){return{hash:a(e),receipt:r(e)}},t.getPromiEventReceiptPromise=r,t.getPromiEventHashPromise=a},1979:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.parseReceiptEvents=t.getTransactionReceiptEvents=t.getContractMethodReceiptEvents=void 0;var a=n(19),i=a.__importDefault(n(1980)),s=a.__importDefault(n(1993));function o(e,t,n){var r=[];n.logs&&(n.events={},n.logs.forEach((function(e){e.returnValues={},e.signature=null,e.raw={data:e.data,topics:e.topics},delete e.data,delete e.topics;var t=e.logIndex;n.events[t]=e})),delete n.logs),Object.keys(n.events).forEach((function(a){var o=n.events[a];if(s.default.toChecksumAddress(o.address)===s.default.toChecksumAddress(t)&&!o.signature){var u=e.filter((function(e){return"event"===e.type})).map((function(e){return Object.assign(Object.assign({},e),{signature:e.signature||i.default.encodeEventSignature(e)})})).find((function(e){return e.signature===o.raw.topics[0]}));o.event=u.name,o.signature=u.signature,o.returnValues=i.default.decodeLog(u.inputs,o.raw.data,o.raw.topics.slice(1)),r.push(o),delete o.returnValues.__length__,delete n.events[a]}}));var a=0;return r.forEach((function(e){e.event?n.events[e.event]?Array.isArray(n.events[e.event])?n.events[e.event].push(e):n.events[e.event]=[n.events[e.event],e]:n.events[e.event]=e:(n.events[a]=e,a+=1)})),null===n||void 0===n?void 0:n.events}t.getContractMethodReceiptEvents=function(e){return a.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return n=t.sent,t.abrupt("return",n.events?Object.keys(n.events).map((function(e){return n.events[e]})).map((function(e){return Object.assign(Object.assign({},e),{args:e.returnValues})})):[]);case 4:case"end":return t.stop()}}),t)})))},t.getTransactionReceiptEvents=function(e,t,n){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var i;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=o,r.t1=n,r.t2=t,r.next=5,e;case 5:return r.t3=r.sent,i=(0,r.t0)(r.t1,r.t2,r.t3),r.abrupt("return",Object.values(i)||[]);case 8:case"end":return r.stop()}}),a)})))},t.parseReceiptEvents=o},1984:function(e,t){},1987:function(e,t){},1994:function(e,t){},1997:function(e,t){},2002:function(e,t,n){"use strict";var r=n(78).default,a=n(48).default,i=n(20).default,s=n(21).default,o=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.EthersTransaction=t.EthersFunctionCall=t.EthersContract=t.EthersEthereum=t.EthersWeb3ProviderEthereum=void 0;var u=n(19),c=n(1078),d=n(1182),p=n(64),l=n(2003),y=n(298),f=n(2006),m=n(2013),b=function(){function e(t,n){s(this,e),this.web3Provider=t,this.from=n,this.send=this.send.bind(this)}return o(e,[{key:"createContract",value:function(e,t){if(!t)throw new Error("No Contract address provided, it's required for EthersEthereum");return new h(new c.ethers.Contract(t,e,this.web3Provider.getSigner()),this.web3Provider.getSigner())}},{key:"send",value:function(e,t){return u.__awaiter(this,void 0,void 0,i().mark((function n(){var r;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.web3Provider.send(e,t);case 3:return n.abrupt("return",n.sent);case 6:return n.prev=6,n.t0=n.catch(0),n.prev=8,n.next=11,this.getFrom();case 11:r=n.sent,n.next=16;break;case 14:n.prev=14,n.t1=n.catch(8);case 16:throw new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.send",error:n.t0,data:{method:e,params:t,from:r}});case 17:case"end":return n.stop()}}),n,this,[[0,6],[8,14]])})))}},{key:"personalSign",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.web3Provider.getSigner().signMessage(e);case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),t.prev=8,t.next=11,this.getFrom();case 11:n=t.sent,t.next=16;break;case 14:t.prev=14,t.t1=t.catch(8);case 16:throw new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.personalSign",error:t.t0,data:{message:e,from:n}});case 17:case"end":return t.stop()}}),t,this,[[0,6],[8,14]])})))}},{key:"signTypedData",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getFrom();case 3:return n=t.sent,t.next=6,(0,d.signTypedData)(this.send,n,e);case 6:return t.abrupt("return",t.sent);case 9:throw t.prev=9,t.t0=t.catch(0),new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.signTypedData",error:t.t0,data:e,signer:n});case 12:case"end":return t.stop()}}),t,this,[[0,9]])})))}},{key:"getFrom",value:function(){return u.__awaiter(this,void 0,void 0,i().mark((function e(){var t,n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.from){e.next=8;break}return e.next=4,this.web3Provider.listAccounts();case 4:return t=e.sent,n=a(t,1),r=n[0],e.abrupt("return",r);case 8:return e.abrupt("return",this.from);case 11:throw e.prev=11,e.t0=e.catch(0),new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.getFrom",error:e.t0,data:null});case 14:case"end":return e.stop()}}),e,this,[[0,11]])})))}},{key:"encodeParameter",value:function(e,t){try{return(0,f.encodeParameters)([e],[t])}catch(n){throw new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.encodeParameter",error:n,data:{type:e,parameter:t}})}}},{key:"decodeParameter",value:function(e,t){try{return(0,f.decodeParameters)([e],t)}catch(n){throw new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.decodeParameter",error:n,data:{type:e,data:t}})}}},{key:"getBalance",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.web3Provider.getBalance(e);case 3:return n=t.sent,t.abrupt("return",(0,p.toBigNumber)(n.toString()));case 7:throw t.prev=7,t.t0=t.catch(0),new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.getBalance",error:t.t0,data:{address:e}});case 10:case"end":return t.stop()}}),t,this,[[0,7]])})))}},{key:"getChainId",value:function(){return u.__awaiter(this,void 0,void 0,i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.web3Provider.getNetwork();case 3:return t=e.sent,n=t.chainId,e.abrupt("return",+n);case 8:throw e.prev=8,e.t0=e.catch(0),new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.getChainId",error:e.t0,data:null});case 11:case"end":return e.stop()}}),e,this,[[0,8]])})))}},{key:"getCurrentProvider",value:function(){return this.web3Provider.provider}}]),e}();t.EthersWeb3ProviderEthereum=b;var v=function(){function e(t){s(this,e),this.signer=t}return o(e,[{key:"getCurrentProvider",value:function(){return w(this.signer)}},{key:"createContract",value:function(e,t){if(!t)throw new Error("No Contract address provided, it's required for EthersEthereum");return new h(new c.ethers.Contract(t,e,this.signer),this.signer)}},{key:"personalSign",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.signer.signMessage(e);case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),t.prev=8,t.next=11,this.getFrom();case 11:n=t.sent,t.next=16;break;case 14:t.prev=14,t.t1=t.catch(8);case 16:throw new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersEthereum.personalSign",error:t.t0,data:{message:e,from:n}});case 17:case"end":return t.stop()}}),t,this,[[0,6],[8,14]])})))}},{key:"signTypedData",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n,r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=e.types,n.EIP712Domain,r=u.__rest(n,["EIP712Domain"]),t.next=4,this.signer._signTypedData(e.domain,r,e.message);case 4:return t.abrupt("return",t.sent);case 7:throw t.prev=7,t.t0=t.catch(0),new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersEthereum.signTypedData",error:t.t0,data:e});case 10:case"end":return t.stop()}}),t,this,[[0,7]])})))}},{key:"getFrom",value:function(){return u.__awaiter(this,void 0,void 0,i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.signer.getAddress();case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersEthereum.getFrom",error:e.t0,data:null});case 9:case"end":return e.stop()}}),e,this,[[0,6]])})))}},{key:"encodeParameter",value:function(e,t){try{return(0,f.encodeParameters)([e],[t])}catch(n){throw new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersEthereum.encodeParameter",error:n,data:{type:e,parameter:t}})}}},{key:"decodeParameter",value:function(e,t){try{return(0,f.decodeParameters)([e],t)}catch(n){throw new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersEthereum.decodeParameter",error:n,data:{type:e,data:t}})}}},{key:"getBalance",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.signer.provider){t.next=2;break}throw new Error("EthersEthereum: signer provider does not exist");case 2:return t.prev=2,t.next=5,this.signer.provider.getBalance(e);case 5:return n=t.sent,t.abrupt("return",(0,p.toBigNumber)(n.toString()));case 9:throw t.prev=9,t.t0=t.catch(2),new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersEthereum.getBalance",error:t.t0,data:{address:e}});case 12:case"end":return t.stop()}}),t,this,[[2,9]])})))}},{key:"getChainId",value:function(){return u.__awaiter(this,void 0,void 0,i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.signer.getChainId();case 3:return e.abrupt("return",+e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),new d.EthereumProviderError({providerId:(0,y.getDappType)(this.getCurrentProvider()),provider:d.Provider.ETHERS,method:"EthersEthereum.getChainId",error:e.t0,data:null});case 9:case"end":return e.stop()}}),e,this,[[0,6]])})))}}]),e}();t.EthersEthereum=v;var h=function(){function e(t,n){s(this,e),this.contract=t,this.signer=n}return o(e,[{key:"functionCall",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(r).join("0")}(n,2*l)}}n.length%2===1&&(n="0x0"+n.substring(2))}return n}function d(e){var t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}}function p(e){var t=[];return Object.keys(e).forEach((function(n){"object"!==typeof e[n]?t.push({name:n,type:e[n]}):t.push(Object.assign(d(n),{components:p(e[n])}))})),t}t.encodeParameters=function(e,t){return e=u(e),t=t.map((function(t,n){var r=e[n];if("object"===typeof r&&r.type&&(r=r.type),t=c(r,t),"string"===typeof r&&r.includes("tuple")){!function e(t,n){if("array"===t.name)return n.map((function(n){return e(o._getCoder(s.from(t.type.replace("[]",""))),n)}));t.coders.forEach((function(t,r){"tuple"===t.name?e(t,n[r]):n[r]=c(t.name,n[r])}))}(o._getCoder(s.from(r)),t)}return t})),o.encode(e,t)},t.decodeParameters=function(e,t){return e=u(e),o.decode(e,t)}}).call(this,n(15).Buffer)},2009:function(e,t){},2013:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getTxEvents=void 0;var a=n(19);t.getTxEvents=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.abrupt("return",e.logs.map((function(e){try{var n=t.interface.parseLog(e);return Object.assign(Object.assign({},e),{event:n.name,args:n.args,returnValues:n.args})}catch(r){return Object.assign(Object.assign({},e),{event:"",returnValues:{},args:{}})}})));case 4:return n.prev=4,n.t0=n.catch(0),console.log(n.t0),n.abrupt("return",[]);case 8:case"end":return n.stop()}}),n,null,[[0,4]])})))}},2015:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prodConfig=void 0,t.prodConfig={basePath:"https://api.rarible.org",ethereumEnv:"mainnet",flowEnv:"mainnet",tezosNetwork:"mainnet",polygonNetwork:"polygon",solanaNetwork:"mainnet-beta",immutablexNetwork:"prod",mantleNetwork:"mantle"}},2016:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.developmentConfig=void 0,t.developmentConfig={basePath:"https://dev-api.rarible.org",ethereumEnv:"dev-ethereum",flowEnv:"dev-testnet",tezosNetwork:"dev",polygonNetwork:"dev-polygon",solanaNetwork:"devnet",immutablexNetwork:"testnet",mantleNetwork:"testnet-mantle"}},2017:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testnetConfig=void 0,t.testnetConfig={basePath:"https://testnet-api.rarible.org",ethereumEnv:"testnet",flowEnv:"testnet",tezosNetwork:"testnet",polygonNetwork:"mumbai",solanaNetwork:"devnet",immutablexNetwork:"testnet",mantleNetwork:"testnet-mantle"}},2018:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stagingConfig=void 0,t.stagingConfig={basePath:"https://staging-api.rarible.org",ethereumEnv:"staging",flowEnv:"testnet",tezosNetwork:"testnet",polygonNetwork:"staging-polygon",solanaNetwork:"devnet",immutablexNetwork:"testnet",mantleNetwork:"testnet-mantle"}},2019:function(e,t,n){"use strict";var r=n(78).default;Object.defineProperty(t,"__esModule",{value:!0}),t.createEthereumSdk=void 0;var a=n(931),i=n(45),s=n(64),o=n(427),u=n(408),c=n(748),d=n(410),p=n(409),l=n(524),y=n(1271),f=n(2481),m=n(2482),b=n(2483),v=n(2484),h=n(2485),T=n(2487),g=n(2488),w=n(2489),k=n(2490),x=n(2491);t.createEthereumSdk=function(e,t,n,O,_){var E,A,C=(0,a.createRaribleSdk)(null===e||void 0===e?void 0:e.ethereum,O,{apiClientParams:Object.assign(Object.assign({},(null===_||void 0===_?void 0:_.params)||{}),{middleware:[].concat(r((null===(E=_.logs)||void 0===E?void 0:E.level)!==o.LogsLevel.DISABLED?[(0,d.getErrorHandlerMiddleware)(d.NetworkErrorCode.ETHEREUM_NETWORK_ERR)]:[]),r((null===(A=null===_||void 0===_?void 0:_.params)||void 0===A?void 0:A.middleware)||[]))}),logs:_.logs,ethereum:_[i.Blockchain.ETHEREUM],polygon:_[i.Blockchain.POLYGON],marketplaceMarker:_.marketplaceMarker?(0,s.toBinary)(_.marketplaceMarker):void 0,apiKey:_.apiKey}),I=new f.EthereumSell(C,O,_),S=new g.EthereumBalance(C,t,O),R=new h.EthereumBid(C,e,S,O,_),j=new y.EthereumMint(C,t,O),P=new m.EthereumFill(C,e,O,_),B=new k.EthereumCreateCollection(C,O).createCollectionSimplified,M=new x.EthereumCryptopunk(C,O),F=new v.EthereumTransfer(C,O),N=new b.EthereumBurn(C,O),D=new T.EthereumCancel(C,O),L=u.Middlewarer.skipMiddleware(j.preprocessMeta),U=new c.MetaUploader(i.Blockchain.ETHEREUM,L);return{nft:{mint:new p.MethodWithPrepare(j.mintBasic,j.prepare),burn:new p.MethodWithPrepare(N.burnBasic,N.burn),transfer:new p.MethodWithPrepare(F.transferBasic,F.transfer),generateTokenId:new w.EthereumTokenId(C).generateTokenId,createCollection:B,preprocessMeta:L,uploadMeta:U.uploadMeta},order:{fill:{prepare:P.fill},buy:new p.MethodWithPrepare(P.buyBasic,P.buy),batchBuy:new p.MethodWithPrepare(P.batchBuyBasic,P.batchBuy),acceptBid:new p.MethodWithPrepare(P.acceptBidBasic,P.acceptBid),sell:new p.MethodWithPrepare(I.sellBasic,I.sell),sellUpdate:new p.MethodWithPrepare(I.sellUpdateBasic,I.update),bid:new p.MethodWithPrepare(R.bidBasic,R.bid),bidUpdate:new p.MethodWithPrepare(R.bidUpdateBasic,R.update),cancel:D.cancel},balances:{getBalance:S.getBalance,convert:S.convert,transfer:l.notImplemented,getBiddingBalance:S.getBiddingBalance,depositBiddingBalance:S.depositBiddingBalance,withdrawBiddingBalance:S.withdrawBiddingBalance},restriction:{canTransfer:function(){return Promise.resolve({success:!0})},getFutureOrderFees:function(){return I.getFutureOrderFees()}},ethereum:{wrapCryptoPunk:M.wrap,unwrapCryptoPunk:M.unwrap,getBatchBuyAmmInfo:P.getBuyAmmInfo}}}},2034:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mainnetConfig=void 0;var r=n(73),a=n(241),i=n(301);t.mainnetConfig={basePath:"https://ethereum-api.rarible.org",chainId:1,exchange:{v1:(0,r.toAddress)("0x09EaB21c40743B2364b94345419138eF80f39e30"),v2:(0,r.toAddress)("0x9757F2d2b135150BBeb65308D4a91804107cd8D6"),openseaV1:(0,r.toAddress)("0x7be8076f4ea4a4ad08075c2508e481d6c946d12b"),wrapper:(0,r.toAddress)("0x0c17Fc3Ea97cDBFc9503333dAEEc3097EE076E23"),looksrare:(0,r.toAddress)("0x59728544B08AB483533076417FbBB2fD0B17CE3a"),looksrareV2:(0,r.toAddress)("0x0000000000E655fAe4d56241588680F86E3b2377"),x2y2:(0,r.toAddress)("0x74312363e45dcaba76c59ec49a7aa8a65a67eed3")},transferProxies:{nft:(0,r.toAddress)("0x4fee7b061c97c9c496b01dbce9cdb10c02f0a0be"),erc20:(0,r.toAddress)("0xb8e4526e0da700e9ef1f879af713d691f81507d8"),erc721Lazy:(0,r.toAddress)("0xbb7829BFdD4b557EB944349b2E2c965446052497"),erc1155Lazy:(0,r.toAddress)("0x75a8B7c0B22D973E0B46CfBD3e2f6566905AA79f"),openseaV1:(0,r.toAddress)("0xe5c783ee536cf5e63e792988335c4255169be4e1"),cryptoPunks:(0,r.toAddress)("0xdf907c1b541b1843b511d115e2fef78a6a830772")},feeConfigUrl:i.FEE_CONFIG_URL,openSea:{metadata:(0,a.id32)("RARIBLE"),proxyRegistry:(0,r.toAddress)("0xa5409ec958c83c3f309868babaca7c86dcb077c1"),merkleValidator:(0,r.toAddress)("0xbaf2127b49fc93cbca6269fade0f7f31df4c88a7")},factories:{erc721:(0,r.toAddress)("0x6E42262978de5233C8d5B05B128C121fBa110DA4"),erc1155:(0,r.toAddress)("0xda5bfe0bd4443d63833c8f4e3284357299eae6bc")},cryptoPunks:{marketContract:(0,r.toAddress)("0x6Ba6f2207e343923BA692e5Cae646Fb0F566DB8D"),wrapperContract:(0,r.toAddress)("0x282BDD42f4eb70e7A9D9F40c8fEA0825B7f68C5D")},sudoswap:{pairFactory:(0,r.toAddress)("0xb16c1342E617A5B6E4b631EB114483FDB289c0A4"),pairRouter:(0,r.toAddress)("0x2b2e8cda09bba9660dca5cb6233787738ad68329")},weth:(0,r.toAddress)("0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:(0,r.toAddress)("0x2a784a5b5C8AE0bd738FBc67E4C069dB4F4961B7")}},2036:function(e,t){},2040:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mumbaiConfig=void 0;var r=n(73),a=n(241),i=n(301);t.mumbaiConfig={basePath:"https://testnet-polygon-api.rarible.org",chainId:80001,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x2Fc743F5419637B93dDAC159715B902186300041"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x042221c65AC6925fbc478dB5B746183f72377526"),x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x02e21199D043dab90248f79d6A8d0c36832734B0"),erc20:(0,r.toAddress)("0xCA90c2E7d3c41EF220888B0038849BA1e67688bC"),erc721Lazy:(0,r.toAddress)("0xA8628124C255171cF356F0E0204E2D19CA89F636"),erc1155Lazy:(0,r.toAddress)("0x8fd27f771bf72C1F8c8b78FCdcf323C0C34f030b"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:i.FEE_CONFIG_URL,openSea:{metadata:(0,a.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xa85180a21786bA65b0778bE1cb5CBA5E5c6cD21d"),erc1155:(0,r.toAddress)("0xAa9CD5834E0009902EeAA3FEfAc6A160e9A096b4")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x9c3c9283d3e44854697cd22d3faa240cfb032889"),auction:r.ZERO_ADDRESS}},2041:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.polygonConfig=void 0;var r=n(73),a=n(241),i=n(301);t.polygonConfig={basePath:"https://polygon-api.rarible.org",chainId:137,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x12b3897a36fDB436ddE2788C06Eff0ffD997066e"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0xf7DD32c761D61624dCAAe61d0d50Efc6E3E1F65c"),x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xd47e14DD9b98411754f722B4c4074e14752Ada7C"),erc20:(0,r.toAddress)("0x49b4e47079d9b733B2227fa15f0762dBF707B263"),erc721Lazy:(0,r.toAddress)("0xDD28328257a2Cce3204332C747Cc350153937A1D"),erc1155Lazy:(0,r.toAddress)("0x0E63021A7597B254484b7F99dDD9b319591350B6"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:i.FEE_CONFIG_URL,openSea:{metadata:(0,a.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0x16911a36a56f828f17632cD4915614Dd5c7a45e0"),erc1155:(0,r.toAddress)("0xF46e8e6fA0F048DdD76F8c6982eBD059796298B8")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"),auction:r.ZERO_ADDRESS}},2042:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.devEthereumConfig=void 0;var r=n(73),a=n(241),i=n(301);t.devEthereumConfig={basePath:"https://dev-ethereum-api.rarible.org",chainId:300500,exchange:{v1:(0,r.toAddress)("0x18033Ad24EBBd26E06a84d820dB1D252Fa0c00DB"),v2:(0,r.toAddress)("0x6aABb267a1c440CfB5C200Ebcd078Efa9249492A"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x5Ace78C04f6D2656B89ce7FAA1f3C4d08fD6f1B7"),x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xc6f33b62A94939E52E1b074c4aC1A801B869fDB2"),erc20:(0,r.toAddress)("0x3586d3E6CDaE98d5F0eEaB737977Bc78406Da2BD"),erc721Lazy:(0,r.toAddress)("0xeC47DA9591FC24F5a5F401e8D275526Cc5eE5d37"),erc1155Lazy:(0,r.toAddress)("0x8812cFb55853da0968a02AaaEA84CD93EC4b42A1"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:(0,r.toAddress)("0x44be0e540DfA005D97Fde86CdD058F7E1A71A317")},feeConfigUrl:i.FEE_CONFIG_URL,openSea:{metadata:(0,a.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xD6313c8A2D1cDad7EE522135776Ff02EC98b1606"),erc1155:(0,r.toAddress)("0x3EAA06308C859fC35A17b7944f20f14872462d3D")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:(0,r.toAddress)("0x3df054dA59B1c0D5d9CeE5EDc9B58798526023B5"),pairRouter:(0,r.toAddress)("0xc64E5D291CaEdF42b77fa9E50d5Fd46113227857")},weth:(0,r.toAddress)("0x55eB2809896aB7414706AaCDde63e3BBb26e0BC6"),auction:r.ZERO_ADDRESS}},2043:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.devPolygonConfig=void 0;var r=n(73),a=n(241),i=n(301);t.devPolygonConfig={basePath:"https://dev-polygon-api.rarible.org",chainId:300501,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x8283Ffd0F535E1103C3599D2d00b85815774A896"),openseaV1:r.ZERO_ADDRESS,wrapper:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x3586d3E6CDaE98d5F0eEaB737977Bc78406Da2BD"),erc20:(0,r.toAddress)("0xeC47DA9591FC24F5a5F401e8D275526Cc5eE5d37"),erc721Lazy:(0,r.toAddress)("0x8812cFb55853da0968a02AaaEA84CD93EC4b42A1"),erc1155Lazy:(0,r.toAddress)("0x87ECcc03BaBC550c919Ad61187Ab597E9E7f7C21"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:(0,r.toAddress)("0x44a72AEb7dAc73c4b72f89d6855dE063949627F3")},feeConfigUrl:i.FEE_CONFIG_URL,openSea:{metadata:(0,a.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0x66611f8D97688A0aF08D4337D7846eFEc6995d58"),erc1155:(0,r.toAddress)("0x31C827f06E10e4999eb88c193669d408eF597B3D")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x328823f69a0915c9BEc366Eb09ccdfB964f91Ad5"),auction:r.ZERO_ADDRESS}},2044:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testnetEthereumConfig=void 0;var r=n(73),a=n(241),i=n(301);t.testnetEthereumConfig={basePath:"https://testnet-ethereum-api.rarible.org",chainId:5,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x02afbD43cAD367fcB71305a2dfB9A3928218f0c1"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x89Ee42D532438BB70a0aF196729aE2B22744c3db"),looksrare:(0,r.toAddress)("0xD112466471b5438C1ca2D218694200e49d81D047"),looksrareV2:(0,r.toAddress)("0x35C2215F2FFe8917B06454eEEaba189877F200cf"),x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x21B0B84FfAB5A8c48291f5eC9D9FDb9aef574052"),erc20:(0,r.toAddress)("0x17cEf9a8bf107D58E87c170be1652c06390BD990"),erc721Lazy:(0,r.toAddress)("0x96102D9472C0338005cbf12Fb7eA829F242C2809"),erc1155Lazy:(0,r.toAddress)("0x1e1B6E13F0eB4C570628589e3c088BC92aD4dB45"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:i.FEE_CONFIG_URL,openSea:{metadata:(0,a.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xf3964B93F0127C9CC2F48752C67dF4b1dB7c9138"),erc1155:(0,r.toAddress)("0x6E8a327181cE6d83A6cE4A58fe6D07f50B0bc0Af")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:(0,r.toAddress)("0xF0202E9267930aE942F0667dC6d805057328F6dC"),pairRouter:(0,r.toAddress)("0x25b4EfC43c9dCAe134233CD577fFca7CfAd6748F")},weth:(0,r.toAddress)("0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:(0,r.toAddress)("0x7454Cc9AEB024bcE6A2CDC49ad4733B4D8215fb8")}},2045:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stagingEthereumConfig=void 0;var r=n(73),a=n(241),i=n(301);t.stagingEthereumConfig={basePath:"https://staging-ethereum-api.rarible.org",chainId:200500,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0xC5696e98bE223E58D992Fd17225b37DF0FEFbEDf"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x3EAA06308C859fC35A17b7944f20f14872462d3D"),looksrare:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xdB4eDB8BEDD9C3017909aEB38F66707F8A19681B"),erc20:(0,r.toAddress)("0xD032fB7da01b16E181AaA59962C95f5b0e6e8381"),erc721Lazy:(0,r.toAddress)("0x3fB287d1Da10a10A87b613dED57230964e546719"),erc1155Lazy:(0,r.toAddress)("0x02c640F479ebCb92B078F51A4D8417fb1F3e10D7"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:i.FEE_CONFIG_URL,openSea:{metadata:(0,a.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0x319c4Bd373d3F16697d630153F5a2d526047FD8C"),erc1155:(0,r.toAddress)("0x957893927401ceF0878c538976a92a46C36ADc5f")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:(0,r.toAddress)("0x525641e8f1140b8a215A0D9692BA2C9A7916e017"),pairRouter:(0,r.toAddress)("0xE27A07e9B293dC677e34aB5fF726073ECbeCA842")},weth:(0,r.toAddress)("0xecd2728000E21aA49aA1F823242dc8C8bc5BB4aB"),auction:r.ZERO_ADDRESS}},2046:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stagingPolygonConfig=void 0;var r=n(73),a=n(241),i=n(301);t.stagingPolygonConfig={basePath:"https://staging-polygon-api.rarible.org",chainId:200501,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x6aABb267a1c440CfB5C200Ebcd078Efa9249492A"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0xE63941f52ecbA57d731bEd5447cd5d392468Ba7F"),x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xc6f33b62A94939E52E1b074c4aC1A801B869fDB2"),erc20:(0,r.toAddress)("0x3586d3E6CDaE98d5F0eEaB737977Bc78406Da2BD"),erc721Lazy:(0,r.toAddress)("0xeC47DA9591FC24F5a5F401e8D275526Cc5eE5d37"),erc1155Lazy:(0,r.toAddress)("0x8812cFb55853da0968a02AaaEA84CD93EC4b42A1"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:i.FEE_CONFIG_URL,openSea:{metadata:(0,a.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0x6972347e66A32F40ef3c012615C13cB88Bf681cc"),erc1155:(0,r.toAddress)("0x44be0e540DfA005D97Fde86CdD058F7E1A71A317")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:(0,r.toAddress)("0x31C827f06E10e4999eb88c193669d408eF597B3D"),pairRouter:(0,r.toAddress)("0xbDC9d365aD6131D1078409521e2432b154439F05")},weth:(0,r.toAddress)("0x48fAF37c8b1B8A8C735aB25c039Cc00E8f95a435"),auction:r.ZERO_ADDRESS}},2047:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mantleTestnetConfig=void 0;var r=n(73),a=n(241),i=n(301);t.mantleTestnetConfig={basePath:"https://testnet-mantle-api.rarible.org",chainId:5001,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x41407B447Fb5425187A9BCA3a062644EF2410F8D"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x0141aC79eFD8e4305cE7785B4483C54d5E968995"),looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xF1cb795B7eA59a9213a790f868104c11a14690Fa"),erc20:(0,r.toAddress)("0xa90e536A492aef0d57e6d295FA17687c3ca93347"),erc721Lazy:(0,r.toAddress)("0x61512179F6a16bEC0D259d8010CC0485CE363868"),erc1155Lazy:(0,r.toAddress)("0x3e52D660b69d1bDacb6C513cE085D924F5Cb9c77"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:i.FEE_CONFIG_URL,openSea:{metadata:(0,a.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0x4492608238eB09c7AD036e9C089538a7286B8985"),erc1155:(0,r.toAddress)("0x552dcDddEd58DAfC95AB1231A9a46E15c34E211A")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0xdeaddeaddeaddeaddeaddeaddeaddeaddead1111"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},2048:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mantleConfig=void 0;var r=n(73),a=n(241),i=n(301);t.mantleConfig={basePath:"https://mantle-api.rarible.org",chainId:5e3,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x0e7B24d73e45B639A5cF674C5f2Bb02930716f87"),openseaV1:r.ZERO_ADDRESS,wrapper:r.ZERO_ADDRESS,looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xA3AaA33E13Bd42fE5cBDefC72fB0a0888cfB44C0"),erc20:(0,r.toAddress)("0x5274ac9507b20aC14e215B098479bd69733fA98A"),erc721Lazy:(0,r.toAddress)("0xc0C8d44A78605E4C221C9506DA737bB2A5dfd537"),erc1155Lazy:(0,r.toAddress)("0x2047f99EFa18009ceA518AC99cEE8e2151D53eDc"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:i.FEE_CONFIG_URL,openSea:{metadata:(0,a.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0x465d62a669E98517e08e4E3D809A28FAF3DfbAE1"),erc1155:(0,r.toAddress)("0x16911a36a56f828f17632cD4915614Dd5c7a45e0")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0xdeaddeaddeaddeaddeaddeaddeaddeaddead1111"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},2049:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.UpsertOrder=void 0;var s=n(19),o=n(115),u=n(73),c=n(176),d=n(520),p=n(302),l=n(362),y=n(731),f=n(521),m=(0,u.toWord)("0x0000000000000000000000000000000000000000000000000000000000000000"),b=function(){function e(t,n,i,u,c,d,p,l,y){var f=this;a(this,e),this.orderFiller=t,this.send=n,this.checkLazyOrder=i,this.approveFn=u,this.signOrder=c,this.orderApi=d,this.ethereum=p,this.checkWalletChainId=l,this.marketplaceMarker=y,this.upsert=o.Action.create({id:"approve",run:function(e){var t=e.order,n=e.infinite;return s.__awaiter(f,void 0,void 0,r().mark((function e(){var a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.checkLazyOrder(t);case 2:return a=e.sent,e.next=5,this.approve(a,n);case 5:return e.abrupt("return",a);case 6:case"end":return e.stop()}}),e,this)})))}}).thenStep({id:"sign",run:function(e){return f.upsertRequest(e)}}).before((function(e){return s.__awaiter(f,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.checkWalletChainId();case 2:return t.abrupt("return",e);case 3:case"end":return t.stop()}}),t,this)})))}))}return i(e,[{key:"getOrder",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!("order"in e)){t.next=4;break}return t.abrupt("return",e.order);case 4:return t.abrupt("return",this.orderApi.getValidatedOrderByHash({hash:e.orderHash}));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"getPrice",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!("price"in e)){n.next=4;break}return n.abrupt("return",e.price);case 4:n.t0=t.assetClass,n.next="ETH"===n.t0?7:"ERC20"===n.t0?8:12;break;case 7:return n.abrupt("return",(0,c.toBn)(e.priceDecimal).multipliedBy((0,c.toBn)(10).pow(18)));case 8:return n.next=10,(0,f.createErc20Contract)((0,p.getRequiredWallet)(this.ethereum),t.contract).functionCall("decimals").call();case 10:return a=n.sent,n.abrupt("return",(0,c.toBn)(e.priceDecimal).multipliedBy((0,c.toBn)(10).pow(Number(a))));case 12:throw new Error("Asset type should be either ETH or ERC-20, received=".concat(JSON.stringify(t)));case 13:case"end":return n.stop()}}),n,this)})))}},{key:"approve",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return s.__awaiter(this,void 0,void 0,r().mark((function a(){var i,s,o,u;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=e.orderFormToSimpleOrder(t),r.next=3,this.orderFiller.getOrderFee(i);case 3:if(s=r.sent,o=(0,y.addFee)(t.make,s),!(u=this.approveFn(t.maker,o,n))){r.next=9;break}return r.next=9,(0,l.waitTx)(u);case 9:return r.abrupt("return",u);case 10:case"end":return r.stop()}}),a,this)})))}},{key:"upsertRequest",value:function(t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=e.orderFormToSimpleOrder(t),n.t0=this.orderApi,n.t1=Object,n.t2=Object.assign({},t),n.next=6,this.signOrder(a);case 6:return n.t3=n.sent,n.t4={signature:n.t3},n.t5=n.t1.assign.call(n.t1,n.t2,n.t4),n.t6={orderForm:n.t5},n.abrupt("return",n.t0.upsertOrder.call(n.t0,n.t6));case 11:case"end":return n.stop()}}),n,this)})))}},{key:"prepareOrderForm",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=e.type,n.next="DATA_V2"===n.t0?3:"DATA_V3_BUY"===n.t0?5:"DATA_V3_SELL"===n.t0?7:9;break;case 3:return a={dataType:"RARIBLE_V2_DATA_V2",payouts:e.payouts,originFees:e.originFees,isMakeFill:t},n.abrupt("break",10);case 5:return a={dataType:"RARIBLE_V2_DATA_V3_BUY",payout:e.payout,originFeeFirst:e.originFeeFirst,originFeeSecond:e.originFeeSecond,marketplaceMarker:this.marketplaceMarker},n.abrupt("break",10);case 7:return a={dataType:"RARIBLE_V2_DATA_V3_SELL",payout:e.payout,originFeeFirst:e.originFeeFirst,originFeeSecond:e.originFeeSecond,marketplaceMarker:this.marketplaceMarker,maxFeesBasePoint:e.maxFeesBasePoint},n.abrupt("break",10);case 9:throw new Error("Unknown OrderRequest type");case 10:return n.next=12,this.getOrderMaker(e);case 12:return n.t1=n.sent,n.t2=a,n.t3=(0,u.toBigNumber)((0,c.toBn)((0,u.randomWord)(),16).toString(10)),n.t4=(0,u.toBinary)("0x"),n.t5=e.start,n.t6=e.end,n.abrupt("return",{maker:n.t1,type:"RARIBLE_V2",data:n.t2,salt:n.t3,signature:n.t4,start:n.t5,end:n.t6});case 19:case"end":return n.stop()}}),n,this)})))}},{key:"getOrderMaker",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.maker){t.next=4;break}return t.abrupt("return",e.maker);case 4:return t.t0=u.toAddress,t.next=7,(0,p.getRequiredWallet)(this.ethereum).getFrom();case 7:return t.t1=t.sent,t.abrupt("return",(0,t.t0)(t.t1));case 9:case"end":return t.stop()}}),t,this)})))}},{key:"getOrderFormFromOrder",value:function(e,t,n){return Object.assign(Object.assign({},e),{make:t,take:n,salt:(0,u.toBigNumber)((0,c.toBn)(e.salt,16).toString(10)),signature:e.signature||(0,u.toBinary)("0x")})}},{key:"updateCryptoPunkOrder",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getOrder(e);case 2:if("CRYPTO_PUNK"===(n=t.sent).type){t.next=5;break}throw new Error("can't update punk order with type: ".concat(n.type));case 5:return t.next=7,this.updateCryptoPunkOrderByContract((0,p.getRequiredWallet)(this.ethereum),n,e);case 7:return t.abrupt("return",v(n));case 8:case"end":return t.stop()}}),t,this)})))}},{key:"updateCryptoPunkOrderByContract",value:function(e,t,n){return s.__awaiter(this,void 0,void 0,r().mark((function a(){var i,s,o;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getPrice(n,{});case 2:if(i=r.sent,"CRYPTO_PUNKS"!==t.make.assetType.assetClass){r.next=9;break}return s=(0,d.createCryptoPunksMarketContract)(e,t.make.assetType.contract),r.next=7,this.send(s.functionCall("offerPunkForSale",t.make.assetType.tokenId,i));case 7:case 13:r.next=16;break;case 9:if("CRYPTO_PUNKS"!==t.take.assetType.assetClass){r.next=15;break}return o=(0,d.createCryptoPunksMarketContract)(e,t.take.assetType.contract),r.next=13,this.send(o.functionCall("enterBidForPunk",t.take.assetType.tokenId),{value:i.toString()});case 15:throw new Error("Crypto punks asset has not been found");case 16:case"end":return r.stop()}}),a,this)})))}}],[{key:"orderFormToSimpleOrder",value:function(e){return Object.assign(Object.assign({},e),{salt:(0,u.toBinary)((0,c.toBn)(e.salt).toString(16))})}}]),e}();function v(e){return Object.assign(Object.assign({},e),{cancelled:!1,createdAt:"",fill:(0,u.toBigNumber)("0"),hash:m,lastUpdateAt:"",makeStock:e.make.value})}t.UpsertOrder=b},2052:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.approveCryptoPunk=void 0;var a=n(19),i=n(520);t.approveCryptoPunk=function(e,t,n,s,o,u){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var s,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}throw new Error("Wallet undefined");case 2:return s=(0,i.createCryptoPunksMarketContract)(e,n),r.next=5,s.functionCall("punksOfferedForSale",u).call();case 5:if(!(c=r.sent).isForSale||c.onlySellTo.toLowerCase()!==o.toLowerCase()||"0"!==c.minValue){r.next=10;break}return r.abrupt("return",void 0);case 10:return r.abrupt("return",t(s.functionCall("offerPunkForSaleToAddress",u,0,o)));case 11:case"end":return r.stop()}}),a)})))}},2053:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.OrderSell=void 0;var s=n(19),o=n(73),u=n(176),c=n(115),d=n(2054),p=function(){function e(t,n,i){var o=this;a(this,e),this.upserter=t,this.checkAssetType=n,this.checkWalletChainId=i,this.sell=c.Action.create({id:"approve",run:function(e){return s.__awaiter(o,void 0,void 0,r().mark((function t(){var n,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getSellForm(e);case 2:return n=t.sent,t.next=5,this.upserter.checkLazyOrder(n);case 5:return a=t.sent,t.next=8,this.upserter.approve(a,!1);case 8:return t.abrupt("return",a);case 9:case"end":return t.stop()}}),t,this)})))}}).thenStep({id:"sign",run:function(e){return o.upserter.upsertRequest(e)}}).before((function(e){return s.__awaiter(o,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.checkWalletChainId();case 2:return t.abrupt("return",e);case 3:case"end":return t.stop()}}),t,this)})))})),this.update=c.Action.create({id:"approve",run:function(e){return s.__awaiter(o,void 0,void 0,r().mark((function t(){var n,a,i,s;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.upserter.getOrder(e);case 2:if(n=t.sent,(0,d.isCurrency)(n.take.assetType)){t.next=5;break}throw new Error("Make asset type should be either ETH or ERC-20 asset, received=".concat(n.make.assetType.assetClass));case 5:if("CRYPTO_PUNK"!==n.type){t.next=9;break}return t.abrupt("return",e);case 9:return t.next=11,this.upserter.getPrice(e,n.take.assetType);case 11:return a=t.sent,t.next=14,this.prepareOrderUpdateForm(n,a);case 14:return i=t.sent,t.next=17,this.upserter.checkLazyOrder(i);case 17:return s=t.sent,t.next=20,this.upserter.approve(s,!1);case 20:return t.abrupt("return",s);case 21:case"end":return t.stop()}}),t,this)})))}}).thenStep({id:"sign",run:function(e){return!("type"in e)||"RARIBLE_V1"!==e.type&&"RARIBLE_V2"!==e.type?o.upserter.updateCryptoPunkOrder(e):o.upserter.upsertRequest(e)}}).before((function(e){return s.__awaiter(o,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.checkWalletChainId();case 2:return t.abrupt("return",e);case 3:case"end":return t.stop()}}),t,this)})))}))}return i(e,[{key:"getSellForm",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.upserter.getPrice(e,e.takeAssetType);case 2:return n=t.sent,t.next=5,this.upserter.prepareOrderForm(e,!0);case 5:return a=t.sent,t.t0=Object,t.t1=Object.assign({},a),t.next=10,this.checkAssetType(e.makeAssetType);case 10:return t.t2=t.sent,t.t3=(0,o.toBigNumber)(e.amount.toString()),t.t4={assetType:t.t2,value:t.t3},t.t5={assetType:e.takeAssetType,value:(0,o.toBigNumber)((0,u.toBn)(n).multipliedBy(e.amount).toString())},t.t6={make:t.t4,take:t.t5},t.abrupt("return",t.t0.assign.call(t.t0,t.t1,t.t6));case 16:case"end":return t.stop()}}),t,this)})))}},{key:"prepareOrderUpdateForm",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("RARIBLE_V1"!==e.type&&"RARIBLE_V2"!==e.type){n.next=2;break}return n.abrupt("return",this.upserter.getOrderFormFromOrder(e,e.make,{assetType:e.take.assetType,value:(0,o.toBigNumber)((0,u.toBn)(t).multipliedBy(e.make.value).toString())}));case 2:throw new Error("Unsupported order type: ".concat(e.type));case 3:case"end":return n.stop()}}),n,this)})))}}]),e}();t.OrderSell=p},2054:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCurrency=void 0,t.isCurrency=function(e){switch(e.assetClass){case"ERC20":case"ETH":return!0;default:return!1}}},2055:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.hashLegacyOrder=void 0;var r=n(454),a=n(1231);t.hashLegacyOrder=function(t,n){if("RARIBLE_V1"!==n.type)throw new Error("Not supported type: ".concat(n.type));var i=n.data;if("LEGACY"!==i.dataType)throw new Error("Not supported data type: ".concat(i.dataType));var o=(0,a.toLegacyAssetType)(n.make.assetType),u=(0,a.toLegacyAssetType)(n.take.assetType),c={key:{owner:n.maker,salt:n.salt,sellAsset:o,buyAsset:u},selling:n.make.value,buying:n.take.value,sellerFee:i.fee},d=t.encodeParameter({Order:s},c);return"0x".concat((0,r.keccak256)(e.from(d.substring(2),"hex")).toString("hex"))};var i={token:"address",tokenId:"uint256",assetType:"uint8"},s={key:{owner:"address",salt:"uint256",sellAsset:i,buyAsset:i},selling:"uint256",buying:"uint256",sellerFee:"uint256"}}).call(this,n(15).Buffer)},2056:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIP712_ORDER_TYPES=t.EIP712_DOMAIN_TEMPLATE=t.EIP712_ORDER_TYPE=t.EIP712_ORDER_VERSION=t.EIP712_ORDER_NAME=void 0,t.EIP712_ORDER_NAME="Exchange",t.EIP712_ORDER_VERSION="2",t.EIP712_ORDER_TYPE="Order",t.EIP712_DOMAIN_TEMPLATE={name:t.EIP712_ORDER_NAME,version:t.EIP712_ORDER_VERSION},t.EIP712_ORDER_TYPES={EIP712Domain:[{type:"string",name:"name"},{type:"string",name:"version"},{type:"uint256",name:"chainId"},{type:"address",name:"verifyingContract"}],AssetType:[{name:"assetClass",type:"bytes4"},{name:"data",type:"bytes"}],Asset:[{name:"assetType",type:"AssetType"},{name:"value",type:"uint256"}],Order:[{name:"maker",type:"address"},{name:"makeAsset",type:"Asset"},{name:"taker",type:"address"},{name:"takeAsset",type:"Asset"},{name:"salt",type:"uint256"},{name:"start",type:"uint256"},{name:"end",type:"uint256"},{name:"dataType",type:"bytes4"},{name:"data",type:"bytes"}]}},2057:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.OrderBid=void 0;var s=n(19),o=n(176),u=n(115),c=n(73),d=function(){function e(t,n,i){var o=this;a(this,e),this.upserter=t,this.checkAssetType=n,this.checkWalletChainId=i,this.bid=u.Action.create({id:"approve",run:function(e){return s.__awaiter(o,void 0,void 0,r().mark((function t(){var n,a,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("ERC20"===e.makeAssetType.assetClass){t.next=2;break}throw new Error("Make asset type should be ERC-20, received=".concat(e.makeAssetType.assetClass));case 2:return t.next=4,this.getBidForm(e);case 4:return n=t.sent,t.next=7,this.upserter.checkLazyOrder(n);case 7:return a=t.sent,t.next=10,this.upserter.approve(a,!0);case 10:return i=t.sent,t.abrupt("return",{checked:a,approveTx:i});case 12:case"end":return t.stop()}}),t,this)})))}}).thenStep({id:"sign",run:function(e){return s.__awaiter(o,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e.approveTx,t.next=3,this.upserter.upsertRequest(e.checked);case 3:return t.t1=t.sent,t.abrupt("return",{approveTx:t.t0,order:t.t1});case 5:case"end":return t.stop()}}),t,this)})))}}).before((function(e){return s.__awaiter(o,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.checkWalletChainId();case 2:return t.abrupt("return",e);case 3:case"end":return t.stop()}}),t,this)})))})),this.update=u.Action.create({id:"approve",run:function(e){return s.__awaiter(o,void 0,void 0,r().mark((function t(){var n,a,i,s,o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.upserter.getOrder(e);case 2:if("CRYPTO_PUNK"!==(n=t.sent).type){t.next=5;break}return t.abrupt("return",{form:e,approveTx:void 0});case 5:if("ERC20"===n.make.assetType.assetClass){t.next=7;break}throw new Error("Make asset type should be ERC-20, received=".concat(n.make.assetType.assetClass));case 7:return t.next=9,this.upserter.getPrice(e,n.make.assetType);case 9:return a=t.sent,t.next=12,this.prepareOrderUpdateForm(n,a);case 12:return i=t.sent,t.next=15,this.upserter.checkLazyOrder(i);case 15:return s=t.sent,t.next=18,this.upserter.approve(s,!0);case 18:return o=t.sent,t.abrupt("return",{form:s,approveTx:o});case 20:case"end":return t.stop()}}),t,this)})))}}).thenStep({id:"sign",run:function(e){return s.__awaiter(o,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!("type"in e.form)||"RARIBLE_V1"!==e.form.type&&"RARIBLE_V2"!==e.form.type){t.next=6;break}return t.t0=e.approveTx,t.next=4,this.upserter.upsertRequest(e.form);case 4:return t.t1=t.sent,t.abrupt("return",{approveTx:t.t0,order:t.t1});case 6:return t.t2=e.approveTx,t.next=9,this.upserter.updateCryptoPunkOrder(e.form);case 9:return t.t3=t.sent,t.abrupt("return",{approveTx:t.t2,order:t.t3});case 11:case"end":return t.stop()}}),t,this)})))}}).before((function(e){return s.__awaiter(o,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.checkWalletChainId();case 2:return t.abrupt("return",e);case 3:case"end":return t.stop()}}),t,this)})))}))}return i(e,[{key:"getBidForm",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.upserter.prepareOrderForm(e,!1);case 2:return n=t.sent,t.next=5,this.upserter.getPrice(e,e.makeAssetType);case 5:return a=t.sent,t.t0=Object,t.t1=Object.assign({},n),t.t2={assetType:e.makeAssetType,value:(0,c.toBigNumber)((0,o.toBn)(a).multipliedBy(e.amount).toString())},t.next=11,this.checkAssetType(e.takeAssetType);case 11:return t.t3=t.sent,t.t4=(0,c.toBigNumber)(e.amount.toString()),t.t5={assetType:t.t3,value:t.t4},t.t6={make:t.t2,take:t.t5},t.abrupt("return",t.t0.assign.call(t.t0,t.t1,t.t6));case 16:case"end":return t.stop()}}),t,this)})))}},{key:"prepareOrderUpdateForm",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("RARIBLE_V1"!==e.type&&"RARIBLE_V2"!==e.type){n.next=2;break}return n.abrupt("return",this.upserter.getOrderFormFromOrder(e,{assetType:e.make.assetType,value:(0,c.toBigNumber)((0,o.toBn)(t).multipliedBy(e.take.value).toString())},e.take));case 2:throw new Error("Unsupported order type: ".concat(e.type));case 3:case"end":return n.stop()}}),n,this)})))}}]),e}();t.OrderBid=d},2058:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19);r.__exportStar(n(937),t),r.__exportStar(n(2059),t),r.__exportStar(n(2060),t)},2059:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.checkLazyAsset=void 0;var a=n(19);t.checkLazyAsset=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e(t.assetType);case 2:return n.t0=n.sent,n.t1=t.value,n.abrupt("return",{assetType:n.t0,value:n.t1});case 5:case"end":return n.stop()}}),n)})))}},2060:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.checkLazyOrder=void 0;var a=n(19);function i(e,t,n){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var i;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e(t);case 2:if(i=r.sent,"ERC1155_LAZY"!==(a=i.assetType).assetClass&&"ERC721_LAZY"!==a.assetClass||i.assetType.creators[0].account!==n){r.next=5;break}return r.abrupt("return",i);case 5:return r.abrupt("return",t);case 6:case"end":return r.stop()}var a}),a)})))}t.checkLazyOrder=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a,s;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i(e,t.make,t.maker);case 2:return a=n.sent,n.next=5,e(t.take);case 5:return s=n.sent,n.abrupt("return",Object.assign(Object.assign({},t),{make:a,take:s}));case 7:case"end":return n.stop()}}),n)})))}},216:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxFeesBasePointSupport=t.PayoutsSupport=t.OriginFeeSupport=void 0,function(e){e.NONE="NONE",e.AMOUNT_ONLY="AMOUNT_ONLY",e.FULL="FULL"}(t.OriginFeeSupport||(t.OriginFeeSupport={})),function(e){e.NONE="NONE",e.SINGLE="SINGLE",e.MULTIPLE="MULTIPLE"}(t.PayoutsSupport||(t.PayoutsSupport={})),function(e){e.IGNORED="IGNORED",e.REQUIRED="REQUIRED"}(t.MaxFeesBasePointSupport||(t.MaxFeesBasePointSupport={}))},2208:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestURI=t.mintOffChain=void 0;var a=n(19),i=n(73),s=n(1235),o=n(1236),u=n(1237),c=n(619),d=n(1239),p=n(620),l=n(456),y=n(734);function f(e,t,n){var r={contract:e.collection.id,uri:e.uri,royalties:e.royalties||[],creators:t,tokenId:n};return"supply"in e?Object.assign({},r,{"@type":"ERC1155",supply:(0,i.toBigNumber)(e.supply.toString())}):Object.assign({},r,{"@type":"ERC721"})}function m(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,o,u;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("ERC721"!==t.collection.type){n.next=10;break}return n.next=3,(0,p.getErc721Contract)(e,l.ERC721VersionEnum.ERC721V3,t.collection.id);case 3:return a=n.sent,n.next=6,a.functionCall("baseURI").call();case 6:return i=n.sent,n.abrupt("return",(0,s.sanitizeUri)(i,t.uri));case 10:if("ERC1155"!==t.collection.type){n.next=18;break}return n.next=13,(0,y.getErc1155Contract)(e,l.ERC1155VersionEnum.ERC1155V2,t.collection.id);case 13:return o=n.sent,n.next=16,o.functionCall("baseURI").call();case 16:return u=n.sent,n.abrupt("return",(0,s.sanitizeUri)(u,t.uri));case 18:throw new Error("Wrong collection type");case 19:case"end":return n.stop()}}),n)})))}t.mintOffChain=function(e,t,n,i,s){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var p,l,y,b,v;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=o.getBlockchainFromChainId,r.next=3,e.getChainId();case 3:if(r.t1=r.sent,r.t2=(0,r.t0)(r.t1),"POLYGON"!==r.t2){r.next=7;break}throw new Error("Off-chain mint not supported for Polygon");case 7:return r.next=9,(0,d.getCreators)(s,e);case 9:return p=r.sent,r.next=12,(0,u.getTokenId)(n,s.collection.id,p[0].account,s.nftTokenId);case 12:return l=r.sent,y=l.tokenId,r.t3=f,r.t4=Object,r.t5=Object.assign({},s),r.next=19,m(e,s);case 19:return r.t6=r.sent,r.t7={uri:r.t6},r.t8=r.t4.assign.call(r.t4,r.t5,r.t7),r.t9=p,r.t10=y,b=(0,r.t3)(r.t8,r.t9,r.t10),r.t11=i,r.t12=Object,r.t13={},r.t14=b,r.t15=y,r.next=32,t(b);case 32:return r.t16=r.sent,r.t17=[r.t16],r.t18={tokenId:r.t15,signatures:r.t17},r.t19=r.t12.assign.call(r.t12,r.t13,r.t14,r.t18),r.t20={lazyNft:r.t19},r.next=39,r.t11.mintNftAsset.call(r.t11,r.t20);case 39:return v=r.sent,r.abrupt("return",{type:c.MintResponseTypeEnum.OFF_CHAIN,item:v,owner:p[0].account,tokenId:y,contract:v.contract,itemId:"".concat(v.contract,":").concat(y)});case 41:case"end":return r.stop()}}),a)})))},t.getRequestURI=m},2209:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc721v3Abi=void 0,t.erc721v3Abi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"}],name:"CreateERC721Rarible",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"}],name:"CreateERC721RaribleUser",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],indexed:!1,internalType:"struct LibPart.Part[]",name:"creators",type:"tuple[]"}],name:"Creators",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"hasApproval",type:"bool"}],name:"DefaultApproval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],indexed:!1,internalType:"struct LibPart.Part[]",name:"royalties",type:"tuple[]"}],name:"RoyaltiesSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"baseURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"contractURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getCreators",outputs:[{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getRaribleV2Royalties",outputs:[{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"tokenURI",type:"string"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"creators",type:"tuple[]"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"royalties",type:"tuple[]"},{internalType:"bytes[]",name:"signatures",type:"bytes[]"}],internalType:"struct LibERC721LazyMint.Mint721Data",name:"data",type:"tuple"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"}],name:"transferFromOrMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"}],name:"updateAccount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address[]",name:"operators",type:"address[]"}],name:"__ERC721RaribleUser_init",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address",name:"transferProxy",type:"address"},{internalType:"address",name:"lazyTransferProxy",type:"address"}],name:"__ERC721Rarible_init",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"tokenURI",type:"string"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"creators",type:"tuple[]"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"royalties",type:"tuple[]"},{internalType:"bytes[]",name:"signatures",type:"bytes[]"}],internalType:"struct LibERC721LazyMint.Mint721Data",name:"data",type:"tuple"},{internalType:"address",name:"to",type:"address"}],name:"mintAndTransfer",outputs:[],stateMutability:"nonpayable",type:"function"}]},2210:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc721v2Abi=void 0,t.erc721v2Abi=[{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"address",name:"newOwner",type:"address"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"string",name:"tokenURIPrefix",type:"string"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"address[]",name:"recipients",type:"address[]"},{indexed:!1,internalType:"uint256[]",name:"bps",type:"uint256[]"}],name:"SecondarySaleFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burn",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contractURI",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],name:"fees",outputs:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getFeeBps",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getFeeRecipients",outputs:[{internalType:"address payable[]",name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"isOwner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"tokenURIPrefix",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"},{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct ERC721Base.Fee[]",name:"_fees",type:"tuple[]"},{internalType:"string",name:"tokenURI",type:"string"}],name:"mint",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"tokenURIPrefix",type:"string"}],name:"setTokenURIPrefix",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"contractURI",type:"string"}],name:"setContractURI",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},2211:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc721v1Abi=void 0,t.erc721v1Abi=[{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"contractURIPrefix",type:"string"},{internalType:"string",name:"tokenURIPrefix",type:"string"},{internalType:"address",name:"signer",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"}],name:"Create",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"SignerAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"SignerRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burn",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contractURI",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contractURIPrefix",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"isOwner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"account",type:"address"}],name:"isSigner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"renounceSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"tokenURIPrefix",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"},{internalType:"string",name:"tokenURI",type:"string"}],name:"mint",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"account",type:"address"}],name:"addSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"account",type:"address"}],name:"removeSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"tokenURIPrefix",type:"string"}],name:"setTokenURIPrefix",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"contractURIPrefix",type:"string"}],name:"setContractURIPrefix",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},2212:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc1155v2Abi=void 0,t.erc1155v2Abi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"}],name:"CreateERC1155Rarible",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"}],name:"CreateERC1155RaribleUser",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],indexed:!1,internalType:"struct LibPart.Part[]",name:"creators",type:"tuple[]"}],name:"Creators",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"hasApproval",type:"bool"}],name:"DefaultApproval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],indexed:!1,internalType:"struct LibPart.Part[]",name:"royalties",type:"tuple[]"}],name:"RoyaltiesSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Supply",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"baseURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"burnBatch",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"contractURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],name:"creators",outputs:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getCreators",outputs:[{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getRaribleV2Royalties",outputs:[{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"tokenURI",type:"string"},{internalType:"uint256",name:"supply",type:"uint256"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"creators",type:"tuple[]"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"royalties",type:"tuple[]"},{internalType:"bytes[]",name:"signatures",type:"bytes[]"}],internalType:"struct LibERC1155LazyMint.Mint1155Data",name:"data",type:"tuple"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFromOrMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"}],name:"updateAccount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address[]",name:"operators",type:"address[]"}],name:"__ERC1155RaribleUser_init",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address",name:"transferProxy",type:"address"},{internalType:"address",name:"lazyTransferProxy",type:"address"}],name:"__ERC1155Rarible_init",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"tokenURI",type:"string"},{internalType:"uint256",name:"supply",type:"uint256"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"creators",type:"tuple[]"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"royalties",type:"tuple[]"},{internalType:"bytes[]",name:"signatures",type:"bytes[]"}],internalType:"struct LibERC1155LazyMint.Mint1155Data",name:"data",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"mintAndTransfer",outputs:[],stateMutability:"nonpayable",type:"function"}]},2213:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc1155v1Abi=void 0,t.erc1155v1Abi=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"address",name:"signer",type:"address"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"string",name:"tokenURIPrefix",type:"string"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_owner",type:"address"},{indexed:!0,internalType:"address",name:"_operator",type:"address"},{indexed:!1,internalType:"bool",name:"_approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"}],name:"CreateERC1155_v1",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"address[]",name:"recipients",type:"address[]"},{indexed:!1,internalType:"uint256[]",name:"bps",type:"uint256[]"}],name:"SecondarySaleFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"SignerAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"SignerRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_operator",type:"address"},{indexed:!0,internalType:"address",name:"_from",type:"address"},{indexed:!0,internalType:"address",name:"_to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"_ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"_values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_operator",type:"address"},{indexed:!0,internalType:"address",name:"_from",type:"address"},{indexed:!0,internalType:"address",name:"_to",type:"address"},{indexed:!1,internalType:"uint256",name:"_id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"_value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"_value",type:"string"},{indexed:!0,internalType:"uint256",name:"_id",type:"uint256"}],name:"URI",type:"event"},{constant:!1,inputs:[{internalType:"address",name:"account",type:"address"}],name:"addSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address[]",name:"_owners",type:"address[]"},{internalType:"uint256[]",name:"_ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"burn",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contractURI",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"creators",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],name:"fees",outputs:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getFeeBps",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getFeeRecipients",outputs:[{internalType:"address payable[]",name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"isOwner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"account",type:"address"}],name:"isSigner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"account",type:"address"}],name:"removeSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"renounceSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256[]",name:"_ids",type:"uint256[]"},{internalType:"uint256[]",name:"_values",type:"uint256[]"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_operator",type:"address"},{internalType:"bool",name:"_approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"contractURI",type:"string"}],name:"setContractURI",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"tokenURIPrefix",type:"string"}],name:"setTokenURIPrefix",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"tokenURIPrefix",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"},{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct ERC1155Base.Fee[]",name:"fees",type:"tuple[]"},{internalType:"uint256",name:"supply",type:"uint256"},{internalType:"string",name:"uri",type:"string"}],name:"mint",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},2214:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.transfer=void 0;var a=n(19),i=n(73),s=n(176),o=n(735),u=n(2215),c=n(2216),d=n(2217),p=n(2218);t.transfer=function(e,t,n,l,y,f,m,b,v){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var h,T,g;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,f();case 2:if(e){r.next=4;break}throw new Error("Wallet undefined");case 4:return r.t0=i.toAddress,r.next=7,e.getFrom();case 7:return r.t1=r.sent,h=(0,r.t0)(r.t1),r.next=11,y.getNftOwnershipByIdRaw({ownershipId:(0,o.getOwnershipId)(m.contract,(0,i.toBigNumber)("".concat(m.tokenId)),h)});case 11:if(200!==(T=r.sent).status){r.next=31;break}return r.next=15,n(m);case 15:if(g=r.sent,!(0,s.toBn)(T.value.lazyValue).gt(0)){r.next=22;break}if("CRYPTO_PUNKS"!==g.assetClass){r.next=19;break}throw new Error("CRYPTO_PUNKS can't be lazy");case 19:if("COLLECTION"!==g.assetClass){r.next=21;break}throw new Error("Transfer asset class cannot be as collection");case 21:return r.abrupt("return",(0,d.transferNftLazy)(e,t,l,g,(0,i.toAddress)(h),b,v));case 22:r.t2=g.assetClass,r.next="ERC721"===r.t2?25:"ERC1155"===r.t2?26:"CRYPTO_PUNKS"===r.t2?27:28;break;case 25:return r.abrupt("return",(0,u.transferErc721)(e,t,g.contract,h,b,g.tokenId));case 26:return r.abrupt("return",(0,c.transferErc1155)(e,t,g.contract,h,b,g.tokenId,v||"1"));case 27:return r.abrupt("return",(0,p.transferCryptoPunk)(e,t,g.contract,b,g.tokenId));case 28:throw new Error("Not supported asset: ".concat(JSON.stringify(g)));case 29:r.next=32;break;case 31:throw new Error("Address ".concat(h," has not any ownerships of token with Id ").concat(m.tokenId));case 32:case"end":return r.stop()}}),a)})))}},2215:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.transferErc721=void 0;var a=n(19),i=n(617);t.transferErc721=function(e,t,n,s,o,u){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=(0,i.createErc721Contract)(e,n),r.abrupt("return",t(c.functionCall("safeTransferFrom",s,o,u)));case 2:case"end":return r.stop()}}),a)})))}},2216:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.transferErc1155=void 0;var a=n(19),i=n(618);function s(e,t,n,s,o,u,c){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var d;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(d=(0,i.createErc1155Contract)(e,n),!Array.isArray(u)||!Array.isArray(c)){r.next=3;break}return r.abrupt("return",t(d.functionCall("safeBatchTransferFrom",s,o,u,c,"0x00")));case 3:return r.abrupt("return",t(d.functionCall("safeTransferFrom",s,o,u,c,"0x00")));case 4:case"end":return r.stop()}}),a)})))}t.transferErc1155=function(e,t,n,i,o,u,c){return a.__awaiter(this,void 0,void 0,r().mark((function a(){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!Array.isArray(u)||!Array.isArray(c)){r.next=8;break}if(u.length!==c.length){r.next=5;break}return r.abrupt("return",s(e,t,n,i,o,u,c));case 5:throw new Error("Length of token amounts and token id's isn't equal");case 6:r.next=9;break;case 8:return r.abrupt("return",s(e,t,n,i,o,u,c));case 9:case"end":return r.stop()}}),a)})))}},2217:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.transferNftLazy=void 0;var a=n(19),i=n(620),s=n(456),o=n(734);t.transferNftLazy=function(e,t,n,u,c,d,p){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var l,y,f,m;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,n.getNftLazyItemById({itemId:"".concat(u.contract,":").concat(u.tokenId)});case 2:l=r.sent,y={tokenId:l.tokenId,tokenURI:l.uri,creators:l.creators,royalties:l.royalties,signatures:l.signatures},"ERC1155"===l["@type"]&&(y.supply=l.supply),r.t0=l["@type"],r.next="ERC721"===r.t0?8:"ERC1155"===r.t0?12:16;break;case 8:return r.next=10,(0,i.getErc721Contract)(e,s.ERC721VersionEnum.ERC721V3,l.contract);case 10:return f=r.sent,r.abrupt("return",t(f.functionCall("transferFromOrMint",y,c,d)));case 12:return r.next=14,(0,o.getErc1155Contract)(e,s.ERC1155VersionEnum.ERC1155V2,l.contract);case 14:return m=r.sent,r.abrupt("return",t(m.functionCall("transferFromOrMint",y,c,d,p)));case 16:return r.abrupt("return",Promise.reject(new Error("Unsupported nft standard")));case 17:case"end":return r.stop()}}),a)})))}},2218:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.transferCryptoPunk=void 0;var a=n(19),i=n(520);t.transferCryptoPunk=function(e,t,n,s,o){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var u;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=(0,i.createCryptoPunksMarketContract)(e,n),r.abrupt("return",t(u.functionCall("transferPunk",s,o)));case 2:case"end":return r.stop()}}),a)})))}},2219:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.signNft=void 0;var a=n(19),i=n(73),s=n(2220);function o(e,t,n){switch(n){case"ERC721":return Object.assign(Object.assign({},s.EIP721_DOMAIN_NFT_TEMPLATE),{chainId:e,verifyingContract:t});case"ERC1155":return Object.assign(Object.assign({},s.EIP1155_DOMAIN_NFT_TEMPLATE),{chainId:e,verifyingContract:t});default:throw new Error("Unexpected")}}t.signNft=function(e,t,n){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var u,c,d,p,l,y;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}throw new Error("Wallet undefined");case 2:r.t0=n["@type"],r.next="ERC721"===r.t0?5:"ERC1155"===r.t0?13:21;break;case 5:return u=o(t,n.contract,"ERC721"),c={types:s.EIP721_NFT_TYPES,domain:u,primaryType:s.EIP721_NFT_TYPE,message:Object.assign(Object.assign({},n),{tokenURI:n.uri})},r.next=9,e.signTypedData(c);case 9:if(d=r.sent){r.next=12;break}throw new Error("signNft error: signedData is empty (".concat(d,"), data=").concat(JSON.stringify(c)));case 12:return r.abrupt("return",(0,i.toBinary)(d));case 13:return p=o(t,n.contract,"ERC1155"),l={types:s.EIP1155_NFT_TYPES,domain:p,primaryType:s.EIP1155_NFT_TYPE,message:Object.assign(Object.assign({},n),{tokenURI:n.uri})},r.next=17,e.signTypedData(l);case 17:if(y=r.sent){r.next=20;break}throw new Error("signNft error: signedData=".concat(y,", data=").concat(JSON.stringify(l)));case 20:return r.abrupt("return",(0,i.toBinary)(y));case 21:throw new Error("Unexpected");case 22:case"end":return r.stop()}}),a)})))}},2220:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIP1155_DOMAIN_NFT_TEMPLATE=t.EIP1155_DOMAIN_NFT_VERSION=t.EIP1155_DOMAIN_NFT_NAME=t.EIP1155_NFT_TYPE=t.EIP721_DOMAIN_NFT_TEMPLATE=t.EIP721_DOMAIN_NFT_VERSION=t.EIP721_DOMAIN_NFT_NAME=t.EIP1155_NFT_TYPES=t.EIP721_NFT_TYPES=t.NFT_DOMAIN_TYPE=t.EIP721_NFT_TYPE=void 0,t.EIP721_NFT_TYPE="Mint721",t.NFT_DOMAIN_TYPE=[{type:"string",name:"name"},{type:"string",name:"version"},{type:"uint256",name:"chainId"},{type:"address",name:"verifyingContract"}],t.EIP721_NFT_TYPES={EIP712Domain:t.NFT_DOMAIN_TYPE,Part:[{name:"account",type:"address"},{name:"value",type:"uint96"}],Mint721:[{name:"tokenId",type:"uint256"},{name:"tokenURI",type:"string"},{name:"creators",type:"Part[]"},{name:"royalties",type:"Part[]"}]},t.EIP1155_NFT_TYPES={EIP712Domain:t.NFT_DOMAIN_TYPE,Part:[{name:"account",type:"address"},{name:"value",type:"uint96"}],Mint1155:[{name:"tokenId",type:"uint256"},{name:"supply",type:"uint256"},{name:"tokenURI",type:"string"},{name:"creators",type:"Part[]"},{name:"royalties",type:"Part[]"}]},t.EIP721_DOMAIN_NFT_NAME="Mint721",t.EIP721_DOMAIN_NFT_VERSION="1",t.EIP721_DOMAIN_NFT_TEMPLATE={name:t.EIP721_DOMAIN_NFT_NAME,version:t.EIP721_DOMAIN_NFT_VERSION},t.EIP1155_NFT_TYPE="Mint1155",t.EIP1155_DOMAIN_NFT_NAME="Mint1155",t.EIP1155_DOMAIN_NFT_VERSION="1",t.EIP1155_DOMAIN_NFT_TEMPLATE={name:t.EIP1155_DOMAIN_NFT_NAME,version:t.EIP1155_DOMAIN_NFT_VERSION}},2221:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.burn=void 0;var a=n(19),i=n(73),s=n(121),o=n(735),u=n(1240),c=n(620),d=n(456),p=n(734);t.burn=function(e,t,n,l,y,f){var m;return a.__awaiter(this,void 0,void 0,r().mark((function a(){var b,v,h,T,g,w,k,x,O;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,y();case 2:if(e){r.next=4;break}throw new Error("Wallet undefined");case 4:return r.next=6,n(f.assetType);case 6:return b=r.sent,r.t0=i.toAddress,r.next=10,e.getFrom();case 10:return r.t1=r.sent,v=(0,r.t0)(r.t1),r.next=14,l.nftOwnership.getNftOwnershipByIdRaw({ownershipId:(0,o.getOwnershipId)(f.assetType.contract,(0,i.toBigNumber)("".concat(f.assetType.tokenId)),v)});case 14:if(200!==(h=r.sent).status){r.next=44;break}if(!(T=(0,s.toBn)(h.value.lazyValue)).gt(0)){r.next=27;break}if(T.isEqualTo(h.value.value)){r.next=20;break}throw new Error("Unable to burn lazy minted item");case 20:return g=f.creators&&f.creators.length?null===(m=f.creators)||void 0===m?void 0:m.map((function(e){return e.account})):[v],r.next=23,e.personalSign("I would like to burn my ".concat(f.assetType.tokenId," item."));case 23:if(w=r.sent){r.next=26;break}throw new Error("burn error: personal signature is empty (".concat(w,")"));case 26:return r.abrupt("return",l.nftItem.deleteLazyMintNftAsset({itemId:(0,u.createItemId)(f.assetType.contract,(0,i.toBigNumber)("".concat(f.assetType.tokenId))),burnLazyNftForm:{creators:g,signatures:[(0,i.toBinary)(w)]}}));case 27:r.t2=b.assetClass,r.next="ERC721"===r.t2?30:"ERC1155"===r.t2?34:43;break;case 30:return r.next=32,(0,c.getErc721Contract)(e,d.ERC721VersionEnum.ERC721V2,b.contract);case 32:return k=r.sent,r.abrupt("return",t(k.functionCall("burn",b.tokenId)));case 34:if(!f.amount){r.next=42;break}return r.next=37,(0,p.getErc1155Contract)(e,d.ERC1155VersionEnum.ERC1155V1,b.contract);case 37:return x=r.sent,r.next=40,e.getFrom();case 40:return O=r.sent,r.abrupt("return",t(x.functionCall("burn",O,b.tokenId,f.amount)));case 42:throw new Error("amount is ".concat(f.amount,". Amount for burn ERC1155 is required"));case 43:throw new Error("Unexpected asset class");case 44:throw new Error("Ownership is not found");case 45:case"end":return r.stop()}}),a)})))}},2222:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.createEthereumApis=void 0;var a=n(19),i=a.__importStar(n(733)),s=n(406),o=n(2223);t.createEthereumApis=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=(0,o.getApiConfig)(e,Object.assign({headers:"string"===typeof n.apiKey?{"X-API-KEY":n.apiKey}:{},exceptionHandler:function(e,n,i){return a.__awaiter(t,void 0,void 0,r().mark((function t(){var a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new s.NetworkError({status:-1,url:decodeURIComponent(n),formData:null===(a=null===i||void 0===i?void 0:i.body)||void 0===a?void 0:a.toString(),method:null===i||void 0===i?void 0:i.method,data:{message:e.message}});case 1:case"end":return t.stop()}}),t)})))}},n)),c=new i.Configuration(u);return{nftItem:new i.NftItemControllerApi(c),nftOwnership:new i.NftOwnershipControllerApi(c),order:new i.OrderControllerApi(c),orderActivity:new i.OrderActivityControllerApi(c),orderSignature:new i.OrderSignatureControllerApi(c),nftCollection:new i.NftCollectionControllerApi(c),balances:new i.BalanceControllerApi(c),gateway:new i.GatewayControllerApi(c),nftLazyMint:new i.NftLazyMintControllerApi(c),auction:new i.AuctionControllerApi(c)}}},2223:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getApiConfig=void 0;var r=n(1224);t.getApiConfig=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,r.getEthereumConfig)(e);return Object.assign({basePath:n.basePath},t)}},2224:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.waitForReceipt=t.waitForConfirmation=t.waitForHash=t.sentTxConfirm=t.sentTx=t.getSimpleSendWithInjects=t.getSendWithInjects=void 0;var a=n(19),i=n(938),s=n(939),o=n(2243);function u(e){return{hash:e.hash,data:e.data,nonce:e.nonce,from:e.from,to:e.to}}function c(e){return a.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e.once("transactionHash",(function(e){return t(e)})),e.once("error",(function(e){return n(e)}))})));case 1:case"end":return t.stop()}}),t)})))}function d(e){return a.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e.once("confirmation",(function(e,n){return t(n.transactionHash)})),e.once("error",(function(e){return n(e)}))})));case 1:case"end":return t.stop()}}),t)})))}t.getSendWithInjects=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).logger;return function(t,n,c,d){return a.__awaiter(this,void 0,void 0,r().mark((function t(){var a,p,l;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n();case 2:return t.next=4,c.getCallInfo();case 4:return a=t.sent,t.next=7,(0,o.estimateGas)(c,{from:a.from,value:null===d||void 0===d?void 0:d.value},e);case 7:return t.prev=7,t.next=10,c.send(d);case 10:p=t.sent;try{(null===e||void 0===e?void 0:e.level)&&e.level>=i.LogsLevel.TRACE&&e.instance.raw({level:"TRACE",method:a.method,message:JSON.stringify(u(p)),args:JSON.stringify(a.args),provider:a.provider,to:a.contract,value:null===d||void 0===d?void 0:d.value})}catch(r){console.error("Error while sending logs",r)}return t.abrupt("return",p);case 15:if(t.prev=15,t.t0=t.catch(7),t.prev=17,!((null===e||void 0===e?void 0:e.level)&&e.level>=i.LogsLevel.ERROR)){t.next=30;break}return l=void 0,t.prev=20,t.next=23,c.getData();case 23:l=t.sent,t.next=29;break;case 26:t.prev=26,t.t1=t.catch(20),console.error("Unable to get tx data for log",t.t1);case 29:e.instance.raw({level:"ERROR",method:a.method,message:(0,s.getErrorMessageString)(t.t0),from:a.from,provider:a.provider,args:JSON.stringify(a.args),to:a.contract,value:null===d||void 0===d?void 0:d.value,data:l});case 30:t.next=35;break;case 32:t.prev=32,t.t2=t.catch(17),console.error("Error while sending logs",t.t2,t.t0);case 35:throw t.t0;case 36:case"end":return t.stop()}}),t,null,[[7,15],[17,32],[20,26]])})))}},t.getSimpleSendWithInjects=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).logger;return function(t,n,c){return a.__awaiter(this,void 0,void 0,r().mark((function t(){var a,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getCallInfo();case 2:return a=t.sent,t.prev=3,t.next=6,(0,o.estimateGas)(n,{from:a.from,value:null===c||void 0===c?void 0:c.value},e);case 6:t.next=10;break;case 8:t.prev=8,t.t0=t.catch(3);case 10:return t.prev=10,t.next=13,n.send(c);case 13:d=t.sent;try{(null===e||void 0===e?void 0:e.level)&&e.level>=i.LogsLevel.TRACE&&e.instance.raw({level:"TRACE",method:a.method,from:a.from,provider:a.provider,args:JSON.stringify(a.args),message:JSON.stringify(u(d)),to:a.contract,value:null===c||void 0===c?void 0:c.value})}catch(r){console.error("Error while sending logs",r)}return t.abrupt("return",d);case 18:t.prev=18,t.t1=t.catch(10);try{(null===e||void 0===e?void 0:e.level)&&e.level>=i.LogsLevel.ERROR&&a&&e.instance.raw({level:"ERROR",method:a.method,from:a.from,provider:a.provider,args:JSON.stringify(a.args),error:(0,s.getErrorMessageString)(t.t1),to:a.contract,value:null===c||void 0===c?void 0:c.value})}catch(r){console.error("Error while sending logs",r,t.t1)}throw t.t1;case 22:case"end":return t.stop()}}),t,null,[[3,8],[10,18]])})))}},t.sentTx=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=e.send(Object.assign(Object.assign({},t),{gas:3e6})),n.abrupt("return",c(a));case 2:case"end":return n.stop()}}),n)})))},t.sentTxConfirm=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=e.send(Object.assign(Object.assign({},t),{gas:3e6})),n.abrupt("return",d(a));case 2:case"end":return n.stop()}}),n)})))},t.waitForHash=c,t.waitForConfirmation=d,t.waitForReceipt=function(e){return a.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e.once("receipt",(function(e){return t(e)})),e.once("error",(function(e){return n(e)}))})));case 1:case"end":return t.stop()}}),t)})))}},2242:function(e){e.exports=JSON.parse('{"name":"@rarible/protocol-ethereum-sdk","version":"0.13.55","keywords":["axios","typescript","openapi","openapi-generator","api_documentation"],"license":"Apache-2.0","main":"build/index.js","types":"build/index.d.ts","files":["build","umd","typings.d.ts"],"scripts":{"clean":"rimraf ./build ./umd","build":"run-s build:*","build:ts":"tsc --project tsconfig-build.json","build:umd":"webpack","verify":"tsc --noEmit","test":"jest --runInBand --silent --forceExit"},"dependencies":{"@rarible/action":"~0.9.1","@rarible/ethereum-api-client":"^0.1.26-beta2","@rarible/ethereum-provider":"^0.13.55","@rarible/logger":"^0.9.12","@rarible/sdk-common":"^0.13.55","@rarible/utils":"~0.9.10","eth-sig-util":"^3.0.0","ethereumjs-util":"^7.1.0","exponential-backoff":"^3.1.0","merkletreejs":"^0.2.31"},"devDependencies":{"@rarible/ethereum-sdk-test-common":"^0.13.55","@rarible/ethers-ethereum":"^0.13.55","@rarible/test-provider":"~0.5.0","@rarible/web3-ethereum":"^0.13.55","@types/jest":"27.0.2","@types/node-fetch":"^2.5.11","buffer":"^6.0.3","ethers":"~5.4.4","form-data":"^4.0.0","identity-obj-proxy":"^3.0.0","jest":"^27.3.1","jest-junit":"^15.0.0","node-polyfill-webpack-plugin":"^1.1.4","npm-run-all":"^4.1.5","process":"^0.11.10","stream-browserify":"^3.0.0","ts-jest":"^27.0.7","typescript":"^4.8.4","web3":">=1.5.0 <1.9.0","webpack":"^5.68.0","webpack-cli":"^4.9.2"},"peerDependencies":{"axios":"^0.26.1","tslib":"^2.3.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"gitHead":"e1a77d6596ee3286e6f2d7c1db5f69489c10f10c"}')},2243:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.estimateGas=void 0;var a=n(19),i=n(938),s=n(939);t.estimateGas=function(e,t,n){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var o,u,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,e.estimateGas(t);case 3:return r.abrupt("return",r.sent);case 6:return r.prev=6,r.t0=r.catch(0),r.prev=8,r.next=11,e.getCallInfo();case 11:if(o=r.sent,!((null===n||void 0===n?void 0:n.level)&&n.level>=i.LogsLevel.ERROR)){r.next=26;break}return u=void 0,r.prev=14,r.next=17,e.getData();case 17:u=r.sent,r.next=23;break;case 20:r.prev=20,r.t1=r.catch(14),console.error("Unable to get tx data for log",r.t1);case 23:c={level:"ESTIMATE_GAS_ERRORS",method:"".concat(o.method,".estimateGas"),message:(0,s.getErrorMessageString)(r.t0),from:o.from,provider:o.provider,args:JSON.stringify(o.args),to:o.contract,value:null===t||void 0===t?void 0:t.value,data:u},console.error(c),n.instance.raw(c);case 26:r.next=31;break;case 28:r.prev=28,r.t2=r.catch(8),console.error("Error while sending logs",r.t2,r.t0);case 31:throw r.t0;case 32:case"end":return r.stop()}}),a,null,[[0,6],[8,28],[14,20]])})))}},2244:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.cancelLooksRareV2Order=t.cancelLooksRareOrder=t.cancelSeaportOrder=t.cancelCryptoPunkOrderByAsset=t.cancelCryptoPunksOrder=t.cancelX2Y2Order=t.cancelOpenseaOrderV1=t.cancel=void 0;var a=n(19),i=n(73),s=n(737),o=n(520),u=n(302),c=n(1250),d=n(1251),p=n(1252),l=n(1253),y=n(942),f=n(934),m=n(1254),b=n(943),v=n(2286),h=n(2287),T=n(947),g=n(1260);function w(e,t,n,i){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var s;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return s=(0,c.createExchangeV1Contract)(e,n),r.abrupt("return",t(s.functionCall("cancel",(0,l.toStructLegacyOrderKey)(i))));case 2:case"end":return r.stop()}}),a)})))}function k(e,t,n,i){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var s;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return s=(0,d.createExchangeV2Contract)(e,n),r.abrupt("return",t(s.functionCall("cancel",(0,f.orderToStruct)(e,i))));case 2:case"end":return r.stop()}}),a)})))}function x(e,t,n){var r=(0,p.createOpenseaContract)(e,n.data.exchange),a=(0,m.convertOpenSeaOrderToDTO)(e,n),i=(0,s.toVrs)(n.signature||"0x");return t(r.functionCall("cancelOrder_",(0,y.getAtomicMatchArgAddresses)(a),(0,y.getAtomicMatchArgUints)(a),a.feeMethod,a.side,a.saleKind,a.howToCall,a.calldata,a.replacementPattern,a.staticExtradata,i.v,i.r,i.s))}function O(e,t,n,s,o){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var u,c,d,p,l;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=function(t){return e.decodeParameter({components:[{name:"itemHashes",type:"bytes32[]"},{name:"deadline",type:"uint256"},{name:"v",type:"uint8"},{name:"r",type:"bytes32"},{name:"s",type:"bytes32"}],name:"data",type:"tuple"},t)[0]},c=(0,i.toBigNumber)("3"),d=(0,h.createX2Y2Contract)(e,s),p="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",r.t0=u,r.t1=n.orderSignature,r.t2=o.data.orderId,r.t3=c,r.next=10,e.getFrom();case 10:return r.t4=r.sent,r.next=13,e.personalSign(p);case 13:return r.t5=r.sent,r.t6=p,r.t7={orderId:r.t2,op:r.t3,caller:r.t4,sign:r.t5,signMessage:r.t6},r.t8={x2Y2GetCancelInputRequest:r.t7},r.next=19,r.t1.cancelSignX2Y2.call(r.t1,r.t8);case 19:return r.t9=r.sent.input,l=(0,r.t0)(r.t9),r.abrupt("return",t(d.functionCall("cancel",l.itemHashes,l.deadline,l.v,l.r,l.s)));case 22:case"end":return r.stop()}}),a)})))}function _(e,t,n){if("CRYPTO_PUNKS"===n.make.assetType.assetClass)return E(e,t,"punkNoLongerForSale",n.make.assetType);if("CRYPTO_PUNKS"===n.take.assetType.assetClass)return E(e,t,"withdrawBidForPunk",n.take.assetType);throw new Error("Crypto punks asset has not been found")}function E(e,t,n,r){return t((0,o.createCryptoPunksMarketContract)(e,r.contract).functionCall(n,r.tokenId))}function A(e,t,n,s){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var o,u,c,d;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(s.signature&&"0x"!==s.signature){r.next=6;break}return r.next=3,n.orderSignature.getSeaportOrderSignature({hash:s.hash});case 3:o=r.sent,u=o.signature,s.signature=u;case 6:return c=(0,b.convertAPIOrderToSeaport)(s).parameters,d=(0,T.getSeaportContract)(e,(0,i.toAddress)(s.data.protocol)),r.abrupt("return",t(d.functionCall("cancel",[c])));case 9:case"end":return r.stop()}}),a)})))}function C(e,t,n,i){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var s,o;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(s=(0,u.getRequiredWallet)(e),n.looksrare){r.next=3;break}throw new Error("Looksrare contract did not specified");case 3:return o=(0,v.createLooksrareExchange)(s,n.looksrare),r.abrupt("return",t(o.functionCall("cancelMultipleMakerOrders",[i.data.nonce])));case 5:case"end":return r.stop()}}),a)})))}function I(e,t,n,i){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var s,o;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(s=(0,u.getRequiredWallet)(e),n.looksrareV2){r.next=3;break}throw new Error("Looksrare contract did not specified");case 3:return o=(0,g.createLooksrareV2Exchange)(s,n.looksrareV2),r.abrupt("return",t(o.functionCall("cancelOrderNonces",[i.data.orderNonce])));case 5:case"end":return r.stop()}}),a)})))}t.cancel=function(e,t,n,i,s,o,u){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,s();case 2:if(!t){r.next=18;break}return r.next=5,e(u);case 5:c=r.sent,r.t0=c.type,r.next="RARIBLE_V1"===r.t0?9:"RARIBLE_V2"===r.t0?10:"OPEN_SEA_V1"===r.t0?11:"SEAPORT_V1"===r.t0?12:"LOOKSRARE"===r.t0?13:"LOOKSRARE_V2"===r.t0?14:"CRYPTO_PUNK"===r.t0?15:"X2Y2"===r.t0?16:17;break;case 9:return r.abrupt("return",w(t,n,i.v1,c));case 10:return r.abrupt("return",k(t,n,i.v2,c));case 11:return r.abrupt("return",x(t,n,c));case 12:return r.abrupt("return",A(t,n,o,c));case 13:return r.abrupt("return",C(t,n,i,c));case 14:return r.abrupt("return",I(t,n,i,c));case 15:return r.abrupt("return",_(t,n,c));case 16:return r.abrupt("return",O(t,n,o,i.x2y2,c));case 17:throw new Error("Unsupported order: ".concat(JSON.stringify(c)));case 18:throw new Error("Wallet undefined");case 19:case"end":return r.stop()}}),a)})))},t.cancelOpenseaOrderV1=x,t.cancelX2Y2Order=O,t.cancelCryptoPunksOrder=_,t.cancelCryptoPunkOrderByAsset=E,t.cancelSeaportOrder=A,t.cancelLooksRareOrder=C,t.cancelLooksRareV2Order=I},2245:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.proxyRegistryAbi=t.createOpenseaProxyRegistryEthContract=void 0,t.createOpenseaProxyRegistryEthContract=function(e,n){return e.createContract(t.proxyRegistryAbi,n)},t.proxyRegistryAbi=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"initialAddressSet",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"addr",type:"address"}],name:"endGrantAuthentication",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"addr",type:"address"}],name:"revokeAuthentication",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"pending",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"contracts",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"delegateProxyImplementation",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"proxies",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"addr",type:"address"}],name:"startGrantAuthentication",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"registerProxy",outputs:[{name:"proxy",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"DELAY_PERIOD",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"previousOwner",type:"address"}],name:"OwnershipRenounced",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"previousOwner",type:"address"},{indexed:!0,name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{constant:!1,inputs:[{name:"authAddress",type:"address"}],name:"grantInitialAuthentication",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},2246:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merkleValidatorAbi=t.createMerkleValidatorContract=void 0,t.createMerkleValidatorContract=function(e,n){return e.createContract(t.merkleValidatorAbi,n)},t.merkleValidatorAbi=[{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"contract IERC721",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"matchERC721UsingCriteria",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"contract IERC721",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"matchERC721WithSafeTransferUsingCriteria",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"contract IERC1155",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"matchERC1155UsingCriteria",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}]},2247:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrderOpenSeaV1DataV1HowToCall=t.OrderOpenSeaV1DataV1SaleKind=t.OrderOpenSeaV1DataV1Side=t.OrderOpenSeaV1DataV1FeeMethod=void 0,function(e){e[e.PROTOCOL_FEE=0]="PROTOCOL_FEE",e[e.SPLIT_FEE=1]="SPLIT_FEE"}(t.OrderOpenSeaV1DataV1FeeMethod||(t.OrderOpenSeaV1DataV1FeeMethod={})),function(e){e[e.BUY=0]="BUY",e[e.SELL=1]="SELL"}(t.OrderOpenSeaV1DataV1Side||(t.OrderOpenSeaV1DataV1Side={})),function(e){e[e.FIXED_PRICE=0]="FIXED_PRICE",e[e.DUTCH_AUCTION=1]="DUTCH_AUCTION"}(t.OrderOpenSeaV1DataV1SaleKind||(t.OrderOpenSeaV1DataV1SaleKind={})),function(e){e[e.CALL=0]="CALL",e[e.DELEGATE_CALL=1]="DELEGATE_CALL"}(t.OrderOpenSeaV1DataV1HowToCall||(t.OrderOpenSeaV1DataV1HowToCall={}))},2248:function(e,t,n){"use strict";var r=n(20).default,a=n(78).default,i=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getMarketIdByOpenseaContract=t.prepareSeaportExchangeData=void 0;var s=n(19),o=n(121),u=n(73),c=n(615),d=n(458),p=n(363),l=n(740),y=n(739),f=n(303),m=n(943),b=n(741),v=n(1256),h=n(742),T=n(2280),g=n(947);function w(e){if((0,l.compareCaseInsensitive)(e,f.CROSS_CHAIN_SEAPORT_V1_4_ADDRESS))return d.ExchangeWrapperOrderType.SEAPORT_V14;if((0,l.compareCaseInsensitive)(e,f.CROSS_CHAIN_SEAPORT_ADDRESS))return d.ExchangeWrapperOrderType.SEAPORT_ADVANCED_ORDERS;if((0,l.compareCaseInsensitive)(e,f.CROSS_CHAIN_SEAPORT_V1_5_ADDRESS))return d.ExchangeWrapperOrderType.SEAPORT_V15;throw new Error("Unrecognized opensea protocol contract")}t.prepareSeaportExchangeData=function(e,t,n,d){var l=d.unitsToFill,k=d.encodedFeesValue,x=d.totalFeeBasisPoints;return s.__awaiter(this,void 0,void 0,r().mark((function t(){var s,d,O,_,E,A,C,I,S,R,j,P,B,M,F,N,D,L,U,V,W,H,K,z,G;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=(0,g.getSeaportContract)(e,(0,u.toAddress)(n.data.protocol)),d=(0,m.convertAPIOrderToSeaport)(n),t.next=4,e.getFrom();case 4:return O=t.sent,_=d.parameters,E=_.offerer,A=_.offer,C=_.consideration,I=f.NO_CONDUIT,S=(0,f.getConduitByKey)(_.conduitKey,n.data.protocol),R=(0,f.getConduitByKey)(I,n.data.protocol),j="0x",P=O,B=[],M=[],t.next=16,Promise.all([(0,b.getBalancesAndApprovals)({ethereum:e,owner:E,items:A,criterias:B,operator:S}),(0,b.getBalancesAndApprovals)({ethereum:e,owner:O,items:[].concat(a(A),a(C)),criterias:[].concat(B,M),operator:R}),s.functionCall("getOrderStatus",(0,v.getOrderHash)(_)).call()]);case 16:return F=t.sent,N=i(F,3),D=N[0],L=N[1],U=N[2],V={totalFilled:(0,o.toBn)(U.totalFilled),totalSize:(0,o.toBn)(U.totalSize),isValidated:U.isValidated,isCancelled:U.isCancelled},W=(0,h.validateAndSanitizeFromOrderStatus)(d,V),H={startTime:W.parameters.startTime,endTime:W.parameters.endTime,currentBlockTimestamp:Math.floor(Date.now()/1e3),ascendingAmountTimestampBuffer:300},t.next=26,(0,T.getFulfillAdvancedOrderWrapperData)({order:W,unitsToFill:l,totalSize:V.totalSize,totalFilled:V.totalFilled,offerCriteria:B,considerationCriteria:M,tips:[],extraData:j,seaportAddress:(0,u.toAddress)(f.CROSS_CHAIN_SEAPORT_ADDRESS),offererBalancesAndApprovals:D,fulfillerBalancesAndApprovals:L,offererOperator:S,fulfillerOperator:R,timeBasedItemParams:H,conduitKey:I,recipientAddress:P,seaportContract:s});case 26:return K=t.sent,z=(0,p.calcValueWithFees)((0,c.toBigNumber)(K.value),x),G=(0,o.toBn)(n.take.value).div(n.make.value).multipliedBy(l||1).toFixed(),t.abrupt("return",{data:{marketId:w(n.data.protocol),amount:(0,o.toBn)(G).toFixed(),fees:k,data:K.data},options:{value:(0,y.isETH)(n.take.assetType)?z.toString():"0"}});case 30:case"end":return t.stop()}}),t)})))},t.getMarketIdByOpenseaContract=w},2249:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.balanceOf=void 0;var a=n(19),i=n(73),s=n(121),o=n(521),u=n(617),c=n(618),d=n(304),p=n(303);t.balanceOf=function(e,t,n,l){return a.__awaiter(void 0,void 0,void 0,r().mark((function a(){var y,f,m,b,v,h,T;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(0,d.isErc721Item)(n.itemType)){r.next=19;break}if(y=(0,u.createErc721Contract)(e,(0,i.toAddress)(n.token)),n.itemType!==p.ItemType.ERC721_WITH_CRITERIA){r.next=13;break}if(!l){r.next=8;break}return r.next=6,y.functionCall("ownerOf",l.identifier).call();case 6:return f=r.sent,r.abrupt("return",(0,s.toBn)(Number(f.toLowerCase()===t.toLowerCase())));case 8:return r.t0=s.toBn,r.next=11,y.functionCall("balanceOf",t).call();case 11:return r.t1=r.sent,r.abrupt("return",(0,r.t0)(r.t1));case 13:return r.next=15,y.functionCall("ownerOf",n.identifierOrCriteria).call();case 15:return m=r.sent,r.abrupt("return",(0,s.toBn)(Number(m.toLowerCase()===t.toLowerCase())));case 19:if(!(0,d.isErc1155Item)(n.itemType)){r.next=36;break}if(b=(0,c.createErc1155Contract)(e,(0,i.toAddress)(n.token)),n.itemType!==p.ItemType.ERC1155_WITH_CRITERIA){r.next=31;break}if(l){r.next=26;break}return v=(0,s.toBn)(n.startAmount),h=(0,s.toBn)(n.endAmount),r.abrupt("return",v.gt(h)?v:h);case 26:return r.t2=s.toBn,r.next=29,b.functionCall("balanceOf",t,l.identifier).call();case 29:return r.t3=r.sent,r.abrupt("return",(0,r.t2)(r.t3));case 31:return r.t4=s.toBn,r.next=34,b.functionCall("balanceOf",t,n.identifierOrCriteria).call();case 34:return r.t5=r.sent,r.abrupt("return",(0,r.t4)(r.t5));case 36:if(!(0,d.isErc20Item)(n.itemType)){r.next=43;break}return T=(0,o.createErc20Contract)(e,(0,i.toAddress)(n.token)),r.t6=s.toBn,r.next=41,T.functionCall("balanceOf",t).call();case 41:return r.t7=r.sent,r.abrupt("return",(0,r.t6)(r.t7));case 43:return r.t8=s.toBn,r.next=46,e.getBalance((0,i.toAddress)(t));case 46:return r.t9=r.sent,r.abrupt("return",(0,r.t8)(r.t9));case 48:case"end":return r.stop()}}),a)})))}},2250:function(e,t,n){"use strict";(function(e){var r=n(21).default,a=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleTree=t.hashIdentifier=void 0;var i=n(19).__importDefault(n(2251)),s=n(454),o=n(121);t.hashIdentifier=function(t){return(0,s.keccak256)(e.from((0,o.toBn)(t).toString(16).padStart(64,"0"),"hex"))};var u=function(){function e(n){r(this,e),this.tree=new i.default(n.map(t.hashIdentifier),s.keccak256,{sort:!0})}return a(e,[{key:"getProof",value:function(e){return this.tree.getHexProof((0,t.hashIdentifier)(e))}},{key:"getRoot",value:function(){return this.tree.getRoot().toString("hex")?this.tree.getHexRoot():"0"}}]),e}();t.MerkleTree=u}).call(this,n(15).Buffer)},2280:function(e,t,n){"use strict";var r=n(20).default,a=n(78).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getFulfillAdvancedOrderWrapperData=void 0;var i=n(19),s=n(73),o=n(743),u=n(304),c=n(741),d=n(742),p=n(621);t.getFulfillAdvancedOrderWrapperData=function(e){var t,n=e.order,l=e.unitsToFill,y=void 0===l?0:l,f=e.totalSize,m=e.totalFilled,b=e.offerCriteria,v=e.considerationCriteria,h=e.tips,T=void 0===h?[]:h,g=e.extraData,w=e.offererBalancesAndApprovals,k=e.fulfillerBalancesAndApprovals,x=e.offererOperator,O=e.fulfillerOperator,_=e.timeBasedItemParams,E=e.conduitKey,A=e.recipientAddress,C=e.seaportContract;return i.__awaiter(this,void 0,void 0,r().mark((function e(){var i,l,h,I,S,R,j,P,B,M,F,N,D,L;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=y?(0,o.mapOrderAmountsFromUnitsToFill)(n,{unitsToFill:y,totalSize:f}):(0,o.mapOrderAmountsFromFilledStatus)(n,{totalFilled:m,totalSize:f}),l=i.parameters,h=l.offer,I=l.consideration,S=[].concat(a(I),a(T)),R=h.filter((function(e){var t=e.itemType;return(0,u.isCriteriaItem)(t)})),j=S.filter((function(e){var t=e.itemType;return(0,u.isCriteriaItem)(t)})),P=R.length>0||j.length>0,R.length===b.length&&j.length===v.length){e.next=8;break}throw new Error("You must supply the appropriate criterias for criteria based items");case 8:return B=null===(t=(0,u.getSummedTokenAndIdentifierAmounts)({items:S,criterias:v,timeBasedItemParams:Object.assign(Object.assign({},_),{isConsiderationItem:!0})})[s.ZERO_ADDRESS])||void 0===t?void 0:t[0],(0,c.validateStandardFulfillBalancesAndApprovals)({offer:h,consideration:S,offerCriteria:b,considerationCriteria:v,offererBalancesAndApprovals:w,fulfillerBalancesAndApprovals:k,timeBasedItemParams:_,offererOperator:x,fulfillerOperator:O}),M=Object.assign(Object.assign({},n),{parameters:Object.assign(Object.assign({},n.parameters),{consideration:[].concat(a(n.parameters.consideration),a(T)),totalOriginalConsiderationItems:I.length})}),F=(0,d.getAdvancedOrderNumeratorDenominator)(n,y),N=F.numerator,D=F.denominator,L=[Object.assign(Object.assign({},M),{numerator:N,denominator:D,extraData:null!==g&&void 0!==g?g:"0x"}),P?(0,p.generateCriteriaResolvers)({orders:[n],offerCriterias:[b],considerationCriterias:[v]}):[],E,A],e.next=15,C.functionCall.apply(C,["fulfillAdvancedOrder"].concat(L)).getData();case 15:return e.t0=e.sent,e.t1=(null===B||void 0===B?void 0:B.toFixed())||"0",e.abrupt("return",{data:e.t0,value:e.t1});case 18:case"end":return e.stop()}}),e)})))}},2281:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeaportABIv14=t.createSeaportV14Contract=void 0,t.createSeaportV14Contract=function(e,n){return e.createContract(t.SeaportABIv14,n)},t.SeaportABIv14=[{inputs:[{internalType:"address",name:"conduitController",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"BadContractSignature",type:"error"},{inputs:[],name:"BadFraction",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"BadReturnValueFromERC20OnTransfer",type:"error"},{inputs:[{internalType:"uint8",name:"v",type:"uint8"}],name:"BadSignatureV",type:"error"},{inputs:[],name:"CannotCancelOrder",type:"error"},{inputs:[],name:"ConsiderationCriteriaResolverOutOfRange",type:"error"},{inputs:[],name:"ConsiderationLengthNotEqualToTotalOriginal",type:"error"},{inputs:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"considerationIndex",type:"uint256"},{internalType:"uint256",name:"shortfallAmount",type:"uint256"}],name:"ConsiderationNotMet",type:"error"},{inputs:[],name:"CriteriaNotEnabledForItem",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"identifiers",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"ERC1155BatchTransferGenericFailure",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"EtherTransferGenericFailure",type:"error"},{inputs:[],name:"InexactFraction",type:"error"},{inputs:[],name:"InsufficientEtherSupplied",type:"error"},{inputs:[],name:"Invalid1155BatchTransferEncoding",type:"error"},{inputs:[],name:"InvalidBasicOrderParameterEncoding",type:"error"},{inputs:[{internalType:"address",name:"conduit",type:"address"}],name:"InvalidCallToConduit",type:"error"},{inputs:[{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"address",name:"conduit",type:"address"}],name:"InvalidConduit",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"InvalidContractOrder",type:"error"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"InvalidERC721TransferAmount",type:"error"},{inputs:[],name:"InvalidFulfillmentComponentData",type:"error"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"InvalidMsgValue",type:"error"},{inputs:[],name:"InvalidNativeOfferItem",type:"error"},{inputs:[],name:"InvalidProof",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"InvalidRestrictedOrder",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"InvalidSigner",type:"error"},{inputs:[{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"InvalidTime",type:"error"},{inputs:[{internalType:"uint256",name:"fulfillmentIndex",type:"uint256"}],name:"MismatchedFulfillmentOfferAndConsiderationComponents",type:"error"},{inputs:[{internalType:"enum Side",name:"side",type:"uint8"}],name:"MissingFulfillmentComponentOnAggregation",type:"error"},{inputs:[],name:"MissingItemAmount",type:"error"},{inputs:[],name:"MissingOriginalConsiderationItems",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"NoContract",type:"error"},{inputs:[],name:"NoReentrantCalls",type:"error"},{inputs:[],name:"NoSpecifiedOrdersAvailable",type:"error"},{inputs:[],name:"OfferAndConsiderationRequiredOnFulfillment",type:"error"},{inputs:[],name:"OfferCriteriaResolverOutOfRange",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderAlreadyFilled",type:"error"},{inputs:[{internalType:"enum Side",name:"side",type:"uint8"}],name:"OrderCriteriaResolverOutOfRange",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderIsCancelled",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderPartiallyFilled",type:"error"},{inputs:[],name:"PartialFillsNotEnabledForOrder",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"TokenTransferGenericFailure",type:"error"},{inputs:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"considerationIndex",type:"uint256"}],name:"UnresolvedConsiderationCriteria",type:"error"},{inputs:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"offerIndex",type:"uint256"}],name:"UnresolvedOfferCriteria",type:"error"},{inputs:[],name:"UnusedItemParameters",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"newCounter",type:"uint256"},{indexed:!0,internalType:"address",name:"offerer",type:"address"}],name:"CounterIncremented",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"offerer",type:"address"},{indexed:!0,internalType:"address",name:"zone",type:"address"}],name:"OrderCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"offerer",type:"address"},{indexed:!0,internalType:"address",name:"zone",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],indexed:!1,internalType:"struct SpentItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],indexed:!1,internalType:"struct ReceivedItem[]",name:"consideration",type:"tuple[]"}],name:"OrderFulfilled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],indexed:!1,internalType:"struct OrderParameters",name:"orderParameters",type:"tuple"}],name:"OrderValidated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32[]",name:"orderHashes",type:"bytes32[]"}],name:"OrdersMatched",type:"event"},{inputs:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"counter",type:"uint256"}],internalType:"struct OrderComponents[]",name:"orders",type:"tuple[]"}],name:"cancel",outputs:[{internalType:"bool",name:"cancelled",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"uint120",name:"numerator",type:"uint120"},{internalType:"uint120",name:"denominator",type:"uint120"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes",name:"extraData",type:"bytes"}],internalType:"struct AdvancedOrder",name:"advancedOrder",type:"tuple"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"enum Side",name:"side",type:"uint8"},{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"bytes32[]",name:"criteriaProof",type:"bytes32[]"}],internalType:"struct CriteriaResolver[]",name:"criteriaResolvers",type:"tuple[]"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"}],name:"fulfillAdvancedOrder",outputs:[{internalType:"bool",name:"fulfilled",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"uint120",name:"numerator",type:"uint120"},{internalType:"uint120",name:"denominator",type:"uint120"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes",name:"extraData",type:"bytes"}],internalType:"struct AdvancedOrder[]",name:"advancedOrders",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"enum Side",name:"side",type:"uint8"},{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"bytes32[]",name:"criteriaProof",type:"bytes32[]"}],internalType:"struct CriteriaResolver[]",name:"criteriaResolvers",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"offerFulfillments",type:"tuple[][]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"considerationFulfillments",type:"tuple[][]"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"maximumFulfilled",type:"uint256"}],name:"fulfillAvailableAdvancedOrders",outputs:[{internalType:"bool[]",name:"availableOrders",type:"bool[]"},{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order[]",name:"orders",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"offerFulfillments",type:"tuple[][]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"considerationFulfillments",type:"tuple[][]"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"uint256",name:"maximumFulfilled",type:"uint256"}],name:"fulfillAvailableOrders",outputs:[{internalType:"bool[]",name:"availableOrders",type:"bool[]"},{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"considerationToken",type:"address"},{internalType:"uint256",name:"considerationIdentifier",type:"uint256"},{internalType:"uint256",name:"considerationAmount",type:"uint256"},{internalType:"address payable",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{internalType:"address",name:"offerToken",type:"address"},{internalType:"uint256",name:"offerIdentifier",type:"uint256"},{internalType:"uint256",name:"offerAmount",type:"uint256"},{internalType:"enum BasicOrderType",name:"basicOrderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"offererConduitKey",type:"bytes32"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalAdditionalRecipients",type:"uint256"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct AdditionalRecipient[]",name:"additionalRecipients",type:"tuple[]"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct BasicOrderParameters",name:"parameters",type:"tuple"}],name:"fulfillBasicOrder",outputs:[{internalType:"bool",name:"fulfilled",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"}],name:"fulfillOrder",outputs:[{internalType:"bool",name:"fulfilled",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"contractOfferer",type:"address"}],name:"getContractOffererNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"offerer",type:"address"}],name:"getCounter",outputs:[{internalType:"uint256",name:"counter",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"counter",type:"uint256"}],internalType:"struct OrderComponents",name:"order",type:"tuple"}],name:"getOrderHash",outputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"getOrderStatus",outputs:[{internalType:"bool",name:"isValidated",type:"bool"},{internalType:"bool",name:"isCancelled",type:"bool"},{internalType:"uint256",name:"totalFilled",type:"uint256"},{internalType:"uint256",name:"totalSize",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"incrementCounter",outputs:[{internalType:"uint256",name:"newCounter",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"information",outputs:[{internalType:"string",name:"version",type:"string"},{internalType:"bytes32",name:"domainSeparator",type:"bytes32"},{internalType:"address",name:"conduitController",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"uint120",name:"numerator",type:"uint120"},{internalType:"uint120",name:"denominator",type:"uint120"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes",name:"extraData",type:"bytes"}],internalType:"struct AdvancedOrder[]",name:"orders",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"enum Side",name:"side",type:"uint8"},{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"bytes32[]",name:"criteriaProof",type:"bytes32[]"}],internalType:"struct CriteriaResolver[]",name:"criteriaResolvers",type:"tuple[]"},{components:[{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"offerComponents",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"considerationComponents",type:"tuple[]"}],internalType:"struct Fulfillment[]",name:"fulfillments",type:"tuple[]"},{internalType:"address",name:"recipient",type:"address"}],name:"matchAdvancedOrders",outputs:[{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order[]",name:"orders",type:"tuple[]"},{components:[{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"offerComponents",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"considerationComponents",type:"tuple[]"}],internalType:"struct Fulfillment[]",name:"fulfillments",type:"tuple[]"}],name:"matchOrders",outputs:[{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"contractName",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order[]",name:"orders",type:"tuple[]"}],name:"validate",outputs:[{internalType:"bool",name:"validated",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},2282:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeaportABI=t.createSeaportContract=void 0,t.createSeaportContract=function(e,n){return e.createContract(t.SeaportABI,n)},t.SeaportABI=[{inputs:[{internalType:"address",name:"conduitController",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"BadContractSignature",type:"error"},{inputs:[],name:"BadFraction",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"BadReturnValueFromERC20OnTransfer",type:"error"},{inputs:[{internalType:"uint8",name:"v",type:"uint8"}],name:"BadSignatureV",type:"error"},{inputs:[],name:"ConsiderationCriteriaResolverOutOfRange",type:"error"},{inputs:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"considerationIndex",type:"uint256"},{internalType:"uint256",name:"shortfallAmount",type:"uint256"}],name:"ConsiderationNotMet",type:"error"},{inputs:[],name:"CriteriaNotEnabledForItem",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"identifiers",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"ERC1155BatchTransferGenericFailure",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"EtherTransferGenericFailure",type:"error"},{inputs:[],name:"InexactFraction",type:"error"},{inputs:[],name:"InsufficientEtherSupplied",type:"error"},{inputs:[],name:"InvalidBasicOrderParameterEncoding",type:"error"},{inputs:[{internalType:"address",name:"conduit",type:"address"}],name:"InvalidCallToConduit",type:"error"},{inputs:[],name:"InvalidCanceller",type:"error"},{inputs:[{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"address",name:"conduit",type:"address"}],name:"InvalidConduit",type:"error"},{inputs:[],name:"InvalidERC721TransferAmount",type:"error"},{inputs:[],name:"InvalidFulfillmentComponentData",type:"error"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"InvalidMsgValue",type:"error"},{inputs:[],name:"InvalidProof",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"InvalidRestrictedOrder",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"InvalidSigner",type:"error"},{inputs:[],name:"InvalidTime",type:"error"},{inputs:[],name:"MismatchedFulfillmentOfferAndConsiderationComponents",type:"error"},{inputs:[{internalType:"enum Side",name:"side",type:"uint8"}],name:"MissingFulfillmentComponentOnAggregation",type:"error"},{inputs:[],name:"MissingItemAmount",type:"error"},{inputs:[],name:"MissingOriginalConsiderationItems",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"NoContract",type:"error"},{inputs:[],name:"NoReentrantCalls",type:"error"},{inputs:[],name:"NoSpecifiedOrdersAvailable",type:"error"},{inputs:[],name:"OfferAndConsiderationRequiredOnFulfillment",type:"error"},{inputs:[],name:"OfferCriteriaResolverOutOfRange",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderAlreadyFilled",type:"error"},{inputs:[],name:"OrderCriteriaResolverOutOfRange",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderIsCancelled",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderPartiallyFilled",type:"error"},{inputs:[],name:"PartialFillsNotEnabledForOrder",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"TokenTransferGenericFailure",type:"error"},{inputs:[],name:"UnresolvedConsiderationCriteria",type:"error"},{inputs:[],name:"UnresolvedOfferCriteria",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"newCounter",type:"uint256"},{indexed:!0,internalType:"address",name:"offerer",type:"address"}],name:"CounterIncremented",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"offerer",type:"address"},{indexed:!0,internalType:"address",name:"zone",type:"address"}],name:"OrderCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"offerer",type:"address"},{indexed:!0,internalType:"address",name:"zone",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],indexed:!1,internalType:"struct SpentItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],indexed:!1,internalType:"struct ReceivedItem[]",name:"consideration",type:"tuple[]"}],name:"OrderFulfilled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"offerer",type:"address"},{indexed:!0,internalType:"address",name:"zone",type:"address"}],name:"OrderValidated",type:"event"},{inputs:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"counter",type:"uint256"}],internalType:"struct OrderComponents[]",name:"orders",type:"tuple[]"}],name:"cancel",outputs:[{internalType:"bool",name:"cancelled",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"uint120",name:"numerator",type:"uint120"},{internalType:"uint120",name:"denominator",type:"uint120"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes",name:"extraData",type:"bytes"}],internalType:"struct AdvancedOrder",name:"advancedOrder",type:"tuple"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"enum Side",name:"side",type:"uint8"},{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"bytes32[]",name:"criteriaProof",type:"bytes32[]"}],internalType:"struct CriteriaResolver[]",name:"criteriaResolvers",type:"tuple[]"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"}],name:"fulfillAdvancedOrder",outputs:[{internalType:"bool",name:"fulfilled",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"uint120",name:"numerator",type:"uint120"},{internalType:"uint120",name:"denominator",type:"uint120"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes",name:"extraData",type:"bytes"}],internalType:"struct AdvancedOrder[]",name:"advancedOrders",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"enum Side",name:"side",type:"uint8"},{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"bytes32[]",name:"criteriaProof",type:"bytes32[]"}],internalType:"struct CriteriaResolver[]",name:"criteriaResolvers",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"offerFulfillments",type:"tuple[][]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"considerationFulfillments",type:"tuple[][]"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"maximumFulfilled",type:"uint256"}],name:"fulfillAvailableAdvancedOrders",outputs:[{internalType:"bool[]",name:"availableOrders",type:"bool[]"},{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order[]",name:"orders",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"offerFulfillments",type:"tuple[][]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"considerationFulfillments",type:"tuple[][]"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"uint256",name:"maximumFulfilled",type:"uint256"}],name:"fulfillAvailableOrders",outputs:[{internalType:"bool[]",name:"availableOrders",type:"bool[]"},{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"considerationToken",type:"address"},{internalType:"uint256",name:"considerationIdentifier",type:"uint256"},{internalType:"uint256",name:"considerationAmount",type:"uint256"},{internalType:"address payable",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{internalType:"address",name:"offerToken",type:"address"},{internalType:"uint256",name:"offerIdentifier",type:"uint256"},{internalType:"uint256",name:"offerAmount",type:"uint256"},{internalType:"enum BasicOrderType",name:"basicOrderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"offererConduitKey",type:"bytes32"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalAdditionalRecipients",type:"uint256"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct AdditionalRecipient[]",name:"additionalRecipients",type:"tuple[]"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct BasicOrderParameters",name:"parameters",type:"tuple"}],name:"fulfillBasicOrder",outputs:[{internalType:"bool",name:"fulfilled",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"}],name:"fulfillOrder",outputs:[{internalType:"bool",name:"fulfilled",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"offerer",type:"address"}],name:"getCounter",outputs:[{internalType:"uint256",name:"counter",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"counter",type:"uint256"}],internalType:"struct OrderComponents",name:"order",type:"tuple"}],name:"getOrderHash",outputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"getOrderStatus",outputs:[{internalType:"bool",name:"isValidated",type:"bool"},{internalType:"bool",name:"isCancelled",type:"bool"},{internalType:"uint256",name:"totalFilled",type:"uint256"},{internalType:"uint256",name:"totalSize",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"incrementCounter",outputs:[{internalType:"uint256",name:"newCounter",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"information",outputs:[{internalType:"string",name:"version",type:"string"},{internalType:"bytes32",name:"domainSeparator",type:"bytes32"},{internalType:"address",name:"conduitController",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"uint120",name:"numerator",type:"uint120"},{internalType:"uint120",name:"denominator",type:"uint120"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes",name:"extraData",type:"bytes"}],internalType:"struct AdvancedOrder[]",name:"advancedOrders",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"enum Side",name:"side",type:"uint8"},{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"bytes32[]",name:"criteriaProof",type:"bytes32[]"}],internalType:"struct CriteriaResolver[]",name:"criteriaResolvers",type:"tuple[]"},{components:[{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"offerComponents",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"considerationComponents",type:"tuple[]"}],internalType:"struct Fulfillment[]",name:"fulfillments",type:"tuple[]"}],name:"matchAdvancedOrders",outputs:[{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order[]",name:"orders",type:"tuple[]"},{components:[{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"offerComponents",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"considerationComponents",type:"tuple[]"}],internalType:"struct Fulfillment[]",name:"fulfillments",type:"tuple[]"}],name:"matchOrders",outputs:[{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"contractName",type:"string"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order[]",name:"orders",type:"tuple[]"}],name:"validate",outputs:[{internalType:"bool",name:"validated",type:"bool"}],stateMutability:"nonpayable",type:"function"}]},2283:function(e,t,n){"use strict";var r,a,i,s,o=n(204).default,u=n(20).default,c=n(1257).default,d=n(78).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getfulfillBasicOrderData=void 0;var p=n(19),l=n(73),y=n(304),f=n(303);t.getfulfillBasicOrderData=function(e){var t,n,r=e.order,a=e.timeBasedItemParams,i=e.tips,s=void 0===i?[]:i,o=e.conduitKey,b=void 0===o?f.NO_CONDUIT:o,v=e.seaportContract;return p.__awaiter(this,void 0,void 0,u().mark((function e(){var i,o,p,f,h,T,g,w,k,x,O,_,E,A;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=r.parameters,o=i.offer,p=i.consideration,f=[].concat(d(p),d(s)),h=o[0],T=c(f),g=T[0],w=T.slice(1),void 0!==(k=null===(t=m[h.itemType])||void 0===t?void 0:t[g.itemType])){e.next=7;break}throw new Error("Order parameters did not result in a valid basic fulfillment");case 7:return x=w.map((function(e){return{amount:e.startAmount,recipient:e.recipient}})),O=f.filter((function(e){return e.itemType!==o[0].itemType})),_=null===(n=(0,y.getSummedTokenAndIdentifierAmounts)({items:O,criterias:[],timeBasedItemParams:Object.assign(Object.assign({},a),{isConsiderationItem:!0})})[l.ZERO_ADDRESS])||void 0===n?void 0:n[0],E={offerer:r.parameters.offerer,offererConduitKey:r.parameters.conduitKey,zone:r.parameters.zone,basicOrderType:r.parameters.orderType+4*k,offerToken:h.token,offerIdentifier:h.identifierOrCriteria,offerAmount:h.endAmount,considerationToken:g.token,considerationIdentifier:g.identifierOrCriteria,considerationAmount:g.endAmount,startTime:r.parameters.startTime,endTime:r.parameters.endTime,salt:r.parameters.salt,totalOriginalAdditionalRecipients:r.parameters.consideration.length-1,signature:r.signature,fulfillerConduitKey:b,additionalRecipients:x,zoneHash:r.parameters.zoneHash},A=v.functionCall("fulfillBasicOrder",E),console.log("fulfillBasicOrder",JSON.stringify(E,null," ")),e.abrupt("return",{functionCall:A,options:{value:null===_||void 0===_?void 0:_.toString()}});case 14:case"end":return e.stop()}}),e)})))};var m=(o(s={},f.ItemType.ERC20,(o(r={},f.ItemType.ERC721,f.BasicOrderRouteType.ERC721_TO_ERC20),o(r,f.ItemType.ERC1155,f.BasicOrderRouteType.ERC1155_TO_ERC20),r)),o(s,f.ItemType.ERC721,(o(a={},f.ItemType.NATIVE,f.BasicOrderRouteType.ETH_TO_ERC721),o(a,f.ItemType.ERC20,f.BasicOrderRouteType.ERC20_TO_ERC721),a)),o(s,f.ItemType.ERC1155,(o(i={},f.ItemType.NATIVE,f.BasicOrderRouteType.ETH_TO_ERC1155),o(i,f.ItemType.ERC20,f.BasicOrderRouteType.ERC20_TO_ERC1155),i)),s)},2284:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getApprovalActions=t.approvedItemAmount=void 0;var a=n(19),i=n(73),s=n(121),o=n(521),u=n(617),c=n(618),d=n(362),p=n(304),l=n(303);t.approvedItemAmount=function(e,t,n,c){return a.__awaiter(void 0,void 0,void 0,r().mark((function a(){var d,y,f;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(0,p.isErc721Item)(n.itemType)&&!(0,p.isErc1155Item)(n.itemType)){r.next=8;break}return d=(0,u.createErc721Contract)(e,(0,i.toAddress)(n.token)),r.next=4,d.functionCall("isApprovedForAll",t,c).call();case 4:return y=r.sent,r.abrupt("return",y?l.MAX_INT:(0,s.toBn)(0));case 8:if(n.itemType!==l.ItemType.ERC20){r.next=13;break}return f=(0,o.createErc20Contract)(e,(0,i.toAddress)(n.token)),r.next=12,f.functionCall("allowance",t,c).call();case 12:return r.abrupt("return",r.sent);case 13:return r.abrupt("return",l.MAX_INT);case 14:case"end":return r.stop()}}),a)})))},t.getApprovalActions=function(e,t,n,s){var y=this;return Promise.all(n.filter((function(e,t){return t===n.length-1||n[t+1].token!==e.token})).map((function(n){var d=n.token,f=n.operator,m=n.itemType;return a.__awaiter(y,void 0,void 0,r().mark((function n(){var a,y,b;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(0,p.isErc721Item)(m)){n.next=5;break}return a=(0,u.createErc721Contract)(e,(0,i.toAddress)(d)),n.abrupt("return",t(a.functionCall("setApprovalForAll",f,!0)));case 5:if(!(0,p.isErc1155Item)(m)){n.next=10;break}return y=(0,c.createErc1155Contract)(e,(0,i.toAddress)(d)),n.abrupt("return",t(y.functionCall("setApprovalForAll",f,!0)));case 10:return b=(0,o.createErc20Contract)(e,(0,i.toAddress)(d)),n.abrupt("return",t(b.functionCall("approve",null!==s&&void 0!==s?s:f,l.MAX_INT.toFixed())));case 12:case"end":return n.stop()}}),n)})))})).map((function(e){return a.__awaiter(y,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,d.waitTx)(e);case 2:return t.abrupt("return",e);case 3:case"end":return t.stop()}}),t)})))})))}},2285:function(e,t,n){"use strict";var r=n(20).default,a=n(78).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getFulfillStandardOrderData=void 0;var i=n(19),s=n(73),o=n(742),u=n(621),c=n(304),d=n(743);t.getFulfillStandardOrderData=function(e){var t,n=e.order,p=e.unitsToFill,l=void 0===p?0:p,y=e.totalSize,f=e.totalFilled,m=e.offerCriteria,b=e.considerationCriteria,v=e.tips,h=void 0===v?[]:v,T=e.extraData,g=e.timeBasedItemParams,w=e.conduitKey,k=e.recipientAddress,x=e.seaportContract;return i.__awaiter(this,void 0,void 0,r().mark((function e(){var i,p,v,O,_,E,A,C,I,S,R,j,P,B,M,F,N;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l?(0,d.mapOrderAmountsFromUnitsToFill)(n,{unitsToFill:l,totalSize:y}):(0,d.mapOrderAmountsFromFilledStatus)(n,{totalFilled:f,totalSize:y}),p=i.parameters,v=p.offer,O=p.consideration,_=[].concat(a(O),a(h)),E=v.filter((function(e){var t=e.itemType;return(0,c.isCriteriaItem)(t)})),A=_.filter((function(e){var t=e.itemType;return(0,c.isCriteriaItem)(t)})),C=E.length>0||A.length>0,E.length===m.length&&A.length===b.length){e.next=8;break}throw new Error("You must supply the appropriate criterias for criteria based items");case 8:if(I=null===(t=(0,c.getSummedTokenAndIdentifierAmounts)({items:_,criterias:b,timeBasedItemParams:Object.assign(Object.assign({},g),{isConsiderationItem:!0})})[s.ZERO_ADDRESS])||void 0===t?void 0:t[0],S=k!==s.ZERO_ADDRESS,R=Boolean(l)||C||S,j=Object.assign(Object.assign({},n),{parameters:Object.assign(Object.assign({},n.parameters),{consideration:[].concat(a(n.parameters.consideration),a(h)),totalOriginalConsiderationItems:O.length})}),P=(0,o.getAdvancedOrderNumeratorDenominator)(n,l),B=P.numerator,M=P.denominator,!R){e.next=18;break}return e.next=16,x.functionCall("fulfillAdvancedOrder",Object.assign(Object.assign({},j),{numerator:B,denominator:M,extraData:null!==T&&void 0!==T?T:"0x"}),C?(0,u.generateCriteriaResolvers)({orders:[n],offerCriterias:[m],considerationCriterias:[b]}):[],w,k);case 16:return F=e.sent,e.abrupt("return",{functionCall:F,options:{value:(null===I||void 0===I?void 0:I.toFixed())||"0"}});case 18:return e.next=20,x.functionCall("fulfillOrder",j,w);case 20:return N=e.sent,e.abrupt("return",{functionCall:N,options:{value:(null===I||void 0===I?void 0:I.toFixed())||"0"}});case 22:case"end":return e.stop()}}),e)})))}},2286:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LOOKSRARE_ABI=t.createLooksrareExchange=void 0,t.createLooksrareExchange=function(e,n){return e.createContract(t.LOOKSRARE_ABI,n)},t.LOOKSRARE_ABI=[{inputs:[{internalType:"address",name:"_currencyManager",type:"address"},{internalType:"address",name:"_executionManager",type:"address"},{internalType:"address",name:"_royaltyFeeManager",type:"address"},{internalType:"address",name:"_WETH",type:"address"},{internalType:"address",name:"_protocolFeeRecipient",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"newMinNonce",type:"uint256"}],name:"CancelAllOrders",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256[]",name:"orderNonces",type:"uint256[]"}],name:"CancelMultipleOrders",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"currencyManager",type:"address"}],name:"NewCurrencyManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"executionManager",type:"address"}],name:"NewExecutionManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"protocolFeeRecipient",type:"address"}],name:"NewProtocolFeeRecipient",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"royaltyFeeManager",type:"address"}],name:"NewRoyaltyFeeManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"transferSelectorNFT",type:"address"}],name:"NewTransferSelectorNFT",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"collection",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"royaltyRecipient",type:"address"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"RoyaltyPayment",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"orderNonce",type:"uint256"},{indexed:!0,internalType:"address",name:"taker",type:"address"},{indexed:!0,internalType:"address",name:"maker",type:"address"},{indexed:!0,internalType:"address",name:"strategy",type:"address"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"address",name:"collection",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"price",type:"uint256"}],name:"TakerAsk",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"orderNonce",type:"uint256"},{indexed:!0,internalType:"address",name:"taker",type:"address"},{indexed:!0,internalType:"address",name:"maker",type:"address"},{indexed:!0,internalType:"address",name:"strategy",type:"address"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"address",name:"collection",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"price",type:"uint256"}],name:"TakerBid",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"minNonce",type:"uint256"}],name:"cancelAllOrdersForSender",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256[]",name:"orderNonces",type:"uint256[]"}],name:"cancelMultipleMakerOrders",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"currencyManager",outputs:[{internalType:"contract ICurrencyManager",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"executionManager",outputs:[{internalType:"contract IExecutionManager",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"orderNonce",type:"uint256"}],name:"isUserOrderNonceExecutedOrCancelled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bool",name:"isOrderAsk",type:"bool"},{internalType:"address",name:"taker",type:"address"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"minPercentageToAsk",type:"uint256"},{internalType:"bytes",name:"params",type:"bytes"}],internalType:"struct OrderTypes.TakerOrder",name:"takerBid",type:"tuple"},{components:[{internalType:"bool",name:"isOrderAsk",type:"bool"},{internalType:"address",name:"signer",type:"address"},{internalType:"address",name:"collection",type:"address"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"strategy",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"minPercentageToAsk",type:"uint256"},{internalType:"bytes",name:"params",type:"bytes"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct OrderTypes.MakerOrder",name:"makerAsk",type:"tuple"}],name:"matchAskWithTakerBid",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bool",name:"isOrderAsk",type:"bool"},{internalType:"address",name:"taker",type:"address"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"minPercentageToAsk",type:"uint256"},{internalType:"bytes",name:"params",type:"bytes"}],internalType:"struct OrderTypes.TakerOrder",name:"takerBid",type:"tuple"},{components:[{internalType:"bool",name:"isOrderAsk",type:"bool"},{internalType:"address",name:"signer",type:"address"},{internalType:"address",name:"collection",type:"address"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"strategy",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"minPercentageToAsk",type:"uint256"},{internalType:"bytes",name:"params",type:"bytes"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct OrderTypes.MakerOrder",name:"makerAsk",type:"tuple"}],name:"matchAskWithTakerBidUsingETHAndWETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bool",name:"isOrderAsk",type:"bool"},{internalType:"address",name:"taker",type:"address"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"minPercentageToAsk",type:"uint256"},{internalType:"bytes",name:"params",type:"bytes"}],internalType:"struct OrderTypes.TakerOrder",name:"takerAsk",type:"tuple"},{components:[{internalType:"bool",name:"isOrderAsk",type:"bool"},{internalType:"address",name:"signer",type:"address"},{internalType:"address",name:"collection",type:"address"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"strategy",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"minPercentageToAsk",type:"uint256"},{internalType:"bytes",name:"params",type:"bytes"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct OrderTypes.MakerOrder",name:"makerBid",type:"tuple"}],name:"matchBidWithTakerAsk",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFeeRecipient",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"royaltyFeeManager",outputs:[{internalType:"contract IRoyaltyFeeManager",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"transferSelectorNFT",outputs:[{internalType:"contract ITransferSelectorNFT",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_currencyManager",type:"address"}],name:"updateCurrencyManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_executionManager",type:"address"}],name:"updateExecutionManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_protocolFeeRecipient",type:"address"}],name:"updateProtocolFeeRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_royaltyFeeManager",type:"address"}],name:"updateRoyaltyFeeManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_transferSelectorNFT",type:"address"}],name:"updateTransferSelectorNFT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"userMinOrderNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}]},2287:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.X2Y2_EXCHANGE_ABI=t.createX2Y2Contract=void 0,t.createX2Y2Contract=function(e,n){return e.createContract(t.X2Y2_EXCHANGE_ABI,n)},t.X2Y2_EXCHANGE_ABI=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"itemHash",type:"bytes32"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"incentive",type:"uint256"}],name:"EvAuctionRefund",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"itemHash",type:"bytes32"}],name:"EvCancel",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"delegate",type:"address"},{indexed:!1,internalType:"bool",name:"isRemoval",type:"bool"}],name:"EvDelegate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"index",type:"uint256"},{indexed:!1,internalType:"bytes",name:"error",type:"bytes"}],name:"EvFailure",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"newValue",type:"uint256"}],name:"EvFeeCapUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"itemHash",type:"bytes32"},{indexed:!1,internalType:"address",name:"maker",type:"address"},{indexed:!1,internalType:"address",name:"taker",type:"address"},{indexed:!1,internalType:"uint256",name:"orderSalt",type:"uint256"},{indexed:!1,internalType:"uint256",name:"settleSalt",type:"uint256"},{indexed:!1,internalType:"uint256",name:"intent",type:"uint256"},{indexed:!1,internalType:"uint256",name:"delegateType",type:"uint256"},{indexed:!1,internalType:"uint256",name:"deadline",type:"uint256"},{indexed:!1,internalType:"contract IERC20Upgradeable",name:"currency",type:"address"},{indexed:!1,internalType:"bytes",name:"dataMask",type:"bytes"},{components:[{internalType:"uint256",name:"price",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],indexed:!1,internalType:"struct Market.OrderItem",name:"item",type:"tuple"},{components:[{internalType:"enum Market.Op",name:"op",type:"uint8"},{internalType:"uint256",name:"orderIdx",type:"uint256"},{internalType:"uint256",name:"itemIdx",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"bytes32",name:"itemHash",type:"bytes32"},{internalType:"contract IDelegate",name:"executionDelegate",type:"address"},{internalType:"bytes",name:"dataReplacement",type:"bytes"},{internalType:"uint256",name:"bidIncentivePct",type:"uint256"},{internalType:"uint256",name:"aucMinIncrementPct",type:"uint256"},{internalType:"uint256",name:"aucIncDurationSecs",type:"uint256"},{components:[{internalType:"uint256",name:"percentage",type:"uint256"},{internalType:"address",name:"to",type:"address"}],internalType:"struct Market.Fee[]",name:"fees",type:"tuple[]"}],indexed:!1,internalType:"struct Market.SettleDetail",name:"detail",type:"tuple"}],name:"EvInventory",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"itemHash",type:"bytes32"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"EvProfit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"bool",name:"isRemoval",type:"bool"}],name:"EvSigner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[],name:"RATE_BASE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"itemHashes",type:"bytes32[]"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"cancel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegates",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeCapPct",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"feeCapPct_",type:"uint256"},{internalType:"address",name:"weth_",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"inventoryStatus",outputs:[{internalType:"enum Market.InvStatus",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"ongoingAuctions",outputs:[{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"netPrice",type:"uint256"},{internalType:"uint256",name:"endAt",type:"uint256"},{internalType:"address",name:"bidder",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"network",type:"uint256"},{internalType:"uint256",name:"intent",type:"uint256"},{internalType:"uint256",name:"delegateType",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"contract IERC20Upgradeable",name:"currency",type:"address"},{internalType:"bytes",name:"dataMask",type:"bytes"},{components:[{internalType:"uint256",name:"price",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Market.OrderItem[]",name:"items",type:"tuple[]"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"uint8",name:"signVersion",type:"uint8"}],internalType:"struct Market.Order[]",name:"orders",type:"tuple[]"},{components:[{internalType:"enum Market.Op",name:"op",type:"uint8"},{internalType:"uint256",name:"orderIdx",type:"uint256"},{internalType:"uint256",name:"itemIdx",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"bytes32",name:"itemHash",type:"bytes32"},{internalType:"contract IDelegate",name:"executionDelegate",type:"address"},{internalType:"bytes",name:"dataReplacement",type:"bytes"},{internalType:"uint256",name:"bidIncentivePct",type:"uint256"},{internalType:"uint256",name:"aucMinIncrementPct",type:"uint256"},{internalType:"uint256",name:"aucIncDurationSecs",type:"uint256"},{components:[{internalType:"uint256",name:"percentage",type:"uint256"},{internalType:"address",name:"to",type:"address"}],internalType:"struct Market.Fee[]",name:"fees",type:"tuple[]"}],internalType:"struct Market.SettleDetail[]",name:"details",type:"tuple[]"},{components:[{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountToEth",type:"uint256"},{internalType:"uint256",name:"amountToWeth",type:"uint256"},{internalType:"address",name:"user",type:"address"},{internalType:"bool",name:"canFail",type:"bool"}],internalType:"struct Market.SettleShared",name:"shared",type:"tuple"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"}],internalType:"struct Market.RunInput",name:"input",type:"tuple"}],name:"run",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"network",type:"uint256"},{internalType:"uint256",name:"intent",type:"uint256"},{internalType:"uint256",name:"delegateType",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"contract IERC20Upgradeable",name:"currency",type:"address"},{internalType:"bytes",name:"dataMask",type:"bytes"},{components:[{internalType:"uint256",name:"price",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Market.OrderItem[]",name:"items",type:"tuple[]"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"uint8",name:"signVersion",type:"uint8"}],internalType:"struct Market.Order",name:"order",type:"tuple"},{components:[{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountToEth",type:"uint256"},{internalType:"uint256",name:"amountToWeth",type:"uint256"},{internalType:"address",name:"user",type:"address"},{internalType:"bool",name:"canFail",type:"bool"}],internalType:"struct Market.SettleShared",name:"shared",type:"tuple"},{components:[{internalType:"enum Market.Op",name:"op",type:"uint8"},{internalType:"uint256",name:"orderIdx",type:"uint256"},{internalType:"uint256",name:"itemIdx",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"bytes32",name:"itemHash",type:"bytes32"},{internalType:"contract IDelegate",name:"executionDelegate",type:"address"},{internalType:"bytes",name:"dataReplacement",type:"bytes"},{internalType:"uint256",name:"bidIncentivePct",type:"uint256"},{internalType:"uint256",name:"aucMinIncrementPct",type:"uint256"},{internalType:"uint256",name:"aucIncDurationSecs",type:"uint256"},{components:[{internalType:"uint256",name:"percentage",type:"uint256"},{internalType:"address",name:"to",type:"address"}],internalType:"struct Market.Fee[]",name:"fees",type:"tuple[]"}],internalType:"struct Market.SettleDetail",name:"detail",type:"tuple"}],name:"run1",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"signers",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"toAdd",type:"address[]"},{internalType:"address[]",name:"toRemove",type:"address[]"}],name:"updateDelegates",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"val",type:"uint256"}],name:"updateFeeCap",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"toAdd",type:"address[]"},{internalType:"address[]",name:"toRemove",type:"address[]"}],name:"updateSigners",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"weth",outputs:[{internalType:"contract IWETHUpgradable",name:"",type:"address"}],stateMutability:"view",type:"function"},{stateMutability:"payable",type:"receive"}]},2288:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.OrderFiller=void 0;var s=n(19),o=n(73),u=n(115),c=n(732),d=n(937),p=n(364),l=n(1253),y=n(1261),f=n(942),m=n(2292),b=n(944),v=n(1262),h=n(1263),T=n(1264),g=n(949),w=n(1265),k=function(){function e(t,n,r,i,s,o,u){a(this,e),this.ethereum=t,this.send=n,this.config=r,this.apis=i,this.getBaseOrderFee=s,this.env=o,this.sdkConfig=u,this.fill=this.getFillAction(),this.buy=this.getFillAction(),this.acceptBid=this.getFillAction(),this.getBaseOrderFillFee=this.getBaseOrderFillFee.bind(this),this.getTransactionData=this.getTransactionData.bind(this),this.getBuyTx=this.getBuyTx.bind(this),this.v1Handler=new l.RaribleV1OrderHandler(t,i.order,n,r,s,u),this.v2Handler=new y.RaribleV2OrderHandler(t,n,r,s,u),this.openSeaHandler=new f.OpenSeaOrderHandler(t,n,r,i,s,u),this.punkHandler=new m.CryptoPunksOrderHandler(t,n,r,s,u),this.seaportHandler=new b.SeaportOrderHandler(t,n,r,i,s,o,u),this.looksrareHandler=new h.LooksrareOrderHandler(t,n,r,s,o,i,u),this.looksrareV2Handler=new w.LooksrareV2OrderHandler(t,n,r,s,o,i),this.x2y2Handler=new v.X2Y2OrderHandler(t,n,r,s,i),this.ammHandler=new T.AmmOrderHandler(t,n,r,s,i,o,u),this.checkAssetType=c.checkAssetType.bind(this,i.nftCollection),this.checkLazyAssetType=d.checkLazyAssetType.bind(this,i.nftItem),this.getBuyAmmInfo=this.getBuyAmmInfo.bind(this)}return i(e,[{key:"getFillAction",value:function(){var e=this;return u.Action.create({id:"approve",run:function(t){return s.__awaiter(e,void 0,void 0,r().mark((function e(){var n,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.ethereum){e.next=2;break}throw new Error("Wallet undefined");case 2:if("SEAPORT_V1"!==t.order.type&&"LOOKSRARE"!==t.order.type&&"LOOKSRARE_V2"!==t.order.type&&"X2Y2"!==t.order.type&&"AMM"!==t.order.type){e.next=4;break}return e.abrupt("return",{request:t,inverted:t.order});case 4:return e.t0=o.toAddress,e.next=7,this.ethereum.getFrom();case 7:return e.t1=e.sent,n=(0,e.t0)(e.t1),e.next=11,this.invertOrder(t,n);case 11:if(a=e.sent,!t.assetType||"COLLECTION"!==a.make.assetType.assetClass){e.next=19;break}return e.next=15,this.checkAssetType(t.assetType);case 15:return a.make.assetType=e.sent,e.next=18,this.checkLazyAssetType(a.make.assetType);case 18:a.make.assetType=e.sent;case 19:return e.next=21,this.approveOrder(a,Boolean(t.infinite));case 21:return e.abrupt("return",{request:t,inverted:a});case 22:case"end":return e.stop()}}),e,this)})))}}).thenStep({id:"send-tx",run:function(t){var n=t.inverted,a=t.request;return s.__awaiter(e,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.checkStartEndDates(a.order),e.abrupt("return",this.sendTransaction(a,n));case 2:case"end":return e.stop()}}),e,this)})))}}).before((function(t){return s.__awaiter(e,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.checkChainId)(this.ethereum,this.config);case 2:return e.abrupt("return",t);case 3:case"end":return e.stop()}}),e,this)})))}))}},{key:"getBuyTx",value:function(e){var t,n=e.request,a=e.from;return s.__awaiter(this,void 0,void 0,r().mark((function e(){var i,s,o,u,c,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.invertOrder(n,a);case 2:if(i=e.sent,!n.assetType||"COLLECTION"!==i.make.assetType.assetClass){e.next=7;break}return e.next=6,this.checkAssetType(n.assetType);case 6:i.make.assetType=e.sent;case 7:return e.next=9,this.getTransactionRequestData(n,i);case 9:return s=e.sent,o=s.functionCall,u=s.options,e.next=14,o.getCallInfo();case 14:return c=e.sent,d=(null===(t=u.value)||void 0===t?void 0:t.toString())||"0",e.t0=a,e.t1=d,e.next=20,o.getData();case 20:return e.t2=e.sent,e.t3=c.contract,e.abrupt("return",{from:e.t0,value:e.t1,data:e.t2,to:e.t3});case 23:case"end":return e.stop()}}),e,this)})))}},{key:"invertOrder",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=e.order.type,n.next="RARIBLE_V1"===n.t0?3:"RARIBLE_V2"===n.t0?4:"OPEN_SEA_V1"===n.t0?5:"SEAPORT_V1"===n.t0?6:"X2Y2"===n.t0?7:"AMM"===n.t0?8:"CRYPTO_PUNK"===n.t0?9:10;break;case 3:return n.abrupt("return",this.v1Handler.invert(e,t));case 4:return n.abrupt("return",this.v2Handler.invert(e,t));case 5:return n.abrupt("return",this.openSeaHandler.invert(e,t));case 6:throw new Error("Invert for Seaport orders is not implemented yet");case 7:throw new Error("Invert for x2y2 orders is not implemented yet");case 8:throw new Error("Invert for AMM orders is not implemented yet");case 9:return n.abrupt("return",this.punkHandler.invert(e,t));case 10:throw new Error("Unsupported order: ".concat(JSON.stringify(e)));case 11:case"end":return n.stop()}}),n,this)})))}},{key:"approveOrder",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=e.type,n.next="RARIBLE_V1"===n.t0?3:"RARIBLE_V2"===n.t0?4:"OPEN_SEA_V1"===n.t0?5:"SEAPORT_V1"===n.t0?6:"X2Y2"===n.t0?7:"AMM"===n.t0?8:"CRYPTO_PUNK"===n.t0?9:10;break;case 3:return n.abrupt("return",this.v1Handler.approve(e,t));case 4:return n.abrupt("return",this.v2Handler.approve(e,t));case 5:return n.abrupt("return",this.openSeaHandler.approve(e,t));case 6:throw new Error("Approve for Seaport orders is not implemented yet");case 7:throw new Error("Approve for x2y2 orders is not implemented yet");case 8:throw new Error("Approve for AMM orders is not implemented yet");case 9:return n.abrupt("return",this.punkHandler.approve(e,t));case 10:throw new Error("Unsupported order: ".concat(JSON.stringify(e)));case 11:case"end":return n.stop()}}),n,this)})))}},{key:"sendTransaction",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,s;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getTransactionRequestData(e,t);case 2:return a=n.sent,i=a.functionCall,s=a.options,n.abrupt("return",this.send(i,Object.assign(Object.assign({},s),{additionalData:(0,g.getUpdatedCalldata)(this.sdkConfig)})));case 6:case"end":return n.stop()}}),n,this)})))}},{key:"getTransactionRequestData",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=e.order.type,n.next="RARIBLE_V1"===n.t0?3:"RARIBLE_V2"===n.t0?4:"OPEN_SEA_V1"===n.t0?5:"SEAPORT_V1"===n.t0?6:"LOOKSRARE"===n.t0?7:"LOOKSRARE_V2"===n.t0?8:"AMM"===n.t0?9:"X2Y2"===n.t0?10:"CRYPTO_PUNK"===n.t0?11:12;break;case 3:return n.abrupt("return",this.v1Handler.getTransactionData(e.order,t,e));case 4:return n.abrupt("return",this.v2Handler.getTransactionData(e.order,t));case 5:return n.abrupt("return",this.openSeaHandler.getTransactionData(e.order,t,e));case 6:return n.abrupt("return",this.seaportHandler.getTransactionData(e));case 7:return n.abrupt("return",this.looksrareHandler.getTransactionData(e));case 8:return n.abrupt("return",this.looksrareV2Handler.getTransactionData(e));case 9:return n.abrupt("return",this.ammHandler.getTransactionData(e));case 10:return n.abrupt("return",this.x2y2Handler.getTransactionData(e));case 11:return n.abrupt("return",this.punkHandler.getTransactionData(e.order,t));case 12:throw new Error("Unsupported request: ".concat(JSON.stringify(e)));case 13:case"end":return n.stop()}}),n,this)})))}},{key:"getTransactionData",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,s,u,c,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.ethereum){t.next=2;break}throw new Error("Wallet undefined");case 2:return t.next=4,(0,p.checkChainId)(this.ethereum,this.config);case 4:return t.t0=o.toAddress,t.next=7,this.ethereum.getFrom();case 7:return t.t1=t.sent,n=(0,t.t0)(t.t1),t.next=11,this.invertOrder(e,n);case 11:if(a=t.sent,!e.assetType||"COLLECTION"!==a.make.assetType.assetClass){t.next=16;break}return t.next=15,this.checkAssetType(e.assetType);case 15:a.make.assetType=t.sent;case 16:return t.next=18,this.getTransactionRequestData(e,a);case 18:return i=t.sent,s=i.functionCall,u=i.options,t.next=23,s.getCallInfo();case 23:return c=t.sent,d=c.contract,t.t2=n,t.t3=(0,o.toAddress)(d),t.next=29,s.getData();case 29:return t.t4=t.sent,t.t5=u,t.abrupt("return",{from:t.t2,contract:t.t3,data:t.t4,options:t.t5});case 32:case"end":return t.stop()}}),t,this)})))}},{key:"getOrderFee",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.type,t.next="RARIBLE_V1"===t.t0?3:"RARIBLE_V2"===t.t0?4:"OPEN_SEA_V1"===t.t0?5:"SEAPORT_V1"===t.t0?6:"LOOKSRARE"===t.t0?7:"CRYPTO_PUNK"===t.t0?8:"X2Y2"===t.t0?9:"AMM"===t.t0?10:11;break;case 3:return t.abrupt("return",this.v1Handler.getOrderFee(e));case 4:return t.abrupt("return",this.v2Handler.getOrderFee(e));case 5:return t.abrupt("return",this.openSeaHandler.getOrderFee(e));case 6:return t.abrupt("return",this.seaportHandler.getOrderFee());case 7:return t.abrupt("return",this.looksrareHandler.getOrderFee());case 8:return t.abrupt("return",this.punkHandler.getOrderFee());case 9:return t.abrupt("return",this.x2y2Handler.getOrderFee());case 10:return t.abrupt("return",this.ammHandler.getOrderFee());case 11:throw new Error("Unsupported order: ".concat(JSON.stringify(e)));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"getBaseOrderFillFee",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.type,t.next="RARIBLE_V1"===t.t0?3:"RARIBLE_V2"===t.t0?4:"OPEN_SEA_V1"===t.t0?5:"SEAPORT_V1"===t.t0?6:"LOOKSRARE"===t.t0?7:"LOOKSRARE_V2"===t.t0?8:"CRYPTO_PUNK"===t.t0?9:"AMM"===t.t0?10:"X2Y2"===t.t0?11:12;break;case 3:return t.abrupt("return",this.v1Handler.getBaseOrderFee());case 4:return t.abrupt("return",this.v2Handler.getBaseOrderFee());case 5:return t.abrupt("return",this.openSeaHandler.getBaseOrderFee());case 6:return t.abrupt("return",this.seaportHandler.getBaseOrderFee());case 7:return t.abrupt("return",this.looksrareHandler.getBaseOrderFee());case 8:return t.abrupt("return",this.looksrareV2Handler.getBaseOrderFee());case 9:return t.abrupt("return",this.punkHandler.getBaseOrderFee());case 10:case 11:return t.abrupt("return",this.ammHandler.getBaseOrderFee());case 12:throw new Error("Unsupported order: ".concat(JSON.stringify(e)));case 13:case"end":return t.stop()}}),t,this)})))}},{key:"checkStartEndDates",value:function(e){var t=Date.now();if(void 0!==e.start&&new Date(1e3*e.start).getTime()>t)throw new Error("Order will be actual since ".concat(new Date(1e3*e.start),", now ").concat(new Date));if(void 0!==e.end&&new Date(1e3*e.end).getTime()=64&&c(r,u)===n)){a.next=3;break}return a.abrupt("return",!0);case 3:return a.abrupt("return",o(t,n,r,s));case 4:case"end":return a.stop()}}),i)})))};var u=[{inputs:[{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"view",type:"function"}];function c(e,t){var n=function(e){var t,n,r;if(e.length>=65)t=e.slice(0,32),n=e.slice(32,64),r=(0,s.bufferToInt)(e.slice(64));else{if(64!==e.length)throw new Error("Invalid signature length");t=e.slice(0,32),n=e.slice(32,64),r=(0,s.bufferToInt)(e.slice(32,33))>>7,n[0]&=127}r<27&&(r+=27);return{v:r,r:t,s:n}}(t),a=function(e,t){if(0===e||1===e)return[t,27+e];if(27===e||28===e)return[t,e];if(32===e||31===e)return[p(t),e-4];throw new Error("Value of 'v' is not recognised: ".concat(e))}(n.v,e),i=r(a,2),o=i[0],u=i[1];return(0,s.bufferToHex)((0,s.pubToAddress)((0,s.ecrecover)(o,u,n.r,n.s)))}var d="\x19Ethereum Signed Message:\n";function p(t){return(0,s.keccak256)(e.concat([e.from("".concat(d,"32"),"ascii"),t]))}function l(e){return e.startsWith("0x")?e.substring(2):e}}).call(this,n(15).Buffer)},2290:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.fixSignature=void 0;var r=n(454);t.fixSignature=function(t){if(void 0!==t){var n=(i=t).startsWith("0x")?e.from(i.substring(2),"hex"):e.from(i,"hex");if(65===n.length){var a=(0,r.bufferToInt)(n.slice(64));return a<27?function(t,n,a){return(0,r.bufferToHex)(e.concat([(0,r.setLengthLeft)(n,32),(0,r.setLengthLeft)(a,32),(0,r.toBuffer)(t)]))}(a+27,n.slice(0,32),n.slice(32,64)):t}return t}return t;var i}}).call(this,n(15).Buffer)},2291:function(e,t,n){"use strict";var r=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.encodeRaribleV2OrderPurchaseStruct=void 0;var a=n(73),i=n(936),s=n(935);t.encodeRaribleV2OrderPurchaseStruct=function(e,t,n,u,c){var d,p,l=(0,s.assetTypeToStruct)(e,t.make.assetType),y=(0,i.encodeRaribleV2OrderData)(e,t.data),f=r(y,2),m=f[0],b=f[1],v=(0,i.encodeRaribleV2OrderData)(e,u.data),h=r(v,2)[1],T=e.encodeParameter(o,{sellOrderMaker:t.maker,sellOrderNftAmount:t.make.value,nftAssetClass:l.assetClass,nftData:l.data,sellOrderPaymentAmount:t.take.value,paymentToken:"ETH"===t.take.assetType.assetClass?a.ZERO_ADDRESS:t.take.assetType.contract,sellOrderSalt:t.salt,sellOrderStart:null!==(d=t.start)&&void 0!==d?d:0,sellOrderEnd:null!==(p=t.end)&&void 0!==p?p:0,sellOrderDataType:m,sellOrderData:b,sellOrderSignature:n,buyOrderPaymentAmount:u.make.value,buyOrderNftAmount:u.take.value,buyOrderData:h});return c?"0x0d5f7d35"+T.slice(2):T};var o={components:[].concat([{name:"sellOrderMaker",type:"address"},{name:"sellOrderNftAmount",type:"uint256"},{name:"nftAssetClass",type:"bytes4"},{name:"nftData",type:"bytes"},{name:"sellOrderPaymentAmount",type:"uint256"},{name:"paymentToken",type:"address"},{name:"sellOrderSalt",type:"uint256"},{name:"sellOrderStart",type:"uint"},{name:"sellOrderEnd",type:"uint"},{name:"sellOrderDataType",type:"bytes4"},{name:"sellOrderData",type:"bytes"},{name:"sellOrderSignature",type:"bytes"}],[{name:"buyOrderPaymentAmount",type:"uint256"},{name:"buyOrderNftAmount",type:"uint256"},{name:"buyOrderData",type:"bytes"}]),name:"data",type:"tuple"}},2292:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoPunksOrderHandler=void 0;var s=n(19),o=n(738),u=n(616),c=n(362),d=n(520),p=n(941),l=function(){function e(t,n,r,i,s){a(this,e),this.ethereum=t,this.send=n,this.config=r,this.getBaseOrderFeeConfig=i,this.sdkConfig=s}return i(e,[{key:"invert",value:function(e,t){var n=(0,p.invertOrder)(e.order,e.amount,t);return n.data={dataType:"CRYPTO_PUNKS_DATA"},n}},{key:"approve",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.ethereum){n.next=2;break}throw new Error("Wallet undefined");case 2:return a=this.getMakeAssetWithFee(e),n.next=5,(0,c.waitTx)((0,u.approve)(this.ethereum,this.send,this.config.transferProxies,e.maker,a,t));case 5:case"end":return n.stop()}}),n,this)})))}},{key:"getTransactionData",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{functionCall:this.getPunkOrderCallMethod(e),options:this.getMatchV2Options(e,t)});case 1:case"end":return n.stop()}}),n,this)})))}},{key:"getPunkOrderCallMethod",value:function(e){if(!this.ethereum)throw new Error("Wallet undefined");if("CRYPTO_PUNKS"===e.make.assetType.assetClass)return(0,d.createCryptoPunksMarketContract)(this.ethereum,e.make.assetType.contract).functionCall("buyPunk",e.make.assetType.tokenId);if("CRYPTO_PUNKS"===e.take.assetType.assetClass)return(0,d.createCryptoPunksMarketContract)(this.ethereum,e.take.assetType.contract).functionCall("acceptBidForPunk",e.take.assetType.tokenId,e.make.value);throw new Error("Unsupported punk asset type")}},{key:"getMatchV2Options",value:function(e,t){return"ETH"===t.make.assetType.assetClass?{value:this.getMakeAssetWithFee(t).value}:{}}},{key:"getMakeAssetWithFee",value:function(e){return(0,o.getAssetWithFee)(e.make,this.getOrderFee())}},{key:"getOrderFee",value:function(){return 0}},{key:"getBaseOrderFee",value:function(){return s.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getBaseOrderFeeConfig("CRYPTO_PUNK"));case 1:case"end":return e.stop()}}),e,this)})))}}]),e}();t.CryptoPunksOrderHandler=l},2293:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.X2Y2Utils=void 0;var s=n(19),o=n(73),u=function(){function e(){a(this,e)}return i(e,null,[{key:"getOrderSign",value:function(t,n){return s.__awaiter(this,void 0,void 0,r().mark((function a(){var i;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.orderSignature.orderSignX2Y2({x2Y2OrderSignRequest:{caller:n.sender,op:e.SELL_OP,orderId:n.orderId,currency:n.currency,price:n.price}});case 2:return i=r.sent,r.abrupt("return",i.input);case 4:case"end":return r.stop()}}),a)})))}}]),e}();t.X2Y2Utils=u,u.SELL_OP=(0,o.toBigNumber)("1")},2294:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SudoswapFill=void 0;var s=n(19),o=n(73),u=n(406),c=n(176),d=n(121),p=n(2295),l=n(2296),y=function(){function e(){a(this,e)}return i(e,null,[{key:"getDirectFillData",value:function(e,t,n){return s.__awaiter(this,void 0,void 0,r().mark((function a(){var i,s,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=this.getOrder(t),r.t0=i.make.assetType.assetClass,r.next="ERC721"===r.t0?4:"AMM_NFT"===r.t0?10:21;break;case 4:if(!t.assetType){r.next=6;break}throw new u.Warning("Remove assetType from request, because it must be captured from order");case 6:return r.next=8,this.buySpecificNFTs(e,t,n,[i.make.assetType.tokenId]);case 8:return s=r.sent,r.abrupt("break",22);case 10:if(!t.assetType){r.next=17;break}return c=Array.isArray(t.assetType)?t.assetType.map((function(e){return(0,o.toBigNumber)(e.tokenId.toString())})):[(0,o.toBigNumber)(t.assetType.tokenId.toString())],r.next=14,this.buySpecificNFTs(e,t,n,c);case 14:s=r.sent,r.next=20;break;case 17:return r.next=19,this.buyAnyNFTs(e,t,n,t.amount);case 19:s=r.sent;case 20:return r.abrupt("break",22);case 21:throw new Error("Unsupported asset type "+i.take.assetType.assetClass);case 22:return r.abrupt("return",{functionCall:s.functionCall,options:s.options});case 23:case"end":return r.stop()}}),a,this)})))}},{key:"getDeadline",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:14400,t=~~(Date.now()/1e3)+e;return(0,o.toBigNumber)("0x"+t.toString(16).padStart(64,"0"))}},{key:"getRouterContract",value:function(e,t){var n=t.sudoswap.pairRouter;if(!n||n===o.ZERO_ADDRESS)throw new Error("Sudoswap router contract address has not been set. Change address in config");return(0,p.createSudoswapRouterV1Contract)(e,n)}},{key:"getOrder",value:function(e){var t=e.order;if("SUDOSWAP_AMM_DATA_V1"!==t.data.dataType)throw new Error("Wrong order data type "+t.data.dataType);if("ETH"!==t.take.assetType.assetClass)throw new Error("Sudoswap supports swaps only for ETH");return t}},{key:"getNftRecipient",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getFrom();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))}},{key:"getETHRecipient",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getFrom();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))}},{key:"buySpecificNFTs",value:function(t,n,a,i){return s.__awaiter(this,void 0,void 0,r().mark((function s(){var o,u,c,d;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=this.getRouterContract(t,a),u=this.getOrder(n),c=(0,l.createSudoswapPairContract)(t,u.data.poolAddress),r.next=5,c.functionCall("getBuyNFTQuote",i.length).call();case 5:return d=r.sent,r.t0=o,r.t1=[{pair:u.data.poolAddress,nftIds:i}],r.next=10,this.getETHRecipient(t);case 10:return r.t2=r.sent,r.next=13,this.getNftRecipient(t);case 13:return r.t3=r.sent,r.t4=e.getDeadline(),r.t5=r.t0.functionCall.call(r.t0,"swapETHForSpecificNFTs",r.t1,r.t2,r.t3,r.t4),r.t6={value:d.inputAmount.toString()},r.abrupt("return",{functionCall:r.t5,options:r.t6});case 18:case"end":return r.stop()}}),s,this)})))}},{key:"buyAnyNFTs",value:function(t,n,a,i){return s.__awaiter(this,void 0,void 0,r().mark((function s(){var o,u,c,d;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=this.getRouterContract(t,a),u=this.getOrder(n),c=(0,l.createSudoswapPairContract)(t,u.data.poolAddress),r.next=5,c.functionCall("getBuyNFTQuote",i).call();case 5:return d=r.sent,r.t0=o,r.t1=[{pair:u.data.poolAddress,numItems:i}],r.next=10,this.getETHRecipient(t);case 10:return r.t2=r.sent,r.next=13,this.getNftRecipient(t);case 13:return r.t3=r.sent,r.t4=e.getDeadline(),r.t5=r.t0.functionCall.call(r.t0,"swapETHForAnyNFTs",r.t1,r.t2,r.t3,r.t4),r.t6={value:d.inputAmount.toString()},r.abrupt("return",{functionCall:r.t5,options:r.t6});case 18:case"end":return r.stop()}}),s,this)})))}},{key:"getRoyaltiesAmount",value:function(e,t){var n=e.reduce((function(e,t){return e+t.value}),0);return(0,c.toBn)(n).dividedBy(1e4).multipliedBy(t).integerValue(d.BigNumber.ROUND_FLOOR)}}]),e}();t.SudoswapFill=y},2295:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUDOSWAP_ROUTER_V1_ABI=t.createSudoswapRouterV1Contract=void 0,t.createSudoswapRouterV1Contract=function(e,n){return e.createContract(t.SUDOSWAP_ROUTER_V1_ABI,n)},t.SUDOSWAP_ROUTER_V1_ABI=[{inputs:[{internalType:"contract ILSSVMPairFactoryLike",name:"_factory",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"factory",outputs:[{internalType:"contract ILSSVMPairFactoryLike",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ERC20",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"enum ILSSVMPairFactoryLike.PairVariant",name:"variant",type:"uint8"}],name:"pairTransferERC20From",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC721",name:"nft",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"enum ILSSVMPairFactoryLike.PairVariant",name:"variant",type:"uint8"}],name:"pairTransferNFTFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256",name:"numItems",type:"uint256"}],internalType:"struct LSSVMRouter.PairSwapAny",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"maxCost",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapAny[]",name:"swapList",type:"tuple[]"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"robustSwapERC20ForAnyNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"maxCost",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecific[]",name:"swapList",type:"tuple[]"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"robustSwapERC20ForSpecificNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"maxCost",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecific[]",name:"tokenToNFTTrades",type:"tuple[]"},{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"minOutput",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecificForToken[]",name:"nftToTokenTrades",type:"tuple[]"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"address payable",name:"tokenRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"}],internalType:"struct LSSVMRouter.RobustPairNFTsFoTokenAndTokenforNFTsTrade",name:"params",type:"tuple"}],name:"robustSwapERC20ForSpecificNFTsAndNFTsToToken",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"},{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256",name:"numItems",type:"uint256"}],internalType:"struct LSSVMRouter.PairSwapAny",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"maxCost",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapAny[]",name:"swapList",type:"tuple[]"},{internalType:"address payable",name:"ethRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"robustSwapETHForAnyNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"maxCost",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecific[]",name:"swapList",type:"tuple[]"},{internalType:"address payable",name:"ethRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"robustSwapETHForSpecificNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"maxCost",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecific[]",name:"tokenToNFTTrades",type:"tuple[]"},{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"minOutput",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecificForToken[]",name:"nftToTokenTrades",type:"tuple[]"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"address payable",name:"tokenRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"}],internalType:"struct LSSVMRouter.RobustPairNFTsFoTokenAndTokenforNFTsTrade",name:"params",type:"tuple"}],name:"robustSwapETHForSpecificNFTsAndNFTsToToken",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"},{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"minOutput",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecificForToken[]",name:"swapList",type:"tuple[]"},{internalType:"address payable",name:"tokenRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"robustSwapNFTsForToken",outputs:[{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256",name:"numItems",type:"uint256"}],internalType:"struct LSSVMRouter.PairSwapAny[]",name:"swapList",type:"tuple[]"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapERC20ForAnyNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"swapList",type:"tuple[]"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapERC20ForSpecificNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256",name:"numItems",type:"uint256"}],internalType:"struct LSSVMRouter.PairSwapAny[]",name:"swapList",type:"tuple[]"},{internalType:"address payable",name:"ethRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForAnyNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"swapList",type:"tuple[]"},{internalType:"address payable",name:"ethRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForSpecificNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"nftToTokenTrades",type:"tuple[]"},{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256",name:"numItems",type:"uint256"}],internalType:"struct LSSVMRouter.PairSwapAny[]",name:"tokenToNFTTrades",type:"tuple[]"}],internalType:"struct LSSVMRouter.NFTsForAnyNFTsTrade",name:"trade",type:"tuple"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"uint256",name:"minOutput",type:"uint256"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNFTsForAnyNFTsThroughERC20",outputs:[{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"nftToTokenTrades",type:"tuple[]"},{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256",name:"numItems",type:"uint256"}],internalType:"struct LSSVMRouter.PairSwapAny[]",name:"tokenToNFTTrades",type:"tuple[]"}],internalType:"struct LSSVMRouter.NFTsForAnyNFTsTrade",name:"trade",type:"tuple"},{internalType:"uint256",name:"minOutput",type:"uint256"},{internalType:"address payable",name:"ethRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNFTsForAnyNFTsThroughETH",outputs:[{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"nftToTokenTrades",type:"tuple[]"},{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"tokenToNFTTrades",type:"tuple[]"}],internalType:"struct LSSVMRouter.NFTsForSpecificNFTsTrade",name:"trade",type:"tuple"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"uint256",name:"minOutput",type:"uint256"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNFTsForSpecificNFTsThroughERC20",outputs:[{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"nftToTokenTrades",type:"tuple[]"},{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"tokenToNFTTrades",type:"tuple[]"}],internalType:"struct LSSVMRouter.NFTsForSpecificNFTsTrade",name:"trade",type:"tuple"},{internalType:"uint256",name:"minOutput",type:"uint256"},{internalType:"address payable",name:"ethRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNFTsForSpecificNFTsThroughETH",outputs:[{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"swapList",type:"tuple[]"},{internalType:"uint256",name:"minOutput",type:"uint256"},{internalType:"address",name:"tokenRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNFTsForToken",outputs:[{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},2296:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUDOSWAP_PAIR_ABI=t.createSudoswapPairContract=void 0,t.createSudoswapPairContract=function(e,n){return e.createContract(t.SUDOSWAP_PAIR_ABI,n)},t.SUDOSWAP_PAIR_ABI=[{inputs:[{internalType:"uint256",name:"numNFTs",type:"uint256"}],name:"getBuyNFTQuote",outputs:[{internalType:"enum CurveErrorCodes.Error",name:"error",type:"uint8"},{internalType:"uint256",name:"newSpotPrice",type:"uint256"},{internalType:"uint256",name:"newDelta",type:"uint256"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"uint256",name:"protocolFee",type:"uint256"}],stateMutability:"view",type:"function"}]},2297:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LOOKSRARE_V2_VALIDATOR_ABI=t.createLooksrareV2Validator=void 0,t.createLooksrareV2Validator=function(e,n){return e.createContract(t.LOOKSRARE_V2_VALIDATOR_ABI,n)},t.LOOKSRARE_V2_VALIDATOR_ABI=[{inputs:[{internalType:"address",name:"_looksRareProtocol",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"CRITERIA_GROUPS",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ERC1155_INTERFACE_ID",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"view",type:"function"},{inputs:[],name:"ERC721_INTERFACE_ID_1",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"view",type:"function"},{inputs:[],name:"ERC721_INTERFACE_ID_2",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAGIC_VALUE_ORDER_NONCE_EXECUTED",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum QuoteType",name:"quoteType",type:"uint8"},{internalType:"uint256",name:"globalNonce",type:"uint256"},{internalType:"uint256",name:"subsetNonce",type:"uint256"},{internalType:"uint256",name:"orderNonce",type:"uint256"},{internalType:"uint256",name:"strategyId",type:"uint256"},{internalType:"enum CollectionType",name:"collectionType",type:"uint8"},{internalType:"address",name:"collection",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"address",name:"signer",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256[]",name:"itemIds",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"additionalParameters",type:"bytes"}],internalType:"struct OrderStructs.Maker",name:"makerOrder",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"},{components:[{internalType:"bytes32",name:"root",type:"bytes32"},{components:[{internalType:"bytes32",name:"value",type:"bytes32"},{internalType:"enum OrderStructs.MerkleTreeNodePosition",name:"position",type:"uint8"}],internalType:"struct OrderStructs.MerkleTreeNode[]",name:"proof",type:"tuple[]"}],internalType:"struct OrderStructs.MerkleTree",name:"merkleTree",type:"tuple"}],name:"checkMakerOrderValidity",outputs:[{internalType:"uint256[9]",name:"validationCodes",type:"uint256[9]"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum QuoteType",name:"quoteType",type:"uint8"},{internalType:"uint256",name:"globalNonce",type:"uint256"},{internalType:"uint256",name:"subsetNonce",type:"uint256"},{internalType:"uint256",name:"orderNonce",type:"uint256"},{internalType:"uint256",name:"strategyId",type:"uint256"},{internalType:"enum CollectionType",name:"collectionType",type:"uint8"},{internalType:"address",name:"collection",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"address",name:"signer",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256[]",name:"itemIds",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"additionalParameters",type:"bytes"}],internalType:"struct OrderStructs.Maker[]",name:"makerOrders",type:"tuple[]"},{internalType:"bytes[]",name:"signatures",type:"bytes[]"},{components:[{internalType:"bytes32",name:"root",type:"bytes32"},{components:[{internalType:"bytes32",name:"value",type:"bytes32"},{internalType:"enum OrderStructs.MerkleTreeNodePosition",name:"position",type:"uint8"}],internalType:"struct OrderStructs.MerkleTreeNode[]",name:"proof",type:"tuple[]"}],internalType:"struct OrderStructs.MerkleTree[]",name:"merkleTrees",type:"tuple[]"}],name:"checkMultipleMakerOrderValidities",outputs:[{internalType:"uint256[9][]",name:"validationCodes",type:"uint256[9][]"}],stateMutability:"view",type:"function"},{inputs:[],name:"creatorFeeManager",outputs:[{internalType:"contract ICreatorFeeManager",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deriveProtocolParameters",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"domainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"looksRareProtocol",outputs:[{internalType:"contract LooksRareProtocol",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxCreatorFeeBp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"royaltyFeeRegistry",outputs:[{internalType:"contract IRoyaltyFeeRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"transferManager",outputs:[{internalType:"contract TransferManager",name:"",type:"address"}],stateMutability:"view",type:"function"}]},2298:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CURRENT_ORDER_TYPE_VERSION=void 0,t.CURRENT_ORDER_TYPE_VERSION="RARIBLE_V2"},2299:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.DeployErc721=void 0;var s=n(19),o=n(73),u=n(364),c=n(2300),d=n(2301),p=function(){function e(t,n,r){a(this,e),this.ethereum=t,this.send=n,this.config=r,this.deployToken=this.deployToken.bind(this),this.deployUserToken=this.deployUserToken.bind(this)}return i(e,[{key:"deployToken",value:function(e,t,n,a){return s.__awaiter(this,void 0,void 0,r().mark((function i(){var s,u;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.ethereum){r.next=2;break}throw new Error("Wallet undefined");case 2:return s=(0,c.createErc721FactoryContract)(this.ethereum,this.config.factories.erc721),u=(0,o.randomWord)(),r.next=6,this.send(s.functionCall("createToken",e,t,n,a,u));case 6:return r.t0=r.sent,r.next=9,this.getContractAddress(e,t,n,a,u);case 9:return r.t1=r.sent,r.abrupt("return",{tx:r.t0,address:r.t1});case 11:case"end":return r.stop()}}),i,this)})))}},{key:"getContractAddress",value:function(e,t,n,a,i){return s.__awaiter(this,void 0,void 0,r().mark((function s(){var o;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.ethereum){r.next=2;break}throw new Error("Wallet undefined");case 2:return o=(0,c.createErc721FactoryContract)(this.ethereum,this.config.factories.erc721),r.abrupt("return",o.functionCall("getAddress",e,t,n,a,i).call());case 4:case"end":return r.stop()}}),s,this)})))}},{key:"deployUserToken",value:function(e,t,n,a,i){return s.__awaiter(this,void 0,void 0,r().mark((function s(){var c,p;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,u.checkChainId)(this.ethereum,this.config);case 2:if(this.ethereum){r.next=4;break}throw new Error("Wallet undefined");case 4:return c=(0,d.createErc721UserFactoryContract)(this.ethereum,this.config.factories.erc721),p=(0,o.randomWord)(),r.next=8,this.send(c.functionCall("createToken",e,t,n,a,i,p));case 8:return r.t0=r.sent,r.next=11,this.getUserContractAddress(e,t,n,a,i,p);case 11:return r.t1=r.sent,r.abrupt("return",{tx:r.t0,address:r.t1});case 13:case"end":return r.stop()}}),s,this)})))}},{key:"getUserContractAddress",value:function(e,t,n,a,i,o){return s.__awaiter(this,void 0,void 0,r().mark((function s(){var c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,u.checkChainId)(this.ethereum,this.config);case 2:if(this.ethereum){r.next=4;break}throw new Error("Wallet undefined");case 4:return c=(0,d.createErc721UserFactoryContract)(this.ethereum,this.config.factories.erc721),r.abrupt("return",c.functionCall("getAddress",e,t,n,a,i,o).call());case 6:case"end":return r.stop()}}),s,this)})))}}]),e}();t.DeployErc721=p},2300:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.erc721RaribleFactoryABI=t.erc721RaribleFactoryBytecode=t.deployTestErc721RaribleFactory=t.createTestRaribleFactoryContract=t.createErc721FactoryContract=void 0;var i=n(19),s=n(73);function o(e,n){return new e.eth.Contract(t.erc721RaribleFactoryABI,n)}t.createErc721FactoryContract=function(e,n){return e.createContract(t.erc721RaribleFactoryABI,n)},t.createTestRaribleFactoryContract=o,t.deployTestErc721RaribleFactory=function(e,n){return i.__awaiter(this,void 0,void 0,r().mark((function i(){var u,c,d,p;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=o(e),r.next=3,e.eth.getAccounts();case 3:return c=r.sent,d=a(c,1),p=d[0],r.abrupt("return",u.deploy({data:t.erc721RaribleFactoryBytecode,arguments:[n,s.ZERO_ADDRESS,s.ZERO_ADDRESS]}).send({from:p,gas:5e6,gasPrice:"0"}));case 7:case"end":return r.stop()}}),i)})))},t.erc721RaribleFactoryBytecode="0x608060405234801561001057600080fd5b506040516112d43803806112d483398101604081905261002f916100e5565b60006100396100c5565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039485166001600160a01b031991821617909155600280549385169382169390931790925560038054919093169116179055610127565b3390565b80516001600160a01b03811681146100e057600080fd5b919050565b6000806000606084860312156100f9578283fd5b610102846100c9565b9250610110602085016100c9565b915061011e604085016100c9565b90509250925092565b61119e806101366000396000f3fe60806040523480156200001157600080fd5b50600436106200006a5760003560e01c806359659e90146200006f578063715018a6146200009157806372397ad5146200009d5780638da5cb5b14620000b45780639cf3178b14620000be578063f2fde38b14620000d5575b600080fd5b62000079620000ec565b6040516200008891906200080e565b60405180910390f35b6200009b620000fb565b005b6200009b620000ae366004620006b7565b620001be565b620000796200035f565b62000079620000cf366004620006b7565b6200036e565b6200009b620000e636600462000687565b620003d5565b6001546001600160a01b031681565b62000105620004f0565b6001600160a01b0316620001186200035f565b6001600160a01b03161462000174576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000620001d9620001d287878787620004f4565b8362000553565b6002546040516318054c3760e01b815291925082916001600160a01b03808416926318054c379262000215929091169060019060040162000822565b600060405180830381600087803b1580156200023057600080fd5b505af115801562000245573d6000803e3d6000fd5b50506003546040516318054c3760e01b81526001600160a01b0380861694506318054c3793506200027e92169060019060040162000822565b600060405180830381600087803b1580156200029957600080fd5b505af1158015620002ae573d6000803e3d6000fd5b50505050806001600160a01b031663f2fde38b620002cb620004f0565b6040518263ffffffff1660e01b8152600401620002e991906200080e565b600060405180830381600087803b1580156200030457600080fd5b505af115801562000319573d6000803e3d6000fd5b505050507fcc1a02f08b4aa92a7d307d9c65aec395a00ed50d5575adbd7447a85dfefdaf92826040516200034e91906200080e565b60405180910390a150505050505050565b6000546001600160a01b031690565b600080620003896200038388888888620004f4565b62000582565b9050600060ff60f81b30858480519060200120604051602001620003b19493929190620007a2565b60408051808303601f19018152919052805160209091012098975050505050505050565b620003df620004f0565b6001600160a01b0316620003f26200035f565b6001600160a01b0316146200044e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620004955760405162461bcd60e51b8152600401808060200182810382526026815260200180620011436026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6060632a83996360e01b858585856040516024016200051794939291906200086b565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050949350505050565b600080620005618462000582565b9050828151602083016000f59150813b6200057b57600080fd5b5092915050565b606060405180602001620005969062000600565b601f1982820381018352601f909101166040819052600154620005ca916001600160a01b039091169085906020016200083d565b60408051601f1981840301815290829052620005ea9291602001620007db565b6040516020818303038152906040529050919050565b61084480620008ff83390190565b600082601f8301126200061f578081fd5b813567ffffffffffffffff808211156200063557fe5b604051601f8301601f1916810160200182811182821017156200065457fe5b6040528281528483016020018610156200066c578384fd5b82602086016020830137918201602001929092529392505050565b60006020828403121562000699578081fd5b81356001600160a01b0381168114620006b0578182fd5b9392505050565b600080600080600060a08688031215620006cf578081fd5b853567ffffffffffffffff80821115620006e7578283fd5b620006f589838a016200060e565b965060208801359150808211156200070b578283fd5b6200071989838a016200060e565b955060408801359150808211156200072f578283fd5b6200073d89838a016200060e565b9450606088013591508082111562000753578283fd5b5062000762888289016200060e565b95989497509295608001359392505050565b600081518084526200078e816020860160208601620008cb565b601f01601f19169290920160200192915050565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60008351620007ef818460208801620008cb565b83519083019062000805818360208801620008cb565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b0383168152604060208201819052600090620008639083018462000774565b949350505050565b60006080825262000880608083018762000774565b828103602084015262000894818762000774565b90508281036040840152620008aa818662000774565b90508281036060840152620008c0818562000774565b979650505050505050565b60005b83811015620008e8578181015183820152602001620008ce565b83811115620008f8576000848401525b5050505056fe60806040526040516108443803806108448339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052506100e3915050565b6100ed82826100f4565b505061047e565b6101078261024960201b6100311760201c565b6101425760405162461bcd60e51b81526004018080602001828103825260258152602001806107c56025913960400191505060405180910390fd5b6101ba826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051610249602090811b61003117901c565b6101f55760405162461bcd60e51b81526004018080602001828103825260348152602001806108106034913960400191505060405180910390fd5b6000805160206107848339815191528281558151156102445761024261021961024f565b836040518060600160405280602181526020016107a4602191396102c260201b6100371760201c565b505b505050565b3b151590565b60006102596103c7565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561029157600080fd5b505afa1580156102a5573d6000803e3d6000fd5b505050506040513d60208110156102bb57600080fd5b5051905090565b60606102cd84610249565b6103085760405162461bcd60e51b81526004018080602001828103825260268152602001806107ea6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106103455780518252601f199092019160209182019101610326565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146103a5576040519150601f19603f3d011682016040523d82523d6000602084013e6103aa565b606091505b5090925090506103bb8282866103da565b925050505b9392505050565b6000805160206107848339815191525490565b606083156103e95750816103c0565b8251156103f95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561044357818101518382015260200161042b565b50505050905090810190601f1680156104705780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f78061048d6000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013b565b6101ae565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029c6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106100ba5780518252601f19909201916020918201910161009b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011a576040519150601f19603f3d011682016040523d82523d6000602084013e61011f565b606091505b509150915061012f8282866101d2565b925050505b9392505050565b6000610145610276565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017d57600080fd5b505afa158015610191573d6000803e3d6000fd5b505050506040513d60208110156101a757600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101cd573d6000f35b3d6000fd5b606083156101e1575081610134565b8251156101f15782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023b578181015183820152602001610223565b50505050905090810190601f1680156102685780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a26469706673582212208d876f4df9e95fb28cbac2f32a1bbbb4e7f39f9d7bb110fc7b5628d98879c2ba64736f6c63430007060033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220c4162bc3109c9ceb01a6502f24b87c608b1dab3a661fb42ba98f982032b3535964736f6c63430007060033",t.erc721RaribleFactoryABI=[{inputs:[{internalType:"address",name:"_beacon",type:"address"},{internalType:"address",name:"_transferProxy",type:"address"},{internalType:"address",name:"_lazyTransferProxy",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"proxy",type:"address"}],name:"Create721RaribleProxy",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"beacon",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"uint256",name:"salt",type:"uint256"}],name:"createToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"uint256",name:"_salt",type:"uint256"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0}]},2301:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.erc721UserFactoryABI=t.erc721UserFactoryBytecode=t.deployTestErc721RaribleUserFactory=t.createTestRaribleUserFactoryContract=t.createErc721UserFactoryContract=void 0;var i=n(19);function s(e,n){return new e.eth.Contract(t.erc721UserFactoryABI,n)}t.createErc721UserFactoryContract=function(e,n){return e.createContract(t.erc721UserFactoryABI,n)},t.createTestRaribleUserFactoryContract=s,t.deployTestErc721RaribleUserFactory=function(e,n){return i.__awaiter(this,void 0,void 0,r().mark((function i(){var o,u,c,d;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=s(e),r.next=3,e.eth.getAccounts();case 3:return u=r.sent,c=a(u,1),d=c[0],r.abrupt("return",o.deploy({data:t.erc721UserFactoryBytecode,arguments:[n]}).send({from:d,gas:5e6,gasPrice:"0"}));case 7:case"end":return r.stop()}}),i)})))},t.erc721UserFactoryBytecode="0x608060405234801561001057600080fd5b506040516112b83803806112b883398101604081905261002f916100ac565b60006100396100a8565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100da565b3390565b6000602082840312156100bd578081fd5b81516001600160a01b03811681146100d3578182fd5b9392505050565b6111cf806100e96000396000f3fe60806040523480156200001157600080fd5b50600436106200006a5760003560e01c806327050d1f146200006f57806339280695146200008857806359659e9014620000b7578063715018a614620000c15780638da5cb5b14620000cb578063f2fde38b14620000d5575b600080fd5b620000866200008036600462000672565b620000ec565b005b6200009f6200009936600462000672565b620001b9565b604051620000ae9190620007f0565b60405180910390f35b6200009f62000222565b6200008662000231565b6200009f620002f4565b62000086620000e63660046200064e565b62000303565b6000620001086200010188888888886200041e565b8362000480565b9050806001600160a01b03811663f2fde38b62000124620004af565b6040518263ffffffff1660e01b8152600401620001429190620007f0565b600060405180830381600087803b1580156200015d57600080fd5b505af115801562000172573d6000803e3d6000fd5b505050507f4768a3e06654c109507892e111851106a07f51f57cc0cfc3374a141e03c3f08f82604051620001a79190620007f0565b60405180910390a15050505050505050565b600080620001d5620001cf89898989896200041e565b620004b3565b9050600060ff60f81b30858480519060200120604051602001620001fd949392919062000784565b60408051808303601f1901815291905280516020909101209998505050505050505050565b6001546001600160a01b031681565b6200023b620004af565b6001600160a01b03166200024e620002f4565b6001600160a01b031614620002aa576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6200030d620004af565b6001600160a01b031662000320620002f4565b6001600160a01b0316146200037c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620003c35760405162461bcd60e51b8152600401808060200182810382526026815260200180620011746026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b606063c4552e2460e01b86868686866040516024016200044395949392919062000832565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905095945050505050565b6000806200048e84620004b3565b9050828151602083016000f59150813b620004a857600080fd5b5092915050565b3390565b606060405180602001620004c79062000532565b601f1982820381018352601f909101166040819052600154620004fb916001600160a01b0390911690859060200162000804565b60408051601f19818403018152908290526200051b9291602001620007bd565b60405160208183030381529060405290505b919050565b610844806200093083390190565b80356001600160a01b03811681146200052d57600080fd5b600082601f83011262000569578081fd5b8135602067ffffffffffffffff8211156200058057fe5b80820262000590828201620008d7565b838152828101908684018388018501891015620005ab578687fd5b8693505b85841015620005d857620005c38162000540565b835260019390930192918401918401620005af565b50979650505050505050565b600082601f830112620005f5578081fd5b813567ffffffffffffffff8111156200060a57fe5b6200061f601f8201601f1916602001620008d7565b81815284602083860101111562000634578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121562000660578081fd5b6200066b8262000540565b9392505050565b60008060008060008060c087890312156200068b578182fd5b863567ffffffffffffffff80821115620006a3578384fd5b620006b18a838b01620005e4565b97506020890135915080821115620006c7578384fd5b620006d58a838b01620005e4565b96506040890135915080821115620006eb578384fd5b620006f98a838b01620005e4565b955060608901359150808211156200070f578384fd5b6200071d8a838b01620005e4565b9450608089013591508082111562000733578384fd5b506200074289828a0162000558565b92505060a087013590509295509295509295565b6000815180845262000770816020860160208601620008fc565b601f01601f19169290920160200192915050565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60008351620007d1818460208801620008fc565b835190830190620007e7818360208801620008fc565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b03831681526040602082018190526000906200082a9083018462000756565b949350505050565b600060a082526200084760a083018862000756565b6020838203818501526200085c828962000756565b9150838203604085015262000872828862000756565b9150838203606085015262000888828762000756565b84810360808601528551808252828701935090820190845b81811015620008c75784516001600160a01b031683529383019391830191600101620008a0565b50909a9950505050505050505050565b60405181810167ffffffffffffffff81118282101715620008f457fe5b604052919050565b60005b8381101562000919578181015183820152602001620008ff565b8381111562000929576000848401525b5050505056fe60806040526040516108443803806108448339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052506100e3915050565b6100ed82826100f4565b505061047e565b6101078261024960201b6100311760201c565b6101425760405162461bcd60e51b81526004018080602001828103825260258152602001806107c56025913960400191505060405180910390fd5b6101ba826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051610249602090811b61003117901c565b6101f55760405162461bcd60e51b81526004018080602001828103825260348152602001806108106034913960400191505060405180910390fd5b6000805160206107848339815191528281558151156102445761024261021961024f565b836040518060600160405280602181526020016107a4602191396102c260201b6100371760201c565b505b505050565b3b151590565b60006102596103c7565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561029157600080fd5b505afa1580156102a5573d6000803e3d6000fd5b505050506040513d60208110156102bb57600080fd5b5051905090565b60606102cd84610249565b6103085760405162461bcd60e51b81526004018080602001828103825260268152602001806107ea6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106103455780518252601f199092019160209182019101610326565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146103a5576040519150601f19603f3d011682016040523d82523d6000602084013e6103aa565b606091505b5090925090506103bb8282866103da565b925050505b9392505050565b6000805160206107848339815191525490565b606083156103e95750816103c0565b8251156103f95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561044357818101518382015260200161042b565b50505050905090810190601f1680156104705780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f78061048d6000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013b565b6101ae565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029c6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106100ba5780518252601f19909201916020918201910161009b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011a576040519150601f19603f3d011682016040523d82523d6000602084013e61011f565b606091505b509150915061012f8282866101d2565b925050505b9392505050565b6000610145610276565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017d57600080fd5b505afa158015610191573d6000803e3d6000fd5b505050506040513d60208110156101a757600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101cd573d6000f35b3d6000fd5b606083156101e1575081610134565b8251156101f15782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023b578181015183820152602001610223565b50505050905090810190601f1680156102685780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a26469706673582212208d876f4df9e95fb28cbac2f32a1bbbb4e7f39f9d7bb110fc7b5628d98879c2ba64736f6c63430007060033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122062a9f7eceafdf4d3437882923bee4606f71d99bbffbcc86a697bc23f2645cf5464736f6c63430007060033",t.erc721UserFactoryABI=[{inputs:[{internalType:"address",name:"_beacon",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"proxy",type:"address"}],name:"Create721RaribleUserProxy",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"beacon",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address[]",name:"operators",type:"address[]"},{internalType:"uint256",name:"salt",type:"uint256"}],name:"createToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address[]",name:"operators",type:"address[]"},{internalType:"uint256",name:"_salt",type:"uint256"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0}]},2302:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.DeployErc1155=void 0;var s=n(19),o=n(73),u=n(364),c=n(2303),d=n(2304),p=function(){function e(t,n,r){a(this,e),this.ethereum=t,this.send=n,this.config=r,this.deployToken=this.deployToken.bind(this),this.deployUserToken=this.deployUserToken.bind(this)}return i(e,[{key:"deployToken",value:function(e,t,n,a){return s.__awaiter(this,void 0,void 0,r().mark((function i(){var s,d;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,u.checkChainId)(this.ethereum,this.config);case 2:if(this.ethereum){r.next=4;break}throw new Error("Wallet undefined");case 4:return s=(0,c.createErc1155FactoryContract)(this.ethereum,this.config.factories.erc1155),d=(0,o.randomWord)(),r.next=8,this.send(s.functionCall("createToken",e,t,n,a,d));case 8:return r.t0=r.sent,r.next=11,this.getContractAddress(e,t,n,a,d);case 11:return r.t1=r.sent,r.abrupt("return",{tx:r.t0,address:r.t1});case 13:case"end":return r.stop()}}),i,this)})))}},{key:"getContractAddress",value:function(e,t,n,a,i){return s.__awaiter(this,void 0,void 0,r().mark((function s(){var o;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,u.checkChainId)(this.ethereum,this.config);case 2:if(this.ethereum){r.next=4;break}throw new Error("Wallet undefined");case 4:return o=(0,c.createErc1155FactoryContract)(this.ethereum,this.config.factories.erc1155),r.abrupt("return",o.functionCall("getAddress",e,t,n,a,i).call());case 6:case"end":return r.stop()}}),s,this)})))}},{key:"deployUserToken",value:function(e,t,n,a,i){return s.__awaiter(this,void 0,void 0,r().mark((function s(){var c,p;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,u.checkChainId)(this.ethereum,this.config);case 2:if(this.ethereum){r.next=4;break}throw new Error("Wallet undefined");case 4:return c=(0,d.createErc1155UserFactoryContract)(this.ethereum,this.config.factories.erc1155),p=(0,o.randomWord)(),r.next=8,this.send(c.functionCall("createToken",e,t,n,a,i,p));case 8:return r.t0=r.sent,r.next=11,this.getUserContractAddress(e,t,n,a,i,p);case 11:return r.t1=r.sent,r.abrupt("return",{tx:r.t0,address:r.t1});case 13:case"end":return r.stop()}}),s,this)})))}},{key:"getUserContractAddress",value:function(e,t,n,a,i,o){return s.__awaiter(this,void 0,void 0,r().mark((function s(){var c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,u.checkChainId)(this.ethereum,this.config);case 2:if(this.ethereum){r.next=4;break}throw new Error("Wallet undefined");case 4:return c=(0,d.createErc1155UserFactoryContract)(this.ethereum,this.config.factories.erc1155),r.abrupt("return",c.functionCall("getAddress",e,t,n,a,i,o).call());case 6:case"end":return r.stop()}}),s,this)})))}}]),e}();t.DeployErc1155=p},2303:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.erc1155FactoryABI=t.erc1155FactoryBytecode=t.deployTestErc1155RaribleFactory=t.createTestErc1155RaribleFactoryContract=t.createErc1155FactoryContract=void 0;var i=n(19);function s(e,n){return new e.eth.Contract(t.erc1155FactoryABI,n)}t.createErc1155FactoryContract=function(e,n){return e.createContract(t.erc1155FactoryABI,n)},t.createTestErc1155RaribleFactoryContract=s,t.deployTestErc1155RaribleFactory=function(e,n,o,u){return i.__awaiter(this,void 0,void 0,r().mark((function i(){var c,d,p,l;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=s(e),r.next=3,e.eth.getAccounts();case 3:return d=r.sent,p=a(d,1),l=p[0],r.abrupt("return",c.deploy({data:t.erc1155FactoryBytecode,arguments:[n,o,u]}).send({from:l,gas:5e6,gasPrice:"0"}));case 7:case"end":return r.stop()}}),i)})))},t.erc1155FactoryBytecode="0x608060405234801561001057600080fd5b506040516112d43803806112d483398101604081905261002f916100e5565b60006100396100c5565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039485166001600160a01b031991821617909155600280549385169382169390931790925560038054919093169116179055610127565b3390565b80516001600160a01b03811681146100e057600080fd5b919050565b6000806000606084860312156100f9578283fd5b610102846100c9565b9250610110602085016100c9565b915061011e604085016100c9565b90509250925092565b61119e806101366000396000f3fe60806040523480156200001157600080fd5b50600436106200006a5760003560e01c806359659e90146200006f578063715018a6146200009157806372397ad5146200009d5780638da5cb5b14620000b45780639cf3178b14620000be578063f2fde38b14620000d5575b600080fd5b62000079620000ec565b6040516200008891906200080e565b60405180910390f35b6200009b620000fb565b005b6200009b620000ae366004620006b7565b620001be565b620000796200035f565b62000079620000cf366004620006b7565b6200036e565b6200009b620000e636600462000687565b620003d5565b6001546001600160a01b031681565b62000105620004f0565b6001600160a01b0316620001186200035f565b6001600160a01b03161462000174576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000620001d9620001d287878787620004f4565b8362000553565b6002546040516318054c3760e01b815291925082916001600160a01b03808416926318054c379262000215929091169060019060040162000822565b600060405180830381600087803b1580156200023057600080fd5b505af115801562000245573d6000803e3d6000fd5b50506003546040516318054c3760e01b81526001600160a01b0380861694506318054c3793506200027e92169060019060040162000822565b600060405180830381600087803b1580156200029957600080fd5b505af1158015620002ae573d6000803e3d6000fd5b50505050806001600160a01b031663f2fde38b620002cb620004f0565b6040518263ffffffff1660e01b8152600401620002e991906200080e565b600060405180830381600087803b1580156200030457600080fd5b505af115801562000319573d6000803e3d6000fd5b505050507f7d676ffa0eb839c909c4588fca6dd0076b4036f58e821b53b7d754c0e4b9a4d0826040516200034e91906200080e565b60405180910390a150505050505050565b6000546001600160a01b031690565b600080620003896200038388888888620004f4565b62000582565b9050600060ff60f81b30858480519060200120604051602001620003b19493929190620007a2565b60408051808303601f19018152919052805160209091012098975050505050505050565b620003df620004f0565b6001600160a01b0316620003f26200035f565b6001600160a01b0316146200044e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620004955760405162461bcd60e51b8152600401808060200182810382526026815260200180620011436026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b606063148dbc4f60e01b858585856040516024016200051794939291906200086b565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050949350505050565b600080620005618462000582565b9050828151602083016000f59150813b6200057b57600080fd5b5092915050565b606060405180602001620005969062000600565b601f1982820381018352601f909101166040819052600154620005ca916001600160a01b039091169085906020016200083d565b60408051601f1981840301815290829052620005ea9291602001620007db565b6040516020818303038152906040529050919050565b61084480620008ff83390190565b600082601f8301126200061f578081fd5b813567ffffffffffffffff808211156200063557fe5b604051601f8301601f1916810160200182811182821017156200065457fe5b6040528281528483016020018610156200066c578384fd5b82602086016020830137918201602001929092529392505050565b60006020828403121562000699578081fd5b81356001600160a01b0381168114620006b0578182fd5b9392505050565b600080600080600060a08688031215620006cf578081fd5b853567ffffffffffffffff80821115620006e7578283fd5b620006f589838a016200060e565b965060208801359150808211156200070b578283fd5b6200071989838a016200060e565b955060408801359150808211156200072f578283fd5b6200073d89838a016200060e565b9450606088013591508082111562000753578283fd5b5062000762888289016200060e565b95989497509295608001359392505050565b600081518084526200078e816020860160208601620008cb565b601f01601f19169290920160200192915050565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60008351620007ef818460208801620008cb565b83519083019062000805818360208801620008cb565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b0383168152604060208201819052600090620008639083018462000774565b949350505050565b60006080825262000880608083018762000774565b828103602084015262000894818762000774565b90508281036040840152620008aa818662000774565b90508281036060840152620008c0818562000774565b979650505050505050565b60005b83811015620008e8578181015183820152602001620008ce565b83811115620008f8576000848401525b5050505056fe60806040526040516108443803806108448339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052506100e3915050565b6100ed82826100f4565b505061047e565b6101078261024960201b6100311760201c565b6101425760405162461bcd60e51b81526004018080602001828103825260258152602001806107c56025913960400191505060405180910390fd5b6101ba826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051610249602090811b61003117901c565b6101f55760405162461bcd60e51b81526004018080602001828103825260348152602001806108106034913960400191505060405180910390fd5b6000805160206107848339815191528281558151156102445761024261021961024f565b836040518060600160405280602181526020016107a4602191396102c260201b6100371760201c565b505b505050565b3b151590565b60006102596103c7565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561029157600080fd5b505afa1580156102a5573d6000803e3d6000fd5b505050506040513d60208110156102bb57600080fd5b5051905090565b60606102cd84610249565b6103085760405162461bcd60e51b81526004018080602001828103825260268152602001806107ea6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106103455780518252601f199092019160209182019101610326565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146103a5576040519150601f19603f3d011682016040523d82523d6000602084013e6103aa565b606091505b5090925090506103bb8282866103da565b925050505b9392505050565b6000805160206107848339815191525490565b606083156103e95750816103c0565b8251156103f95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561044357818101518382015260200161042b565b50505050905090810190601f1680156104705780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f78061048d6000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013b565b6101ae565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029c6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106100ba5780518252601f19909201916020918201910161009b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011a576040519150601f19603f3d011682016040523d82523d6000602084013e61011f565b606091505b509150915061012f8282866101d2565b925050505b9392505050565b6000610145610276565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017d57600080fd5b505afa158015610191573d6000803e3d6000fd5b505050506040513d60208110156101a757600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101cd573d6000f35b3d6000fd5b606083156101e1575081610134565b8251156101f15782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023b578181015183820152602001610223565b50505050905090810190601f1680156102685780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a26469706673582212208d876f4df9e95fb28cbac2f32a1bbbb4e7f39f9d7bb110fc7b5628d98879c2ba64736f6c63430007060033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220f12267365abbae1fecd57c5f27da72b3d2e0838fa8aee9181013326301bfa65e64736f6c63430007060033",t.erc1155FactoryABI=[{inputs:[{internalType:"address",name:"_beacon",type:"address"},{internalType:"address",name:"_transferProxy",type:"address"},{internalType:"address",name:"_lazyTransferProxy",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"proxy",type:"address"}],name:"Create1155RaribleProxy",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"beacon",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"uint256",name:"salt",type:"uint256"}],name:"createToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"uint256",name:"_salt",type:"uint256"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0}]},2304:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.erc1155UserFactoryAbi=t.erc1155UserFactoryBytecode=t.deployTestErc1155UserRaribleFactory=t.createTestErc1155RaribleUserFactoryContract=t.createErc1155UserFactoryContract=void 0;var i=n(19);function s(e,n){return new e.eth.Contract(t.erc1155UserFactoryAbi,n)}t.createErc1155UserFactoryContract=function(e,n){return e.createContract(t.erc1155UserFactoryAbi,n)},t.createTestErc1155RaribleUserFactoryContract=s,t.deployTestErc1155UserRaribleFactory=function(e,n){return i.__awaiter(this,void 0,void 0,r().mark((function i(){var o,u,c,d;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=s(e),r.next=3,e.eth.getAccounts();case 3:return u=r.sent,c=a(u,1),d=c[0],r.abrupt("return",o.deploy({data:t.erc1155UserFactoryBytecode,arguments:[n]}).send({from:d,gas:5e6,gasPrice:"0"}));case 7:case"end":return r.stop()}}),i)})))},t.erc1155UserFactoryBytecode="0x608060405234801561001057600080fd5b506040516112b83803806112b883398101604081905261002f916100ac565b60006100396100a8565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100da565b3390565b6000602082840312156100bd578081fd5b81516001600160a01b03811681146100d3578182fd5b9392505050565b6111cf806100e96000396000f3fe60806040523480156200001157600080fd5b50600436106200006a5760003560e01c806327050d1f146200006f57806339280695146200008857806359659e9014620000b7578063715018a614620000c15780638da5cb5b14620000cb578063f2fde38b14620000d5575b600080fd5b620000866200008036600462000672565b620000ec565b005b6200009f6200009936600462000672565b620001b9565b604051620000ae9190620007f0565b60405180910390f35b6200009f62000222565b6200008662000231565b6200009f620002f4565b62000086620000e63660046200064e565b62000303565b6000620001086200010188888888886200041e565b8362000480565b9050806001600160a01b03811663f2fde38b62000124620004af565b6040518263ffffffff1660e01b8152600401620001429190620007f0565b600060405180830381600087803b1580156200015d57600080fd5b505af115801562000172573d6000803e3d6000fd5b505050507f5b961e37212df9fe72e2c84d894099793a4569a883f97d6413c4362e68c644b582604051620001a79190620007f0565b60405180910390a15050505050505050565b600080620001d5620001cf89898989896200041e565b620004b3565b9050600060ff60f81b30858480519060200120604051602001620001fd949392919062000784565b60408051808303601f1901815291905280516020909101209998505050505050505050565b6001546001600160a01b031681565b6200023b620004af565b6001600160a01b03166200024e620002f4565b6001600160a01b031614620002aa576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6200030d620004af565b6001600160a01b031662000320620002f4565b6001600160a01b0316146200037c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620003c35760405162461bcd60e51b8152600401808060200182810382526026815260200180620011746026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b606063650e5ad760e01b86868686866040516024016200044395949392919062000832565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905095945050505050565b6000806200048e84620004b3565b9050828151602083016000f59150813b620004a857600080fd5b5092915050565b3390565b606060405180602001620004c79062000532565b601f1982820381018352601f909101166040819052600154620004fb916001600160a01b0390911690859060200162000804565b60408051601f19818403018152908290526200051b9291602001620007bd565b60405160208183030381529060405290505b919050565b610844806200093083390190565b80356001600160a01b03811681146200052d57600080fd5b600082601f83011262000569578081fd5b8135602067ffffffffffffffff8211156200058057fe5b80820262000590828201620008d7565b838152828101908684018388018501891015620005ab578687fd5b8693505b85841015620005d857620005c38162000540565b835260019390930192918401918401620005af565b50979650505050505050565b600082601f830112620005f5578081fd5b813567ffffffffffffffff8111156200060a57fe5b6200061f601f8201601f1916602001620008d7565b81815284602083860101111562000634578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121562000660578081fd5b6200066b8262000540565b9392505050565b60008060008060008060c087890312156200068b578182fd5b863567ffffffffffffffff80821115620006a3578384fd5b620006b18a838b01620005e4565b97506020890135915080821115620006c7578384fd5b620006d58a838b01620005e4565b96506040890135915080821115620006eb578384fd5b620006f98a838b01620005e4565b955060608901359150808211156200070f578384fd5b6200071d8a838b01620005e4565b9450608089013591508082111562000733578384fd5b506200074289828a0162000558565b92505060a087013590509295509295509295565b6000815180845262000770816020860160208601620008fc565b601f01601f19169290920160200192915050565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60008351620007d1818460208801620008fc565b835190830190620007e7818360208801620008fc565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b03831681526040602082018190526000906200082a9083018462000756565b949350505050565b600060a082526200084760a083018862000756565b6020838203818501526200085c828962000756565b9150838203604085015262000872828862000756565b9150838203606085015262000888828762000756565b84810360808601528551808252828701935090820190845b81811015620008c75784516001600160a01b031683529383019391830191600101620008a0565b50909a9950505050505050505050565b60405181810167ffffffffffffffff81118282101715620008f457fe5b604052919050565b60005b8381101562000919578181015183820152602001620008ff565b8381111562000929576000848401525b5050505056fe60806040526040516108443803806108448339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052506100e3915050565b6100ed82826100f4565b505061047e565b6101078261024960201b6100311760201c565b6101425760405162461bcd60e51b81526004018080602001828103825260258152602001806107c56025913960400191505060405180910390fd5b6101ba826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051610249602090811b61003117901c565b6101f55760405162461bcd60e51b81526004018080602001828103825260348152602001806108106034913960400191505060405180910390fd5b6000805160206107848339815191528281558151156102445761024261021961024f565b836040518060600160405280602181526020016107a4602191396102c260201b6100371760201c565b505b505050565b3b151590565b60006102596103c7565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561029157600080fd5b505afa1580156102a5573d6000803e3d6000fd5b505050506040513d60208110156102bb57600080fd5b5051905090565b60606102cd84610249565b6103085760405162461bcd60e51b81526004018080602001828103825260268152602001806107ea6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106103455780518252601f199092019160209182019101610326565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146103a5576040519150601f19603f3d011682016040523d82523d6000602084013e6103aa565b606091505b5090925090506103bb8282866103da565b925050505b9392505050565b6000805160206107848339815191525490565b606083156103e95750816103c0565b8251156103f95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561044357818101518382015260200161042b565b50505050905090810190601f1680156104705780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f78061048d6000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013b565b6101ae565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029c6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106100ba5780518252601f19909201916020918201910161009b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011a576040519150601f19603f3d011682016040523d82523d6000602084013e61011f565b606091505b509150915061012f8282866101d2565b925050505b9392505050565b6000610145610276565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017d57600080fd5b505afa158015610191573d6000803e3d6000fd5b505050506040513d60208110156101a757600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101cd573d6000f35b3d6000fd5b606083156101e1575081610134565b8251156101f15782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023b578181015183820152602001610223565b50505050905090810190601f1680156102685780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a26469706673582212208d876f4df9e95fb28cbac2f32a1bbbb4e7f39f9d7bb110fc7b5628d98879c2ba64736f6c63430007060033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122042298c7a1be957e3b4120f1e36519d0117ca30aa8564828c978f486d1be2b82c64736f6c63430007060033",t.erc1155UserFactoryAbi=[{inputs:[{internalType:"address",name:"_beacon",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"proxy",type:"address"}],name:"Create1155RaribleUserProxy",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"beacon",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address[]",name:"operators",type:"address[]"},{internalType:"uint256",name:"salt",type:"uint256"}],name:"createToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address[]",name:"operators",type:"address[]"},{internalType:"uint256",name:"_salt",type:"uint256"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0}]},2305:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Balances=void 0;var s=n(19),o=n(121),u=n(1238),c=function(){function e(t){a(this,e),this.apis=t,this.getBalance=this.getBalance.bind(this)}return i(e,[{key:"getBalance",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,s=this;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=t.assetClass,n.next="ETH"===n.t0?3:"ERC20"===n.t0?7:11;break;case 3:return n.next=5,(0,u.wrapInRetry)((function(){return s.apis.balances.getEthBalance({owner:e})}));case 5:return a=n.sent,n.abrupt("return",(0,o.toBn)(a.decimalBalance));case 7:return n.next=9,(0,u.wrapInRetry)((function(){return s.apis.balances.getErc20Balance({contract:t.contract,owner:e})}));case 9:return i=n.sent,n.abrupt("return",(0,o.toBn)(i.decimalBalance));case 11:throw new Error("Asset class is not supported");case 12:case"end":return n.stop()}}),n)})))}}]),e}();t.Balances=c},2306:function(e,t,n){"use strict";var r=n(203).default,a=n(37).default,i=n(38).default,s=n(193).default,o=n(20).default,u=n(21).default,c=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroValueIsPassedError=t.UnsupportedConvertAssetTypeError=t.UnsupportedCurrencyConvertError=t.ConvertWeth=void 0;var d=n(19),p=n(121),l=n(302),y=n(740),f=n(2307),m=n(364),b=function(){function e(t,n,r){var a=this;u(this,e),this.ethereum=t,this.send=n,this.config=r,this.getWethContractAddress=function(){return a.config.weth},this.deposit=this.deposit.bind(this),this.depositWei=this.depositWei.bind(this),this.withdraw=this.withdraw.bind(this),this.withdrawWei=this.withdrawWei.bind(this),this.convert=this.convert.bind(this)}return c(e,[{key:"deposit",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n,r,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getContractDecimals();case 2:return n=t.sent,r=(0,p.toBn)(10).pow(Number(n)),a=(0,p.toBn)(e).multipliedBy(r).toString(),t.abrupt("return",this.depositWei(a));case 6:case"end":return t.stop()}}),t,this)})))}},{key:"depositWei",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n,r,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=(0,p.toBn)(e)).isZero()){t.next=3;break}throw new T;case 3:return r=(0,l.getRequiredWallet)(this.ethereum),t.next=6,(0,m.checkChainId)(r,this.config);case 6:return a=this.getContract(),t.abrupt("return",this.send(a.functionCall("deposit"),{value:n.toString()}));case 8:case"end":return t.stop()}}),t,this)})))}},{key:"withdraw",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getContractDecimals();case 2:return n=t.sent,r=(0,p.toBn)(e).multipliedBy((0,p.toBn)(10).pow(Number(n))).toString(),t.abrupt("return",this.withdrawWei(r));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"withdrawWei",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(0,p.toBn)(e).isZero()){t.next=3;break}throw new T;case 3:return n=(0,l.getRequiredWallet)(this.ethereum),t.next=6,(0,m.checkChainId)(n,this.config);case 6:return r=this.getContract(),t.abrupt("return",this.send(r.functionCall("withdraw",e)));case 8:case"end":return t.stop()}}),t,this)})))}},{key:"getContract",value:function(){var e=(0,l.getRequiredWallet)(this.ethereum);return(0,f.createWethContract)(e,this.config.weth)}},{key:"getContractDecimals",value:function(){return this.getContract().functionCall("decimals").call()}},{key:"convert",value:function(e,t,n){return d.__awaiter(this,void 0,void 0,o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,m.checkChainId)(this.ethereum,this.config);case 2:if("ETH"!==e.assetClass||"ERC20"!==t.assetClass){r.next=6;break}if((0,y.compareCaseInsensitive)(t.contract,this.config.weth)){r.next=5;break}throw new v(t.contract);case 5:return r.abrupt("return",this.deposit(n));case 6:if("ERC20"!==e.assetClass||"ETH"!==t.assetClass){r.next=10;break}if((0,y.compareCaseInsensitive)(e.contract,this.config.weth)){r.next=9;break}throw new v(e.contract);case 9:return r.abrupt("return",this.withdraw(n));case 10:throw new h;case 11:case"end":return r.stop()}}),r,this)})))}}]),e}();t.ConvertWeth=b;var v=function(e){a(n,e);var t=i(n);function n(e){var a;return u(this,n),(a=t.call(this,"Contract is not supported - ".concat(e))).name="UnsupportedCurrencyConvertError",Object.setPrototypeOf(r(a),n.prototype),a}return c(n)}(s(Error));t.UnsupportedCurrencyConvertError=v;var h=function(e){a(n,e);var t=i(n);function n(){var e;return u(this,n),(e=t.call(this,"Unsupported convert asset types")).name="UnsupportedConvertAssetTypeError",Object.setPrototypeOf(r(e),n.prototype),e}return c(n)}(s(Error));t.UnsupportedConvertAssetTypeError=h;var T=function(e){a(n,e);var t=i(n);function n(){var e;return u(this,n),(e=t.call(this,"Zero value is passed")).name="ZeroValueIsPassedError",Object.setPrototypeOf(r(e),n.prototype),e}return c(n)}(s(Error));t.ZeroValueIsPassedError=T},2307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWethContract=void 0;var r=n(2308);t.createWethContract=function(e,t){return e.createContract(r.wethABI,t)}},2308:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wethABI=void 0,t.wethABI=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]},2309:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.StartAuction=void 0;var s=n(19),o=n(73),u=n(115),c=n(121),d=n(241),p=n(362),l=n(746),y=n(732),f=n(364),m=n(407),b=n(2310),v=n(1267),h=n(622),T=n(747),g=function(){function e(t,n,i,c,m,b){var v=this;a(this,e),this.ethereum=t,this.send=n,this.config=i,this.env=c,this.approve=m,this.apis=b,this.MAX_DURATION_SECONDS=864e5,this.MIN_DURATION_SECONDS=54e3,this.start=u.Action.create({id:"approve",run:function(e){return s.__awaiter(v,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.ethereum){t.next=2;break}throw new Error("Wallet is undefined");case 2:return t.next=4,this.checkAssetType(e.makeAssetType);case 4:return n=t.sent,this.validate(e,n),t.t0=p.waitTx,t.t1=this,t.t2=o.toAddress,t.next=11,this.ethereum.getFrom();case 11:return t.t3=t.sent,t.t4=(0,t.t2)(t.t3),t.t5={assetType:n,value:e.amount},t.t6=t.t1.approve.call(t.t1,t.t4,t.t5,!0),t.next=17,(0,t.t0)(t.t6);case 17:return t.abrupt("return",{request:e,makeAssetType:n});case 18:case"end":return t.stop()}}),t,this)})))}}).thenStep({id:"sign",run:function(e){var t=e.request,n=e.makeAssetType;return s.__awaiter(v,void 0,void 0,r().mark((function e(){var a,i,u,c,p,y,f=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.ethereum){e.next=2;break}throw new Error("Wallet is undefined");case 2:return a={assetType:{assetClass:(0,d.id)(n.assetClass),data:(0,T.getAssetEncodedData)(this.ethereum,n)},value:t.amount},i={assetClass:(0,d.id)(t.takeAssetType.assetClass),data:(0,T.getAssetEncodedData)(this.ethereum,t.takeAssetType)},e.t0=this.ethereum,e.t1=T.AUCTION_DATA_V1,e.t2=[],e.t3=t.originFees||[],e.t4=t.duration,e.t5=t.startTime||0,e.next=12,(0,l.getPrice)(this.ethereum,t.takeAssetType,t.buyOutPriceDecimal);case 12:return e.t6=e.sent.toString(),e.t7={payouts:e.t2,originFees:e.t3,duration:e.t4,startTime:e.t5,buyOutPrice:e.t6},u=e.t0.encodeParameter.call(e.t0,e.t1,e.t7),e.t8=this,e.t9=(0,h.createEthereumAuctionContract)(this.ethereum,this.config.auction),e.t10=a,e.t11=i,e.next=21,(0,l.getPrice)(this.ethereum,t.takeAssetType,t.minimalStepDecimal);case 21:return e.t12=e.sent.toString(),e.next=24,(0,l.getPrice)(this.ethereum,t.takeAssetType,t.minimalPriceDecimal);case 24:return e.t13=e.sent.toString(),e.t14=T.AUCTION_DATA_TYPE,e.t15=u,e.next=29,e.t9.functionCall.call(e.t9,"startAuction",e.t10,e.t11,e.t12,e.t13,e.t14,e.t15);case 29:return e.t16=e.sent,e.next=32,e.t8.send.call(e.t8,e.t16);case 32:return c=e.sent,p=c.getEvents().then((function(e){return s.__awaiter(f,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.find((function(e){return"AuctionCreated"===e.event}))){t.next=3;break}throw new Error("AuctionCreated event has not been found");case 3:return t.abrupt("return",(0,o.toBigNumber)(n.args.auctionId));case 4:case"end":return t.stop()}}),t)})))})),y=p.then((function(e){return f.getAuctionHash(e)})),e.abrupt("return",{tx:c,hash:y,auctionId:p});case 36:case"end":return e.stop()}}),e,this)})))}}).before((function(e){return s.__awaiter(v,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,f.checkChainId)(this.ethereum,this.config);case 2:return t.abrupt("return",e);case 3:case"end":return t.stop()}}),t,this)})))})),this.checkAssetType=y.checkAssetType.bind(null,b.nftCollection),this.getAuctionHash=T.getAuctionHash.bind(null,this.ethereum,this.config)}return i(e,[{key:"validate",value:function(e,t){if(!(0,m.isNft)(t))throw new Error("Make asset should be NFT token");if("ERC721_LAZY"===t.assetClass||"ERC1155_LAZY"===t.assetClass)throw new Error("Auction cannot be created with lazy assets");if(!(0,b.isPaymentToken)(e.takeAssetType))throw new Error("Take asset should be payment token (ETH or ERC-20)");var n=(0,c.toBn)(e.minimalPriceDecimal);if(!n.isPositive())throw new Error("Minimal price should be a correct value");if(!(0,c.toBn)(e.minimalStepDecimal).isPositive())throw new Error("Minimal step should be a correct value");var r=(0,c.toBn)(e.startTime||0);if(!r.isZero()){if(r.isNaN()||!r.isInteger()||r.isNegative())throw new Error("Wrong auction start time timestamp = ".concat(r.toString()));if(r.isLessThan(Date.now()/1e3))throw new Error("Auction start time should be greater than current time")}var a=(0,c.toBn)(e.duration);if(a.isNaN()||a.isNegative()||a.isGreaterThan(this.MAX_DURATION_SECONDS))throw new Error("Incorrect duration value");if("testnet"!==this.env&&a.isLessThan(this.MIN_DURATION_SECONDS))throw new Error("Auction duration should be greater than minimal duration time");var i=(0,c.toBn)(e.buyOutPriceDecimal);if(!i.isPositive()||i.isLessThanOrEqualTo(n))throw new Error("Auction buyout price should be correct and greater than minimal price");var s=(0,c.toBn)(e.amount);if(!s.isInteger()||s.isLessThanOrEqualTo(0))throw new Error("Auction asset amount should be integer and greater than 0");return(0,v.validateParts)(e.originFees),!0}}]),e}();t.StartAuction=g},2310:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPaymentToken=void 0,t.isPaymentToken=function(e){switch(e.assetClass){case"ETH":case"ERC20":return!0;default:return!1}}},2311:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.cancelAuction=void 0;var a=n(19),i=n(622);t.cancelAuction=function(e,t,n,s,o){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var u,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}throw new Error("Wallet is undefined");case 2:return r.next=4,s.auction.getAuctionByHash({hash:o});case 4:return u=r.sent,r.next=7,e.getFrom();case 7:if(c=r.sent,u.seller.toLowerCase()===c.toLowerCase()){r.next=10;break}throw new Error("This operation is allowed only for auction owner");case 10:if(!u.lastBid){r.next=12;break}throw new Error("Can't cancel auction with bid");case 12:return r.abrupt("return",t((0,i.createEthereumAuctionContract)(e,n.auction).functionCall("cancel",u.auctionId)));case 13:case"end":return r.stop()}}),a)})))}},2312:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.finishAuction=void 0;var a=n(19),i=n(622);function s(e){if(!e.lastBid)throw new Error("Auction without bid can't be finished");if(e.endTime){var t=new Date(e.endTime).getTime();if(t>0&&t2)throw new Error("Supports max up to 2 different origin fee address per request");return e.reduce((function(e,n){var r=t.reducePart(n);return e[0]+=r[0],e[1]+=r[1],e}),[0,0])}},{key:"getComplexReducedFeesData",value:function(e){var t=this.getReducedFeesArray(e);return{encodedFeesValue:(0,s.packFeesToUint)(t),totalFeeBasisPoints:t[0]+t[1]}}},{key:"getAddresses",value:function(){return this.addresses}},{key:"reducePart",value:function(e){var t=0,n=0;if(e.account===this.addresses[0])t+=e.value;else if(e.account===this.addresses[1])n+=e.value;else if(this.addresses[0]===i.ZERO_ADDRESS)t+=e.value,this.addresses[0]=e.account;else{if(this.addresses[1]!==i.ZERO_ADDRESS)throw new Error("Supports max up to 2 different origin fee address per request");n+=e.value,this.addresses[1]=e.account}return[t,n]}}]),e}();t.OriginFeeReducer=o},2319:function(e,t,n){"use strict";var r=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.parseItemId=void 0;var a=n(73);t.parseItemId=function(e){var t=e.split(":");if(t.length<2)throw new Error("Unable to parse ItemId: ".concat(e));var n=r(t,2),i=n[0],s=n[1];return{contract:(0,a.toAddress)(i),tokenId:s}}},2320:function(e,t,n){"use strict";var r=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.parseOwnershipId=void 0;var a=n(73);t.parseOwnershipId=function(e){var t=e.split(":");if(t.length<3)throw new Error("Unable to parse OwnershipId: ".concat(e));var n=r(t,3),i=n[0],s=n[1],o=n[2];return{contract:(0,a.toAddress)(i),tokenId:s,owner:(0,a.toAddress)(o)}}},2321:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toPromise=void 0,t.toPromise=function(e){return void 0!==e.then?e:Promise.resolve(e)}},241:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.id32=t.id=void 0;var r=n(454),a=n(73);function i(t){return(0,a.toWord)("0x".concat((0,r.keccak256)(e.from(t)).toString("hex")))}t.id=function(e){return i(e).substring(0,10)},t.id32=i}).call(this,n(15).Buffer)},2474:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2475:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.BlockchainEthereumTransaction=void 0;var s=n(19),o=n(45),u=function(){function e(t,n,r){a(this,e),this.transaction=t,this.network=n,this.resultExtractor=r,this.blockchain=this.getBlockchain(n)}return i(e,[{key:"getBlockchain",value:function(e){switch(e){case"mumbai":case"polygon":return o.Blockchain.POLYGON;case"mantle":case"testnet-mantle":return o.Blockchain.MANTLE;default:return o.Blockchain.ETHEREUM}}},{key:"hash",value:function(){return this.transaction.hash}},{key:"wait",value:function(){var e;return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.transaction.wait();case 2:return t.t0=this.blockchain,t.t1=this.transaction.hash,t.next=6,this.transaction.getEvents();case 6:return t.t2=t.sent,t.next=9,null===(e=this.resultExtractor)||void 0===e?void 0:e.call(this,this.transaction.getEvents.bind(this.transaction));case 9:return t.t3=t.sent,t.abrupt("return",{blockchain:t.t0,hash:t.t1,events:t.t2,result:t.t3});case 11:case"end":return t.stop()}}),t,this)})))}},{key:"getTxLink",value:function(){switch(this.network){case"mainnet":return"https://etherscan.io/tx/".concat(this.hash());case"mumbai":return"https://mumbai.polygonscan.com/tx/".concat(this.hash());case"polygon":return"https://polygonscan.com/tx/".concat(this.hash());case"testnet":return"https://goerli.etherscan.io/tx/".concat(this.hash());case"mantle":return"https://explorer.mantle.xyz/tx/".concat(this.hash());case"testnet-mantle":return"https://explorer.testnet.mantle.xyz/tx/".concat(this.hash());default:throw new Error("Unsupported transaction network")}}},{key:"isEmpty",get:function(){return!1}}]),e}();t.BlockchainEthereumTransaction=u},2476:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.BlockchainFlowTransaction=void 0;var s=n(19),o=n(45),u=function(){function e(t,n){a(this,e),this.transaction=t,this.network=n,this.blockchain=o.Blockchain.FLOW}return i(e,[{key:"hash",value:function(){return this.transaction.txId}},{key:"wait",value:function(){return s.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{blockchain:this.blockchain,hash:this.transaction.txId});case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getTxLink",value:function(){switch(this.network){case"mainnet":return"https://flowscan.org/transaction/".concat(this.hash());case"testnet":return"https://testnet.flowscan.org/transaction/".concat(this.hash());case"emulator":return"";default:throw new Error("Unsupported transaction network")}}},{key:"isEmpty",get:function(){return!1}}]),e}();t.BlockchainFlowTransaction=u},2477:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.BlockchainTezosTransaction=void 0;var s=n(19),o=n(45),u=function(){function e(t,n){a(this,e),this.transaction=t,this.network=n,this.blockchain=o.Blockchain.TEZOS}return i(e,[{key:"hash",value:function(){return this.transaction.hash}},{key:"wait",value:function(){return s.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.transaction.confirmation();case 2:return e.abrupt("return",{blockchain:this.blockchain,hash:this.transaction.hash});case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getTxLink",value:function(){switch(this.network){case"testnet":case"dev":return"https://ghostnet.tzkt.io/".concat(this.hash());case"mainnet":return"https://tzkt.io/".concat(this.hash());default:throw new Error("Unsupported transaction network")}}},{key:"isEmpty",get:function(){return!1}}]),e}();t.BlockchainTezosTransaction=u},2478:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.BlockchainSolanaTransaction=void 0;var s=n(19),o=n(45),u=function(){function e(t,n){a(this,e),this.transaction=t,this.blockchain=o.Blockchain.SOLANA,this.cluster=n.cluster,this.getSdk=function(){return n}}return i(e,[{key:"hash",value:function(){return this.transaction.txId}},{key:"wait",value:function(){return s.__awaiter(this,void 0,void 0,r().mark((function e(){var t,n=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return 4,t=function e(t){return s.__awaiter(n,void 0,void 0,r().mark((function n(){var a,i,s;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.getSdk().confirmTransaction(this.transaction.txId,"confirmed");case 3:if(s=n.sent,!(null===(a=s.value)||void 0===a?void 0:a.err)){n.next=10;break}if("string"!==typeof s.value.err){n.next=9;break}throw new Error(s.value.err);case 9:throw s.value.err;case 10:case 17:n.next=20;break;case 12:if(n.prev=12,n.t0=n.catch(0),!((null===(i=null===n.t0||void 0===n.t0?void 0:n.t0.message)||void 0===i?void 0:i.includes("Transaction was not confirmed in"))&&t>0)){n.next=19;break}return n.next=17,e(t-1);case 19:throw n.t0;case 20:case"end":return n.stop()}}),n,this,[[0,12]])})))},e.next=4,t(4);case 4:return e.abrupt("return",{blockchain:this.blockchain,hash:this.transaction.txId});case 5:case"end":return e.stop()}}),e,this)})))}},{key:"getTxLink",value:function(){var e="https://solscan.io/tx/".concat(this.hash());switch(this.cluster){case"mainnet-beta":return e;case"testnet":case"devnet":return e+"?cluster=".concat(this.cluster);default:throw new Error("Unsupported transaction network")}}},{key:"isEmpty",get:function(){return!1}}]),e}();t.BlockchainSolanaTransaction=u},2479:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.BlockchainImmutableXTransaction=void 0;var s=n(19),o=n(45),u=function(){function e(t){a(this,e),this.transaction=t,this.blockchain=o.Blockchain.IMMUTABLEX}return i(e,[{key:"hash",value:function(){var e;return(null!==(e=this.transaction)&&void 0!==e?e:"")+""}},{key:"wait",value:function(){return s.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{blockchain:this.blockchain,hash:this.hash()});case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getTxLink",value:function(){return this.transaction?"https://immutascan.io/tx/"+this.transaction:""}},{key:"isEmpty",get:function(){return void 0===this.transaction}}]),e}();t.BlockchainImmutableXTransaction=u},2480:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateOrderDataV3Request=void 0;var r=n(252),a=n(366);t.validateOrderDataV3Request=function(e,t){if((null===t||void 0===t?void 0:t.shouldProvideMaxFeesBasePoint)&&(!e.maxFeesBasePoint||e.maxFeesBasePoint<=0||e.maxFeesBasePoint>1e3))throw new r.Warning("maxFeesBasePoint should be specified in request and should be more than 0% and can't be more than 10%");if(e.payouts&&e.payouts.length>1)throw new r.Warning("Only 1 payout account maximum supported");if(e.originFees&&e.originFees.length>2)throw new r.Warning("Only 2 origin accounts maximum supported");(0,a.checkPayouts)(e.payouts)}},2481:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumSell=void 0;var o=n(19),u=n(64),c=n(216),d=n(267),p=n(750),l=n(366),y=o.__importStar(n(253)),f=n(253),m=function(){function e(t,n,r){i(this,e),this.sdk=t,this.network=n,this.config=r,this.blockchain=(0,f.getEVMBlockchain)(n),this.sell=this.sell.bind(this),this.update=this.update.bind(this),this.sellBasic=this.sellBasic.bind(this),this.sellUpdateBasic=this.sellUpdateBasic.bind(this)}return s(e,[{key:"sell",value:function(){var e;return o.__awaiter(this,void 0,void 0,a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(null===(e=this.config)||void 0===e?void 0:e.useDataV3)){t.next=4;break}return t.abrupt("return",this.sellDataV3());case 4:return t.abrupt("return",this.sellDataV2());case 5:case"end":return t.stop()}}),t,this)})))}},{key:"sellBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sell();case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"sellUpdateBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.update(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getFutureOrderFees",value:function(){return o.__awaiter(this,void 0,void 0,a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=c.OriginFeeSupport.FULL,e.next=3,this.sdk.order.getBaseOrderFee();case 3:return e.t1=e.sent,e.abrupt("return",{originFeeSupport:e.t0,baseFee:e.t1});case 5:case"end":return e.stop()}}),e,this)})))}},{key:"sellDataV2",value:function(){return o.__awaiter(this,void 0,void 0,a().mark((function e(){var t,n=this;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.sdk.order.sell.before((function(e){return o.__awaiter(n,void 0,void 0,a().mark((function t(){var n,r,i,s,o,c;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,l.checkPayouts)(e.payouts),r=(0,f.getEthereumItemId)(e.itemId),i=r.tokenId,s=r.contract,o=(0,p.convertDateToTimestamp)(e.expirationDate),c=(0,d.getCurrencyAssetType)(e.currency),t.abrupt("return",{type:"DATA_V2",makeAssetType:{tokenId:i,contract:(0,u.toAddress)(s)},amount:null!==(n=e.amount)&&void 0!==n?n:1,takeAssetType:y.getEthTakeAssetType(c),priceDecimal:e.price,payouts:y.toEthereumParts(e.payouts),originFees:y.toEthereumParts(e.originFees),end:o});case 5:case"end":return t.stop()}}),t)})))})).after((function(e){return y.convertEthereumOrderHash(e.hash,n.blockchain)})),e.t0=c.OriginFeeSupport.FULL,e.t1=c.PayoutsSupport.MULTIPLE,e.t2=c.MaxFeesBasePointSupport.IGNORED,e.t3=y.getSupportedCurrencies(),e.next=7,this.sdk.order.getBaseOrderFee();case 7:return e.t4=e.sent,e.t5=t,e.abrupt("return",{originFeeSupport:e.t0,payoutsSupport:e.t1,maxFeesBasePointSupport:e.t2,supportedCurrencies:e.t3,baseFee:e.t4,supportsExpirationDate:!0,submit:e.t5});case 10:case"end":return e.stop()}}),e,this)})))}},{key:"sellDataV3",value:function(){return o.__awaiter(this,void 0,void 0,a().mark((function e(){var t,n=this;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.sdk.order.sell.before((function(e){return o.__awaiter(n,void 0,void 0,a().mark((function t(){var n,r,i,s,o,c,l,m,b;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,f.validateOrderDataV3Request)(e,{shouldProvideMaxFeesBasePoint:!0}),i=(0,f.getEthereumItemId)(e.itemId),s=i.tokenId,o=i.contract,c=(0,p.convertDateToTimestamp)(e.expirationDate),l=(0,d.getCurrencyAssetType)(e.currency),m=y.toEthereumParts(e.payouts),b=y.toEthereumParts(e.originFees),t.abrupt("return",{type:"DATA_V3_SELL",makeAssetType:{tokenId:s,contract:(0,u.toAddress)(o)},payout:m[0],originFeeFirst:b[0],originFeeSecond:b[1],maxFeesBasePoint:null!==(n=e.maxFeesBasePoint)&&void 0!==n?n:0,amount:null!==(r=e.amount)&&void 0!==r?r:1,takeAssetType:y.getEthTakeAssetType(l),priceDecimal:e.price,end:c});case 7:case"end":return t.stop()}}),t)})))})).after((function(e){return y.convertEthereumOrderHash(e.hash,n.blockchain)})),e.t0=c.OriginFeeSupport.FULL,e.t1=c.PayoutsSupport.SINGLE,e.t2=c.MaxFeesBasePointSupport.REQUIRED,e.t3=y.getSupportedCurrencies(),e.next=7,this.sdk.order.getBaseOrderFee();case 7:return e.t4=e.sent,e.t5=t,e.abrupt("return",{originFeeSupport:e.t0,payoutsSupport:e.t1,maxFeesBasePointSupport:e.t2,supportedCurrencies:e.t3,baseFee:e.t4,supportsExpirationDate:!0,submit:e.t5});case 10:case"end":return e.stop()}}),e,this)})))}},{key:"update",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,i,s,o,d,p,l=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.orderId){t.next=2;break}throw new Error("OrderId has not been specified");case 2:if(n=e.orderId.split(":"),i=r(n,2),s=i[0],o=i[1],(0,f.isEVMBlockchain)(s)){t.next=5;break}throw new Error("Not an ethereum order");case 5:return t.next=7,this.sdk.apis.order.getValidatedOrderByHash({hash:o});case 7:if("RARIBLE_V2"===(d=t.sent).type||"RARIBLE_V1"===d.type){t.next=10;break}throw new Error("You can't update non-Rarible orders. Unable to update sell ".concat(JSON.stringify(d)));case 10:return p=this.sdk.order.sellUpdate.before((function(e){return{orderHash:(0,u.toWord)(o),priceDecimal:e.price}})).after((function(e){return y.convertEthereumOrderHash(e.hash,l.blockchain)})),t.t0=(0,f.getOriginFeeSupport)(d.type),t.t1=(0,f.getPayoutsSupport)(d.type),t.t2=c.MaxFeesBasePointSupport.IGNORED,t.t3=y.getSupportedCurrencies(),t.next=17,this.sdk.order.getBaseOrderFee(d.type);case 17:return t.t4=t.sent,t.t5=p,t.t6={nftCollection:"contract"in d.make.assetType?(0,f.convertEthereumContractAddress)(d.make.assetType.contract,this.blockchain):void 0},t.abrupt("return",{originFeeSupport:t.t0,payoutsSupport:t.t1,maxFeesBasePointSupport:t.t2,supportedCurrencies:t.t3,baseFee:t.t4,submit:t.t5,orderData:t.t6});case 21:case"end":return t.stop()}}),t,this)})))}}]),e}();t.EthereumSell=m},2482:function(e,t,n){"use strict";var r=n(78).default,a=n(111).default,i=n(20).default,s=n(21).default,o=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumFill=void 0;var u=n(19),c=n(64),d=n(176),p=n(146),l=n(407),y=n(735),f=n(45),m=n(252),b=n(216),v=n(366),h=n(253),T=function(){function e(t,n,r,a){s(this,e),this.sdk=t,this.wallet=n,this.network=r,this.config=a,this.fill=this.fill.bind(this),this.buy=this.buy.bind(this),this.batchBuy=this.batchBuy.bind(this),this.acceptBid=this.acceptBid.bind(this),this.buyBasic=this.buyBasic.bind(this),this.acceptBidBasic=this.acceptBidBasic.bind(this),this.batchBuyBasic=this.batchBuyBasic.bind(this),this.getBuyAmmInfo=this.getBuyAmmInfo.bind(this)}return o(e,[{key:"buyBasic",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.buy(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"acceptBidBasic",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.acceptBid(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getFillOrderRequest",value:function(e,t){var n,r,a,i,s;switch(e.type){case"RARIBLE_V1":s={order:e,amount:t.amount,infinite:t.infiniteApproval,originFee:(null===(r=null===(n=t.originFees)||void 0===n?void 0:n[0])||void 0===r?void 0:r.value)?t.originFees[0].value:0,payout:(null===(i=null===(a=t.payouts)||void 0===a?void 0:a[0])||void 0===i?void 0:i.account)?(0,h.convertToEthereumAddress)(t.payouts[0].account):void 0};break;case"RARIBLE_V2":switch(s={order:e,amount:t.amount,infinite:t.infiniteApproval,payouts:(0,h.toEthereumParts)(t.payouts),originFees:(0,h.toEthereumParts)(t.originFees)},e.data.dataType){case"RARIBLE_V2_DATA_V3_BUY":(0,h.validateOrderDataV3Request)(t,{shouldProvideMaxFeesBasePoint:!0}),s.maxFeesBasePoint=t.maxFeesBasePoint;break;case"RARIBLE_V2_DATA_V3_SELL":(0,h.validateOrderDataV3Request)(t,{shouldProvideMaxFeesBasePoint:!1})}break;case"OPEN_SEA_V1":s={order:e,originFees:"ETH"===e.take.assetType.assetClass?(0,h.toEthereumParts)(t.originFees):[],payouts:(0,h.toEthereumParts)(t.payouts),infinite:t.infiniteApproval};break;case"SEAPORT_V1":case"LOOKSRARE":case"LOOKSRARE_V2":case"X2Y2":s={order:e,originFees:(0,h.toEthereumParts)(t.originFees),amount:t.amount};break;case"AMM":return{order:e,originFees:(0,h.toEthereumParts)(t.originFees),amount:t.amount,assetType:(0,h.getAssetTypeFromFillRequest)(t.itemId),addRoyalty:t.addRoyalties};default:throw new Error("Unsupported order type")}if(t.addRoyalties)throw new m.Warning("Adding royalties is available only for AMM orders");if(t.itemId){if(Array.isArray(t.itemId))throw new Error("Array of itemIds is supported only for AMM orders");var o=(0,h.getEthereumItemId)(t.itemId),u=o.contract,d=o.tokenId;s.assetType={contract:(0,c.toAddress)(u),tokenId:d}}return s}},{key:"getSupportFlags",value:function(e){switch(e.type){case"RARIBLE_V1":return{originFeeSupport:b.OriginFeeSupport.AMOUNT_ONLY,payoutsSupport:b.PayoutsSupport.SINGLE,maxFeesBasePointSupport:b.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!0};case"RARIBLE_V2":switch(e.data.dataType){case"RARIBLE_V2_DATA_V3_BUY":return{originFeeSupport:b.OriginFeeSupport.FULL,payoutsSupport:b.PayoutsSupport.SINGLE,maxFeesBasePointSupport:b.MaxFeesBasePointSupport.REQUIRED,supportsPartialFill:!0};case"RARIBLE_V2_DATA_V3_SELL":return{originFeeSupport:b.OriginFeeSupport.FULL,payoutsSupport:b.PayoutsSupport.SINGLE,maxFeesBasePointSupport:b.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!0};default:return{originFeeSupport:b.OriginFeeSupport.FULL,payoutsSupport:b.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:b.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!0}}case"OPEN_SEA_V1":return{originFeeSupport:"ETH"===e.take.assetType.assetClass?b.OriginFeeSupport.FULL:b.OriginFeeSupport.NONE,payoutsSupport:b.PayoutsSupport.SINGLE,maxFeesBasePointSupport:b.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!1};case"SEAPORT_V1":var t="PARTIAL_OPEN"===e.data.orderType||"PARTIAL_RESTRICTED"===e.data.orderType;return{originFeeSupport:b.OriginFeeSupport.FULL,payoutsSupport:b.PayoutsSupport.NONE,maxFeesBasePointSupport:b.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:t};case"LOOKSRARE":case"LOOKSRARE_V2":case"AMM":return{originFeeSupport:b.OriginFeeSupport.FULL,payoutsSupport:b.PayoutsSupport.NONE,maxFeesBasePointSupport:b.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!0};case"X2Y2":return{originFeeSupport:b.OriginFeeSupport.FULL,payoutsSupport:b.PayoutsSupport.NONE,maxFeesBasePointSupport:b.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!1};default:throw new Error("Unsupported order type")}}},{key:"getPlatform",value:function(e){switch(e.type){case"RARIBLE_V1":case"RARIBLE_V2":default:return f.Platform.RARIBLE;case"OPEN_SEA_V1":case"SEAPORT_V1":return f.Platform.OPEN_SEA;case"LOOKSRARE":case"LOOKSRARE_V2":return f.Platform.LOOKSRARE;case"AMM":return f.Platform.SUDOSWAP;case"X2Y2":return f.Platform.X2Y2;case"CRYPTO_PUNK":return f.Platform.CRYPTO_PUNKS}}},{key:"getMaxAmount",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n,r,a;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("COLLECTION"!==e.take.assetType.assetClass){t.next=2;break}return t.abrupt("return",null);case 2:if(!(0,l.isNft)(e.take.assetType)){t.next=13;break}if(void 0!==this.wallet){t.next=5;break}throw new Error("Wallet undefined");case 5:return t.next=7,this.wallet.ethereum.getFrom();case 7:return n=t.sent,r=(0,y.getOwnershipId)(e.take.assetType.contract,e.take.assetType.tokenId,(0,c.toAddress)(n)),t.next=11,this.sdk.apis.nftOwnership.getNftOwnershipById({ownershipId:r});case 11:return a=t.sent,t.abrupt("return",(0,c.toBigNumber)(d.BigNumber.min(a.value,e.take.value).toFixed()));case 13:return t.abrupt("return",e.makeStock);case 14:case"end":return t.stop()}}),t,this)})))}},{key:"isMultiple",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n,r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(0,l.isNft)(e.take.assetType)&&"COLLECTION"!==e.take.assetType.assetClass){t.next=4;break}n=e.take.assetType.contract,t.next=13;break;case 4:if(!(0,l.isNft)(e.make.assetType)&&"COLLECTION"!==e.make.assetType.assetClass){t.next=8;break}n=e.make.assetType.contract,t.next=13;break;case 8:if("AMM_NFT"!==e.make.assetType.assetClass){t.next=12;break}return t.abrupt("return",!1);case 12:throw new Error("Nft has not been found");case 13:return t.next=15,this.sdk.apis.nftCollection.getNftCollectionById({collection:n});case 15:return r=t.sent,t.abrupt("return","ERC1155"===r.type);case 17:case"end":return t.stop()}}),t,this)})))}},{key:"getOrderHashFromRequest",value:function(e){if("order"in e)return(0,h.convertOrderIdToEthereumHash)(e.order.id);if("orderId"in e)return(0,h.convertOrderIdToEthereumHash)(e.orderId);throw new Error("OrderId has not been found in request")}},{key:"hasCollectionAssetType",value:function(e){return"COLLECTION"===e.take.assetType.assetClass||"COLLECTION"===e.make.assetType.assetClass}},{key:"commonFill",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return u.__awaiter(this,void 0,void 0,i().mark((function r(){var a,s,o,u,c,d=this;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=this.getOrderHashFromRequest(t),r.next=3,this.sdk.apis.order.getValidatedOrderByHash({hash:a});case 3:return s=r.sent,o=e.before((function(e){if((0,v.checkPayouts)(e.payouts),e.unwrap)throw new m.Warning("Unwrap is not supported yet");if(d.hasCollectionAssetType(s)&&!e.itemId)throw new m.Warning("For collection order you should pass itemId");return d.getFillOrderRequest(s,e)})).after((function(e){return new p.BlockchainEthereumTransaction(e,d.network)})),u=(0,h.getEVMBlockchain)(this.network),c=n?s.take.assetType:s.make.assetType,r.t0=Object,r.t1=Object.assign({},this.getSupportFlags(s)),r.next=11,this.isMultiple(s);case 11:return r.t2=r.sent,r.next=14,this.getMaxAmount(s);case 14:return r.t3=r.sent,r.next=17,this.sdk.order.getBaseOrderFillFee(s);case 17:return r.t4=r.sent,r.t5=o,r.t6={platform:this.getPlatform(s),nftCollection:"contract"in c?(0,h.convertEthereumContractAddress)(c.contract,u):void 0},r.t7={multiple:r.t2,maxAmount:r.t3,baseFee:r.t4,submit:r.t5,orderData:r.t6},r.abrupt("return",r.t0.assign.call(r.t0,r.t1,r.t7));case 22:case"end":return r.stop()}}),r,this)})))}},{key:"fill",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.commonFill(this.sdk.order.fill,e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"buy",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.commonFill(this.sdk.order.buy,e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"acceptBid",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.commonFill(this.sdk.order.acceptBid,e,!0));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"batchBuy",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n,s,o,c,d=this;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={},s=this.sdk.order.buyBatch.around((function(e){return e.map((function(e){(0,v.checkPayouts)(e.payouts);var t=n[e.orderId];if(!t)throw new Error("Order with id ".concat(e.orderId," not precached"));if(e.unwrap)throw new Error("Unwrap is not supported yet");return d.getFillOrderRequest(t,e)}))}),(function(e,t){return new p.BlockchainEthereumTransaction(e,d.network,(function(e){return u.__awaiter(d,void 0,void 0,i().mark((function n(){var s,o,u,c,d,p,l;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e();case 3:if(n.t0=n.sent,n.t0){n.next=6;break}n.t0=[];case 6:o=n.t0,u=[],c=a(o);try{for(c.s();!(d=c.n()).done;)if("0"in(p=d.value)&&"Execution"===(null===(s=p[0])||void 0===s?void 0:s.event))if(Array.isArray(p))u.push.apply(u,r(p));else for(l=0;p[l];)u.push(p[l]),l+=1;else"Execution"===p.event&&u.push(p)}catch(i){c.e(i)}finally{c.f()}if(!u){n.next=14;break}return n.abrupt("return",{type:"BATCH_BUY",results:t.map((function(e,t){var n,r,a;return{orderId:e.orderId,result:"0x0000000000000000000000000000000000000000000000000000000000000001"===((null===(n=u[t])||void 0===n?void 0:n.data)||(null===(a=null===(r=u[t])||void 0===r?void 0:r.raw)||void 0===a?void 0:a.data))}}))});case 14:return n.abrupt("return",void 0);case 15:n.next=21;break;case 17:return n.prev=17,n.t1=n.catch(0),console.error("Can't parse transaction events",n.t1),n.abrupt("return",void 0);case 21:case"end":return n.stop()}}),n,null,[[0,17]])})))}))})),o=(0,h.getEVMBlockchain)(this.network),t.next=5,Promise.all(e.map((function(e){return u.__awaiter(d,void 0,void 0,i().mark((function t(){var r,a,s;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.getOrderHashFromRequest(e),t.next=3,this.sdk.apis.order.getValidatedOrderByHash({hash:r});case 3:if(a=t.sent,s=(0,h.getOrderId)(e),n[s]=a,"ACTIVE"===a.status){t.next=8;break}throw new Error("Order with id ".concat(s," is not active"));case 8:if("OPEN_SEA_V1"===a.type||"RARIBLE_V2"===a.type||"SEAPORT_V1"===a.type||"LOOKSRARE"===a.type||"LOOKSRARE_V2"===a.type||"AMM"===a.type||"X2Y2"===a.type){t.next=10;break}throw new Error("Order type ".concat(a.type," is not supported for batch buy"));case 10:if("ETH"!==a.make.assetType.assetClass&&"ERC20"!==a.make.assetType.assetClass){t.next=12;break}throw new Error("Bid orders is not supported");case 12:return t.t0=Object,t.t1=Object.assign({orderId:s},this.getSupportFlags(a)),t.next=16,this.isMultiple(a);case 16:return t.t2=t.sent,t.next=19,this.getMaxAmount(a);case 19:return t.t3=t.sent,t.next=22,this.sdk.order.getBaseOrderFillFee(a);case 22:return t.t4=t.sent,t.t5={platform:this.getPlatform(a),nftCollection:"contract"in a.make.assetType?(0,h.convertEthereumContractAddress)(a.make.assetType.contract,o):void 0},t.t6={multiple:t.t2,maxAmount:t.t3,baseFee:t.t4,orderData:t.t5},t.abrupt("return",t.t0.assign.call(t.t0,t.t1,t.t6));case 26:case"end":return t.stop()}}),t,this)})))})));case 5:return c=t.sent,t.abrupt("return",{submit:s,prepared:c});case 7:case"end":return t.stop()}}),t,this)})))}},{key:"getBuyAmmInfo",value:function(e){return this.sdk.order.getBuyAmmInfo({hash:e.hash,numNFTs:e.numNFTs})}},{key:"batchBuyBasic",value:function(e){return u.__awaiter(this,void 0,void 0,i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.batchBuy(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}}]),e}();t.EthereumFill=T},2483:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumBurn=void 0;var s=n(19),o=n(115),u=n(64),c=n(146),d=n(253),p=function(){function e(t,n){a(this,e),this.sdk=t,this.network=n,this.burn=this.burn.bind(this),this.burnBasic=this.burnBasic.bind(this)}return i(e,[{key:"burn",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,p,l,y=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,d.getEthereumItemId)(e.itemId),a=n.contract,i=n.tokenId,t.next=3,this.sdk.apis.nftItem.getNftItemById({itemId:"".concat(a,":").concat(i)});case 3:return p=t.sent,t.next=6,this.sdk.apis.nftCollection.getNftCollectionById({collection:p.contract});case 6:return l=t.sent,t.abrupt("return",{multiple:"ERC1155"===l.type,maxAmount:p.supply,submit:o.Action.create({id:"burn",run:function(e){return s.__awaiter(y,void 0,void 0,r().mark((function t(){var n,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=void 0!==(null===e||void 0===e?void 0:e.amount)?(0,u.toBigNumber)(e.amount.toFixed()):void 0,t.next=3,this.sdk.nft.burn({assetType:{contract:p.contract,tokenId:p.tokenId},amount:n,creators:(0,d.toEthereumParts)(null===e||void 0===e?void 0:e.creators)});case 3:return a=t.sent,t.abrupt("return",a&&new c.BlockchainEthereumTransaction(a,this.network));case 5:case"end":return t.stop()}}),t,this)})))}})});case 8:case"end":return t.stop()}}),t,this)})))}},{key:"burnBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.burn(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}}]),e}();t.EthereumBurn=p},2484:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumTransfer=void 0;var o=n(19),u=n(115),c=n(64),d=n(146),p=n(253),l=function(){function e(t,n){i(this,e),this.sdk=t,this.network=n,this.transfer=this.transfer.bind(this),this.transferBasic=this.transferBasic.bind(this)}return s(e,[{key:"transfer",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){var n,i,s,l,y,f,m,b=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.itemId.split(":"),i=a(n,3),s=i[0],l=i[1],y=i[2],(0,p.isEVMBlockchain)(s)){t.next=3;break}throw new Error("Not an ethereum item: ".concat(e.itemId));case 3:return t.next=5,this.sdk.apis.nftItem.getNftItemById({itemId:"".concat(l,":").concat(y)});case 5:return f=t.sent,t.next=8,this.sdk.apis.nftCollection.getNftCollectionById({collection:f.contract});case 8:return m=t.sent,t.abrupt("return",{multiple:"ERC1155"===m.type,maxAmount:f.supply,submit:u.Action.create({id:"transfer",run:function(e){return o.__awaiter(b,void 0,void 0,r().mark((function t(){var n,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=void 0!==e.amount?(0,c.toBigNumber)(e.amount.toFixed()):void 0,t.next=3,this.sdk.nft.transfer({contract:f.contract,tokenId:f.tokenId},(0,p.convertToEthereumAddress)(e.to),n);case 3:return a=t.sent,t.abrupt("return",new d.BlockchainEthereumTransaction(a,this.network));case 5:case"end":return t.stop()}}),t,this)})))}})});case 10:case"end":return t.stop()}}),t,this)})))}},{key:"transferBasic",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.transfer(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}}]),e}();t.EthereumTransfer=l},2485:function(e,t,n){"use strict";var r=n(37).default,a=n(38).default,i=n(193).default,s=n(48).default,o=n(20).default,u=n(21).default,c=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateBidNotSupportedForThidKindOfOrderError=t.InsufficientFundsError=t.EthereumBid=void 0;var d=n(19),p=n(64),l=n(515),y=n(45),f=n(115),m=n(731),b=n(1266),v=n(746),h=n(740),T=n(121),g=n(252),w=n(216),k=n(2486),x=n(267),O=n(750),_=n(366),E=n(623),A=d.__importStar(n(253)),C=n(253),I=function(){function e(t,n,r,a,i){u(this,e),this.sdk=t,this.wallet=n,this.balanceService=r,this.network=a,this.config=i,this.blockchain=(0,C.getEVMBlockchain)(a),this.bid=this.bid.bind(this),this.update=this.update.bind(this),this.getConvertableValue=this.getConvertableValue.bind(this),this.convertCurrency=this.convertCurrency.bind(this),this.bidBasic=this.bidBasic.bind(this),this.bidUpdateBasic=this.bidUpdateBasic.bind(this)}return c(e,[{key:"convertAssetType",value:function(e){switch(e.assetClass){case"ETH":return{"@type":"ETH"};case"ERC20":return{"@type":"ERC20",contract:(0,C.convertEthereumContractAddress)(e.contract,this.blockchain)};case"ERC721":return{"@type":"ERC721",contract:(0,C.convertEthereumContractAddress)(e.contract,this.blockchain),tokenId:e.tokenId};case"ERC721_LAZY":return{"@type":"ERC721_Lazy",contract:(0,C.convertEthereumContractAddress)(e.contract,this.blockchain),tokenId:e.tokenId,uri:e.uri,creators:e.creators.map((function(e){return{account:(0,p.toUnionAddress)(e.account),value:e.value}})),royalties:e.royalties.map((function(e){return{account:(0,p.toUnionAddress)(e.account),value:e.value}})),signatures:e.signatures.map((function(e){return(0,p.toBinary)(e)}))};case"ERC1155":return{"@type":"ERC1155",contract:(0,C.convertEthereumContractAddress)(e.contract,this.blockchain),tokenId:e.tokenId};case"ERC1155_LAZY":return{"@type":"ERC1155_Lazy",contract:(0,C.convertEthereumContractAddress)(e.contract,this.blockchain),tokenId:e.tokenId,uri:e.uri,supply:void 0!==e.supply?(0,l.toBigNumber)(e.supply):(0,l.toBigNumber)("1"),creators:e.creators.map((function(e){return{account:(0,p.toUnionAddress)(e.account),value:e.value}})),royalties:e.royalties.map((function(e){return{account:(0,p.toUnionAddress)(e.account),value:e.value}})),signatures:e.signatures.map(p.toBinary)};case"GEN_ART":return{"@type":"GEN_ART",contract:(0,C.convertEthereumContractAddress)(e.contract,this.blockchain)};default:throw new Error("Unsupported asset type ".concat(e.assetClass))}}},{key:"bidBasic",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.bid(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"bidUpdateBasic",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.update(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"bid",value:function(e){var t;return d.__awaiter(this,void 0,void 0,o().mark((function n(){return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(null===(t=this.config)||void 0===t?void 0:t.useDataV3)){n.next=4;break}return n.abrupt("return",this.bidDataV3(e));case 4:return n.abrupt("return",this.bidDataV2(e));case 5:case"end":return n.stop()}}),n,this)})))}},{key:"bidDataV2",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n,r,a,i,s,u,c,p,l=this;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!("itemId"in e)){t.next=9;break}return i=(0,C.getEthereumItemId)(e.itemId),s=i.itemId,t.next=4,this.sdk.apis.nftItem.getNftItemById({itemId:s});case 4:r=t.sent,n=r.contract,a={tokenId:r.tokenId,contract:r.contract},t.next=15;break;case 9:if(!("collectionId"in e)){t.next=14;break}n=(0,C.convertToEthereumAddress)(e.collectionId),a={assetClass:"COLLECTION",contract:n},t.next=15;break;case 14:throw new g.Warning("ItemId or CollectionId must be assigned");case 15:return t.next=17,this.sdk.apis.nftCollection.getNftCollectionById({collection:n});case 17:return u=t.sent,c=this.sdk.order.bid.before((function(e){return d.__awaiter(l,void 0,void 0,o().mark((function t(){var n,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,O.convertDateToTimestamp)(e.expirationDate),r=(0,x.getCurrencyAssetType)(e.currency),t.abrupt("return",{type:"DATA_V2",makeAssetType:A.getEthTakeAssetType(r),takeAssetType:a,amount:(0,C.getOrderAmount)(e.amount,u),priceDecimal:e.price,payouts:A.toEthereumParts(e.payouts),originFees:A.toEthereumParts(e.originFees),end:n});case 3:case"end":return t.stop()}}),t)})))})).after((function(e){return d.__awaiter(l,void 0,void 0,o().mark((function t(){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(n=e.approveTx)||void 0===n?void 0:n.wait();case 2:return t.abrupt("return",A.convertEthereumOrderHash(e.order.hash,this.blockchain));case 3:case"end":return t.stop()}}),t,this)})))})),p=f.Action.create({id:"convert",run:function(e){return d.__awaiter(l,void 0,void 0,o().mark((function t(){var n,r,a,i,s,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("ERC20"!==(r=(0,x.getCurrencyAssetType)(e.currency))["@type"]){t.next=12;break}if(a=this.getWrappedCurrencyAddress(),(0,E.extractBlockchain)(a)===y.Blockchain.MANTLE||!(0,h.compareCaseInsensitive)(r.contract,a)){t.next=12;break}return i=(null===(n=e.originFees)||void 0===n?void 0:n.reduce((function(e,t){return e+t.value}),0))||0,s=(0,C.getOrderAmount)(e.amount,u),t.next=9,this.getConvertableValueCommon(r,e.price,s,i);case 9:return c=t.sent,t.next=12,this.convertCurrency(c);case 12:return t.abrupt("return",e);case 13:case"end":return t.stop()}}),t,this)})))}}).thenAction(c),t.t0=w.OriginFeeSupport.FULL,t.t1=w.PayoutsSupport.MULTIPLE,t.t2=w.MaxFeesBasePointSupport.IGNORED,t.t3=A.getSupportedCurrencies(y.Blockchain.ETHEREUM,!0),t.t4="ERC1155"===u.type,t.t5=r?r.supply:null,t.next=28,this.sdk.order.getBaseOrderFee();case 28:return t.t6=t.sent,t.t7=this.getConvertableValue,t.t8=p,t.abrupt("return",{originFeeSupport:t.t0,payoutsSupport:t.t1,maxFeesBasePointSupport:t.t2,supportedCurrencies:t.t3,multiple:t.t4,maxAmount:t.t5,baseFee:t.t6,getConvertableValue:t.t7,supportsExpirationDate:!0,submit:t.t8});case 32:case"end":return t.stop()}}),t,this)})))}},{key:"bidDataV3",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n,r,a,i,s,u,c,p,l=this;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!("itemId"in e)){t.next=9;break}return i=(0,C.getEthereumItemId)(e.itemId),s=i.itemId,t.next=4,this.sdk.apis.nftItem.getNftItemById({itemId:s});case 4:r=t.sent,n=r.contract,a={tokenId:r.tokenId,contract:r.contract},t.next=15;break;case 9:if(!("collectionId"in e)){t.next=14;break}n=(0,C.convertToEthereumAddress)(e.collectionId),a={assetClass:"COLLECTION",contract:n},t.next=15;break;case 14:throw new Error("ItemId or CollectionId must be assigned");case 15:return t.next=17,this.sdk.apis.nftCollection.getNftCollectionById({collection:n});case 17:return u=t.sent,c=this.sdk.order.bid.before((function(e){return d.__awaiter(l,void 0,void 0,o().mark((function t(){var n,r,i,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,C.validateOrderDataV3Request)(e,{shouldProvideMaxFeesBasePoint:!1}),n=(0,O.convertDateToTimestamp)(e.expirationDate),r=(0,x.getCurrencyAssetType)(e.currency),i=A.toEthereumParts(e.payouts),s=A.toEthereumParts(e.originFees),t.abrupt("return",{type:"DATA_V3_BUY",makeAssetType:A.getEthTakeAssetType(r),takeAssetType:a,amount:(0,C.getOrderAmount)(e.amount,u),priceDecimal:e.price,payout:i[0],originFeeFirst:s[0],originFeeSecond:s[1],end:n});case 6:case"end":return t.stop()}}),t)})))})).after((function(e){return d.__awaiter(l,void 0,void 0,o().mark((function t(){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(n=e.approveTx)||void 0===n?void 0:n.wait();case 2:return t.abrupt("return",A.convertEthereumOrderHash(e.order.hash,this.blockchain));case 3:case"end":return t.stop()}}),t,this)})))})),p=f.Action.create({id:"convert",run:function(e){return d.__awaiter(l,void 0,void 0,o().mark((function t(){var n,r,a,i,s,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((0,_.checkPayouts)(e.payouts),r=this.getWrappedCurrencyAddress(),a=(0,x.getCurrencyAssetType)(e.currency),(0,E.extractBlockchain)(r)===y.Blockchain.MANTLE||"ERC20"!==a["@type"]||!(0,h.compareCaseInsensitive)(a.contract,r)){t.next=12;break}return i=(null===(n=e.originFees)||void 0===n?void 0:n.reduce((function(e,t){return e+t.value}),0))||0,s=(0,C.getOrderAmount)(e.amount,u),t.next=9,this.getConvertableValueCommon(a,e.price,s,i);case 9:return c=t.sent,t.next=12,this.convertCurrency(c);case 12:return t.abrupt("return",e);case 13:case"end":return t.stop()}}),t,this)})))}}).thenAction(c),t.t0=w.OriginFeeSupport.FULL,t.t1=w.PayoutsSupport.MULTIPLE,t.t2=w.MaxFeesBasePointSupport.IGNORED,t.t3=A.getSupportedCurrencies(this.blockchain,!0),t.t4="ERC1155"===u.type,t.t5=r?r.supply:null,t.next=28,this.sdk.order.getBaseOrderFee();case 28:return t.t6=t.sent,t.t7=this.getConvertableValue,t.t8=p,t.abrupt("return",{originFeeSupport:t.t0,payoutsSupport:t.t1,maxFeesBasePointSupport:t.t2,supportedCurrencies:t.t3,multiple:t.t4,maxAmount:t.t5,baseFee:t.t6,getConvertableValue:t.t7,supportsExpirationDate:!0,submit:t.t8});case 32:case"end":return t.stop()}}),t,this)})))}},{key:"getWrappedCurrencyAddress",value:function(){var e=this.sdk.balances.getWethContractAddress();return(0,C.convertEthereumContractAddress)(e,this.blockchain)}},{key:"getConvertableValue",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n,r,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("ERC20"!==(n=this.getAssetTypeForConvert(e))["@type"]){t.next=7;break}if(r=this.getWrappedCurrencyAddress(),(0,E.extractBlockchain)(r)===y.Blockchain.MANTLE||!(0,h.compareCaseInsensitive)(n.contract,r)){t.next=7;break}return a=e.originFees.reduce((function(e,t){return e+t.value}),0),t.abrupt("return",this.getConvertableValueCommon(n,e.price,e.amount,a));case 7:return t.abrupt("return",void 0);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"getAssetTypeForConvert",value:function(e){if(e.assetType)return e.assetType;if(e.currencyId)return(0,x.getCurrencyAssetType)(e.currencyId);throw new Error("assetType or currencyId should be specified")}},{key:"getConvertableValueCommon",value:function(e,t,n,r){return d.__awaiter(this,void 0,void 0,o().mark((function a(){var i,u,c,d,p,f,h,g,w,x,O,_,E,I,S;return o().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=A.assertWallet(this.wallet),u=(0,C.convertToEthereumAssetType)(e),c=(0,T.toBn)(t).multipliedBy(n),a.next=5,Promise.all([(0,v.getPrice)(i.ethereum,u,c),this.sdk.order.getBaseOrderFee()]);case 5:return d=a.sent,p=s(d,2),f=p[0],h=p[1],g=(0,m.addFee)({assetType:u,value:(0,l.toBigNumber)(f.toString())},r+h),a.next=12,Promise.all([(0,b.getDecimals)(i.ethereum,u),i.ethereum.getFrom()]);case 12:return w=a.sent,x=s(w,2),O=x[0],_=x[1],E=(0,C.convertEthereumToUnionAddress)(_,y.Blockchain.ETHEREUM),I={"@type":"ETH",blockchain:this.blockchain},S=(0,T.toBn)(g.value).integerValue().div((0,T.toBn)(10).pow(O)),a.abrupt("return",(0,k.getCommonConvertableValue)(this.balanceService.getBalance,E,S,I,e));case 20:case"end":return a.stop()}}),a,this)})))}},{key:"convertCurrency",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("insufficient"!==(null===e||void 0===e?void 0:e.type)){t.next=2;break}throw new S;case 2:if("convertable"!==(null===e||void 0===e?void 0:e.type)){t.next=8;break}return t.next=5,this.sdk.balances.deposit(e.value);case 5:return n=t.sent,t.next=8,n.wait();case 8:return t.abrupt("return");case 9:case"end":return t.stop()}}),t,this)})))}},{key:"update",value:function(e){return d.__awaiter(this,void 0,void 0,o().mark((function t(){var n,r,a,i,u,c,l,m=this;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.orderId){t.next=2;break}throw new Error("OrderId has not been specified");case 2:if(n=e.orderId.split(":"),r=s(n,2),a=r[0],i=r[1],(0,C.isEVMBlockchain)(a)){t.next=5;break}throw new Error("Not an ethereum order");case 5:return t.next=7,this.sdk.apis.order.getValidatedOrderByHash({hash:i});case 7:if("RARIBLE_V2"===(u=t.sent).type||"RARIBLE_V1"===u.type){t.next=10;break}throw new R(u.type);case 10:return c=this.sdk.order.bidUpdate.before((function(e){return{orderHash:(0,p.toWord)(i),priceDecimal:e.price}})).after((function(e){return d.__awaiter(m,void 0,void 0,o().mark((function t(){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(n=e.approveTx)||void 0===n?void 0:n.wait();case 2:return t.abrupt("return",A.convertEthereumOrderHash(e.order.hash,this.blockchain));case 3:case"end":return t.stop()}}),t,this)})))})),l=f.Action.create({id:"convert",run:function(e){return d.__awaiter(m,void 0,void 0,o().mark((function t(){var n,r,i,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a!==y.Blockchain.MANTLE){t.next=2;break}return t.abrupt("return",e);case 2:if(n=this.getWrappedCurrencyAddress(),"ERC20"!==u.make.assetType.assetClass||u.make.assetType.contract.toLowerCase()!==n.toLowerCase()){t.next=11;break}return r=this.convertAssetType(u.make.assetType),i=(0,C.getOrderFeesSum)(u),t.next=8,this.getConvertableValueCommon(r,e.price,u.take.value,i);case 8:return s=t.sent,t.next=11,this.convertCurrency(s);case 11:return t.abrupt("return",e);case 12:case"end":return t.stop()}}),t,this)})))}}).thenAction(c),t.t0=(0,C.getOriginFeeSupport)(u.type),t.t1=(0,C.getPayoutsSupport)(u.type),t.t2=w.MaxFeesBasePointSupport.IGNORED,t.t3=A.getSupportedCurrencies(y.Blockchain.ETHEREUM,!0),t.next=18,this.sdk.order.getBaseOrderFee(u.type);case 18:return t.t4=t.sent,t.t5=this.getConvertableValue,t.t6=l,t.t7={nftCollection:"contract"in u.take.assetType?(0,C.convertEthereumContractAddress)(u.take.assetType.contract,a):void 0},t.abrupt("return",{originFeeSupport:t.t0,payoutsSupport:t.t1,maxFeesBasePointSupport:t.t2,supportedCurrencies:t.t3,baseFee:t.t4,getConvertableValue:t.t5,submit:t.t6,orderData:t.t7});case 23:case"end":return t.stop()}}),t,this)})))}}]),e}();t.EthereumBid=I;var S=function(e){r(n,e);var t=a(n);function n(){var e;return u(this,n),(e=t.call(this,"Insufficient funds for convertation")).name="InsufficientFundsError",e}return c(n)}(i(Error));t.InsufficientFundsError=S;var R=function(e){r(n,e);var t=a(n);function n(e){var r;return u(this,n),(r=t.call(this,"Update bid is not supported for ".concat(e," kind of order"))).name="UpdateBidNotSupportedForThidKindOfOrderError",r}return c(n)}(i(Error));t.UpdateBidNotSupportedForThidKindOfOrderError=R},2486:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getCommonConvertableValue=void 0;var a=n(19),i=a.__importDefault(n(53));t.getCommonConvertableValue=function(e,t,n,s,o){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var u,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e(t,o);case 2:if(u=r.sent,!new i.default(u).gte(n)){r.next=5;break}return r.abrupt("return",void 0);case 5:return r.next=7,e(t,s);case 7:if(c=r.sent,!new i.default(c).plus(u).gte(n)){r.next=10;break}return r.abrupt("return",{type:"convertable",currency:s,value:new i.default(n).minus(u)});case 10:return r.abrupt("return",{type:"insufficient",currency:s,value:new i.default(n).minus(c)});case 11:case"end":return r.stop()}}),a)})))}},2487:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumCancel=void 0;var o=n(19),u=n(146),c=n(253),d=function(){function e(t,n){i(this,e),this.sdk=t,this.network=n,this.cancel=this.cancel.bind(this)}return s(e,[{key:"cancel",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){var n,i,s,o,d,p;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.orderId){t.next=2;break}throw new Error("OrderId has not been specified");case 2:if(n=e.orderId.split(":"),i=a(n,2),s=i[0],o=i[1],(0,c.isEVMBlockchain)(s)){t.next=5;break}throw new Error("Not an ethereum order");case 5:return t.next=7,this.sdk.apis.order.getValidatedOrderByHash({hash:o});case 7:return d=t.sent,t.next=10,this.sdk.order.cancel(d);case 10:return p=t.sent,t.abrupt("return",new u.BlockchainEthereumTransaction(p,this.network));case 12:case"end":return t.stop()}}),t,this)})))}}]),e}();t.EthereumCancel=d},2488:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumBalance=void 0;var s=n(19),o=n(121),u=n(146),c=n(45),d=n(115),p=n(267),l=n(623),y=n(253),f=function(){function e(t,n,r){var i=this;a(this,e),this.sdk=t,this.apis=n,this.network=r,this.depositBiddingBalance=d.Action.create({id:"send-tx",run:function(e){return i.convert({blockchain:c.Blockchain.ETHEREUM,isWrap:!0,value:e.amount})}}),this.withdrawBiddingBalance=d.Action.create({id:"send-tx",run:function(e){return i.convert({blockchain:c.Blockchain.ETHEREUM,isWrap:!1,value:e.amount})}}),this.getBalance=this.getBalance.bind(this),this.convert=this.convert.bind(this),this.getBiddingBalance=this.getBiddingBalance.bind(this)}return i(e,[{key:"getBalance",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,s;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("ETH"===(a=(0,y.convertToEthereumAssetType)((0,p.getCurrencyAssetType)(t))).assetClass||"ERC20"===a.assetClass){n.next=3;break}throw new Error("Unsupported asset type for getting balance");case 3:return i=(0,y.convertToEthereumAddress)(e),n.next=6,this.sdk.balances.getBalance(i,a);case 6:return s=n.sent,n.abrupt("return",(0,o.toBn)(s));case 8:case"end":return n.stop()}}),n,this)})))}},{key:"convert",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.send(e);case 2:return n=t.sent,t.abrupt("return",new u.BlockchainEthereumTransaction(n,this.network));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"send",value:function(e){return e.isWrap?this.sdk.balances.deposit(e.value):this.sdk.balances.withdraw(e.value)}},{key:"getBiddingBalance",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getBiddingCurrency(e),t.abrupt("return",this.getBalance(e.walletAddress,n));case 2:case"end":return t.stop()}}),t,this)})))}},{key:"getBiddingCurrency",value:function(e){if("currency"in e)return e.currency;var t=this.sdk.balances.getWethContractAddress(),n=(0,l.extractBlockchain)(e.walletAddress);if((0,y.isEVMBlockchain)(n))return{"@type":"ERC20",contract:(0,y.convertEthereumContractAddress)(t,n)};throw new Error("Bidding balance is not supported for ".concat(n))}}]),e}();t.EthereumBalance=f},2489:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumTokenId=void 0;var s=n(19),o=n(253),u=function(){function e(t){a(this,e),this.sdk=t,this.generateTokenId=this.generateTokenId.bind(this)}return i(e,[{key:"generateTokenId",value:function(e){var t=e.collection,n=e.minter;return s.__awaiter(this,void 0,void 0,r().mark((function e(){var a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sdk.apis.nftCollection.generateNftTokenId({collection:(0,o.convertToEthereumAddress)(t),minter:(0,o.convertToEthereumAddress)(n)});case 2:return a=e.sent,e.abrupt("return",{tokenId:a.tokenId.toString(),signature:a.signature});case 4:case"end":return e.stop()}}),e,this)})))}}]),e}();t.EthereumTokenId=u},2490:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumCreateCollection=void 0;var o=n(19),u=n(64),c=n(146),d=n(45),p=n(253),l=function(){function e(t,n){i(this,e),this.sdk=t,this.network=n,this.blockchain=(0,p.getEVMBlockchain)(n),this.createCollectionSimplified=this.createCollectionSimplified.bind(this)}return s(e,[{key:"convertOperatorsAddresses",value:function(e){if(!e)throw new Error("Operators should be provided in case of deploy private collection");return e.map((function(e){var t=e.split(":"),n=a(t,2),r=n[0],i=n[1];if(r!==d.Blockchain.ETHEREUM&&r!==d.Blockchain.POLYGON)throw new Error("Operator address should be in ethereum/polygon blockchain");return(0,u.toAddress)(i)}))}},{key:"convertResponse",value:function(e){return{tx:new c.BlockchainEthereumTransaction(e.tx,this.network),address:(0,p.convertEthereumContractAddress)(e.address,this.blockchain)}}},{key:"startCreateCollection",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,s,o,u;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=[e.arguments.name,e.arguments.symbol,e.arguments.baseURI,e.arguments.contractURI],!e.arguments.isUserToken){t.next=14;break}if(a=this.convertOperatorsAddresses(e.arguments.operators),"ERC721"!==e.assetType){t.next=7;break}return t.abrupt("return",(i=this.sdk.nft.deploy.erc721).deployUserToken.apply(i,n.concat([a])));case 7:if("ERC1155"!==e.assetType){t.next=11;break}return t.abrupt("return",(s=this.sdk.nft.deploy.erc1155).deployUserToken.apply(s,n.concat([a])));case 11:case 22:throw new Error("Unsupported asset type");case 12:t.next=23;break;case 14:if("ERC721"!==e.assetType){t.next=18;break}return t.abrupt("return",(o=this.sdk.nft.deploy.erc721).deployToken.apply(o,n));case 18:if("ERC1155"!==e.assetType){t.next=22;break}return t.abrupt("return",(u=this.sdk.nft.deploy.erc1155).deployToken.apply(u,n));case 23:case"end":return t.stop()}}),t,this)})))}},{key:"createCollectionSimplified",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.blockchain===d.Blockchain.ETHEREUM||e.blockchain===d.Blockchain.POLYGON||e.blockchain===d.Blockchain.MANTLE){t.next=2;break}throw new Error("Wrong blockchain");case 2:return t.t0=this,t.next=5,this.startCreateCollection({assetType:e.type,arguments:{name:e.name,symbol:e.symbol,baseURI:e.baseURI,contractURI:e.contractURI,isUserToken:!e.isPublic,operators:"operators"in e?e.operators:[]}});case 5:return t.t1=t.sent,t.abrupt("return",t.t0.convertResponse.call(t.t0,t.t1));case 7:case"end":return t.stop()}}),t,this)})))}}]),e}();t.EthereumCreateCollection=l},2491:function(e,t,n){"use strict";var r=n(20).default,a=n(22).default,i=n(21).default;Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumCryptopunk=void 0;var s=n(19),o=n(115),u=n(146),c=a((function e(t,n){var a=this;i(this,e),this.sdk=t,this.network=n,this.wrap=o.Action.create({id:"approve-tx",run:function(e){return s.__awaiter(a,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.punkId){t.next=2;break}throw new Error("PunkId has not been specified");case 2:return t.next=4,this.sdk.nft.cryptoPunks.approveForWrapper(e.punkId);case 4:if(!(n=t.sent)){t.next=8;break}return t.next=8,new u.BlockchainEthereumTransaction(n,this.network).wait();case 8:return t.abrupt("return",e);case 9:case"end":return t.stop()}}),t,this)})))}}).thenStep({id:"wrap-tx",run:function(e){return s.__awaiter(a,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sdk.nft.cryptoPunks.wrap(e.punkId);case 2:return n=t.sent,t.abrupt("return",new u.BlockchainEthereumTransaction(n,this.network));case 4:case"end":return t.stop()}}),t,this)})))}}),this.unwrap=o.Action.create({id:"unwrap-tx",run:function(e){return s.__awaiter(a,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.punkId){t.next=2;break}throw new Error("PunkId has not been specified");case 2:return t.next=4,this.sdk.nft.cryptoPunks.unwrap(e.punkId);case 4:return n=t.sent,t.abrupt("return",new u.BlockchainEthereumTransaction(n,this.network));case 6:case"end":return t.stop()}}),t,this)})))}})}));t.EthereumCryptopunk=c},2492:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTezosSdk=void 0;var r=n(45),a=n(408),i=n(524),s=n(748),o=n(409),u=n(2493),c=n(2551),d=n(287),p=n(2552),l=n(2553),y=n(2554),f=n(2555),m=n(2556),b=n(2558),v=n(2559),h=n(2560),T=n(2562);t.createTezosSdk=function(e,t,n,g){var w=n.tezosNetwork,k=(0,d.getMaybeTezosProvider)(null===e||void 0===e?void 0:e.provider,w,Object.assign(Object.assign({},n),{apiKey:null===g||void 0===g?void 0:g.apiKey})),x=new u.TezosSell(k,t),O=new p.TezosMint(k,t,w),_=new b.TezosBalance(k,w),E=new c.TezosFill(k,t,w),A=new v.TezosCreateCollection(k,w).createCollectionSimplified,C=new l.TezosTransfer(k,t,w),I=new y.TezosBurn(k,t,w),S=new m.TezosCancel(k,t,w),R=new T.TezosBid(k,t,w),j=a.Middlewarer.skipMiddleware(O.preprocessMeta),P=new s.MetaUploader(r.Blockchain.TEZOS,j);return{nft:{mint:new o.MethodWithPrepare(O.mintBasic,O.mint),burn:new o.MethodWithPrepare(I.burnBasic,I.burn),transfer:new o.MethodWithPrepare(C.transferBasic,C.transfer),generateTokenId:new f.TezosTokenId(k).generateTokenId,createCollection:A,preprocessMeta:j,uploadMeta:P.uploadMeta},order:{fill:{prepare:E.buy},buy:new o.MethodWithPrepare(E.buyBasic,E.buy),batchBuy:new o.MethodWithPrepare(E.batchBuyBasic,E.batchBuy),acceptBid:new o.MethodWithPrepare(E.acceptBidBasic,E.acceptBid),sell:new o.MethodWithPrepare(x.sellBasic,x.sell),sellUpdate:new o.MethodWithPrepare(x.sellUpdateBasic,x.update),bid:new o.MethodWithPrepare(R.bidBasic,R.bid),bidUpdate:new o.MethodWithPrepare(R.updateBasic,R.update),cancel:S.cancelBasic},balances:{getBalance:_.getBalance,convert:i.notImplemented,transfer:i.notImplemented,getBiddingBalance:i.nonImplementedAction,depositBiddingBalance:i.nonImplementedAction,withdrawBiddingBalance:i.nonImplementedAction},restriction:{canTransfer:new h.TezosCanTransfer(k).canTransfer,getFutureOrderFees:function(){return x.getFutureOrderFees()}}}}},2493:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TezosSell=void 0;var s=n(19),o=n(305),u=n(115),c=s.__importDefault(n(53)),d=n(2550),p=n(252),l=n(64),y=n(216),f=n(267),m=n(750),b=n(366),v=n(306),h=n(287),T=n(751),g=function(){function e(t,n){a(this,e),this.provider=t,this.unionAPI=n,this.sell=this.sell.bind(this),this.update=this.update.bind(this),this.sellUpdateBasic=this.sellUpdateBasic.bind(this),this.sellBasic=this.sellBasic.bind(this)}return i(e,[{key:"parseTakeAssetType",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e["@type"],t.next="XTZ"===t.t0?3:"TEZOS_FT"===t.t0?4:10;break;case 3:return t.abrupt("return",{asset_class:e["@type"]});case 4:return n=(0,h.getRequiredProvider)(this.provider),a=(0,h.convertFromContractAddress)(e.contract),t.next=8,(0,o.get_ft_type)(n.config,a);case 8:return i=t.sent,t.abrupt("return",{asset_class:"FT",contract:a,token_id:i===o.AssetTypeV2.FA2?new c.default(e.tokenId||0):void 0});case 10:throw new Error("Unsupported take asset type");case 11:case"end":return t.stop()}}),t,this)})))}},{key:"getFutureOrderFees",value:function(){return s.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{originFeeSupport:y.OriginFeeSupport.FULL,baseFee:parseInt(this.provider.config.fees.toString())});case 1:case"end":return e.stop()}}),e,this)})))}},{key:"sell",value:function(){return s.__awaiter(this,void 0,void 0,r().mark((function e(){var t,n=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,h.checkChainId)(this.provider);case 2:return t=u.Action.create({id:"send-tx",run:function(e){return s.__awaiter(n,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.sellV2(e));case 1:case"end":return t.stop()}}),t,this)})))}}),e.abrupt("return",{originFeeSupport:y.OriginFeeSupport.FULL,payoutsSupport:y.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:y.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:(0,h.getSupportedCurrencies)(),baseFee:parseInt(this.provider.config.fees.toString()),supportsExpirationDate:!1,submit:t});case 4:case"end":return e.stop()}}),e,this)})))}},{key:"sellBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.sellV2(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"sellUpdateBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.update({orderId:e.orderId});case 2:return n=t.sent,t.abrupt("return",n.submit({price:e.price}));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"sellV2",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,s,o,u,p,y,v,g;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,h.checkChainId)(this.provider);case 2:return(0,b.checkPayouts)(e.payouts),n=(0,h.getRequiredProvider)(this.provider),a=(0,h.getTezosItemData)(e.itemId),i=a.contract,s=a.tokenId,o=(0,f.getCurrencyAssetType)(e.currency),u=(0,m.convertDateToTimestamp)(e.expirationDate),t.next=9,(0,T.getCollectionType)(this.provider,i);case 9:return p=t.sent,t.next=12,(0,h.getTezosAssetTypeV2)(n.config,o);case 12:return y=t.sent,v={s_asset_contract:i,s_asset_token_id:new c.default(s),s_sale_type:y.type,s_sale_asset_contract:y.asset_contract,s_sale_asset_token_id:y.asset_token_id,s_sale:{sale_amount:new c.default(e.price),sale_asset_qty:(0,h.getRequestAmount)(e.amount,p)||new c.default(1),sale_max_fees_base_boint:1e4,sale_end:u,sale_start:void 0,sale_origin_fees:(0,h.convertUnionParts)(e.originFees),sale_payouts:(0,h.convertUnionParts)(e.payouts),sale_data:void 0,sale_data_type:void 0}},t.next=16,(0,d.sellV2)(n,v);case 16:if(g=t.sent){t.next=19;break}throw new Error("OrderID cannot be requested");case 19:return t.abrupt("return",(0,l.toOrderId)(g));case 20:case"end":return t.stop()}}),t,this)})))}},{key:"update",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,o,f,m=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,h.checkChainId)(this.provider);case 2:return t.next=4,this.unionAPI.order.getOrderById({id:e.orderId});case 4:if(n=t.sent){t.next=7;break}throw new Error("Order has not been found");case 7:if("TEZOS_RARIBLE_V2"!==n.data["@type"]){t.next=9;break}throw new p.Warning("You can't change v1 version of order. Cancel order and create a new one");case 9:if(a=n.make,i=n.take,"TEZOS_NFT"===(o=a.type)["@type"]||"TEZOS_MT"===o["@type"]){t.next=13;break}throw new Error("Order is not a sell (id=".concat(e.orderId,")"));case 13:return f=u.Action.create({id:"send-tx",run:function(e){return s.__awaiter(m,void 0,void 0,r().mark((function t(){var s,u,p,y,f,m;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=(0,h.getRequiredProvider)(this.provider),u={make_contract:(0,h.convertFromContractAddress)(o.contract),make_token_id:new c.default(o.tokenId),maker:(0,h.getTezosAddress)(n.maker),take_contract:"contract"in i.type?(0,h.convertFromContractAddress)(i.type.contract):void 0},"TEZOS_FT"===i.type["@type"]&&i.type.tokenId&&(u.take_token_id=new c.default(i.type.tokenId.toString())),t.next=5,(0,h.getTezosAssetTypeV2)(s.config,i.type);case 5:return p=t.sent,y=void 0!==n.endedAt?Math.floor(new Date(n.endedAt).getTime()):void 0,f={s_asset_contract:(0,h.convertFromContractAddress)(o.contract),s_asset_token_id:new c.default(o.tokenId),s_sale_type:p.type,s_sale_asset_contract:u.take_contract,s_sale_asset_token_id:p.asset_token_id,s_sale:{sale_amount:new c.default(e.price),sale_asset_qty:new c.default(a.value),sale_max_fees_base_boint:1e4,sale_end:y,sale_start:void 0,sale_origin_fees:"TEZOS_RARIBLE_V2"===n.data["@type"]?(0,h.convertUnionParts)(n.data.originFees):[],sale_payouts:"TEZOS_RARIBLE_V2"===n.data["@type"]?(0,h.convertUnionParts)(n.data.payouts):[],sale_data:void 0,sale_data_type:void 0}},t.next=10,(0,d.sellV2)(s,f);case 10:return m=t.sent,t.abrupt("return",(0,l.toOrderId)(m));case 12:case"end":return t.stop()}}),t,this)})))}}),t.abrupt("return",{originFeeSupport:y.OriginFeeSupport.FULL,payoutsSupport:y.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:y.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:(0,h.getSupportedCurrencies)(),baseFee:parseInt(this.provider.config.fees.toString()),submit:f,orderData:{nftCollection:(0,v.getNftContractAddress)(n.make.type)}});case 15:case"end":return t.stop()}}),t,this)})))}}]),e}();t.TezosSell=g},2524:function(e,t){},253:function(e,t,n){"use strict";var r=n(48).default,a=n(111).default;Object.defineProperty(t,"__esModule",{value:!0}),t.assertWallet=t.getAssetTypeFromFillRequest=t.getAssetTypeFromItemId=t.getOrderId=t.getOrderAmount=t.getEthereumItemId=t.convertEthereumItemId=t.convertEthereumToUnionAddress=t.convertEthereumCollectionId=t.convertEthereumContractAddress=t.convertOrderIdToEthereumHash=t.convertEthereumOrderHash=t.convertToEthereumAddress=t.isEVMBlockchain=t.getSupportedCurrencies=t.getEVMBlockchain=t.getPayoutsSupport=t.getOriginFeeSupport=t.getOrderFeesSum=t.getOriginFeesSum=t.toEthereumParts=t.convertToEthereumAssetType=t.getEthTakeAssetType=t.EVMBlockchains=void 0;var i=n(19),s=n(64),o=n(300),u=n(45),c=n(176),d=n(298),p=n(216);function l(e){return e.reduce((function(e,t){return e+t.value}),0)}function y(e){var n,r=a(t.EVMBlockchains);try{for(r.s();!(n=r.n()).done;){if(n.value===e)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}function f(e){if(!(0,o.isRealBlockchainSpecified)(e))throw new Error("Not a union or contract address: "+e);var t=e.split(":"),n=r(t,2),a=n[0],i=n[1];if(!y(a))throw new Error("Not an Ethereum address");return(0,s.toAddress)(i)}function m(e){if(!e)throw new Error("ItemId has not been specified");var t=e.split(":"),n=r(t,3),a=n[0],i=n[1],s=n[2];if(!y(a))throw new Error("Not an ethereum item: ".concat(e));return{itemId:"".concat(i,":").concat(s),contract:i,tokenId:s,domain:a}}function b(e){var t=m(e),n=t.contract,r=t.tokenId;return{contract:(0,s.toAddress)(n),tokenId:r}}t.EVMBlockchains=[u.Blockchain.ETHEREUM,u.Blockchain.POLYGON,u.Blockchain.MANTLE],t.getEthTakeAssetType=function(e){switch(e["@type"]){case"ERC20":return{assetClass:e["@type"],contract:f(e.contract)};case"ETH":return{assetClass:e["@type"]};default:throw new Error("Invalid take asset type")}},t.convertToEthereumAssetType=function(e){switch(e["@type"]){case"ETH":return{assetClass:"ETH"};case"ERC20":return{assetClass:"ERC20",contract:f(e.contract)};case"ERC721":return{assetClass:"ERC721",contract:f(e.contract),tokenId:e.tokenId};case"ERC721_Lazy":return{assetClass:"ERC721_LAZY",contract:f(e.contract),tokenId:e.tokenId,uri:e.uri,creators:e.creators.map((function(e){return{account:f(e.account),value:(0,c.toBn)(e.value).toNumber()}})),royalties:e.royalties.map((function(e){return{account:f(e.account),value:(0,c.toBn)(e.value).toNumber()}})),signatures:e.signatures.map((function(e){return(0,s.toBinary)(e)}))};case"ERC1155":return{assetClass:"ERC1155",contract:f(e.contract),tokenId:e.tokenId};case"ERC1155_Lazy":return{assetClass:"ERC1155_LAZY",contract:f(e.contract),tokenId:e.tokenId,uri:e.uri,supply:void 0!==e.supply?(0,s.toBigNumber)(e.supply):(0,s.toBigNumber)("1"),creators:e.creators.map((function(e){return{account:f(e.account),value:(0,c.toBn)(e.value).toNumber()}})),royalties:e.royalties.map((function(e){return{account:f(e.account),value:(0,c.toBn)(e.value).toNumber()}})),signatures:e.signatures.map((function(e){return(0,s.toBinary)(e)}))};case"CRYPTO_PUNKS":return{assetClass:"CRYPTO_PUNKS",contract:f(e.contract),tokenId:e.tokenId};case"GEN_ART":return{assetClass:"GEN_ART",contract:f(e.contract)};default:throw new Error("Unsupported asset type=".concat(e["@type"]))}},t.toEthereumParts=function(e){return(null===e||void 0===e?void 0:e.map((function(e){return{account:f(e.account),value:e.value}})))||[]},t.getOriginFeesSum=l,t.getOrderFeesSum=function(e){switch(e.data.dataType){case"LEGACY":return e.data.fee;case"RARIBLE_V2_DATA_V1":case"RARIBLE_V2_DATA_V2":return l(e.data.originFees);default:throw new Error("Unexpected order dataType")}},t.getOriginFeeSupport=function(e){switch(e){case"RARIBLE_V1":return p.OriginFeeSupport.AMOUNT_ONLY;case"RARIBLE_V2":return p.OriginFeeSupport.FULL;default:throw new Error("Unknown order type "+e)}},t.getPayoutsSupport=function(e){switch(e){case"RARIBLE_V1":return p.PayoutsSupport.SINGLE;case"RARIBLE_V2":return p.PayoutsSupport.MULTIPLE;default:throw new Error("Unknown order type "+e)}},t.getEVMBlockchain=function(e){switch(e){case"testnet":case"dev-ethereum":case"mainnet":case"staging":return u.Blockchain.ETHEREUM;case"dev-polygon":case"mumbai":case"polygon":case"staging-polygon":return u.Blockchain.POLYGON;case"mantle":case"testnet-mantle":return u.Blockchain.MANTLE;default:throw new Error("Unsupported network: ".concat(e))}},t.getSupportedCurrencies=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.Blockchain.ETHEREUM;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?[{blockchain:e,type:"ERC20"}]:[{blockchain:e,type:"NATIVE"},{blockchain:e,type:"ERC20"}]},t.isEVMBlockchain=y,t.convertToEthereumAddress=f,t.convertEthereumOrderHash=function(e,t){return(0,s.toOrderId)("".concat(t,":").concat(e))},t.convertOrderIdToEthereumHash=function(e){if(!(0,o.isRealBlockchainSpecified)(e))throw new Error("Blockchain is not correct=".concat(e));var t=e.split(":"),n=r(t,2),a=n[0],i=n[1];if(!y(a))throw new Error("Not an Ethereum address");return i},t.convertEthereumContractAddress=function(e,t){return(0,s.toContractAddress)("".concat(t,":").concat(e))},t.convertEthereumCollectionId=function(e,t){return(0,s.toCollectionId)("".concat(t,":").concat(e))},t.convertEthereumToUnionAddress=function(e,t){return(0,s.toUnionAddress)("".concat(t,":").concat(e))},t.convertEthereumItemId=function(e,t){return(0,s.toItemId)("".concat(t,":").concat(e))},t.getEthereumItemId=m,t.getOrderAmount=function(e,t){var n="ERC721"===t.type?1:e;if(void 0===n)throw new Error("You should set amount of asset");return n},t.getOrderId=function(e){return"order"in e?e.order.id:e.orderId},t.getAssetTypeFromItemId=b,t.getAssetTypeFromFillRequest=function(e){if(e)return Array.isArray(e)?e.map((function(e){return b(e)})):b(e)},t.assertWallet=function(e){if(!e)throw new d.WalletIsUndefinedError;return e},i.__exportStar(n(2480),t)},2551:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TezosFill=void 0;var o=n(19),u=n(115),c=n(305),d=n(64),p=n(146),l=o.__importDefault(n(53)),y=n(45),f=n(1283),m=n(953),b=n(252),v=n(176),h=n(216),T=n(366),g=n(306),w=n(287),k=function(){function e(t,n,r){i(this,e),this.provider=t,this.unionAPI=n,this.network=r,this.buy=this.buy.bind(this),this.batchBuy=this.batchBuy.bind(this),this.batchBuyBasic=this.batchBuyBasic.bind(this),this.buyBasic=this.buyBasic.bind(this),this.acceptBid=this.acceptBid.bind(this),this.acceptBidBasic=this.acceptBidBasic.bind(this),this.fillCommon=this.fillCommon.bind(this)}return s(e,[{key:"getPreparedOrder",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){var n,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!("order"in e)){t.next=4;break}return t.abrupt("return",e.order);case 4:if(!("orderId"in e)){t.next=11;break}if(n=e.orderId.split(":"),i=a(n,1),i[0]===y.Blockchain.TEZOS){t.next=8;break}throw new Error("Not an tezos order");case 8:return t.abrupt("return",this.unionAPI.order.getOrderById({id:e.orderId}));case 11:throw new Error("Request error");case 12:case"end":return t.stop()}}),t,this)})))}},{key:"getMaxAmount",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,s,o,u;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=(0,w.getRequiredProvider)(this.provider),"TEZOS_MT"!==e.take.type["@type"]&&"TEZOS_NFT"!==e.take.type["@type"]){t.next=14;break}return a=e.take.type,i=a.contract,s=a.tokenId,t.t0="".concat(i,":").concat(s.toString(),":"),t.next=6,(0,c.get_address)(n);case 6:return t.t1=t.sent,o=t.t0.concat.call(t.t0,t.t1),t.next=10,this.unionAPI.ownership.getOwnershipById({ownershipId:o});case 10:return u=t.sent,t.abrupt("return",(0,d.toBigNumber)(u.value));case 14:return t.abrupt("return",(0,d.toBigNumber)(e.makeStock));case 15:case"end":return t.stop()}}),t,this)})))}},{key:"isMultiple",value:function(e){return"TEZOS_MT"===e.take.type["@type"]||"TEZOS_MT"===e.make.type["@type"]}},{key:"buyV2",value:function(e,t,n){return o.__awaiter(this,void 0,void 0,r().mark((function a(){var i,s,o,u,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,w.checkChainId)(this.provider);case 2:return(0,T.checkPayouts)(n.payouts),i=(0,w.getRequiredProvider)(this.provider),s=void 0!==e.makePrice?new l.default(e.makePrice):new l.default(0),r.next=7,(0,w.getTezosAssetTypeV2)(this.provider.config,e.take.type);case 7:if(o=r.sent,t.make_contract&&t.make_token_id){r.next=10;break}throw new Error("Make data for buyV2 should exist");case 10:return u={asset_contract:t.make_contract,asset_token_id:new l.default(t.make_token_id),asset_seller:(0,w.getTezosAddress)(e.maker),sale_type:o.type,sale_asset_contract:o.asset_contract,sale_asset_token_id:o.asset_token_id,sale_amount:s,sale_qty:new l.default(n.amount),sale_payouts:(0,w.convertUnionParts)(n.payouts),sale_origin_fees:(0,w.convertUnionParts)(n.originFees),use_all:!1},r.next=13,(0,f.isExistsSaleOrder)(i,u);case 13:if(!r.sent){r.next=21;break}return r.next=17,(0,f.buyV2)(i,u);case 17:return c=r.sent,r.abrupt("return",new p.BlockchainTezosTransaction(c,this.network));case 21:throw new Error("Error order does not exist");case 22:case"end":return r.stop()}}),a,this)})))}},{key:"buy",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPreparedOrder(e);case 2:return n=t.sent,a=u.Action.create({id:"send-tx",run:function(e){return o.__awaiter(i,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.fillCommon(e,n));case 1:case"end":return t.stop()}}),t,this)})))}}),t.t0=this.isMultiple(n),t.next=7,this.getMaxAmount(n);case 7:return t.t1=t.sent,t.t2=parseInt(this.provider.config.fees.toString()),t.t3=h.OriginFeeSupport.FULL,t.t4=h.PayoutsSupport.MULTIPLE,t.t5=h.MaxFeesBasePointSupport.IGNORED,t.t6=a,t.t7={platform:n.platform,nftCollection:(0,g.getNftContractAddress)(n.make.type)},t.abrupt("return",{multiple:t.t0,maxAmount:t.t1,baseFee:t.t2,originFeeSupport:t.t3,payoutsSupport:t.t4,maxFeesBasePointSupport:t.t5,supportsPartialFill:!0,submit:t.t6,orderData:t.t7});case 15:case"end":return t.stop()}}),t,this)})))}},{key:"fillV1Order",value:function(e,t){return o.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,s,o;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,w.checkChainId)(this.provider);case 2:return a=(0,w.getRequiredProvider)(this.provider),i={amount:new l.default(e.amount),payouts:(0,w.convertUnionParts)(e.payouts),origin_fees:(0,w.convertUnionParts)(e.originFees),infinite:e.infiniteApproval,use_all:!0},s=(0,w.getTezosOrderLegacyForm)(t),n.next=7,(0,c.fill_order)(a,s,i);case 7:return o=n.sent,n.abrupt("return",new p.BlockchainTezosTransaction(o,this.network));case 9:case"end":return n.stop()}}),n,this)})))}},{key:"buyBasic",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPreparedOrder(e);case 2:return n=t.sent,t.abrupt("return",this.fillCommon(e,n));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"acceptBidBasic",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.acceptBid(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"acceptBid",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,s,c,d=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPreparedOrder(e);case 2:return n=t.sent,a=n.make,i=n.take,s=n.data,c=u.Action.create({id:"send-tx",run:function(e){return o.__awaiter(d,void 0,void 0,r().mark((function t(){var o,u,c,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,w.checkChainId)(this.provider);case 2:if((0,T.checkPayouts)(e.payouts),o=(0,w.getRequiredProvider)(this.provider),(0,w.isNftOrMTAssetType)(i.type)){t.next=6;break}throw new b.Warning("Non-bid order has been passed");case 6:if("TEZOS_RARIBLE_V3"===s["@type"]){t.next=8;break}throw new Error("It's not TEZOS_RARIBLE_V3 order");case 8:if((0,v.toBn)(e.amount).isEqualTo(i.value)){t.next=10;break}throw new b.Warning("Partial fill is unavailable for tezos orders");case 10:return t.next=12,(0,w.getTezosAssetTypeV2)(o.config,a.type);case 12:return u=t.sent,t.t0=(0,w.convertFromContractAddress)(i.type.contract),t.t1=new l.default(i.type.tokenId),t.t2=(0,w.convertUnionAddress)(n.maker),t.t3=u.type,t.t4=u.asset_contract,t.t5=u.asset_token_id,t.t6=(0,w.convertUnionParts)(s.originFees),t.next=22,(0,w.getPayouts)(o,s.payouts);case 22:return t.t7=t.sent,c={asset_contract:t.t0,asset_token_id:t.t1,bidder:t.t2,bid_type:t.t3,bid_asset_contract:t.t4,bid_asset_token_id:t.t5,bid_origin_fees:t.t6,bid_payouts:t.t7},t.next=26,(0,m.accept_bid)(o,c);case 26:return d=t.sent,t.abrupt("return",new p.BlockchainTezosTransaction(d,this.network));case 28:case"end":return t.stop()}}),t,this)})))}}),t.t0=this.isMultiple(n),t.next=8,this.getMaxAmount(n);case 8:return t.t1=t.sent,t.t2=parseInt(this.provider.config.fees.toString()),t.t3=h.OriginFeeSupport.FULL,t.t4=h.PayoutsSupport.MULTIPLE,t.t5=h.MaxFeesBasePointSupport.IGNORED,t.t6=c,t.t7={platform:n.platform,nftCollection:(0,g.getNftContractAddress)(n.take.type)},t.abrupt("return",{multiple:t.t0,maxAmount:t.t1,baseFee:t.t2,originFeeSupport:t.t3,payoutsSupport:t.t4,maxFeesBasePointSupport:t.t5,supportsPartialFill:!1,submit:t.t6,orderData:t.t7});case 16:case"end":return t.stop()}}),t,this)})))}},{key:"fillCommon",value:function(e,t){return o.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,s,o,u,d,y,f,m,b,v;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,w.checkChainId)(this.provider);case 2:if((0,T.checkPayouts)(e.payouts),a=(0,w.getRequiredProvider)(this.provider),i=t.make,s=t.take,!(0,w.isNftOrMTAssetType)(i.type)){n.next=59;break}if(o={make_contract:(0,w.convertFromContractAddress)(i.type.contract),make_token_id:new l.default(i.type.tokenId),maker:(0,w.getTezosAddress)(t.maker),take_contract:"contract"in s.type?(0,w.convertFromContractAddress)(s.type.contract):void 0},"TEZOS_FT"===s.type["@type"]&&s.type.tokenId&&(o.take_token_id=new l.default(s.type.tokenId.toString())),"TEZOS_RARIBLE_V3"!==t.data["@type"]){n.next=10;break}return n.abrupt("return",this.buyV2(t,o,e));case 10:if("TEZOS_HEN"!==t.data["@type"]){n.next=17;break}return n.next=13,(0,c.hen_collect)(a,t.id);case 13:if(u=n.sent){n.next=16;break}throw new Error("TEZOS_HEN operation result is empty");case 16:return n.abrupt("return",new p.BlockchainTezosTransaction(u,this.network));case 17:if("TEZOS_VERSUM_V1"!==t.data["@type"]){n.next=24;break}return n.next=20,(0,c.versum_collect)(a,t.id,new l.default(e.amount));case 20:if(d=n.sent){n.next=23;break}throw new Error("TEZOS_VERSUM_V1 operation result is empty");case 23:return n.abrupt("return",new p.BlockchainTezosTransaction(d,this.network));case 24:if("TEZOS_TEIA_V1"!==t.data["@type"]){n.next=31;break}return n.next=27,(0,c.teia_collect)(a,t.id);case 27:if(y=n.sent){n.next=30;break}throw new Error("TEZOS_TEIA_V1 operation result is empty");case 30:return n.abrupt("return",new p.BlockchainTezosTransaction(y,this.network));case 31:if("TEZOS_OBJKT_V1"!==t.data["@type"]){n.next=38;break}return n.next=34,(0,c.objkt_fulfill_ask_v1)(a,t.id);case 34:if(f=n.sent){n.next=37;break}throw new Error("TEZOS_OBJKT_V1 operation result is empty");case 37:return n.abrupt("return",new p.BlockchainTezosTransaction(f,this.network));case 38:if("TEZOS_OBJKT_V2"!==t.data["@type"]){n.next=45;break}return n.next=41,(0,c.objkt_fulfill_ask_v2)(a,t.id);case 41:if(m=n.sent){n.next=44;break}throw new Error("TEZOS_OBJKT_V2 operation result is empty");case 44:return n.abrupt("return",new p.BlockchainTezosTransaction(m,this.network));case 45:if("TEZOS_FXHASH_V1"!==t.data["@type"]){n.next=52;break}return n.next=48,(0,c.fxhash_v1_collect)(a,t.id);case 48:if(b=n.sent){n.next=51;break}throw new Error("TEZOS_FXHASH_V1 operation result is empty");case 51:return n.abrupt("return",new p.BlockchainTezosTransaction(b,this.network));case 52:if("TEZOS_FXHASH_V2"!==t.data["@type"]){n.next=59;break}return n.next=55,(0,c.fxhash_v2_listing_accept)(a,t.id);case 55:if(v=n.sent){n.next=58;break}throw new Error("TEZOS_FXHASH_V2 operation result is empty");case 58:return n.abrupt("return",new p.BlockchainTezosTransaction(v,this.network));case 59:return n.abrupt("return",this.fillV1Order(e,t));case 60:case"end":return n.stop()}}),n,this)})))}},{key:"batchBuyCommon",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,w.checkChainId)(this.provider);case 2:return n=(0,w.getRequiredProvider)(this.provider),a=e.map((function(e){return(0,T.checkPayouts)(e.payouts),{order_id:(0,w.getTezosOrderId)(e.orderId),amount:new l.default(e.amount),payouts:(0,w.convertUnionParts)(e.payouts),origin_fees:(0,w.convertUnionParts)(e.originFees)}})),t.next=6,(0,c.cart_purchase)(n,a);case 6:return i=t.sent,t.abrupt("return",new p.BlockchainTezosTransaction(i,this.network));case 8:case"end":return t.stop()}}),t,this)})))}},{key:"batchBuyBasic",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.batchBuyCommon(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"batchBuy",value:function(e){return o.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=u.Action.create({id:"send-tx",run:function(e){return o.__awaiter(i,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.batchBuyCommon(e));case 1:case"end":return t.stop()}}),t,this)})))}}),t.next=3,Promise.all(e.map((function(e){return o.__awaiter(i,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPreparedOrder(e);case 2:return n=t.sent,t.t0=n.id,t.t1=this.isMultiple(n),t.next=7,this.getMaxAmount(n);case 7:return t.t2=t.sent,t.t3=parseInt(this.provider.config.fees.toString()),t.t4=h.OriginFeeSupport.FULL,t.t5=h.PayoutsSupport.MULTIPLE,t.t6=h.MaxFeesBasePointSupport.IGNORED,t.t7={platform:n.platform,nftCollection:(0,g.getNftContractAddress)(n.make.type)},t.abrupt("return",{orderId:t.t0,multiple:t.t1,maxAmount:t.t2,baseFee:t.t3,originFeeSupport:t.t4,payoutsSupport:t.t5,maxFeesBasePointSupport:t.t6,supportsPartialFill:!0,orderData:t.t7});case 14:case"end":return t.stop()}}),t,this)})))})));case 3:return a=t.sent,t.abrupt("return",{submit:n,prepared:a});case 5:case"end":return t.stop()}}),t)})))}}]),e}();t.TezosFill=k},2552:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getCollectionData=t.TezosMint=void 0;var o=n(19),u=n(115),c=n(305),d=n(176),p=n(146),l=n(45),y=n(614),f=n(306),m=n(287),b=n(751),v=function(){function e(t,n,r){i(this,e),this.provider=t,this.unionAPI=n,this.network=r,this.mint=this.mint.bind(this),this.mintBasic=this.mintBasic.bind(this),this.preprocessMeta=this.preprocessMeta.bind(this)}return s(e,[{key:"getFormatsMeta",value:function(e){return[e.image,e.animation].reduce((function(e,t){if(t){var n=t.url,r=o.__rest(t,["url"]);return e.concat(Object.assign(Object.assign({},r),{uri:T(n)}))}return e}),[])}},{key:"preprocessMeta",value:function(e){var t;if(e.blockchain!==l.Blockchain.TEZOS)throw new Error("Wrong blockchain");var n=e.animation||e.image;return{name:e.name,decimals:0,description:e.description,artifactUri:n?T(n.url):void 0,displayUri:e.image?T(e.image.url):void 0,attributes:null===(t=e.attributes)||void 0===t?void 0:t.map((function(e){return{name:e.key,value:e.value,type:e.type}})),formats:this.getFormatsMeta(e)}}},{key:"getOwner",value:function(e){var t;return o.__awaiter(this,void 0,void 0,a().mark((function n(){return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(null===(t=e.creators)||void 0===t?void 0:t.length)){n.next=2;break}return n.abrupt("return",(0,m.getTezosAddress)(e.creators[0].account));case 2:return n.abrupt("return",(0,c.get_address)((0,m.getRequiredProvider)(this.provider)));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"mint",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r,i,s=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,m.checkChainId)(this.provider);case 2:return t.next=4,h(this.unionAPI,e);case 4:return n=t.sent,r=n.contract,i=n.type,t.abrupt("return",{multiple:i===l.CollectionType.TEZOS_MT,supportsRoyalties:!0,supportsLazyMint:!1,submit:u.Action.create({id:"mint",run:function(e){return o.__awaiter(s,void 0,void 0,a().mark((function t(){var n,i,s,o,u,f;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,m.getRoyalties)(e.royalties),t.next=3,(0,b.getCollectionType)(this.provider,r);case 3:if(i=t.sent,s=i===l.CollectionType.TEZOS_NFT,o=(0,m.getRequiredProvider)(this.provider),u=s?void 0:(0,d.toBn)(e.supply||1),!(s&&e.supply&&e.supply>1)){t.next=9;break}throw new Error("Invalid supply=".concat(e.supply," for NFT collection, expected supply=1"));case 9:return t.t0=c.mint,t.t1=o,t.t2=r,t.t3=n,t.t4=u,t.t5=void 0,t.t6={"":T(e.uri)},t.next=18,this.getOwner(e);case 18:return t.t7=t.sent,t.next=21,(0,t.t0)(t.t1,t.t2,t.t3,t.t4,t.t5,t.t6,t.t7);case 21:return f=t.sent,t.abrupt("return",{type:y.MintType.ON_CHAIN,transaction:new p.BlockchainTezosTransaction(f,this.network),itemId:(0,m.convertTezosItemId)("".concat(r,":").concat(f.token_id))});case 23:case"end":return t.stop()}}),t,this)})))}})});case 8:case"end":return t.stop()}}),t,this)})))}},{key:"mintBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.mint(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}}]),e}();function h(e,t){return o.__awaiter(this,void 0,void 0,a().mark((function n(){var i,s,o,u,c,d;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=(0,f.getContractFromMintRequest)(t),s=i.split(":"),o=r(s,2),u=o[0],c=o[1],u===l.Blockchain.TEZOS){n.next=4;break}throw new Error("Unsupported blockchain of collection: ".concat(u));case 4:return n.next=6,e.collection.getCollectionById({collection:i});case 6:if(d=n.sent){n.next=9;break}throw new Error("Tezos collection with address=".concat(c," has not been found"));case 9:return n.abrupt("return",{contract:c,owner:d.owner,type:d.type});case 10:case"end":return n.stop()}}),n)})))}function T(e){return e.replace("ipfs://ipfs/","ipfs://")}t.TezosMint=v,t.getCollectionData=h},2553:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TezosTransfer=void 0;var s=n(19),o=n(305),u=n(115),c=n(64),d=n(146),p=s.__importDefault(n(53)),l=n(287),y=n(751),f=function(){function e(t,n,r){a(this,e),this.provider=t,this.unionAPI=n,this.network=r,this.transfer=this.transfer.bind(this),this.transferBasic=this.transferBasic.bind(this)}return i(e,[{key:"getRequiredProvider",value:function(){if(!(0,l.isExistedTezosProvider)(this.provider))throw new Error("Tezos provider is required");return this.provider}},{key:"transfer",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,f,m,b=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,l.checkChainId)(this.provider);case 2:return n=(0,l.getTezosItemData)(e.itemId),a=n.contract,i=n.tokenId,t.next=5,this.unionAPI.item.getItemById({itemId:e.itemId});case 5:return f=t.sent,t.next=8,(0,y.getCollectionType)(this.provider,a);case 8:return m=t.sent,t.abrupt("return",{multiple:"TEZOS_MT"===m,maxAmount:(0,c.toBigNumber)(f.supply),submit:u.Action.create({id:"transfer",run:function(e){return s.__awaiter(b,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,o.transfer)(this.getRequiredProvider(),{asset_class:(0,l.getCollectionTypeAssetClass)(m),contract:a,token_id:new p.default(i)},(0,l.getTezosAddress)(e.to),(0,l.getRequestAmount)(null===e||void 0===e?void 0:e.amount,m));case 2:return n=t.sent,t.abrupt("return",new d.BlockchainTezosTransaction(n,this.network));case 4:case"end":return t.stop()}}),t,this)})))}})});case 10:case"end":return t.stop()}}),t,this)})))}},{key:"transferBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.transfer(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}}]),e}();t.TezosTransfer=f},2554:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TezosBurn=void 0;var s=n(19),o=n(64),u=n(115),c=n(305),d=n(146),p=s.__importDefault(n(53)),l=n(287),y=n(751),f=function(){function e(t,n,r){a(this,e),this.provider=t,this.unionAPI=n,this.network=r,this.burn=this.burn.bind(this),this.burnBasic=this.burnBasic.bind(this)}return i(e,[{key:"getRequiredProvider",value:function(){if(!(0,l.isExistedTezosProvider)(this.provider))throw new Error("Tezos provider is required");return this.provider}},{key:"burn",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,f,m,b=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,l.checkChainId)(this.provider);case 2:return n=(0,l.getTezosItemData)(e.itemId),a=n.contract,i=n.tokenId,t.next=5,this.unionAPI.item.getItemById({itemId:e.itemId});case 5:return f=t.sent,t.next=8,(0,y.getCollectionType)(this.provider,a);case 8:return m=t.sent,t.abrupt("return",{multiple:"TEZOS_MT"===m,maxAmount:(0,o.toBigNumber)(f.supply),submit:u.Action.create({id:"burn",run:function(e){return s.__awaiter(b,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,c.burn)(this.getRequiredProvider(),{asset_class:(0,l.getCollectionTypeAssetClass)(m),contract:a,token_id:new p.default(i)},(0,l.getRequestAmount)(null===e||void 0===e?void 0:e.amount,m));case 2:return n=t.sent,t.abrupt("return",new d.BlockchainTezosTransaction(n,this.network));case 4:case"end":return t.stop()}}),t,this)})))}})});case 10:case"end":return t.stop()}}),t,this)})))}},{key:"burnBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.burn(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}}]),e}();t.TezosBurn=f},2555:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TezosTokenId=void 0;var s=n(19),o=n(305),u=n(64),c=n(287),d=function(){function e(t){a(this,e),this.provider=t,this.generateTokenId=this.generateTokenId.bind(this)}return i(e,[{key:"generateTokenId",value:function(e){var t=e.collection;return s.__awaiter(this,void 0,void 0,r().mark((function e(){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,o.get_next_token_id)((0,c.getRequiredProvider)(this.provider),(0,c.convertFromContractAddress)(t));case 2:return n=e.sent,e.abrupt("return",{tokenId:n.toString(),signature:{v:0,r:(0,u.toBinary)("0"),s:(0,u.toBinary)("0")}});case 4:case"end":return e.stop()}}),e,this)})))}}]),e}();t.TezosTokenId=d},2556:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TezosCancel=void 0;var s=n(19),o=n(115),u=n(305),c=n(146),d=s.__importDefault(n(53)),p=n(2557),l=n(953),y=n(287),f=function(){function e(t,n,i){var p=this;a(this,e),this.provider=t,this.unionAPI=n,this.network=i,this.cancel=o.Action.create({id:"send-tx",run:function(e){return s.__awaiter(p,void 0,void 0,r().mark((function t(){var n,a,i,s,o,p,f,m,b,v,h,T,g,w,k;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,y.checkChainId)(this.provider);case 2:return t.next=4,this.unionAPI.order.getOrderById({id:e.orderId});case 4:if(n=t.sent){t.next=7;break}throw new Error("Order has not been found");case 7:if(a=(0,y.getRequiredProvider)(this.provider),i=(0,y.isNftAssetType)(n.make.type)||(0,y.isMTAssetType)(n.make.type),"TEZOS_RARIBLE_V3"!==n.data["@type"]){t.next=21;break}if(!i){t.next=12;break}return t.abrupt("return",this.cancelV2SellOrder(n));case 12:if(!(0,y.isNftAssetType)(n.take.type)&&!(0,y.isMTAssetType)(n.take.type)){t.next=21;break}return t.next=15,(0,y.getTezosAssetTypeV2)(a.config,n.make.type);case 15:return s=t.sent,o={asset_contract:(0,y.convertFromContractAddress)(n.take.type.contract),asset_token_id:new d.default(n.take.type.tokenId),bid_type:s.type,bid_asset_contract:s.asset_contract,bid_asset_token_id:s.asset_token_id},t.next=19,(0,l.cancel_bid)(a,o);case 19:return p=t.sent,t.abrupt("return",new c.BlockchainTezosTransaction(p,this.network));case 21:if(!i){t.next=71;break}if("TEZOS_HEN"!==n.data["@type"]){t.next=29;break}return t.next=25,(0,u.hen_cancel_swap)(a,e.orderId);case 25:if(f=t.sent){t.next=28;break}throw new Error("Operation is undefined");case 28:return t.abrupt("return",new c.BlockchainTezosTransaction(f,this.network));case 29:if("TEZOS_VERSUM_V1"!==n.data["@type"]){t.next=36;break}return t.next=32,(0,u.versum_cancel_swap)(a,e.orderId);case 32:if(m=t.sent){t.next=35;break}throw new Error("Operation is undefined");case 35:return t.abrupt("return",new c.BlockchainTezosTransaction(m,this.network));case 36:if("TEZOS_TEIA_V1"!==n.data["@type"]){t.next=43;break}return t.next=39,(0,u.teia_cancel_swap)(a,e.orderId);case 39:if(b=t.sent){t.next=42;break}throw new Error("Operation is undefined");case 42:return t.abrupt("return",new c.BlockchainTezosTransaction(b,this.network));case 43:if("TEZOS_OBJKT_V1"!==n.data["@type"]){t.next=50;break}return t.next=46,(0,u.objkt_retract_ask_v1)(a,e.orderId);case 46:if(v=t.sent){t.next=49;break}throw new Error("Operation is undefined");case 49:return t.abrupt("return",new c.BlockchainTezosTransaction(v,this.network));case 50:if("TEZOS_OBJKT_V2"!==n.data["@type"]){t.next=57;break}return t.next=53,(0,u.objkt_retract_ask_v2)(a,e.orderId);case 53:if(h=t.sent){t.next=56;break}throw new Error("Operation is undefined");case 56:return t.abrupt("return",new c.BlockchainTezosTransaction(h,this.network));case 57:if("TEZOS_FXHASH_V1"!==n.data["@type"]){t.next=64;break}return t.next=60,(0,u.fxhash_v1_cancel_offer)(a,e.orderId);case 60:if(T=t.sent){t.next=63;break}throw new Error("Operation is undefined");case 63:return t.abrupt("return",new c.BlockchainTezosTransaction(T,this.network));case 64:if("TEZOS_FXHASH_V2"!==n.data["@type"]){t.next=71;break}return t.next=67,(0,u.fxhash_v2_cancel_listing)(a,e.orderId);case 67:if(g=t.sent){t.next=70;break}throw new Error("Operation is undefined");case 70:return t.abrupt("return",new c.BlockchainTezosTransaction(g,this.network));case 71:return w=(0,y.getTezosOrderLegacyForm)(n),t.next=74,(0,u.cancel)((0,y.getRequiredProvider)(this.provider),w);case 74:return k=t.sent,t.abrupt("return",new c.BlockchainTezosTransaction(k,this.network));case 76:case"end":return t.stop()}}),t,this)})))}}),this.cancelBasic=this.cancelBasic.bind(this)}return i(e,[{key:"cancelV2SellOrder",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,s;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,y.checkChainId)(this.provider);case 2:return n=(0,y.getRequiredProvider)(this.provider),t.next=5,(0,y.getTezosAssetTypeV2)(this.provider.config,e.take.type);case 5:return a=t.sent,i={asset_contract:(0,y.convertFromContractAddress)(e.make.type.contract),asset_token_id:new d.default(e.make.type.tokenId),sale_asset_contract:a.asset_contract,sale_asset_token_id:a.asset_token_id,sale_type:a.type},t.next=9,(0,p.cancelV2)(n,i);case 9:if(s=t.sent){t.next=12;break}throw new Error("Cancel transaction has not been returned");case 12:return t.abrupt("return",new c.BlockchainTezosTransaction(s,this.network));case 13:case"end":return t.stop()}}),t,this)})))}},{key:"cancelBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.cancel(e));case 1:case"end":return t.stop()}}),t,this)})))}}]),e}();t.TezosCancel=f},2558:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TezosBalance=void 0;var s=n(19),o=n(305),u=s.__importDefault(n(53)),c=n(267),d=n(287),p=function(){function e(t,n){a(this,e),this.provider=t,this.network=n,this.getBalance=this.getBalance.bind(this)}return i(e,[{key:"getBalance",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=(0,c.getCurrencyAssetType)(t),n.next=3,(0,d.getTezosAssetTypeV2)(this.provider.config,a);case 3:if(i=n.sent,"XTZ"===a["@type"]||"TEZOS_FT"===a["@type"]){n.next=6;break}throw new Error("Unsupported asset type");case 6:if(this.provider.config.node_url){n.next=8;break}throw new Error("Node url for tezos has not been specified");case 8:return n.t0=u.default,n.next=11,(0,o.get_balance)(this.provider.config,(0,d.getTezosAddress)(e),i.type,i.asset_contract,i.asset_token_id);case 11:return n.t1=n.sent,n.abrupt("return",new n.t0(n.t1));case 13:case"end":return n.stop()}}),n,this)})))}}]),e}();t.TezosBalance=p},2559:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TezosCreateCollection=void 0;var s=n(19),o=n(115),u=n(305),c=n(146),d=n(45),p=n(287),l=function(){function e(t,n){var i=this;a(this,e),this.provider=t,this.network=n,this.createCollection=o.Action.create({id:"send-tx",run:function(e){return s.__awaiter(i,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.blockchain===d.Blockchain.TEZOS){t.next=2;break}throw new Error("Wrong blockchain");case 2:return t.next=4,(0,p.checkChainId)(this.provider);case 4:return t.next=6,this.getDeployOperation(e.asset);case 6:return n=t.sent,t.abrupt("return",{tx:new c.BlockchainTezosTransaction(n,this.network),address:(0,p.convertTezosToContractAddress)(n.contract)});case 8:case"end":return t.stop()}}),t,this)})))}}),this.createCollectionSimplified=this.createCollectionSimplified.bind(this)}return i(e,[{key:"getMetadataJSON",value:function(e){var t,n={name:e.arguments.name,homepage:e.arguments.homepage};return e.arguments.description&&(n.description=e.arguments.description),e.arguments.license&&(n.license=e.arguments.license),e.arguments.version&&(n.version=e.arguments.version),(null===(t=e.arguments.authors)||void 0===t?void 0:t.length)&&(n.authors=e.arguments.authors),JSON.stringify(n)}},{key:"getDeployOperation",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,p.getRequiredProvider)(this.provider),t.next=3,n.tezos.address();case 3:if(a=t.sent,i={"":"tezos-storage:metadata",metadata:this.getMetadataJSON(e)},"NFT"!==e.assetType){t.next=13;break}if(e.arguments.isUserToken){t.next=10;break}return t.abrupt("return",(0,u.deploy_nft_public)(n,a,i));case 10:return t.abrupt("return",(0,u.deploy_nft_private)(n,a,i));case 11:case 19:t.next=22;break;case 13:if("MT"!==e.assetType){t.next=21;break}if(e.arguments.isUserToken){t.next=18;break}return t.abrupt("return",(0,u.deploy_mt_public)(n,a,i));case 18:return t.abrupt("return",(0,u.deploy_mt_private)(n,a,i));case 21:throw new Error("Unsupported asset type=".concat(e.assetType));case 22:case"end":return t.stop()}}),t,this)})))}},{key:"createCollectionSimplified",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.blockchain===d.Blockchain.TEZOS){t.next=2;break}throw new Error("Wrong blockchain");case 2:return n=e.isPublic,a=e.type,i=s.__rest(e,["isPublic","type"]),t.next=5,this.getDeployOperation({assetType:a,arguments:Object.assign(Object.assign({},i),{isUserToken:!n})});case 5:return o=t.sent,t.abrupt("return",{tx:new c.BlockchainTezosTransaction(o,this.network),address:(0,p.convertTezosToContractAddress)(o.contract)});case 7:case"end":return t.stop()}}),t,this)})))}}]),e}();t.TezosCreateCollection=l},2560:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(19).__exportStar(n(2561),t)},2561:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TezosCanTransfer=void 0;var s=n(19),o=n(252),u=n(287),c=n(410),d=function(){function e(t){a(this,e),this.provider=t,this.canTransfer=this.canTransfer.bind(this)}return i(e,[{key:"canTransfer",value:function(e,t,n){return s.__awaiter(this,void 0,void 0,r().mark((function a(){var i,s,d,p,y,f,m,b,v;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=(0,u.getRequiredProvider)(this.provider),s=(0,u.getTezosItemData)(e),d=s.tokenId,p=s.contract,y={chain_id:this.provider.config.chain_id,contract:p,entrypoint:"can_transfer",gas:"100000",input:{prim:"Pair",args:[{int:d},{prim:"Pair",args:[{string:(0,u.convertUnionAddress)(t)},{string:(0,u.convertUnionAddress)(n)}]}]},payer:(0,u.convertUnionAddress)(t),source:this.provider.config.transfer_proxy,unparsing_mode:"Readable"},f={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(y)},m="".concat(i.tezos.tk.rpc.getRpcUrl(),"/chains/main/blocks/head/helpers/scripts/run_view"),r.prev=5,r.next=8,window.fetch(m,f);case 8:b=r.sent,r.next=14;break;case 11:throw r.prev=11,r.t0=r.catch(5),new o.NetworkError({url:m,data:r.t0.message,code:c.NetworkErrorCode.TEZOS_EXTERNAL_ERR});case 14:return r.next=16,(0,o.handleFetchErrorResponse)(b,{requestInit:f,code:c.NetworkErrorCode.TEZOS_EXTERNAL_ERR});case 16:return r.next=18,b.json();case 18:if(""!==(v=r.sent).data.string){r.next=21;break}return r.abrupt("return",{success:!0});case 21:return r.abrupt("return",{success:!1,reason:l(v.data.string)});case 22:case"end":return r.stop()}}),a,this,[[5,11]])})))}}]),e}();t.TezosCanTransfer=d;var p={ARCHETYPE_QUOTA_REACHED:"You have reached the maximum amount of Digits you can own of this Edition, please visit [quartz.ubisoft.com](https://quartz.ubisoft.com) for more information.",TO_RESTRICTED:"You can't trade this Digit at the moment, please visit [quartz.ubisoft.com](https://quartz.ubisoft.com) for more information."};function l(e){return e in p?p[e]:p.TO_RESTRICTED}},2562:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TezosBid=void 0;var o=n(19),u=n(115),c=n(953),d=o.__importDefault(n(53)),p=n(64),l=n(305),y=n(75),f=n(252),m=n(216),b=n(267),v=n(524),h=n(750),T=n(306),g=n(287),w=function(){function e(t,n,r){i(this,e),this.provider=t,this.apis=n,this.network=r,this.bid=this.bid.bind(this),this.bidBasic=this.bidBasic.bind(this),this.update=this.update.bind(this),this.updateBasic=this.updateBasic.bind(this)}return s(e,[{key:"parseTakeAssetType",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r,i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e["@type"],t.next="XTZ"===t.t0?3:"TEZOS_FT"===t.t0?4:10;break;case 3:return t.abrupt("return",{asset_class:e["@type"]});case 4:return n=(0,g.getRequiredProvider)(this.provider),r=(0,g.convertFromContractAddress)(e.contract),t.next=8,(0,l.get_ft_type)(n.config,r);case 8:return i=t.sent,t.abrupt("return",{asset_class:"FT",contract:r,token_id:i===y.AssetTypeV2.FA2?new d.default(e.tokenId||0):void 0});case 10:throw new Error("Unsupported take asset type");case 11:case"end":return t.stop()}}),t,this)})))}},{key:"bid",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r,i=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getBidRequestInfo(e);case 2:return n=t.sent,r=u.Action.create({id:"send-tx",run:function(t){return o.__awaiter(i,void 0,void 0,a().mark((function r(){var i,s,o,u;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=(0,g.getRequiredProvider)(this.provider),r.t0=Object,r.t1=Object,r.t2={},r.next=6,this.getCommonBidData(t);case 6:if(r.t3=r.sent,r.t4=r.t1.assign.call(r.t1,r.t2,r.t3),r.t5={asset_contract:n.contract},s=r.t0.assign.call(r.t0,r.t4,r.t5),!("itemId"in e)){r.next=19;break}if(void 0!==n.tokenId){r.next=13;break}throw new f.Warning("Check tokenId in your itemId parameter");case 13:return u=Object.assign(Object.assign({},s),{asset_token_id:new d.default(n.tokenId)}),r.next=16,(0,c.put_bid)(i,u);case 16:o=r.sent,r.next=24;break;case 19:if(!("collectionId"in e)){r.next=23;break}throw new f.Warning("Floor bids are not available yet");case 23:throw new f.Warning("ItemId or CollectionId must be assigned");case 24:if(o){r.next=26;break}throw new Error("OrderID cannot be requested");case 26:return r.abrupt("return",(0,p.toOrderId)(o));case 27:case"end":return r.stop()}}),r,this)})))}}),t.abrupt("return",{multiple:"TEZOS_MT"===n.collection.type,maxAmount:"item"in n&&n.item?(0,p.toBigNumber)(n.item.supply):null,originFeeSupport:m.OriginFeeSupport.FULL,payoutsSupport:m.PayoutsSupport.MULTIPLE,supportedCurrencies:(0,g.getSupportedCurrencies)(),baseFee:parseInt(this.provider.config.fees.toString()),maxFeesBasePointSupport:m.MaxFeesBasePointSupport.IGNORED,getConvertableValue:v.notImplemented,supportsExpirationDate:!1,submit:r});case 5:case"end":return t.stop()}}),t,this)})))}},{key:"bidBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.bid(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getCommonBidData",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r,i,s,o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,g.getRequiredProvider)(this.provider),r=(0,b.getCurrencyAssetType)(e.currency),t.next=4,(0,g.getTezosAssetTypeV2)(n.config,r);case 4:return i=t.sent,s=new d.default(e.amount||1),o=s.multipliedBy(e.price),t.t0=i.type,t.t1=i.asset_contract,t.t2=i.asset_token_id,t.t3=(0,g.convertUnionParts)(e.originFees),t.next=13,(0,g.getPayouts)(n,e.payouts);case 13:return t.t4=t.sent,t.t5=o,t.t6=s,t.t7=(0,h.convertDateToTimestamp)(e.expirationDate),t.t8=void 0,t.t9=void 0,t.t10={bid_origin_fees:t.t3,bid_payouts:t.t4,bid_amount:t.t5,bid_asset_qty:t.t6,bid_expiry_date:t.t7,bid_data_type:t.t8,bid_data:t.t9},t.abrupt("return",{bid_type:t.t0,bid_asset_contract:t.t1,bid_asset_token_id:t.t2,bid:t.t10});case 21:case"end":return t.stop()}}),t,this)})))}},{key:"updateBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.update(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"update",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r,i=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.apis.order.getOrderById({id:e.orderId});case 2:if(n=t.sent){t.next=5;break}throw new Error("Order has not been found");case 5:return r=u.Action.create({id:"send-tx",run:function(e){return o.__awaiter(i,void 0,void 0,a().mark((function t(){var r,i,s,o,u;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=(0,g.getRequiredProvider)(this.provider),(0,g.isNftOrMTAssetType)(n.take.type)){t.next=3;break}throw new f.Warning("Non-bid order specified");case 3:if("TEZOS_RARIBLE_V3"===n.data["@type"]){t.next=5;break}throw new Error("It's not TEZOS_RARIBLE_V3 order");case 5:return t.next=7,(0,g.getTezosAssetTypeV2)(r.config,n.make.type);case 7:return i=t.sent,s=new d.default(n.take.value).multipliedBy(e.price),t.t0=(0,g.convertFromContractAddress)(n.take.type.contract),t.t1=new d.default(n.take.type.tokenId),t.t2=i.type,t.t3=i.asset_contract,t.t4=i.asset_token_id,t.t5=(0,g.convertUnionParts)(n.data.originFees),t.next=17,(0,g.getPayouts)(r,n.data.payouts);case 17:return t.t6=t.sent,t.t7=s,t.t8=new d.default(n.take.value),t.t9=void 0!==n.endedAt?(0,h.convertDateToTimestamp)(new Date(n.endedAt)):void 0,t.t10=void 0,t.t11=void 0,t.t12={bid_origin_fees:t.t5,bid_payouts:t.t6,bid_amount:t.t7,bid_asset_qty:t.t8,bid_expiry_date:t.t9,bid_data_type:t.t10,bid_data:t.t11},o={asset_contract:t.t0,asset_token_id:t.t1,bid_type:t.t2,bid_asset_contract:t.t3,bid_asset_token_id:t.t4,bid:t.t12},t.next=27,(0,c.put_bid)(r,o);case 27:if(u=t.sent){t.next=30;break}throw new Error("OrderID cannot be requested");case 30:return t.abrupt("return",(0,p.toOrderId)(u));case 31:case"end":return t.stop()}}),t,this)})))}}),t.abrupt("return",{originFeeSupport:m.OriginFeeSupport.FULL,payoutsSupport:m.PayoutsSupport.MULTIPLE,supportedCurrencies:(0,g.getSupportedCurrencies)(),baseFee:parseInt(this.provider.config.fees.toString()),maxFeesBasePointSupport:m.MaxFeesBasePointSupport.IGNORED,getConvertableValue:v.notImplemented,submit:r,orderData:{nftCollection:(0,T.getNftContractAddress)(n.take.type)}});case 7:case"end":return t.stop()}}),t,this)})))}},{key:"getBidRequestInfo",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,i,s,o,u,c,d,p;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!("itemId"in e)){t.next=11;break}return n=(0,g.getTezosItemData)(e.itemId),i=n.contract,s=n.tokenId,t.next=4,Promise.all([this.apis.collection.getCollectionById({collection:(0,g.convertTezosToContractAddress)(i)}),this.apis.item.getItemById({itemId:e.itemId})]);case 4:return o=t.sent,u=r(o,2),c=u[0],d=u[1],t.abrupt("return",{contract:i,tokenId:s,collection:c,item:d});case 11:if(!("collectionId"in e)){t.next=18;break}return t.next=14,this.apis.collection.getCollectionById({collection:e.collectionId});case 14:return p=t.sent,t.abrupt("return",{contract:(0,g.convertUnionAddress)(e.collectionId),collection:p});case 18:throw new f.Warning("ItemId or CollectionId must be assigned");case 19:case"end":return t.stop()}}),t,this)})))}}]),e}();t.TezosBid=w},2563:function(e,t,n){"use strict";var r=n(111).default,a=n(20).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.createUnionSdk=void 0;var o=n(19),u=n(45),c=n(115),d=n(298),p=n(853),l=n(408),y=n(267),f=n(409),m=n(623);t.createUnionSdk=function(e,t,n,r,a,i,s){return{balances:new T({ETHEREUM:e.balances,FLOW:t.balances,TEZOS:n.balances,POLYGON:r.balances,SOLANA:a.balances,IMMUTABLEX:i.balances,MANTLE:s.balances}),nft:new h({ETHEREUM:e.nft,FLOW:t.nft,TEZOS:n.nft,POLYGON:r.nft,SOLANA:a.nft,IMMUTABLEX:i.nft,MANTLE:s.nft}),order:new b({ETHEREUM:e.order,FLOW:t.order,TEZOS:n.order,POLYGON:r.order,SOLANA:a.order,IMMUTABLEX:i.order,MANTLE:s.order}),restriction:new g({ETHEREUM:e.restriction,FLOW:t.restriction,TEZOS:n.restriction,POLYGON:r.restriction,SOLANA:a.restriction,IMMUTABLEX:i.restriction,MANTLE:s.restriction}),ethereum:new w(e.ethereum),flow:new k(t.flow)}};var b=function(){function e(t){i(this,e),this.instances=t,this.cancel=this.cancel.bind(this),this.bid=new f.MethodWithPrepare((function(e){return t[(0,m.extractBlockchain)(x(e))].bid(e)}),(function(e){return t[(0,m.extractBlockchain)(x(e))].bid.prepare(e)})),this.bidUpdate=new f.MethodWithPrepare((function(e){return t[(0,m.extractBlockchain)(e.orderId)].bidUpdate(e)}),(function(e){return t[(0,m.extractBlockchain)(e.orderId)].bidUpdate.prepare(e)})),this.fill={prepare:function(e){return t[(0,m.extractBlockchain)(v(e))].fill.prepare(e)}},this.buy=new f.MethodWithPrepare((function(e){return t[(0,m.extractBlockchain)(v(e))].buy(e)}),(function(e){return t[(0,m.extractBlockchain)(v(e))].buy.prepare(e)})),this.batchBuy=new f.MethodWithPrepare((function(e){return t[E(e)].batchBuy(e)}),(function(e){return t[E(e)].batchBuy.prepare(e)})),this.acceptBid=new f.MethodWithPrepare((function(e){return t[(0,m.extractBlockchain)(v(e))].acceptBid(e)}),(function(e){return t[(0,m.extractBlockchain)(v(e))].acceptBid.prepare(e)})),this.sell=new f.MethodWithPrepare((function(e){return t[(0,m.extractBlockchain)(e.itemId)].sell(e)}),(function(e){return t[e.blockchain].sell.prepare(e)})),this.sellUpdate=new f.MethodWithPrepare((function(e){return t[(0,m.extractBlockchain)(e.orderId)].sellUpdate(e)}),(function(e){return t[(0,m.extractBlockchain)(e.orderId)].sellUpdate.prepare(e)}))}return s(e,[{key:"cancel",value:function(e){return this.instances[(0,m.extractBlockchain)(e.orderId)].cancel(e)}}]),e}();function v(e){return"orderId"in e?e.orderId:e.order.id}var h=function(){function e(t){i(this,e),this.instances=t,this.preprocessMeta=l.Middlewarer.skipMiddleware(this.preprocessMeta.bind(this)),this.generateTokenId=this.generateTokenId.bind(this),this.uploadMeta=this.uploadMeta.bind(this),this.createCollection=this.createCollection.bind(this),this.transfer=new f.MethodWithPrepare((function(e){return t[(0,m.extractBlockchain)(e.itemId)].transfer(e)}),(function(e){return t[(0,m.extractBlockchain)(e.itemId)].transfer.prepare(e)})),this.mint=new f.MethodWithPrepare((function(e){return t[(0,m.extractBlockchain)((0,p.getCollectionId)(e))].mint(e)}),(function(e){return t[(0,m.extractBlockchain)((0,p.getCollectionId)(e))].mint.prepare(e)})),this.burn=new f.MethodWithPrepare((function(e){return t[(0,m.extractBlockchain)(e.itemId)].burn(e)}),(function(e){return t[(0,m.extractBlockchain)(e.itemId)].burn.prepare(e)}))}return s(e,[{key:"createCollection",value:function(e){return this.instances[e.blockchain].createCollection(e)}},{key:"uploadMeta",value:function(e){return this.instances[(0,m.extractBlockchain)(e.accountAddress)].uploadMeta(e)}},{key:"generateTokenId",value:function(e){return this.instances[(0,m.extractBlockchain)(e.collection)].generateTokenId(e)}},{key:"preprocessMeta",value:function(e){return this.instances[e.blockchain].preprocessMeta(e)}}]),e}(),T=function(){function e(t){var n=this;i(this,e),this.instances=t,this.depositBiddingBalance=c.Action.create({id:"send-tx",run:function(e){return n.instances[_(e)].depositBiddingBalance(e)}}),this.withdrawBiddingBalance=c.Action.create({id:"send-tx",run:function(e){return n.instances[_(e)].withdrawBiddingBalance(e)}}),this.getBalance=this.getBalance.bind(this),this.convert=this.convert.bind(this),this.getBiddingBalance=this.getBiddingBalance.bind(this),this.transfer=this.transfer.bind(this)}return s(e,[{key:"getBalance",value:function(e,t){var n=O(e,t);return this.instances[n].getBalance(e,t)}},{key:"convert",value:function(e){return this.instances[e.blockchain].convert(e)}},{key:"transfer",value:function(e){var t=O(e.recipient,e.currency);return this.instances[t].transfer(e)}},{key:"getBiddingBalance",value:function(e){var t=_(e);return this.instances[t].getBiddingBalance(e)}}]),e}(),g=function(){function e(t){i(this,e),this.instances=t,this.blockchainFeeData=new Map}return s(e,[{key:"canTransfer",value:function(e,t,n){return this.instances[(0,m.extractBlockchain)(e)].canTransfer(e,t,n)}},{key:"getFutureOrderFees",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=(0,m.extractBlockchain)(e),this.blockchainFeeData.has(n)){t.next=7;break}return t.next=4,this.instances[n].getFutureOrderFees(e);case 4:return r=t.sent,this.blockchainFeeData.set(n,r),t.abrupt("return",r);case 7:return t.abrupt("return",this.blockchainFeeData.get(n));case 8:case"end":return t.stop()}}),t,this)})))}}]),e}(),w=s((function e(t){i(this,e),this.ethereumSdk=t,this.wrapCryptoPunk=this.ethereumSdk.wrapCryptoPunk,this.unwrapCryptoPunk=this.ethereumSdk.unwrapCryptoPunk,this.getBatchBuyAmmInfo=this.ethereumSdk.getBatchBuyAmmInfo})),k=s((function e(t){i(this,e),this.flowSdk=t,this.setupAccount=this.flowSdk.setupAccount,this.setupMattelCollections=this.flowSdk.setupMattelCollections,this.checkInitMattelCollections=this.flowSdk.checkInitMattelCollections}));function x(e){if("itemId"in e)return e.itemId;if("collectionId"in e)return e.collectionId;throw new Error("Bit request should contains itemId or collectionId")}function O(e,t){if((0,y.isAssetType)(t))return(0,d.extractBlockchainFromAssetType)(t)||(0,m.extractBlockchain)(e);if((0,y.isRequestCurrencyAssetType)(t))return(0,y.getDataFromCurrencyId)(t).blockchain;throw new Error("Unrecognized RequestCurrency ".concat(JSON.stringify(t)))}function _(e){if("currency"in e){if((0,y.isRequestCurrencyAssetType)(e.currency))return(0,m.extractBlockchain)(e.currency);if((0,y.isAssetType)(e.currency)){if("blockchain"in e.currency&&e.currency.blockchain)return e.currency.blockchain;if("contract"in e.currency&&e.currency.contract)return(0,m.extractBlockchain)(e.currency.contract);if("itemId"in e.currency&&e.currency.itemId)return(0,m.extractBlockchain)(e.currency.itemId);switch(e.currency["@type"]){case"SOLANA_SOL":return u.Blockchain.SOLANA;case"ETH":return u.Blockchain.ETHEREUM;case"XTZ":return u.Blockchain.TEZOS}}throw new Error("Unrecognized RequestCurrency ".concat(JSON.stringify(e.currency)))}return"order"in e?(0,m.extractBlockchain)(e.order.id):"orderId"in e?(0,m.extractBlockchain)(e.orderId):e.blockchain}function E(e){var t,n=(0,m.extractBlockchain)(v(e[0])),a=r(e);try{for(a.s();!(t=a.n()).done;){var i=t.value;if((0,m.extractBlockchain)(v(i))!==n)throw new Error("All orders should be in same blockchain")}}catch(s){a.e(s)}finally{a.f()}return n}},2564:function(e){e.exports=JSON.parse('{"name":"@rarible/sdk","version":"0.13.55-fix.0","homepage":"","license":"ISC","main":"build/index.js","types":"build/index.d.ts","files":["build","umd"],"scripts":{"build":"run-s build:*","build:ts":"tsc --project tsconfig-build.json","build:umd":"webpack","analyze":"webpack --config webpack-analyze.config.js","clean":"rimraf ./build","test":"sh ./scripts/test.sh","verify":"tsc --noEmit","docs":"typedoc","test:only":"jest --runInBand --testPathPattern=src/sdk-blockchains/ethereum/bid --silent=false --detectOpenHandles"},"dependencies":{"@babel/runtime":"^7.15.4","@ethersproject/keccak256":"^5.6.0","@rarible/action":"~0.9.1","@rarible/api-client":"0.16.2-beta1","@rarible/flow-sdk":"~0.5.71-HWGarageTokenV2","@rarible/immutable-sdk":"^0.13.52","@rarible/immutable-wallet":"^0.13.52","@rarible/logger":"~0.9.12","@rarible/protocol-ethereum-sdk":"^0.13.55","@rarible/sdk-common":"^0.13.55","@rarible/sdk-transaction":"^0.13.55","@rarible/sdk-wallet":"^0.13.55","@rarible/solana-sdk":"^0.13.52","@rarible/tezos-sdk":"0.1.46","@rarible/types":"~0.9.16","@rarible/utils":"~0.9.10","@solana/web3.js":"^1.35.1","bignumber.js":"^9.0.1","callable-instance":"^2.0.0","mime-types":"^2.1.27","tezos-api-client":"~0.0.19","uuid":"^8.3.1"},"devDependencies":{"@babel/cli":"^7.14.8","@babel/core":"^7.14.8","@babel/plugin-proposal-class-properties":"^7.14.5","@babel/plugin-proposal-object-rest-spread":"^7.15.6","@babel/plugin-proposal-optional-chaining":"^7.14.5","@babel/plugin-syntax-bigint":"^7.8.3","@babel/plugin-transform-runtime":"^7.15.8","@babel/plugin-transform-typescript":"^7.8.3","@babel/preset-env":"^7.8.3","@babel/preset-typescript":"^7.14.5","@onflow/fcl":"~1.3.2","@rarible/ethereum-sdk-test-common":"^0.13.55","@rarible/flow-test-common":"~0.5.66","@rarible/solana-wallet":"^0.13.52","@types/jest":"^27.0.2","@types/mime-types":"^2.1.0","@types/node":"^12.20.36","@types/node-fetch":"^2.6.1","@types/uuid":"^8.3.0","babel-plugin-transform-bigint":"^1.0.12","buffer":"^6.0.3","crypto-browserify":"^3.12.0","dotenv":"16.0.0","ethers":"^5.6.2","jest":"^27.2.7","jest-junit":"^15.0.0","keccak":"^3.0.2","mock-local-storage":"^1.1.23","node-fetch":"2.6.7","node-polyfill-webpack-plugin":"^1.1.4","npm-run-all":"^4.1.5","os-browserify":"^0.3.0","path-browserify":"^1.0.1","stream-browserify":"^3.0.0","ts-jest":"^27.0.3","typescript":"^4.8.4","web3":">=1.5.0 <1.9.0","webpack":"^5.68.0","webpack-bundle-analyzer":"^4.5.0","webpack-cli":"^4.9.2","yargs":"^17.2.1"},"peerDependencies":{"axios":"^0.26.1","tslib":"^2.3.1"}}')},2565:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getCallableExtraFields=t.LoggerDataContainer=t.getExecRevertedMessage=t.getErrorLevel=t.CustomErrorCode=t.isErrorWarning=void 0;var s,o=n(19),u=n(252),c=n(1269),d=n(89),p=n(298),l=n(410),y=n(306),f=n(408),m=n(954),b=["Network request failed","Failed to fetch"];function v(e,t){try{if(!e)return!1;if(T(t)&&(0,p.isEVMWarning)(e))return!0;if(t===d.WalletType.TEZOS)return(0,p.isTezosWarning)(e);if(t===d.WalletType.FLOW)return(0,p.isFlowWarning)(e);if(t===d.WalletType.SOLANA&&(0,p.isSolanaWarning)(e))return!0}catch(n){}return!1}function h(e,t,n){return 400===(null===t||void 0===t?void 0:t.status)?c.LogLevel.WARN:t instanceof u.NetworkError||"NetworkError"===(null===t||void 0===t?void 0:t.name)?(null===t||void 0===t?void 0:t.code)||l.NetworkErrorCode.NETWORK_ERR:function(e,t){return!!(null===e||void 0===e?void 0:e.startsWith("apis."))||b.some((function(e){var n;return null===(n=null===t||void 0===t?void 0:t.message)||void 0===n?void 0:n.includes(e)}))}(e,t)?l.NetworkErrorCode.NETWORK_ERR:(0,p.isInfoLevel)(t)?c.LogLevel.INFO:v(t,null===n||void 0===n?void 0:n.walletType)||t instanceof u.Warning||"Warning"===(null===t||void 0===t?void 0:t.name)?c.LogLevel.WARN:T(null===n||void 0===n?void 0:n.walletType)&&function(e){var t;return null===(t=null===e||void 0===e?void 0:e.message)||void 0===t?void 0:t.includes("execution reverted")}(t)?s.CONTRACT_ERROR:c.LogLevel.ERROR}function T(e){return e===d.WalletType.ETHEREUM||e===d.WalletType.IMMUTABLEX}t.isErrorWarning=v,function(e){e.CONTRACT_ERROR="CONTRACT_ERROR"}(s=t.CustomErrorCode||(t.CustomErrorCode={})),t.getErrorLevel=h;var g=/execution reverted:(.*[^\\])/,w=/"execution reverted[:]?(.*?)"/;t.getExecRevertedMessage=function(e){if(!e)return e;try{var t=e.includes("Error while gas estimation with message cannot estimate gas")?e.match(w):e.match(g);if(t&&t[1])return t[1].trim()}catch(n){}return e};var k=function(){function e(t){a(this,e),this.input=t,this.extraFields=x(t.callable),this.stringifiedArgs=e.getParsedArgs(t.args)}return i(e,[{key:"getTraceData",value:function(){return o.__awaiter(this,void 0,void 0,r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.input.responsePromise;case 2:return t=e.sent,e.abrupt("return",Object.assign({level:c.LogLevel.TRACE,method:this.input.callable.name,message:"trace of "+this.input.callable.name,duration:(Date.now()-this.input.startTime)/1e3,args:this.stringifiedArgs,resp:JSON.stringify(t)},this.extraFields||{}));case 4:case"end":return e.stop()}}),e,this)})))}},{key:"getErrorData",value:function(e){var t,n,r,a,i,s=p.WrappedError.isWrappedError(e)?e.error:e;try{i=Object.assign({level:h(null===(t=this.input.callable)||void 0===t?void 0:t.name,s,null===(n=this.input.sdkContext)||void 0===n?void 0:n.wallet),method:null===(r=this.input.callable)||void 0===r?void 0:r.name,message:(0,m.getErrorMessageString)(s),error:(0,p.getStringifiedData)(s),duration:(Date.now()-this.input.startTime)/1e3,args:this.stringifiedArgs,requestAddress:void 0},this.extraFields||{}),(s instanceof u.NetworkError||"NetworkError"===(null===s||void 0===s?void 0:s.name))&&(i.requestAddress=null===s||void 0===s?void 0:s.url)}catch(o){i={level:"LOGGING_ERROR",method:null===(a=this.input.callable)||void 0===a?void 0:a.name,message:(0,m.getErrorMessageString)(o),error:(0,p.getStringifiedData)(o)}}return i}}],[{key:"getParsedArgs",value:function(e){var t;try{t=JSON.stringify(e)}catch(n){try{t=JSON.stringify(e,Object.getOwnPropertyNames(e))}catch(r){t="unknown"}}return t}}]),e}();function x(e){var t,n,r,a,i,s,o,u;try{if("string"!==typeof(null===e||void 0===e?void 0:e.name))return{};if(function(e){var t;return e instanceof f.WrappedAdvancedFn||"WrappedAdvancedFn"===(null===(t=null===e||void 0===e?void 0:e.constructor)||void 0===t?void 0:t.name)}(e)){var c=e.parent;if(null===e||void 0===e?void 0:e.name.startsWith("order.buy.prepare.submit")){var d=null===c||void 0===c?void 0:c.args[0];return{orderId:(0,y.getOrderIdFromFillRequest)(d),platform:null===(n=null===(t=null===c||void 0===c?void 0:c.context)||void 0===t?void 0:t.orderData)||void 0===n?void 0:n.platform,collectionId:null===(a=null===(r=null===c||void 0===c?void 0:c.context)||void 0===r?void 0:r.orderData)||void 0===a?void 0:a.nftCollection}}if(null===e||void 0===e?void 0:e.name.startsWith("order.batchBuy.prepare.submit")){var p=null===c||void 0===c?void 0:c.args[0],l=Array.isArray(p)?p.map((function(e){return(0,y.getOrderIdFromFillRequest)(e)})).join(","):null,m=null===c||void 0===c?void 0:c.context,b=Array.isArray(null===m||void 0===m?void 0:m.prepared)?null===m||void 0===m?void 0:m.prepared.reduce((function(e,t){var n,r;return(null===(n=null===t||void 0===t?void 0:t.orderData)||void 0===n?void 0:n.platform)&&!e.includes(null===(r=null===t||void 0===t?void 0:t.orderData)||void 0===r?void 0:r.platform)&&e.push(t.orderData.platform),e}),[]).join(","):null,v=Array.isArray(null===m||void 0===m?void 0:m.prepared)?null===m||void 0===m?void 0:m.prepared.reduce((function(e,t){var n,r;return(null===(n=null===t||void 0===t?void 0:t.orderData)||void 0===n?void 0:n.nftCollection)&&!e.includes(null===(r=null===t||void 0===t?void 0:t.orderData)||void 0===r?void 0:r.nftCollection)&&e.push(t.orderData.nftCollection),e}),[]).join(","):null;return{orderId:"[".concat(l,"]"),platform:"[".concat(b,"]"),collectionId:"[".concat(v,"]")}}if(null===e||void 0===e?void 0:e.name.startsWith("order.bid.prepare.submit")){var h=null===c||void 0===c?void 0:c.args[0];return h?{itemId:"itemId"in h?h.itemId:void 0,collectionId:"collectionId"in h?h.collectionId:(0,y.getCollectionFromItemId)(h.itemId)}:{}}if(null===e||void 0===e?void 0:e.name.startsWith("order.bidUpdate.prepare.submit")){var T=null===c||void 0===c?void 0:c.args[0];return{orderId:null===T||void 0===T?void 0:T.orderId}}if(null===e||void 0===e?void 0:e.name.startsWith("order.cancel")){var g=null===c||void 0===c?void 0:c.args[0];return{orderId:null===g||void 0===g?void 0:g.orderId}}if(null===e||void 0===e?void 0:e.name.startsWith("order.sell.prepare.submit")){var w=null===c||void 0===c?void 0:c.args[0];return{itemId:null===w||void 0===w?void 0:w.itemId,collectionId:w?(0,y.getCollectionFromItemId)(w.itemId):void 0}}if(null===e||void 0===e?void 0:e.name.startsWith("order.sellUpdate.prepare.submit")){var k=null===c||void 0===c?void 0:c.args[0];return{orderId:null===k||void 0===k?void 0:k.orderId,collectionId:null===(s=null===(i=null===c||void 0===c?void 0:c.context)||void 0===i?void 0:i.orderData)||void 0===s?void 0:s.nftCollection}}if(null===e||void 0===e?void 0:e.name.startsWith("order.acceptBid.prepare.submit")){var x=null===c||void 0===c?void 0:c.args[0];return{orderId:(0,y.getOrderIdFromFillRequest)(x),collectionId:null===(u=null===(o=null===c||void 0===c?void 0:c.context)||void 0===o?void 0:o.orderData)||void 0===u?void 0:u.nftCollection}}if(null===e||void 0===e?void 0:e.name.startsWith("nft.transfer.prepare.submit")){var O=null===c||void 0===c?void 0:c.args[0];if(null===O||void 0===O?void 0:O.itemId)return{collectionId:(0,y.getCollectionFromItemId)(O.itemId)}}if(null===e||void 0===e?void 0:e.name.startsWith("nft.mint.prepare.submit")){var _=null===c||void 0===c?void 0:c.args[0];if(_)return{collectionId:(0,y.getContractFromMintRequest)(_)}}if(null===e||void 0===e?void 0:e.name.startsWith("nft.burn.prepare.submit")){var E=null===c||void 0===c?void 0:c.args[0];if(E)return{collectionId:(0,y.getCollectionFromItemId)(E.itemId)}}}}catch(A){}return{}}t.LoggerDataContainer=k,t.getCallableExtraFields=x},2566:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSolanaSdk=void 0;var r=n(2567),a=n(45),i=n(524),s=n(408),o=n(748),u=n(409),c=n(2693),d=n(2694),p=n(2695),l=n(2697),y=n(2698);t.createSolanaSdk=function(e,t,n,f){var m=r.SolanaSdk.create({connection:{cluster:n,endpoint:null===f||void 0===f?void 0:f.endpoint,commitmentOrConfig:"confirmed"},debug:!1}),b=new c.SolanaNft(m,e,t,f),v=new l.SolanaBalance(m,e,t,f),h=new p.SolanaOrder(m,e,t,f),T=new d.SolanaFill(m,e,t,f),g=new y.SolanaCollection(m,e,t,f).createCollectionBasic,w=s.Middlewarer.skipMiddleware(b.preprocessMeta),k=new o.MetaUploader(a.Blockchain.SOLANA,w);return{nft:{mint:new u.MethodWithPrepare(b.mintBasic,b.mint),burn:new u.MethodWithPrepare(b.burnBasic,b.burn),transfer:new u.MethodWithPrepare(b.transferBasic,b.transfer),generateTokenId:i.nonImplementedAction,createCollection:g,preprocessMeta:w,uploadMeta:k.uploadMeta},order:{fill:{prepare:T.fill},buy:new u.MethodWithPrepare(T.buyBasic,T.fill),batchBuy:new u.MethodWithPrepare(i.notImplemented,i.nonImplementedAction),acceptBid:new u.MethodWithPrepare(T.acceptBidBasic,T.fill),sell:new u.MethodWithPrepare(h.sellBasic,h.sell),sellUpdate:new u.MethodWithPrepare(h.sellUpdateBasic,h.sellUpdate),bid:new u.MethodWithPrepare(h.bidBasic,h.bid),bidUpdate:new u.MethodWithPrepare(h.bidUpdateBasic,h.bidUpdate),cancel:h.cancelBasic},balances:{getBalance:v.getBalance,convert:i.nonImplementedAction,transfer:i.notImplemented,getBiddingBalance:v.getBiddingBalance,depositBiddingBalance:v.depositBiddingBalance,withdrawBiddingBalance:v.withdrawBiddingBalance},restriction:{canTransfer:i.nonImplementedAction,getFutureOrderFees:function(){return h.getFutureOrderFees()}}}}},2567:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19);r.__exportStar(n(1292),t),r.__exportStar(n(2692),t)},2568:function(e,t){},2570:function(e,t){},2581:function(e,t,n){"use strict";var r=n(21).default,a=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugLogger=void 0;var i=function(){function e(t){r(this,e),this.enabled=t}return a(e,[{key:"log",value:function(){var e;this.enabled&&(e=console).log.apply(e,arguments)}},{key:"error",value:function(){var e;this.enabled&&(e=console).error.apply(e,arguments)}}]),e}();t.DebugLogger=i},2582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUnixTs=t.sleep=t.toPublicKey=t.isPrivateKey=t.isPublicKey=void 0;var r=n(19).__importStar(n(32));t.isPublicKey=function(e){return e instanceof r.PublicKey},t.isPrivateKey=function(e){return e instanceof r.Keypair},t.toPublicKey=function(e){return new r.PublicKey(e)},t.sleep=function(e){return new Promise((function(t){return setTimeout(t,e)}))},t.getUnixTs=function(){return(new Date).getTime()/1e3}},2583:function(e,t,n){"use strict";var r=n(111).default,a=n(20).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaBalancesSdk=void 0;var o=n(19),u=o.__importDefault(n(53)),c=n(32),d=function(){function e(t,n){i(this,e),this.connection=t,this.logger=n}return s(e,[{key:"getBalance",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.__awaiter(this,void 0,void 0,a().mark((function r(){return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=u.default,r.next=3,this.connection.getBalance(e,null!==(t=n.commitment)&&void 0!==t?t:"confirmed");case 3:return r.t1=r.sent,r.abrupt("return",new r.t0(r.t1).dividedBy(c.LAMPORTS_PER_SOL));case 5:case"end":return r.stop()}}),r,this)})))}},{key:"getTokenBalance",value:function(e,t){var n,i,s,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o.__awaiter(this,void 0,void 0,a().mark((function o(){var d,p,l,y,f,m;return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.connection.getTokenAccountsByOwner(e,{mint:t});case 2:d=a.sent,p=new u.default(0),l=r(d.value),a.prev=5,l.s();case 7:if((y=l.n()).done){a.next=15;break}return f=y.value,a.next=11,this.connection.getTokenAccountBalance(f.pubkey,null!==(n=c.commitment)&&void 0!==n?n:"confirmed");case 11:m=a.sent,p=p.plus(new u.default(null!==(s=null===(i=null===m||void 0===m?void 0:m.value)||void 0===i?void 0:i.uiAmountString)&&void 0!==s?s:0));case 13:a.next=7;break;case 15:a.next=20;break;case 17:a.prev=17,a.t0=a.catch(5),l.e(a.t0);case 20:return a.prev=20,l.f(),a.finish(20);case 23:return this.logger.log("Wallet ".concat(e," have ").concat(p," of ").concat(t.toString()," tokens")),a.abrupt("return",p);case 25:case"end":return a.stop()}}),o,this,[[5,17,20,23]])})))}}]),e}();t.SolanaBalancesSdk=d},2584:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaNftSdk=void 0;var s=n(19),o=n(625),u=n(2585),c=n(2623),d=n(2637),p=function(){function e(t,n,r){a(this,e),this.connection=t,this.logger=n,this.accountSdk=r}return i(e,[{key:"mint",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,c,d,p=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"amount"in e?(a=e.amount,n=void 0):(n=e.masterEditionSupply,a=1),t.next=3,(0,u.getMintNftInstructions)(this.connection,e.signer,{metadataLink:e.metadataUrl,collection:e.collection,masterEditionSupply:n,amount:a,verifyCreators:!0});case 3:return i=t.sent,c=i.mint,d=s.__rest(i,["mint"]),t.abrupt("return",{tx:new o.PreparedTransaction(this.connection,d,e.signer,this.logger,(function(e){p.logger.log("NFT created ".concat(e.txId)),p.logger.log("NFT: Mint Address is ".concat(c.toString()))})),mint:c});case 7:case"end":return t.stop()}}),t,this)})))}},{key:"transfer",value:function(e){var t;return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,s=this;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(null===(t=e.tokenAccount)||void 0===t){n.next=4;break}n.t0=t,n.next=7;break;case 4:return n.next=6,this.accountSdk.getTokenAccountForMint({owner:e.signer.publicKey,mint:e.mint});case 6:n.t0=n.sent;case 7:if(a=n.t0){n.next=10;break}throw new Error("Token account not specified");case 10:return n.next=12,(0,c.getTokenTransferInstructions)({connection:this.connection,signer:e.signer,tokenAccount:a,to:e.to,mint:e.mint,amount:e.amount});case 12:return i=n.sent,n.abrupt("return",new o.PreparedTransaction(this.connection,i,e.signer,this.logger,(function(){s.logger.log("".concat(e.amount.toString()," token(s) ").concat(e.mint.toString()," transferred to ").concat(e.to.toString()))})));case 14:case"end":return n.stop()}}),n,this)})))}},{key:"burn",value:function(e){var t,n;return s.__awaiter(this,void 0,void 0,r().mark((function a(){var i,s,u=this;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(null===(t=e.tokenAccount)||void 0===t){r.next=4;break}r.t0=t,r.next=7;break;case 4:return r.next=6,this.accountSdk.getTokenAccountForMint({owner:null!==(n=e.owner)&&void 0!==n?n:e.signer.publicKey,mint:e.mint});case 6:r.t0=r.sent;case 7:if(i=r.t0){r.next=10;break}throw new Error("Token account not specified");case 10:return r.next=12,(0,d.getTokenBurnInstructions)({connection:this.connection,signer:e.signer,tokenAccount:i,mint:e.mint,amount:e.amount,owner:e.owner,close:e.closeAssociatedAccount});case 12:return s=r.sent,r.abrupt("return",new o.PreparedTransaction(this.connection,s,e.signer,this.logger,(function(){u.logger.log("".concat(e.amount.toString()," token(s) ").concat(e.mint.toString()," burned"))})));case 14:case"end":return r.stop()}}),a,this)})))}}]),e}();t.SolanaNftSdk=p},2585:function(e,t,n){"use strict";var r=n(78).default,a=n(204).default,i=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getMintNftInstructions=t.createMetadata=void 0;var s=n(19),o=n(32),u=n(138),c=n(956),d=n(1298),p=s.__importDefault(n(483)),l=n(754),y=n(406),f=n(307);function m(e){return s.__awaiter(this,void 0,void 0,i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,p.default)(e,{method:"GET"});case 3:n=t.sent,t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(0),new y.NetworkError({url:e,data:t.t0.message,code:"SOLANA_EXTERNAL_ERR"});case 9:return t.next=11,(0,y.handleFetchErrorResponse)(n,{code:"SOLANA_EXTERNAL_ERR"});case 11:return t.abrupt("return",n.json());case 12:case"end":return t.stop()}}),t,null,[[0,6]])})))}function b(e){if(!e.name||!e.image||isNaN(e.seller_fee_basis_points)||!e.properties||!Array.isArray(e.properties.creators))throw new Error("Invalid metadata file");var t=e.properties.creators;if(t.some((function(e){return!e.address}))||100!==t.reduce((function(e,t){return t.share+e}),0))throw new Error("Invalid creators")}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return s.__awaiter(this,void 0,void 0,i().mark((function a(){var s,o,u;return i().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,m(e);case 2:return b(s=a.sent),o=s.properties.creators,u=o.map((function(e){var t;return new d.Creator({address:e.address,share:e.share,verified:null!==(t=null===n||void 0===n?void 0:n[e.address])&&void 0!==t&&t})})),a.abrupt("return",new d.DataV2({symbol:s.symbol,name:s.name,uri:e,sellerFeeBasisPoints:s.seller_fee_basis_points,creators:u,collection:t?new d.Collection({key:t.toBase58(),verified:!1}):null,uses:r}));case 7:case"end":return a.stop()}}),a)})))}t.createMetadata=v,t.getMintNftInstructions=function(e,t,n){return s.__awaiter(this,void 0,void 0,i().mark((function s(){var p,y,m,b,h,T,g,w;return i().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,v(n.metadataLink,n.collection,n.verifyCreators?a({},t.publicKey.toString(),!0):void 0,n.use);case 2:if(p=i.sent){i.next=5;break}throw new Error("Empty metadata");case 5:return i.next=7,e.getMinimumBalanceForRentExemption(u.MintLayout.span);case 7:return y=i.sent,m=l.SolanaKeypairWallet.generate(),h=[m,t],(b=[]).push(o.SystemProgram.createAccount({fromPubkey:t.publicKey,newAccountPubkey:m.publicKey,lamports:y,space:u.MintLayout.span,programId:u.TOKEN_PROGRAM_ID})),b.push(u.Token.createInitMintInstruction(u.TOKEN_PROGRAM_ID,m.publicKey,0,t.publicKey,t.publicKey)),i.next=15,(0,f.getTokenWallet)(t.publicKey,m.publicKey);case 15:return T=i.sent,b.push((0,f.createAssociatedTokenAccountInstruction)(T,t.publicKey,t.publicKey,m.publicKey)),i.next=19,(0,f.getMetadata)(m.publicKey);case 19:if(g=i.sent,b.push.apply(b,r(new d.CreateMetadataV2({feePayer:t.publicKey},{metadata:g,metadataData:p,updateAuthority:t.publicKey,mint:m.publicKey,mintAuthority:t.publicKey}).instructions)),b.push(u.Token.createMintToInstruction(u.TOKEN_PROGRAM_ID,m.publicKey,T,t.publicKey,[],n.amount)),void 0===n.masterEditionSupply){i.next=29;break}if(1===n.amount){i.next=25;break}throw new Error("For create master edition token amount of tokens should be equal 1");case 25:return i.next=27,(0,f.getMasterEdition)(m.publicKey);case 27:w=i.sent,b.push.apply(b,r(new d.CreateMasterEditionV3({feePayer:t.publicKey},{edition:w,metadata:g,mint:m.publicKey,mintAuthority:t.publicKey,updateAuthority:t.publicKey,maxSupply:new c.BN(n.masterEditionSupply)}).instructions));case 29:return i.abrupt("return",{instructions:b,signers:h,mint:m.publicKey});case 30:case"end":return i.stop()}}),s)})))}},2586:function(e,t){},2587:function(e,t){},2589:function(e,t){},2619:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2620:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaKeypairWallet=void 0;var s=n(19),o=s.__importStar(n(32)),u=s.__importStar(n(150)),c=s.__importDefault(n(2621)),d=n(752),p=function(){function e(t){a(this,e),this._keyPair=t}return i(e,[{key:"keyPair",get:function(){return this._keyPair}},{key:"publicKey",get:function(){return this.keyPair.publicKey}},{key:"signTransaction",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.partialSign(this.keyPair),t.abrupt("return",e);case 2:case"end":return t.stop()}}),t,this)})))}},{key:"signAllTransactions",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.map((function(e){return e.partialSign(n.keyPair),e})));case 1:case"end":return t.stop()}}),t)})))}},{key:"signMessage",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="string"===typeof e?(new TextEncoder).encode(e):e,t.abrupt("return",u.sign(n,this._keyPair.secretKey).slice(0,u.sign.signatureLength));case 2:case"end":return t.stop()}}),t,this)})))}}],[{key:"createFrom",value:function(t){if((0,d.isPrivateKey)(t))return new e(t);if(ArrayBuffer.isView(t))return new e(o.Keypair.fromSecretKey(t));if("string"===typeof t)return new e(o.Keypair.fromSecretKey(Uint8Array.from(c.default.decode(t))));throw new Error("Unknown type of secret key")}},{key:"generate",value:function(t){return e.createFrom(t?o.Keypair.fromSeed(t):o.Keypair.generate())}}]),e}();t.SolanaKeypairWallet=p},2623:function(e,t,n){"use strict";(function(e){var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.createTransferTokenInstruction=t.getTokenTransferInstructions=void 0;var a=n(19),i=n(32),s=n(257),o=n(138),u=n(2624),c=n(307),d=n(367);function p(t,n,r,a){var u=e.from((0,s.serialize)(new Map([[Object,{kind:"struct",fields:[["instruction","u8"],["amount","u64"]]}]]),{instruction:3,amount:(0,d.bnToBuffer)(a,"le",8)})),c=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0}];return c.push({pubkey:r,isSigner:!0,isWritable:!1}),new i.TransactionInstruction({programId:o.TOKEN_PROGRAM_ID,keys:c,data:u})}t.getTokenTransferInstructions=function(e){return a.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[],a=[e.signer],t.next=4,o.Token.getAssociatedTokenAddress(o.ASSOCIATED_TOKEN_PROGRAM_ID,o.TOKEN_PROGRAM_ID,e.mint,e.to);case 4:return i=t.sent,t.prev=5,t.next=8,u.Account.load(e.connection,i);case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(5),n.push((0,c.createAssociatedTokenAccountInstruction)(i,e.signer.publicKey,e.to,e.mint));case 13:return n.push(p(e.tokenAccount,i,e.signer.publicKey,(0,d.alignBn)((0,d.bigNumToBn)(e.amount),8))),t.abrupt("return",{instructions:n,signers:a});case 15:case"end":return t.stop()}}),t,null,[[5,10]])})))},t.createTransferTokenInstruction=p}).call(this,n(15).Buffer)},2636:function(e,t){},2637:function(e,t,n){"use strict";(function(e){var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.createBurnTokenInstruction=t.getTokenBurnInstructions=void 0;var a=n(19),i=n(257),s=n(32),o=n(138),u=n(367);function c(t,n,r,a){var c=e.from((0,i.serialize)(new Map([[Object,{kind:"struct",fields:[["instruction","u8"],["amount","u64"]]}]]),{instruction:8,amount:(0,u.bnToBuffer)(a,"le",8)})),d=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0}];return d.push({pubkey:r,isSigner:!0,isWritable:!1}),new s.TransactionInstruction({programId:o.TOKEN_PROGRAM_ID,keys:d,data:c})}t.getTokenBurnInstructions=function(e){var t,n;return a.__awaiter(this,void 0,void 0,r().mark((function a(){var i,s;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=[],s=[e.signer],i.push(c(e.mint,e.tokenAccount,null!==(t=e.owner)&&void 0!==t?t:e.signer.publicKey,(0,u.alignBn)((0,u.bigNumToBn)(e.amount),8))),e.close&&i.push(o.Token.createCloseAccountInstruction(o.TOKEN_PROGRAM_ID,e.tokenAccount,e.signer.publicKey,null!==(n=e.owner)&&void 0!==n?n:e.signer.publicKey,[])),r.abrupt("return",{instructions:i,signers:s});case 5:case"end":return r.stop()}}),a)})))},t.createBurnTokenInstruction=c}).call(this,n(15).Buffer)},2638:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaOrderSdk=void 0;var s=n(19),o=n(625),u=n(2639),c=n(2678),d=n(2679),p=n(2683),l=function(){function e(t,n){a(this,e),this.connection=t,this.logger=n}return i(e,[{key:"sell",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,u.getAuctionHouseSellInstructions)({connection:this.connection,auctionHouse:e.auctionHouse,price:e.price,mint:e.mint,signer:e.signer,tokensAmount:e.tokensAmount});case 2:return n=t.sent,t.abrupt("return",new o.PreparedTransaction(this.connection,n,e.signer,this.logger,(function(){a.logger.log("Set",e.tokensAmount,e.mint.toString(),"for sale for",e.price,"from your account with Auction House",e.auctionHouse.toString())})));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"buy",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,c.getActionHouseBuyInstructions)({connection:this.connection,auctionHouse:e.auctionHouse,price:e.price,mint:e.mint,signer:e.signer,tokensAmount:e.tokensAmount,tokenAccount:e.tokenAccount});case 2:return n=t.sent,t.abrupt("return",new o.PreparedTransaction(this.connection,n,e.signer,this.logger,(function(){a.logger.log("Made offer for ",e.mint.toString(),"for",e.price)})));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"cancel",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,p.getAuctionHouseCancelInstructions)({connection:this.connection,auctionHouse:e.auctionHouse,price:e.price,mint:e.mint,signer:e.signer,tokensAmount:e.tokensAmount});case 2:return n=t.sent,t.abrupt("return",new o.PreparedTransaction(this.connection,n,e.signer,this.logger,(function(){a.logger.log("Cancelled order of",e.tokensAmount,e.mint.toString(),"for",e.price)})));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"acceptBid",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.sell(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"bid",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.buy(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"executeSell",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,d.getAuctionHouseExecuteSellInstructions)({connection:this.connection,auctionHouse:e.auctionHouse,signer:e.signer,buyerWallet:e.buyerWallet,sellerWallet:e.sellerWallet,mint:e.mint,tokenAccount:e.tokenAccount,price:e.price,tokensAmount:e.tokensAmount});case 2:return n=t.sent,t.abrupt("return",new o.PreparedTransaction(this.connection,n,e.signer,this.logger,(function(){a.logger.log("Accepted",e.tokensAmount,e.mint.toString(),"sale from wallet",e.sellerWallet.toString(),"to",e.buyerWallet.toString(),"for",e.price,"from your account with Auction House",e.auctionHouse.toString())})));case 4:case"end":return t.stop()}}),t,this)})))}}]),e}();t.SolanaOrderSdk=l},2639:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAuctionHouseSellInstructions=void 0;var i=n(19),s=i.__importDefault(n(53)),o=n(959),u=n(307),c=n(461),d=n(367);t.getAuctionHouseSellInstructions=function(e){return i.__awaiter(this,void 0,void 0,r().mark((function t(){var n,i,p,l,y,f,m,b,v,h,T,g,w,k,x,O,_,E,A;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,c.loadAuctionHouseProgram)(e.connection,e.signer);case 2:return n=t.sent,t.next=5,n.account.auctionHouse.fetch(e.auctionHouse);case 5:return i=t.sent,t.next=8,(0,u.getPriceWithMantissa)(e.connection,new s.default(e.price),i.treasuryMint,e.signer);case 8:return p=t.sent,t.next=11,(0,u.getPriceWithMantissa)(e.connection,new s.default(e.tokensAmount),e.mint,e.signer);case 11:return l=t.sent,t.next=14,(0,u.getAssociatedTokenAccountForMint)(e.mint,e.signer.publicKey);case 14:return y=t.sent[0],t.next=17,(0,c.getAuctionHouseProgramAsSigner)();case 17:return f=t.sent,m=a(f,2),b=m[0],v=m[1],t.next=23,(0,c.getAuctionHouseTradeState)(e.auctionHouse,e.signer.publicKey,y,i.treasuryMint,e.mint,l,p);case 23:return h=t.sent,T=a(h,2),g=T[0],w=T[1],t.next=29,(0,c.getAuctionHouseTradeState)(e.auctionHouse,e.signer.publicKey,y,i.treasuryMint,e.mint,l,new s.default(0));case 29:return k=t.sent,x=a(k,2),O=x[0],_=x[1],E=[],t.t0=o.AuctionHouseProgram.instructions,t.t1=e.signer.publicKey,t.t2=y,t.next=39,(0,u.getMetadata)(e.mint);case 39:return t.t3=t.sent,t.t4=i.authority,t.t5=e.auctionHouse,t.t6=i.auctionHouseFeeAccount,t.t7=g,t.t8=O,t.t9=b,t.t10={wallet:t.t1,tokenAccount:t.t2,metadata:t.t3,authority:t.t4,auctionHouse:t.t5,auctionHouseFeeAccount:t.t6,sellerTradeState:t.t7,freeSellerTradeState:t.t8,programAsSigner:t.t9},t.t11={tradeStateBump:w,freeTradeStateBump:_,programAsSignerBump:v,buyerPrice:(0,d.bigNumToBn)(p),tokenSize:(0,d.bigNumToBn)(l)},(A=t.t0.createSellInstruction.call(t.t0,t.t10,t.t11)).keys.filter((function(t){return t.pubkey.equals(e.signer.publicKey)})).map((function(e){return e.isSigner=!0})),t.abrupt("return",{instructions:[A],signers:E});case 51:case"end":return t.stop()}}),t)})))}},2650:function(e,t){},2654:function(e,t){},267:function(e,t,n){"use strict";var r=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.XTZ=t.getDataFromCurrencyId=t.convertCurrencyIdToAssetType=t.isAssetType=t.isRequestCurrencyAssetType=t.getCurrencyAssetType=void 0;var a=n(64),i=n(45),s=n(253);function o(e){return"string"===typeof e&&!!(0,a.toCurrencyId)(e)}function u(e){return"object"===typeof e&&"@type"in e}function c(e){var n=d(e),r=n.blockchain,o=n.contract,u=n.tokenId;if((0,s.isEVMBlockchain)(r)||r===i.Blockchain.IMMUTABLEX)return o===a.ZERO_ADDRESS?{"@type":"ETH",blockchain:r}:{"@type":"ERC20",contract:(0,a.toContractAddress)("".concat(r,":").concat(o))};if(r===i.Blockchain.FLOW)return{"@type":"FLOW_FT",contract:(0,a.toContractAddress)(e)};if(r===i.Blockchain.TEZOS)return e===t.XTZ?{"@type":"XTZ"}:{"@type":"TEZOS_FT",contract:(0,a.toContractAddress)("TEZOS:".concat(o)),tokenId:u?(0,a.toBigNumber)(u):void 0};if(r===i.Blockchain.SOLANA)return o===a.ZERO_ADDRESS?{"@type":"SOLANA_SOL"}:{"@type":"SOLANA_NFT",itemId:(0,a.toItemId)("SOLANA:"+o)};throw new Error("Unsupported currency type: ".concat(e))}function d(e){var t=e.split(":"),n=r(t,3),a=n[0],s=n[1],o=n[2];if(!(a in i.Blockchain))throw new Error("Unsupported blockchain: ".concat(e));return{blockchain:a,contract:s,tokenId:o}}t.getCurrencyAssetType=function(e){if(o(e))return c(e);if(u(e))return e;throw new Error("Unrecognized RequestCurrency ".concat(JSON.stringify(e)))},t.isRequestCurrencyAssetType=o,t.isAssetType=u,t.convertCurrencyIdToAssetType=c,t.getDataFromCurrencyId=d,t.XTZ="TEZOS:tz1Ke2h7sDdakHJQh8WX4Z372du1KChsksyU"},2678:function(e,t,n){"use strict";var r=n(20).default,a=n(78).default,i=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getActionHouseBuyInstructions=void 0;var s=n(19),o=s.__importDefault(n(53)),u=n(754),c=n(138),d=n(959),p=n(532),l=n(307),y=n(461),f=n(367);t.getActionHouseBuyInstructions=function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,s,m,b,v,h,T,g,w,k,x,O,_,E,A,C,I,S,R,j,P;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.signer,t.next=3,(0,y.loadAuctionHouseProgram)(e.connection,e.signer);case 3:return s=t.sent,t.next=6,s.account.auctionHouse.fetch(e.auctionHouse);case 6:return m=t.sent,t.next=9,(0,l.getPriceWithMantissa)(e.connection,new o.default(e.price),m.treasuryMint,n);case 9:return b=t.sent,t.next=12,(0,l.getPriceWithMantissa)(e.connection,new o.default(e.tokensAmount),e.mint,n);case 12:return v=t.sent,t.next=15,(0,y.getAuctionHouseBuyerEscrow)(e.auctionHouse,n.publicKey);case 15:if(h=t.sent,T=i(h,2),g=T[0],w=T[1],!e.tokenAccount){t.next=23;break}k=e.tokenAccount,t.next=27;break;case 23:return t.next=25,s.provider.connection.getTokenLargestAccounts(e.mint);case 25:x=t.sent,k=x.value[0].address;case 27:return t.next=29,(0,y.getAuctionHouseTradeState)(e.auctionHouse,n.publicKey,k,m.treasuryMint,e.mint,v,b);case 29:return O=t.sent,_=i(O,2),E=_[0],A=_[1],C=m.treasuryMint.equals(p.WRAPPED_SOL_MINT),t.next=36,(0,l.getAssociatedTokenAccountForMint)(m.treasuryMint,n.publicKey);case 36:return I=t.sent[0],S=u.SolanaKeypairWallet.generate(),R=C?[]:[S],t.t0=d.AuctionHouseProgram.instructions,t.t1=e.signer.publicKey,t.t2=C?n.publicKey:I,t.t3=C?n.publicKey:S.publicKey,t.t4=m.treasuryMint,t.t5=k,t.next=47,(0,l.getMetadata)(e.mint);case 47:return t.t6=t.sent,t.t7=g,t.t8=m.authority,t.t9=e.auctionHouse,t.t10=m.auctionHouseFeeAccount,t.t11=E,t.t12={wallet:t.t1,paymentAccount:t.t2,transferAuthority:t.t3,treasuryMint:t.t4,tokenAccount:t.t5,metadata:t.t6,escrowPaymentAccount:t.t7,authority:t.t8,auctionHouse:t.t9,auctionHouseFeeAccount:t.t10,buyerTradeState:t.t11},t.t13={tradeStateBump:A,escrowPaymentBump:w,buyerPrice:(0,f.bigNumToBn)(b),tokenSize:(0,f.bigNumToBn)(v)},j=t.t0.createBuyInstruction.call(t.t0,t.t12,t.t13),C||j.keys.filter((function(e){return e.pubkey.equals(S.publicKey)})).map((function(e){return e.isSigner=!0})),P=[].concat(a(C?[]:[c.Token.createApproveInstruction(c.TOKEN_PROGRAM_ID,I,S.publicKey,n.publicKey,[],b.toNumber())]),[j],a(C?[]:[c.Token.createRevokeInstruction(c.TOKEN_PROGRAM_ID,I,n.publicKey,[])])),t.abrupt("return",{instructions:P,signers:R});case 59:case"end":return t.stop()}}),t)})))}},2679:function(e,t,n){"use strict";(function(e){var r=n(20).default,a=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAuctionHouseExecuteSellInstructions=void 0;var i=n(19),s=i.__importDefault(n(53)),o=i.__importStar(n(32)),u=n(138),c=n(2680),d=n(532),p=n(307),l=n(461),y=n(367);t.getAuctionHouseExecuteSellInstructions=function(t){return i.__awaiter(this,void 0,void 0,r().mark((function n(){var i,f,m,b,v,h,T,g,w,k,x,O,_,E,A,C,I,S,R,j,P,B,M,F,N,D,L,U;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,l.loadAuctionHouseProgram)(t.connection,t.signer);case 2:return i=n.sent,n.next=5,i.account.auctionHouse.fetch(t.auctionHouse);case 5:return f=n.sent,m=f.treasuryMint.equals(d.WRAPPED_SOL_MINT),n.next=9,(0,p.getPriceWithMantissa)(t.connection,new s.default(t.price),f.treasuryMint,t.signer);case 9:return b=n.sent,n.next=12,(0,p.getPriceWithMantissa)(t.connection,new s.default(t.tokensAmount),t.mint,t.signer);case 12:return v=n.sent,n.next=15,(0,p.getAssociatedTokenAccountForMint)(t.mint,t.sellerWallet);case 15:return h=n.sent[0],n.next=18,(0,l.getAuctionHouseTradeState)(t.auctionHouse,t.buyerWallet,h,f.treasuryMint,t.mint,v,b);case 18:return T=n.sent[0],n.next=21,(0,l.getAuctionHouseTradeState)(t.auctionHouse,t.sellerWallet,h,f.treasuryMint,t.mint,v,b);case 21:return g=n.sent[0],n.next=24,(0,l.getAuctionHouseTradeState)(t.auctionHouse,t.sellerWallet,h,f.treasuryMint,t.mint,v,new s.default(0));case 24:return w=n.sent,k=a(w,2),x=k[0],O=k[1],n.next=30,(0,l.getAuctionHouseBuyerEscrow)(t.auctionHouse,t.buyerWallet);case 30:return _=n.sent,E=a(_,2),A=E[0],C=E[1],n.next=36,(0,l.getAuctionHouseProgramAsSigner)();case 36:return I=n.sent,S=a(I,2),R=S[0],j=S[1],n.next=42,(0,p.getMetadata)(t.mint);case 42:return P=n.sent,n.next=45,i.provider.connection.getAccountInfo(P);case 45:if(B=n.sent){n.next=48;break}throw new Error("Account info doesn't fetched");case 48:if(M=(0,c.decodeMetadata)(e.from(B.data)),F=[],!M.data.creators){n.next=64;break}N=0;case 52:if(!(N0&&void 0!==arguments[0]?arguments[0]:0;return s.SolanaKeypairWallet.createFrom(t.testWallets[e].privateKeyString)},t.genTestWallet=function(e){return s.SolanaKeypairWallet.generate(e)},t.requestSol=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;return a.__awaiter(this,void 0,void 0,r().mark((function a(){var s;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.requestAirdrop(t,n*i.LAMPORTS_PER_SOL);case 2:return s=r.sent,r.next=5,e.confirmTransaction(s);case 5:return r.next=7,e.getBalance(t);case 7:return r.abrupt("return",r.sent);case 8:case"end":return r.stop()}}),a)})))},t.getTokenAccounts=function(e,t,n){return a.__awaiter(this,void 0,void 0,r().mark((function a(){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.getTokenAccountsByOwner(t,{mint:n});case 2:return r.abrupt("return",r.sent);case 3:case"end":return r.stop()}}),a)})))},t.mintToken=function(e){var t=e.sdk,n=e.wallet,i=e.tokensAmount,s=void 0===i?1:i;return a.__awaiter(this,void 0,void 0,r().mark((function e(){var a,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.nft.mint({signer:n,metadataUrl:"https://arweave.net/Vt0uj2ql0ck-U5dLWDWJnwQaZPrvqkfxils8agrTiOc",amount:s,masterEditionSupply:1!==s?0:void 0,collection:null});case 2:return a=e.sent,e.next=5,a.tx.submit("max");case 5:return i=e.sent,expect(i.txId).toBeTruthy(),expect(a.mint).toBeTruthy(),e.next=10,t.connection.confirmTransaction(i.txId,"finalized");case 10:return e.t0=expect,e.next=13,t.balances.getTokenBalance(n.publicKey,a.mint);case 13:return e.t1=e.sent.toString(),(0,e.t0)(e.t1).toEqual(s.toString()),e.abrupt("return",{mintTx:i,mint:a.mint});case 16:case"end":return e.stop()}}),e)})))},t.retry=function e(t,n,r){return r().catch((function(a){if(0===t)throw a;return u(n).then((function(){return e(t-1,n,r)}))}))},t.delay=u},2691:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAccountRevokeDelegateInstructions=void 0;var a=n(19),i=n(138);t.getAccountRevokeDelegateInstructions=function(e){return a.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[],a=[e.signer],n.push(i.Token.createRevokeInstruction(i.TOKEN_PROGRAM_ID,e.tokenAccount,e.signer.publicKey,[])),t.abrupt("return",{instructions:n,signers:a});case 4:case"end":return t.stop()}}),t)})))}},2692:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2693:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaNft=void 0;var s=n(19),o=n(115),u=n(64),c=n(45),d=n(146),p=n(614),l=n(533),y=function(){function e(t,n,r,i){a(this,e),this.sdk=t,this.wallet=n,this.apis=r,this.config=i,this.mint=this.mint.bind(this),this.burn=this.burn.bind(this),this.burnBasic=this.burnBasic.bind(this),this.transfer=this.transfer.bind(this),this.preprocessMeta=this.preprocessMeta.bind(this),this.mintBasic=this.mintBasic.bind(this),this.transferBasic=this.transferBasic.bind(this)}return i(e,[{key:"getCollectionId",value:function(e){return"collection"in e?(0,l.extractPublicKey)(e.collection.id):(0,l.extractPublicKey)(e.collectionId)}},{key:"mint",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.wallet){t.next=2;break}throw new Error("Solana wallet not provided");case 2:return t.abrupt("return",{multiple:!1,supportsRoyalties:!1,supportsLazyMint:!1,submit:o.Action.create({id:"mint",run:function(t){return s.__awaiter(n,void 0,void 0,r().mark((function n(){var a,i,s,o;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=this.getCollectionId(e),i=[],n.next=4,this.sdk.nft.mint({signer:this.wallet.provider,metadataUrl:t.uri,masterEditionSupply:0,collection:a});case 4:if(s=n.sent,i.push(s.tx),!a){n.next=12;break}return n.t0=i,n.next=10,this.sdk.collection.verifyCollection({signer:this.wallet.provider,collection:a,mint:s.mint});case 10:n.t1=n.sent,n.t0.push.call(n.t0,n.t1);case 12:return n.next=14,this.sdk.unionInstructionsAndSend(this.wallet.provider,i,"processed");case 14:return o=n.sent,n.abrupt("return",{type:p.MintType.ON_CHAIN,transaction:new d.BlockchainSolanaTransaction(o,this.sdk),itemId:(0,u.toItemId)("SOLANA:".concat(s.mint.toString()))});case 16:case"end":return n.stop()}}),n,this)})))}})});case 3:case"end":return t.stop()}}),t,this)})))}},{key:"mintBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.mint(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"burn",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.wallet){t.next=2;break}throw new Error("Solana wallet not provided");case 2:return t.next=4,this.apis.item.getItemById({itemId:e.itemId});case 4:return n=t.sent,t.abrupt("return",{multiple:parseFloat(n.supply)>1,maxAmount:(0,u.toBigNumber)(n.supply),submit:o.Action.create({id:"burn",run:function(e){return s.__awaiter(a,void 0,void 0,r().mark((function t(){var a,i,s,o,u;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=null!==(a=null===e||void 0===e?void 0:e.amount)&&void 0!==a?a:1,s=(0,l.extractPublicKey)(n.id),t.next=4,this.sdk.nft.burn({mint:s,signer:this.wallet.provider,amount:i,closeAssociatedAccount:!1});case 4:return o=t.sent,t.next=7,o.submit("processed");case 7:return u=t.sent,t.abrupt("return",new d.BlockchainSolanaTransaction(u,this.sdk));case 9:case"end":return t.stop()}}),t,this)})))}})});case 6:case"end":return t.stop()}}),t,this)})))}},{key:"burnBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.burn(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"transfer",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.wallet){t.next=2;break}throw new Error("Solana wallet not provided");case 2:return t.next=4,this.apis.item.getItemById({itemId:e.itemId});case 4:return n=t.sent,t.abrupt("return",{multiple:parseFloat(n.supply)>1,maxAmount:(0,u.toBigNumber)(n.supply),submit:o.Action.create({id:"transfer",run:function(e){return s.__awaiter(a,void 0,void 0,r().mark((function t(){var a,i,s,o,u;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=null!==(a=null===e||void 0===e?void 0:e.amount)&&void 0!==a?a:1,s=(0,l.extractPublicKey)(n.id),t.next=4,this.sdk.nft.transfer({mint:s,signer:this.wallet.provider,amount:i,to:(0,l.extractPublicKey)(e.to)});case 4:return o=t.sent,t.next=7,o.submit("processed");case 7:return u=t.sent,t.abrupt("return",new d.BlockchainSolanaTransaction(u,this.sdk));case 9:case"end":return t.stop()}}),t,this)})))}})});case 6:case"end":return t.stop()}}),t,this)})))}},{key:"transferBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.transfer(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"preprocessMeta",value:function(e){var t,n,r,a,i;if(!this.wallet)throw new Error("Solana wallet not provided");if(e.blockchain!==c.Blockchain.SOLANA)throw new Error("Wrong blockchain");return{name:e.name,symbol:e.symbol,description:e.description,seller_fee_basis_points:100*(null!==(n=null===(t=e.royalties)||void 0===t?void 0:t.value)&&void 0!==n?n:0),image:null===(r=e.image)||void 0===r?void 0:r.url,animation_url:null===(a=e.animation)||void 0===a?void 0:a.url,external_url:e.external,attributes:null===(i=e.attributes)||void 0===i?void 0:i.map((function(e){return{trait_type:e.key,value:e.value}})),properties:{files:[e.image,e.animation].filter((function(e){return void 0!==e})).map((function(e){return{uri:e.url,type:e.mimeType}})),creators:[{address:this.wallet.provider.publicKey.toString(),share:100}]}}}}]),e}();t.SolanaNft=y},2694:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaFill=void 0;var s=n(19),o=n(115),u=n(45),c=n(146),d=n(216),p=n(366),l=n(306),y=n(533),f=n(961),m=n(962),b=function(){function e(t,n,r,i){a(this,e),this.sdk=t,this.wallet=n,this.apis=r,this.config=i,this.fill=this.fill.bind(this),this.buyBasic=this.buyBasic.bind(this),this.acceptBidBasic=this.acceptBidBasic.bind(this)}return i(e,[{key:"fill",value:function(t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.wallet){n.next=2;break}throw new Error("Solana wallet not provided");case 2:return n.next=4,(0,f.getPreparedOrder)(t,this.apis);case 4:if((a=n.sent).status===u.OrderStatus.ACTIVE){n.next=7;break}throw new Error("Order is not active");case 7:return n.abrupt("return",e.isBuyOrder(a)?this.buy(a):this.acceptBid(a));case 8:case"end":return n.stop()}}),n,this)})))}},{key:"buy",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,u,m,b=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,y.extractPublicKey)((0,f.getOrderData)(e).auctionHouse),a=(0,f.getMintId)(e),i=(0,f.getPrice)(e),t.next=5,this.apis.item.getItemById({itemId:(0,f.getItemId)(a)});case 5:return u=t.sent,m=o.Action.create({id:"send-tx",run:function(t){return s.__awaiter(b,void 0,void 0,r().mark((function s(){var o,u,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return(0,p.checkPayouts)(t.payouts),o=[],r.t0=o,r.next=5,this.sdk.order.buy({auctionHouse:n,signer:this.wallet.provider,mint:a,price:i,tokensAmount:t.amount});case 5:return r.t1=r.sent,r.t0.push.call(r.t0,r.t1),r.next=9,this.sdk.account.getTokenAccountForMint({mint:a,owner:this.wallet.provider.publicKey});case 9:if(!(u=r.sent)){r.next=20;break}return r.next=13,this.sdk.account.getAccountInfo({tokenAccount:u,mint:a});case 13:if(!(c=r.sent).delegate||"0"!==c.amount.toString()){r.next=20;break}return r.t2=o,r.next=18,this.sdk.account.revokeDelegate({signer:this.wallet.provider,tokenAccount:u});case 18:r.t3=r.sent,r.t2.push.call(r.t2,r.t3);case 20:return r.t4=o,r.next=23,this.sdk.order.executeSell({auctionHouse:n,signer:this.wallet.provider,buyerWallet:this.wallet.provider.publicKey,sellerWallet:(0,y.extractPublicKey)(e.maker),mint:a,price:i,tokensAmount:t.amount});case 23:return r.t5=r.sent,r.t4.push.call(r.t4,r.t5),r.abrupt("return",this.sdk.unionInstructionsAndSend(this.wallet.provider,o,"processed"));case 26:case"end":return r.stop()}}),s,this)})))}}).after((function(e){return new c.BlockchainSolanaTransaction(e,b.sdk)})),t.abrupt("return",{multiple:parseFloat(u.supply.toString())>1,maxAmount:e.makeStock,baseFee:0,supportsPartialFill:!1,originFeeSupport:d.OriginFeeSupport.NONE,payoutsSupport:d.PayoutsSupport.NONE,maxFeesBasePointSupport:d.MaxFeesBasePointSupport.IGNORED,submit:m,orderData:{platform:e.platform,nftCollection:(0,l.getNftContractAddress)(e.make.type)}});case 8:case"end":return t.stop()}}),t,this)})))}},{key:"acceptBid",value:function(e){var t;return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,u,b,v,h=this;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=(0,y.extractPublicKey)((0,f.getOrderData)(e).auctionHouse),i=(0,f.getMintId)(e),u=(0,f.getPrice)(e),n.next=5,this.apis.item.getItemById({itemId:(0,f.getItemId)(i)});case 5:return b=n.sent,v=o.Action.create({id:"send-tx",run:function(t){return s.__awaiter(h,void 0,void 0,r().mark((function n(){var s,o;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return(0,p.checkPayouts)(t.payouts),n.next=3,this.sdk.order.sell({auctionHouse:a,signer:this.wallet.provider,mint:i,price:u,tokensAmount:t.amount});case 3:return s=n.sent,n.next=6,this.sdk.order.executeSell({auctionHouse:a,signer:this.wallet.provider,buyerWallet:(0,y.extractPublicKey)(e.maker),sellerWallet:this.wallet.provider.publicKey,mint:i,price:u,tokensAmount:t.amount});case 6:return o=n.sent,n.abrupt("return",this.sdk.unionInstructionsAndSend(this.wallet.provider,[s,o],"processed"));case 8:case"end":return n.stop()}}),n,this)})))}}).after((function(e){return new c.BlockchainSolanaTransaction(e,h.sdk)})),n.t0=parseFloat(b.supply.toString())>1,n.t1=e.makeStock,n.next=11,(0,m.getAuctionHouseFee)(a,null===(t=this.config)||void 0===t?void 0:t.auctionHouseMapping);case 11:return n.t2=n.sent,n.t3=d.OriginFeeSupport.NONE,n.t4=d.PayoutsSupport.NONE,n.t5=d.MaxFeesBasePointSupport.IGNORED,n.t6=v,n.t7={platform:e.platform,nftCollection:(0,l.getNftContractAddress)(e.take.type)},n.abrupt("return",{multiple:n.t0,maxAmount:n.t1,baseFee:n.t2,supportsPartialFill:!1,originFeeSupport:n.t3,payoutsSupport:n.t4,maxFeesBasePointSupport:n.t5,submit:n.t6,orderData:n.t7});case 18:case"end":return n.stop()}}),n,this)})))}},{key:"buyBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.fill(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"acceptBidBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.fill(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}}],[{key:"isBuyOrder",value:function(e){return"SOLANA_NFT"===e.make.type["@type"]}}]),e}();t.SolanaFill=b},2695:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaOrder=void 0;var s=n(19),o=s.__importDefault(n(53)),u=n(115),c=n(64),d=n(146),p=n(216),l=n(366),y=n(306),f=n(962),m=n(533),b=n(961),v=n(2696),h=function(){function e(t,n,i,o){var c=this;a(this,e),this.sdk=t,this.wallet=n,this.apis=i,this.config=o,this.cancel=u.Action.create({id:"send-tx",run:function(e){return s.__awaiter(c,void 0,void 0,r().mark((function t(){var n,a,i,s;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,b.getPreparedOrder)(e,this.apis);case 2:return n=t.sent,a=(0,b.getOrderData)(n),i=(0,b.getTokensAmount)(n),t.next=7,this.sdk.order.cancel({auctionHouse:(0,m.extractPublicKey)(a.auctionHouse),signer:this.wallet.provider,mint:(0,b.getMintId)(n),price:(0,b.getPrice)(n),tokensAmount:i});case 7:return t.next=9,t.sent.submit("processed");case 9:return s=t.sent,t.abrupt("return",new d.BlockchainSolanaTransaction(s,this.sdk));case 11:case"end":return t.stop()}}),t,this)})))}}),this.sell=this.sell.bind(this),this.bid=this.bid.bind(this),this.sellUpdate=this.sellUpdate.bind(this),this.bidUpdate=this.bidUpdate.bind(this),this.sellBasic=this.sellBasic.bind(this),this.sellUpdateBasic=this.sellUpdateBasic.bind(this),this.bidBasic=this.bidBasic.bind(this),this.cancelBasic=this.cancelBasic.bind(this)}return i(e,[{key:"sell",value:function(){var e,t;return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,o=this;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.wallet){n.next=2;break}throw new Error("Solana wallet not provided");case 2:return a=(0,f.getAuctionHouse)({"@type":"SOLANA_SOL"},null===(e=this.config)||void 0===e?void 0:e.auctionHouseMapping),i=u.Action.create({id:"send-tx",run:function(e){return s.__awaiter(o,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.sellCommon(e,a));case 1:case"end":return t.stop()}}),t,this)})))}}),n.t0=p.OriginFeeSupport.NONE,n.t1=p.PayoutsSupport.NONE,n.t2=p.MaxFeesBasePointSupport.IGNORED,n.t3=(0,v.getCurrencies)(),n.next=10,(0,f.getAuctionHouseFee)(a,null===(t=this.config)||void 0===t?void 0:t.auctionHouseMapping);case 10:return n.t4=n.sent,n.t5=i,n.abrupt("return",{originFeeSupport:n.t0,payoutsSupport:n.t1,maxFeesBasePointSupport:n.t2,supportedCurrencies:n.t3,baseFee:n.t4,supportsExpirationDate:!1,submit:n.t5});case 13:case"end":return n.stop()}}),n,this)})))}},{key:"sellCommon",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=(0,m.extractPublicKey)(e.itemId),i=void 0!==e.amount?e.amount:1,(0,l.checkPayouts)(e.payouts),n.next=5,this.sdk.order.sell({auctionHouse:t,signer:this.wallet.provider,mint:a,price:new o.default(e.price).multipliedBy(i),tokensAmount:i});case 5:return n.next=7,n.sent.submit("processed");case 7:return n.abrupt("return",(0,b.getOrderId)("SELL",this.wallet.provider.publicKey.toString(),a.toString(),t.toString()));case 8:case"end":return n.stop()}}),n,this)})))}},{key:"sellBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sell();case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"sellUpdate",value:function(e){var t;return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,o,c=this;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.wallet){n.next=2;break}throw new Error("Solana wallet not provided");case 2:return n.next=4,(0,b.getPreparedOrder)(e,this.apis);case 4:return a=n.sent,i=(0,m.extractPublicKey)((0,b.getOrderData)(a).auctionHouse),o=u.Action.create({id:"send-tx",run:function(e){return s.__awaiter(c,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.sellUpdateCommon(e,a));case 1:case"end":return t.stop()}}),t,this)})))}}),n.t0=p.OriginFeeSupport.NONE,n.t1=p.PayoutsSupport.NONE,n.t2=p.MaxFeesBasePointSupport.IGNORED,n.t3=(0,v.getCurrencies)(),n.next=13,(0,f.getAuctionHouseFee)(i,null===(t=this.config)||void 0===t?void 0:t.auctionHouseMapping);case 13:return n.t4=n.sent,n.t5=o,n.t6={nftCollection:(0,y.getNftContractAddress)(a.make.type)},n.abrupt("return",{originFeeSupport:n.t0,payoutsSupport:n.t1,maxFeesBasePointSupport:n.t2,supportedCurrencies:n.t3,baseFee:n.t4,submit:n.t5,orderData:n.t6});case 17:case"end":return n.stop()}}),n,this)})))}},{key:"sellUpdateCommon",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,s;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=(0,b.getTokensAmount)(t),i=(0,b.getMintId)(t),s=(0,m.extractPublicKey)((0,b.getOrderData)(t).auctionHouse),n.next=5,this.sdk.order.sell({auctionHouse:s,signer:this.wallet.provider,mint:i,price:new o.default(e.price).multipliedBy(a),tokensAmount:a});case 5:return n.next=7,n.sent.submit("processed");case 7:return n.abrupt("return",(0,b.getOrderId)("SELL",this.wallet.provider.publicKey.toString(),i.toString(),s.toString()));case 8:case"end":return n.stop()}}),n,this)})))}},{key:"sellUpdateBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.wallet){t.next=2;break}throw new Error("Solana wallet not provided");case 2:return t.next=4,(0,b.getPreparedOrder)(e,this.apis);case 4:return n=t.sent,t.abrupt("return",this.sellUpdateCommon(e,n));case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getConvertableValue",value:function(){return s.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",void 0);case 1:case"end":return e.stop()}}),e)})))}},{key:"bid",value:function(e){var t;return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,d,y=this;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.wallet){n.next=2;break}throw new Error("Solana wallet not provided");case 2:if("itemId"in e){n.next=4;break}throw new Error("No ItemId provided");case 4:return a=(0,f.getAuctionHouse)({"@type":"SOLANA_SOL"},null===(t=this.config)||void 0===t?void 0:t.auctionHouseMapping),n.next=7,this.apis.item.getItemById({itemId:e.itemId});case 7:return i=n.sent,d=u.Action.create({id:"send-tx",run:function(t){return s.__awaiter(y,void 0,void 0,r().mark((function n(){var i,s;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=(0,m.extractPublicKey)(e.itemId),(0,l.checkPayouts)(t.payouts),s=void 0!==t.amount?t.amount:1,n.next=5,this.sdk.order.buy({auctionHouse:a,signer:this.wallet.provider,mint:i,price:new o.default(t.price).multipliedBy(s),tokensAmount:s});case 5:return n.next=7,n.sent.submit("processed");case 7:return n.abrupt("return",(0,b.getOrderId)("BUY",this.wallet.provider.publicKey.toString(),i.toString(),a.toString()));case 8:case"end":return n.stop()}}),n,this)})))}}),n.abrupt("return",{multiple:parseFloat(i.supply)>1,maxAmount:(0,c.toBigNumber)(i.supply),originFeeSupport:p.OriginFeeSupport.NONE,payoutsSupport:p.PayoutsSupport.NONE,maxFeesBasePointSupport:p.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:(0,v.getCurrencies)(),baseFee:0,getConvertableValue:this.getConvertableValue,supportsExpirationDate:!1,submit:d});case 10:case"end":return n.stop()}}),n,this)})))}},{key:"bidBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.bid(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"bidUpdate",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,c=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.wallet){t.next=2;break}throw new Error("Solana wallet not provided");case 2:return t.next=4,(0,b.getPreparedOrder)(e,this.apis);case 4:return n=t.sent,a=(0,b.getTokensAmount)(n),i=u.Action.create({id:"send-tx",run:function(e){return s.__awaiter(c,void 0,void 0,r().mark((function t(){var i,s;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=(0,b.getMintId)(n),s=(0,m.extractPublicKey)((0,b.getOrderData)(n).auctionHouse),t.next=4,this.sdk.order.buy({auctionHouse:s,signer:this.wallet.provider,mint:i,price:new o.default(e.price).multipliedBy(a),tokensAmount:a});case 4:return t.next=6,t.sent.submit("processed");case 6:return t.abrupt("return",(0,b.getOrderId)("BUY",this.wallet.provider.publicKey.toString(),i.toString(),s.toString()));case 7:case"end":return t.stop()}}),t,this)})))}}),t.abrupt("return",{originFeeSupport:p.OriginFeeSupport.NONE,payoutsSupport:p.PayoutsSupport.NONE,maxFeesBasePointSupport:p.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:(0,v.getCurrencies)(),baseFee:0,getConvertableValue:this.getConvertableValue,submit:i,orderData:{nftCollection:(0,y.getNftContractAddress)(n.take.type)}});case 8:case"end":return t.stop()}}),t,this)})))}},{key:"bidUpdateBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.bidUpdate(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"cancelBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.cancel(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getFutureOrderFees",value:function(){var e,t;return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=(0,f.getAuctionHouse)({"@type":"SOLANA_SOL"},null===(e=this.config)||void 0===e?void 0:e.auctionHouseMapping),n.t0=p.OriginFeeSupport.NONE,n.next=4,(0,f.getAuctionHouseFee)(a,null===(t=this.config)||void 0===t?void 0:t.auctionHouseMapping);case 4:return n.t1=n.sent,n.abrupt("return",{originFeeSupport:n.t0,baseFee:n.t1});case 6:case"end":return n.stop()}}),n,this)})))}}]),e}();t.SolanaOrder=h},2696:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrencies=void 0;var r=n(45);t.getCurrencies=function(){return[{blockchain:r.Blockchain.SOLANA,type:"NATIVE"}]}},2697:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaBalance=void 0;var s=n(19),o=n(115),u=n(146),c=n(267),d=n(533),p=n(961),l=n(962),y=function(){function e(t,n,i,c){var d=this;a(this,e),this.sdk=t,this.wallet=n,this.apis=i,this.config=c,this.depositBiddingBalance=o.Action.create({id:"send-tx",run:function(e){return s.__awaiter(d,void 0,void 0,r().mark((function t(){var n,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.wallet){t.next=2;break}throw new Error("Solana wallet not provided");case 2:return t.next=4,this.getAuctionHouse(e);case 4:return n=t.sent,t.next=7,this.sdk.auctionHouse.depositEscrow({auctionHouse:n,signer:this.wallet.provider,amount:e.amount});case 7:return a=t.sent,t.next=10,a.submit("processed");case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})))}}).after((function(e){return new u.BlockchainSolanaTransaction(e,d.sdk)})),this.withdrawBiddingBalance=o.Action.create({id:"send-tx",run:function(e){return s.__awaiter(d,void 0,void 0,r().mark((function t(){var n,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.wallet){t.next=2;break}throw new Error("Solana wallet not provided");case 2:return t.next=4,this.getAuctionHouse(e);case 4:return n=t.sent,t.next=7,this.sdk.auctionHouse.withdrawEscrow({auctionHouse:n,signer:this.wallet.provider,amount:e.amount});case 7:return a=t.sent,t.next=10,a.submit("processed");case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})))}}).after((function(e){return new u.BlockchainSolanaTransaction(e,d.sdk)})),this.getBalance=this.getBalance.bind(this),this.getBiddingBalance=this.getBiddingBalance.bind(this),this.depositBiddingBalance=this.depositBiddingBalance.bind(this),this.withdrawBiddingBalance=this.withdrawBiddingBalance.bind(this)}return i(e,[{key:"getBalance",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("SOLANA_SOL"!==(a=(0,c.getCurrencyAssetType)(t))["@type"]){n.next=7;break}return n.next=4,this.sdk.balances.getBalance((0,d.extractPublicKey)(e),{commitment:"max"});case 4:case 10:return n.abrupt("return",n.sent);case 7:if("SOLANA_NFT"!==a["@type"]){n.next=13;break}return n.next=10,this.sdk.balances.getTokenBalance((0,d.extractPublicKey)(e),(0,d.extractPublicKey)(a.itemId));case 13:throw new Error("Unsupported asset type");case 14:case"end":return n.stop()}}),n,this)})))}},{key:"getAuctionHouse",value:function(e){var t,n;return s.__awaiter(this,void 0,void 0,r().mark((function a(){var i,s;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!("currency"in e)){r.next=7;break}if("SOLANA_SOL"===(i=(0,c.getCurrencyAssetType)(e.currency))["@type"]||"SOLANA_NFT"===i["@type"]){r.next=4;break}throw new Error("Unsupported currency asset type ("+i["@type"]+")");case 4:return r.abrupt("return",(0,l.getAuctionHouse)(i,null===(t=this.config)||void 0===t?void 0:t.auctionHouseMapping));case 7:if(s=void 0,!("order"in e)){r.next=12;break}s=e.order,r.next=16;break;case 12:if(!("orderId"in e)){r.next=16;break}return r.next=15,this.apis.order.getOrderById({id:e.orderId});case 15:s=r.sent;case 16:if(!s){r.next=20;break}return r.abrupt("return",(0,d.extractPublicKey)((0,p.getOrderData)(s).auctionHouse));case 20:return r.abrupt("return",(0,l.getAuctionHouse)({"@type":"SOLANA_SOL"},null===(n=this.config)||void 0===n?void 0:n.auctionHouseMapping));case 21:case"end":return r.stop()}}),a,this)})))}},{key:"getBiddingBalance",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.wallet){t.next=2;break}throw new Error("Solana wallet not provided");case 2:return t.next=4,this.getAuctionHouse(e);case 4:return n=t.sent,t.next=7,this.sdk.auctionHouse.getEscrowBalance({auctionHouse:n,signer:this.wallet.provider,wallet:(0,d.extractPublicKey)(e.walletAddress)});case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t,this)})))}}]),e}();t.SolanaBalance=y},2698:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaCollection=void 0;var s=n(19),o=n(115),u=n(64),c=n(45),d=n(146),p=function(){function e(t,n,i,p){var l=this;a(this,e),this.sdk=t,this.wallet=n,this.apis=i,this.config=p,this.createCollection=o.Action.create({id:"send-tx",run:function(e){return s.__awaiter(l,void 0,void 0,r().mark((function t(){var n,a,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.blockchain===c.Blockchain.SOLANA){t.next=2;break}throw new Error("Wrong blockchain");case 2:return t.next=4,this.sdk.nft.mint({metadataUrl:e.asset.arguments.metadataURI,signer:this.wallet.provider,masterEditionSupply:0,collection:null});case 4:return n=t.sent,t.next=7,n.tx.submit("confirmed");case 7:return a=t.sent,i="SOLANA:".concat(n.mint.toString()),t.prev=9,t.next=12,this.apis.collection.refreshCollectionMeta({collection:i});case 12:t.next=16;break;case 14:t.prev=14,t.t0=t.catch(9);case 16:return t.abrupt("return",{tx:new d.BlockchainSolanaTransaction(a,this.sdk),address:(0,u.toContractAddress)("SOLANA:".concat(n.mint.toString()))});case 17:case"end":return t.stop()}}),t,this,[[9,14]])})))}}),this.createCollectionBasic=this.createCollectionBasic.bind(this)}return i(e,[{key:"createCollectionBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.blockchain===c.Blockchain.SOLANA){t.next=2;break}throw new Error("Wrong blockchain");case 2:return t.abrupt("return",this.createCollection({blockchain:e.blockchain,asset:{arguments:{metadataURI:e.metadataURI}}}));case 3:case"end":return t.stop()}}),t,this)})))}}]),e}();t.SolanaCollection=p},2699:function(e,t,n){"use strict";var r=n(78).default;Object.defineProperty(t,"__esModule",{value:!0}),t.createImmutablexSdk=void 0;var a=n(2700),i=n(427),s=n(524),o=n(409),u=n(410),c=n(2815),d=n(2816),p=n(2818);t.createImmutablexSdk=function(e,t,n,l){var y=(0,a.createImxSdk)(null===e||void 0===e?void 0:e.wallet.link,n,{apiClientParams:{middleware:r(l!==i.LogsLevel.DISABLED?[(0,u.getErrorHandlerMiddleware)(u.NetworkErrorCode.IMX_NETWORK_ERR)]:[])}}),f=new c.ImxNftService(y,t),m=new d.ImxOrderService(y,t),b=new p.ImxBalanceService(y,t);return{nft:{mint:new o.MethodWithPrepare(s.notImplemented,s.notImplemented),burn:new o.MethodWithPrepare(f.burnBasic,f.burn),transfer:new o.MethodWithPrepare(f.transferBasic,f.transfer),generateTokenId:s.notImplemented,createCollection:s.nonImplementedAction,preprocessMeta:s.notImplemented,uploadMeta:s.notImplemented},order:{fill:{prepare:m.buy},buy:new o.MethodWithPrepare(m.buyBasic,m.buy),batchBuy:new o.MethodWithPrepare(s.notImplemented,s.nonImplementedAction),acceptBid:new o.MethodWithPrepare(m.acceptBidBasic,m.buy),sell:new o.MethodWithPrepare(m.sellBasic,m.sell),sellUpdate:new o.MethodWithPrepare(s.notImplemented,s.notImplemented),bid:new o.MethodWithPrepare(s.notImplemented,s.notImplemented),bidUpdate:new o.MethodWithPrepare(s.notImplemented,s.notImplemented),cancel:m.cancelBasic},balances:{getBalance:b.getBalance,convert:s.notImplemented,transfer:s.notImplemented,getBiddingBalance:s.nonImplementedAction,depositBiddingBalance:s.nonImplementedAction,withdrawBiddingBalance:s.nonImplementedAction},restriction:{canTransfer:s.notImplemented,getFutureOrderFees:function(){return m.getFutureOrderFees()}}}}},2700:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBalance=t.IMX_ENV_CONFIG=t.IMX_CONFIG=t.createImxSdk=void 0;var r=n(2701),a=n(2806),i=n(2809),s=n(1359),o=n(2810);t.createImxSdk=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=(0,o.createApis)(t,null===n||void 0===n?void 0:n.apiClientParams);return{nft:{transfer:r.transfer.bind(null,e),burn:i.burn.bind(null,e)},order:{sell:a.sell.bind(null,e),buy:a.buy.bind(null,t,e,u),cancel:a.cancel.bind(null,e)},balance:{getBalance:s.getBalance.bind(null,t,u)}}};var u=n(1360);Object.defineProperty(t,"IMX_CONFIG",{enumerable:!0,get:function(){return u.IMX_CONFIG}}),Object.defineProperty(t,"IMX_ENV_CONFIG",{enumerable:!0,get:function(){return u.IMX_ENV_CONFIG}});var c=n(1359);Object.defineProperty(t,"getBalance",{enumerable:!0,get:function(){return c.getBalance}})},2701:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.transfer=void 0;var a=n(19),i=n(963),s=n(1358);t.transfer=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a,o,u,c,d,p,l;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(void 0!==e){n.next=2;break}throw new Error("Wallet undefined");case 2:if(a=t.assetClass,o=t.contract,u=t.tokenId,c=t.to,a===i.ERC721TokenType.ERC721){n.next=5;break}throw new Error("Unsupported assetClass");case 5:return n.next=7,e.transfer([{type:i.ERC721TokenType.ERC721,tokenId:u,tokenAddress:o,toAddress:c}]);case 7:if(d=n.sent,(p=d.result)&&p[0]){n.next=11;break}throw new Error("Imx transfer error: result is empty (".concat(JSON.stringify(p),")"));case 11:return l=p[0],n.abrupt("return",(0,s.getTransferResponse)(l));case 13:case"end":return n.stop()}}),n)})))}},2703:function(e,t){},2705:function(e,t){},2713:function(e,t){},2739:function(e,t){},2740:function(e,t){},2757:function(e,t){},2779:function(e,t){},2793:function(e,t){},2794:function(e,t){},2795:function(e,t){},2796:function(e,t){},2797:function(e,t){},2798:function(e,t){},2799:function(e,t){},2800:function(e,t){},2801:function(e,t){},2802:function(e,t){},2803:function(e,t){},2804:function(e,t){},2805:function(e,t){},2806:function(e,t,n){"use strict";var r=n(20).default,a=n(78).default;Object.defineProperty(t,"__esModule",{value:!0}),t.cancel=t.buy=t.sell=void 0;var i=n(19),s=n(2807),o=n(2808);t.sell=function(e,t){return i.__awaiter(this,void 0,void 0,r().mark((function n(){var i,o,u,c,d,p,l,y,f;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(void 0!==e){n.next=2;break}throw new Error("Wallet undefined");case 2:return i=t.makeAssetType,o=i.tokenId,u=i.contract,c=t.takeAssetType,d=t.amount,p=t.payouts,l=t.originFees,y="ERC20"===c.assetClass?c.contract:void 0,n.next=6,e.sell(Object.assign({tokenId:o,tokenAddress:u,fees:(0,s.convertFees)([].concat(a(p),a(l))),amount:d},y?{currencyAddress:y}:{}));case 6:return f=n.sent,n.abrupt("return",{orderId:f});case 8:case"end":return n.stop()}}),n)})))},t.buy=function(e,t,n,a,u){var c;return i.__awaiter(this,void 0,void 0,r().mark((function e(){var d,p,l,y,f,m=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==t){e.next=2;break}throw new Error("Wallet undefined");case 2:return d=a.orderId,p=a.fee,e.next=5,t.buy({orderIds:[d],fees:(0,s.convertFees)(p)});case 5:if(l=e.sent,"error"!==(y=null===(c=l.result)||void 0===c?void 0:c[d]).status){e.next=9;break}throw new Error("Trade unsuccessful: "+y.message);case 9:return f=void 0,e.prev=10,e.next=13,(0,o.retry)(20,2e3,(function(){return i.__awaiter(m,void 0,void 0,r().mark((function e(){var t,a,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.trades.getTrades({tokenType:u.assetClass,tokenAddress:u.contract,tokenId:u.tokenId});case 2:if(t=e.sent,a=t.result,i=a.find((function(e){return e.b.order_id.toString()===d}))){e.next=7;break}throw new Error("Can't find trade with orderid "+d);case 7:if("success"!==y.status){e.next=9;break}return e.abrupt("return",i.transaction_id);case 9:case"end":return e.stop()}}),e)})))}));case 13:f=e.sent,e.next=19;break;case 16:e.prev=16,e.t0=e.catch(10),console.error("Error while fetching trade",e.t0);case 19:return e.abrupt("return",{txId:f});case 20:case"end":return e.stop()}}),e,null,[[10,16]])})))},t.cancel=function(e,t){return i.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(void 0!==e){n.next=2;break}throw new Error("Wallet undefined");case 2:return a=t.orderId,n.next=5,e.cancel({orderId:a});case 5:return i=n.sent,n.abrupt("return",{orderId:i.order_id.toString()});case 7:case"end":return n.stop()}}),n)})))}},2807:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateImxFeePercents=t.convertFees=void 0;var r=n(121);function a(e){if(e<0||e>100)throw new Error("Invalid value for fee, should be a number greater then 0 and lower then")}t.convertFees=function(e){var t=null===e||void 0===e?void 0:e.map((function(e){var t=new r.BigNumber(e.value).div(100).toNumber();return a(t),{recipient:e.account,percentage:t}}));return(null===t||void 0===t?void 0:t.filter((function(e){return 0!==e.percentage})))||[]},t.validateImxFeePercents=a},2808:function(e,t,n){"use strict";function r(e){return new Promise((function(t){return setTimeout(t,e)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.delay=t.retry=void 0,t.retry=function e(t,n,a){return a().catch((function(i){if(0===t)throw i;return r(n).then((function(){return e(t-1,n,a)}))}))},t.delay=r},2809:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.burn=void 0;var a=n(19),i=n(963),s=n(64),o=n(1358);t.burn=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a,u,c,d,p,l;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(void 0!==e){n.next=2;break}throw new Error("Wallet undefined");case 2:if(a=t.assetClass,u=t.tokenId,c=t.contract,a===i.ERC721TokenType.ERC721){n.next=5;break}throw new Error("Unsupported assetClass");case 5:return n.next=7,e.transfer([{type:i.ERC721TokenType.ERC721,tokenId:u,tokenAddress:c,toAddress:s.ZERO_ADDRESS}]);case 7:if(d=n.sent,(p=d.result)&&p[0]){n.next=11;break}throw new Error("Imx burn error: result is empty (".concat(JSON.stringify(p),")"));case 11:return l=p[0],n.abrupt("return",(0,o.getTransferResponse)(l));case 13:case"end":return n.stop()}}),n)})))}},2810:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createApis=void 0;var r=n(749),a=n(1360),i=n(2813),s=n(2814);t.createApis=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a.IMX_ENV_CONFIG[e],o=n.apiAddressV1,u=n.apiAddressV2,c=new r.Configuration(Object.assign({basePath:o},t)),d=new r.Configuration(Object.assign({basePath:u},t)),p=new s.ImxTradesControllerApi(c);return{balance:new i.ImxBalanceControllerApi(d),trades:p}}},2811:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImxWalletProviderEnum=void 0,function(e){e.METAMASK="METAMASK",e.MAGIC_LINK="MAGIC_LINK",e.GAMESTOP="GAMESTOP",e.NONE="NONE"}(t.ImxWalletProviderEnum||(t.ImxWalletProviderEnum={}))},2812:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IMX_ENV_CONFIG=t.IMX_NETWORK_CONFIG=void 0,t.IMX_NETWORK_CONFIG={mainnet:{network:"mainnet",linkAddress:"https://link.x.immutable.com",gasPrice:"4000000",gasLimit:"7000000",enableDebug:!1},goerli:{network:"goerli",linkAddress:"https://link.sandbox.x.immutable.com",gasPrice:"4000000",gasLimit:"7000000",enableDebug:!0}},t.IMX_ENV_CONFIG={testnet:t.IMX_NETWORK_CONFIG.goerli,prod:t.IMX_NETWORK_CONFIG.mainnet}},2813:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default,s=n(37).default,o=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ImxBalanceControllerApi=void 0;var u=n(19),c=n(749),d=function(e){s(n,e);var t=o(n);function n(){return a(this,n),t.apply(this,arguments)}return i(n,[{key:"getAllBalancesRaw",value:function(e){return u.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==e.ownerAddress&&void 0!==e.ownerAddress){t.next=2;break}throw new c.RequiredError("ownerAddress","Required parameter requestParameters.ownerAddress was null or undefined when calling getAllBalances.");case 2:return n={},a={},t.next=6,this.request({path:"/balances/{address}".replace("{".concat("address","}"),encodeURIComponent(String(e.ownerAddress))),method:"GET",headers:a,query:n});case 6:return i=t.sent,t.abrupt("return",new c.JSONApiResponse(i,(function(e){return e})));case 8:case"end":return t.stop()}}),t,this)})))}},{key:"getAllBalances",value:function(e){return u.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getAllBalancesRaw(e);case 2:return n=t.sent,t.next=5,n.value();case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})))}}]),n}(c.BaseAPI);t.ImxBalanceControllerApi=d},2814:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default,s=n(37).default,o=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ImxTradesControllerApi=void 0;var u=n(19),c=n(749),d=function(e){s(n,e);var t=o(n);function n(e){return a(this,n),t.call(this,e)}return i(n,[{key:"getTradesRaw",value:function(e){return u.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={},a={},t.next=4,this.request({path:"/trades?party_b_token_type="+encodeURIComponent(e.tokenType)+"&party_b_token_address="+encodeURIComponent(e.tokenAddress)+"&party_b_token_id="+encodeURIComponent(e.tokenId),method:"GET",headers:a,query:n});case 4:return i=t.sent,t.abrupt("return",new c.JSONApiResponse(i,(function(e){return e})));case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getTrades",value:function(e){return u.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getTradesRaw(e);case 2:return n=t.sent,t.next=5,n.value();case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})))}}]),n}(c.BaseAPI);t.ImxTradesControllerApi=d},2815:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ImxNftService=void 0;var o=n(19),u=n(146),c=n(64),d=n(115),p=function(){function e(t,n){i(this,e),this.sdk=t,this.apis=n,this.burn=this.burn.bind(this),this.burnBasic=this.burnBasic.bind(this),this.transfer=this.transfer.bind(this),this.transferBasic=this.transferBasic.bind(this)}return s(e,[{key:"burnBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.burn(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"transferBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.transfer(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"burn",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{multiple:!1,maxAmount:(0,c.toBigNumber)("1"),submit:d.Action.create({id:"burn",run:function(){return o.__awaiter(n,void 0,void 0,a().mark((function t(){var n,i,s,o,d;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.itemId.split(":"),i=r(n,3),s=i[1],o=i[2],t.next=3,this.sdk.nft.burn({assetClass:"ERC721",tokenId:(0,c.toBigNumber)(o),contract:(0,c.toAddress)(s)});case 3:return d=t.sent,t.abrupt("return",new u.BlockchainImmutableXTransaction(d.txId));case 5:case"end":return t.stop()}}),t,this)})))}})});case 1:case"end":return t.stop()}}),t)})))}},{key:"transfer",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{multiple:!1,maxAmount:(0,c.toBigNumber)("1"),submit:d.Action.create({id:"transfer",run:function(t){return o.__awaiter(n,void 0,void 0,a().mark((function n(){var i,s,o,d,p,l,y,f;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.itemId.split(":"),s=r(i,3),o=s[1],d=s[2],p=t.to.split(":"),l=r(p,2),y=l[1],n.next=4,this.sdk.nft.transfer({assetClass:"ERC721",to:(0,c.toAddress)(y),tokenId:(0,c.toBigNumber)(d),contract:(0,c.toAddress)(o)});case 4:return f=n.sent,n.abrupt("return",new u.BlockchainImmutableXTransaction(f.txId));case 6:case"end":return n.stop()}}),n,this)})))}})});case 1:case"end":return t.stop()}}),t)})))}}]),e}();t.ImxNftService=p},2816:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ImxOrderService=void 0;var o=n(19),u=n(146),c=n(64),d=n(45),p=n(115),l=n(216),y=n(366),f=n(306),m=n(1362),b=n(2817),v=function(){function e(t,n){i(this,e),this.sdk=t,this.apis=n,this.sell=this.sell.bind(this),this.buy=this.buy.bind(this),this.buyBasic=this.buyBasic.bind(this),this.acceptBidBasic=this.acceptBidBasic.bind(this),this.sellBasic=this.sellBasic.bind(this),this.cancelBasic=this.cancelBasic.bind(this)}return s(e,[{key:"buyBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.buy(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"acceptBidBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.buy(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"sellBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sell();case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"sell",value:function(){return o.__awaiter(this,void 0,void 0,a().mark((function e(){var t,n=this;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.Action.create({id:"send-tx",run:function(e){return o.__awaiter(n,void 0,void 0,a().mark((function t(){var n,i,s,o,u;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,y.checkPayouts)(e.payouts),n=e.itemId.split(":"),i=r(n,3),s=i[1],o=i[2],t.next=4,this.sdk.order.sell({amount:(0,c.toBigNumber)(e.price.toString()),originFees:(0,m.unionPartsToParts)(e.originFees),payouts:(0,m.unionPartsToParts)(e.payouts),makeAssetType:{assetClass:"ERC721",contract:(0,c.toAddress)(s),tokenId:(0,c.toBigNumber)(o)},takeAssetType:(0,m.getTakeAssetType)(e.currency)});case 4:return u=t.sent,t.abrupt("return",(0,c.toOrderId)("".concat(d.Blockchain.IMMUTABLEX,":").concat(u.orderId)));case 6:case"end":return t.stop()}}),t,this)})))}}),e.abrupt("return",{originFeeSupport:l.OriginFeeSupport.FULL,payoutsSupport:l.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:l.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:(0,b.getCurrencies)(),baseFee:200,supportsExpirationDate:!1,submit:t});case 2:case"end":return e.stop()}}),e)})))}},{key:"getFutureOrderFees",value:function(){return o.__awaiter(this,void 0,void 0,a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{originFeeSupport:l.OriginFeeSupport.FULL,baseFee:200});case 1:case"end":return e.stop()}}),e)})))}},{key:"buy",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,i,s,c=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,m.getPreparedOrder)(e,this.apis);case 2:if((n=t.sent).status===d.OrderStatus.ACTIVE){t.next=5;break}throw new Error("Order is not active");case 5:return i=function(){if("ERC721"!==n.make.type["@type"])throw new Error("Order make type should be ERC721");var e=n.make.type.contract.split(":");return{assetClass:"ERC721",contract:r(e,2)[1],tokenId:n.make.type.tokenId}},s=p.Action.create({id:"send-tx",run:function(e){return o.__awaiter(c,void 0,void 0,a().mark((function t(){var s,o,u,c;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,y.checkPayouts)(e.payouts),s=n.id.split(":"),o=r(s,2),u=o[1],t.next=4,this.sdk.order.buy({orderId:u,fee:(0,m.unionPartsToParts)(e.originFees)},i());case 4:return c=t.sent,console.log(c),t.abrupt("return",c);case 7:case"end":return t.stop()}}),t,this)})))}}).after((function(e){return new u.BlockchainImmutableXTransaction(e.txId)})),t.abrupt("return",{multiple:!1,maxAmount:n.makeStock,baseFee:(0,m.calcBuyerBaseFee)(n),supportsPartialFill:!1,maxFeesBasePointSupport:l.MaxFeesBasePointSupport.IGNORED,originFeeSupport:l.OriginFeeSupport.FULL,payoutsSupport:l.PayoutsSupport.NONE,submit:s,orderData:{platform:n.platform,nftCollection:(0,f.getOrderNftContractAddress)(n)}});case 8:case"end":return t.stop()}}),t,this)})))}},{key:"cancelBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,i,s;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.orderId.split(":"),i=r(n,2),s=i[1],t.next=3,this.sdk.order.cancel({orderId:s});case 3:return t.abrupt("return",new u.BlockchainImmutableXTransaction(void 0));case 4:case"end":return t.stop()}}),t,this)})))}}]),e}();t.ImxOrderService=v},2817:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrencies=void 0;var r=n(45);t.getCurrencies=function(){return[{blockchain:r.Blockchain.ETHEREUM,type:"NATIVE"},{blockchain:r.Blockchain.ETHEREUM,type:"ERC20"}]}},2818:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ImxBalanceService=void 0;var o=n(19),u=n(64),c=n(267),d=n(1362),p=function(){function e(t,n){i(this,e),this.sdk=t,this.apis=n,this.getBalance=this.getBalance.bind(this)}return s(e,[{key:"getBalance",value:function(e,t){return o.__awaiter(this,void 0,void 0,r().mark((function n(){var i,s,o,p;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=(0,c.getCurrencyAssetType)(t),n.t0=i["@type"],n.next="ETH"===n.t0?4:"ERC20"===n.t0?7:11;break;case 4:return n.next=6,this.sdk.balance.getBalance((0,d.convertToEthereumAddress)(e),{assetClass:"ETH"});case 6:case 10:return n.abrupt("return",n.sent);case 7:return s=i.contract.split(":"),o=a(s,2),p=o[1],n.next=10,this.sdk.balance.getBalance((0,d.convertToEthereumAddress)(e),{assetClass:"ERC20",contract:(0,u.toAddress)(p)});case 11:throw new Error("Unsupported asset type");case 12:case"end":return n.stop()}}),n,this)})))}}]),e}();t.ImxBalanceService=p},2819:function(e,t,n){"use strict";var r=n(78).default;Object.defineProperty(t,"__esModule",{value:!0}),t.createFlowSdk=void 0;var a=n(631),i=n(986),s=n(45),o=n(427),u=n(524),c=n(408),d=n(748),p=n(409),l=n(410),y=n(2928),f=n(2930),m=n(2931),b=n(2932),v=n(2933),h=n(2934),T=n(2935),g=n(2936),w=n(2937);t.createFlowSdk=function(e,t,n,k,x){var O,_,E=(0,a.createFlowSdk)(null===e||void 0===e?void 0:e.fcl,n,Object.assign(Object.assign({},k||{}),{apiKey:null===x||void 0===x?void 0:x.apiKey,middleware:[].concat(r((null===x||void 0===x?void 0:x.logs)!==o.LogsLevel.DISABLED?[(0,l.getErrorHandlerMiddleware)(l.NetworkErrorCode.FLOW_NETWORK_ERR)]:[]),r((null===k||void 0===k?void 0:k.middleware)||[]))}),(null===(_=null===(O=null===x||void 0===x?void 0:x.blockchain)||void 0===O?void 0:O.FLOW)||void 0===_?void 0:_.auth)||(null===e||void 0===e?void 0:e.getAuth())),A=i.ENV_CONFIG[n].network,C=new f.FlowSell(E,t),I=new y.FlowMint(E,t,A),S=new g.FlowBid(E),R=new v.FlowBurn(E,A),j=new b.FlowTransfer(E,A),P=new m.FlowBuy(E,t,A),B=new h.FlowCancel(E,t,A),M=new T.FlowBalance(E,n,A,e),F=c.Middlewarer.skipMiddleware(I.preprocessMeta),N=new d.MetaUploader(s.Blockchain.FLOW,F),D=new w.FlowSetupAccount(E,A);return{nft:{mint:new p.MethodWithPrepare(I.mintBasic,I.prepare),burn:new p.MethodWithPrepare(R.burnBasic,R.burn),transfer:new p.MethodWithPrepare(j.transferBasic,j.transfer),generateTokenId:function(){return Promise.resolve(void 0)},createCollection:u.notImplemented,preprocessMeta:F,uploadMeta:N.uploadMeta},order:{fill:{prepare:P.buy},sell:new p.MethodWithPrepare(C.sellBasic,C.sell),sellUpdate:new p.MethodWithPrepare(C.sellUpdateBasic,C.update),buy:new p.MethodWithPrepare(P.buyBasic,P.buy),batchBuy:new p.MethodWithPrepare(u.notImplemented,u.nonImplementedAction),acceptBid:new p.MethodWithPrepare(P.acceptBidBasic,P.acceptBid),bid:new p.MethodWithPrepare(S.bidBasic,S.bid),bidUpdate:new p.MethodWithPrepare(S.bidUpdateBasic,S.update),cancel:B.cancel},balances:{getBalance:M.getBalance,transfer:M.transfer,convert:u.notImplemented,getBiddingBalance:u.nonImplementedAction,depositBiddingBalance:u.nonImplementedAction,withdrawBiddingBalance:u.nonImplementedAction},restriction:{canTransfer:function(){return Promise.resolve({success:!0})},getFutureOrderFees:function(){return C.getFutureOrderFees()}},flow:{setupAccount:D.setupAccount,checkInitMattelCollections:D.checkInitMattelCollections,setupMattelCollections:D.setupMattelCollections}}}},282:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19);r.__exportStar(n(3620),t),r.__exportStar(n(3622),t),r.__exportStar(n(3623),t),r.__exportStar(n(3625),t),r.__exportStar(n(3626),t),r.__exportStar(n(3627),t)},287:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getTezosOrderLegacyForm=t.getRequestAmount=t.isNftOrMTAssetType=t.isFTAssetType=t.isXtzAssetType=t.isMTAssetType=t.isNftAssetType=t.getTokenIdString=t.getTezosAssetTypeV2=t.convertTezosToUnionAddress=t.convertTezosToCollectionAddress=t.convertTezosToContractAddress=t.convertTezosItemId=t.convertTezosOrderId=t.convertUnionAddress=t.convertFromContractAddress=t.convertUnionParts=t.getCollectionTypeAssetClass=t.convertTezosToUnionAsset=t.covertToLibAsset=t.getTezosAssetType=t.convertOrderToOrderForm=t.convertOrderToFillOrder=t.getSupportedCurrencies=t.getRoyalties=t.getPayouts=t.getMakerPublicKey=t.getTezosAddress=t.getTezosItemData=t.getTezosOrderId=t.getRequiredProvider=t.checkChainId=t.getMaybeTezosProvider=t.isExistedTezosProvider=t.getTezosBasePath=t.XTZ_DECIMALS=void 0;var i=n(19),s=n(45),o=n(305),u=n(75),c=i.__importDefault(n(53)),d=n(64),p=n(515);function l(e){return void 0!==e.tezos}t.XTZ_DECIMALS=6,t.getTezosBasePath=function(e){switch(e){case"testnet":return"https://test-tezos-api.rarible.org";case"dev":return"http://dev-tezos-api.rarible.int";case"mainnet":return"https://tezos-api.rarible.org";default:throw new Error("Unsupported tezos network")}},t.isExistedTezosProvider=l,t.getMaybeTezosProvider=function(e,t,n){var r="".concat(n.basePath,"/v0.1");switch(t){case"testnet":return{tezos:e,config:{exchange:"KT1S6H2FWxrpaD7aPRSW1cTTE1xPucXBSTL5",transfer_proxy:"KT1WbVjXdmBpzzVoYSSUiNt6QFnSC3W768d1",fees:new c.default(0),nft_public:"",mt_public:"",auction:"KT1CB5JBSC7kTxRV3ir2xsooMA1FLieiD4Mt",auction_storage:"KT1KWAPPjuDq4ZeX67rzZWsf6eAeqwtuAfSP",node_url:"https://rpc.tzkt.io/ithacanet",chain_id:"NetXnHfVqm9iesp",sales:"KT1NcKyhPnomH9PKGeDfvMiGH2PDgKCd5YuM",sales_storage:"KT1GDUG3AQpaKmFjFHVn6PYT4Tprf7ccwPa3",transfer_manager:"KT1LQPAi4w2h9GQ61S8NkENcNe3aH5vYEzjP",bid:"KT1FiEi3Mrh31vJy39CD4hkiHq1AfRpTxNpF",bid_storage:"KT1ENB6j6uMJn7MtDV4VBE1AAAwCXmMtzjUd",sig_checker:"KT1Fbvkq4sMawS4rdNXswoN7ELgkNV1ooLB7",tzkt:"https://api.ghostnet.tzkt.io",dipdup:"https://testnet-tezos-indexer.rarible.org/v1/graphql",union_api:r,objkt_sales_v1:"KT1Ax5fm2UNxjXGmrMDytREfqvYoCXoBB4Jo",objkt_sales_v2:"KT1GiZuR6TdkgxZGQGZSdbC3Jox9JTSbqTB6",royalties_provider:"KT1F68vtdE2HHhZa3jBNT1kCkMjaQAWCShXB",hen_marketplace:"KT1XYgjgFQutFfgEiD7RuppSKZsawZbkpKxL",hen_objkts:"KT1P2VyFd61A3ukizJoX37nFF9fqZnihv7Lw",teia_marketplace:"KT1Anx515N2PK8A2ZX5uGNn7Gckh4WytLJmK",versum_marketplace:"KT1B1Wz7jPH23EqKUpDwFDkw3A1yLxGZ4uJy",versum_nfts:"KT1UH5RSbomuV1o6UuDB9yeACbqRMup3utGu",fxhash_sales_v1:"KT1BEc3m6yxN856Y4zfArpDqQ1uZZ1HkDTRh",fxhash_sales_v2:"KT1GCLoBSwUaNjaGXq5RtiP8CXTL3cEeMNDs",fxhash_nfts_v1:"KT1VEXkw6rw6pJDP9APGsMneFafArijmM96j",fxhash_nfts_v2:"KT1WSwXCWPPAxAy4ibPmFyCm4NhmSJT9UuxQ",aggregator_tracker:"KT1DajvCNVScudRm3kCHPfUjsRCtmPnm375s",aggregator_tracker_id:"09616c6c64617461",api_key:n.apiKey}};case"dev":return{tezos:e,config:{exchange:"KT1S6H2FWxrpaD7aPRSW1cTTE1xPucXBSTL5",transfer_proxy:"KT1WbVjXdmBpzzVoYSSUiNt6QFnSC3W768d1",fees:new c.default(0),nft_public:"",mt_public:"",chain_id:"NetXnHfVqm9iesp",auction:"KT1CB5JBSC7kTxRV3ir2xsooMA1FLieiD4Mt",auction_storage:"KT1KWAPPjuDq4ZeX67rzZWsf6eAeqwtuAfSP",node_url:"https://rpc.tzkt.io/ghostnet",sales:"KT1NcKyhPnomH9PKGeDfvMiGH2PDgKCd5YuM",sales_storage:"KT1GDUG3AQpaKmFjFHVn6PYT4Tprf7ccwPa3",transfer_manager:"KT1LQPAi4w2h9GQ61S8NkENcNe3aH5vYEzjP",bid:"KT1FiEi3Mrh31vJy39CD4hkiHq1AfRpTxNpF",bid_storage:"KT1ENB6j6uMJn7MtDV4VBE1AAAwCXmMtzjUd",sig_checker:"KT1Fbvkq4sMawS4rdNXswoN7ELgkNV1ooLB7",tzkt:"https://api.ghostnet.tzkt.io",dipdup:"https://dev-tezos-indexer.rarible.org/v1/graphql",union_api:"https://dev-api.rarible.org/v0.1",objkt_sales_v1:"KT1Ax5fm2UNxjXGmrMDytREfqvYoCXoBB4Jo",objkt_sales_v2:"KT1GiZuR6TdkgxZGQGZSdbC3Jox9JTSbqTB6",royalties_provider:"KT1F68vtdE2HHhZa3jBNT1kCkMjaQAWCShXB",hen_marketplace:"KT1XYgjgFQutFfgEiD7RuppSKZsawZbkpKxL",hen_objkts:"KT1P2VyFd61A3ukizJoX37nFF9fqZnihv7Lw",teia_marketplace:"KT1Anx515N2PK8A2ZX5uGNn7Gckh4WytLJmK",versum_marketplace:"KT1B1Wz7jPH23EqKUpDwFDkw3A1yLxGZ4uJy",versum_nfts:"KT1UH5RSbomuV1o6UuDB9yeACbqRMup3utGu",fxhash_sales_v1:"KT1BEc3m6yxN856Y4zfArpDqQ1uZZ1HkDTRh",fxhash_sales_v2:"KT1GCLoBSwUaNjaGXq5RtiP8CXTL3cEeMNDs",fxhash_nfts_v1:"KT1VEXkw6rw6pJDP9APGsMneFafArijmM96j",fxhash_nfts_v2:"KT1WSwXCWPPAxAy4ibPmFyCm4NhmSJT9UuxQ",aggregator_tracker:"KT1DajvCNVScudRm3kCHPfUjsRCtmPnm375s",aggregator_tracker_id:"09616c6c64617461",api_key:n.apiKey}};case"mainnet":return{tezos:e,config:{exchange:"KT198mqFKkiWerXLmMCw69YB1i6yzYtmGVrC",transfer_proxy:"KT1N2oby9tYmv5tjkGD1KyVzkDRCmgDkXgSD",fees:new c.default(0),nft_public:"",mt_public:"",auction:"",auction_storage:"",node_url:"https://rpc.tzkt.io/mainnet",chain_id:"NetXdQprcVkpaWU",sales:"KT1N4Rrm6BU6229drs6scrH3vard1pPngMyA",sales_storage:"KT1BEZNm3E25rZtXfPPKr5Jxygbi2kL2cCEW",transfer_manager:"KT1ViAbsAM5rp89yVydEkbQozp1S12zqirwS",bid:"",bid_storage:"",sig_checker:"KT1VAmfDTkcYKMZZQhwuxtCGoD1hx7v5bjZ9",tzkt:"https://api.mainnet.tzkt.io",dipdup:"https://tezos-indexer.rarible.org/v1/graphql",union_api:r,objkt_sales_v2:"KT1WvzYHCNBvDSdwafTHv7nJ1dWmZ8GCYuuC",objkt_sales_v1:"KT1FvqJwEDWb1Gwc55Jd1jjTHRVWbYKUUpyq",royalties_provider:"KT1HNNrmCk1fpqveRDz8Fvww2GM4gPzmA7fo",hen_marketplace:"KT1HbQepzV1nVGg8QVznG7z4RcHseD5kwqBn",hen_objkts:"KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton",teia_marketplace:"KT1PHubm9HtyQEJ4BBpMTVomq6mhbfNZ9z5w",versum_marketplace:"KT1GyRAJNdizF1nojQz62uGYkx8WFRUJm9X5",versum_nfts:"KT1LjmAdYQCLBjwv4S2oFkEzyHVkomAf5MrW",fxhash_sales_v1:"KT1Xo5B7PNBAeynZPmca4bRh6LQow4og1Zb9",fxhash_sales_v2:"KT1GbyoDi7H1sfXmimXpptZJuCdHMh66WS9u",fxhash_nfts_v1:"KT1KEa8z6vWXDJrVqtMrAeDVzsvxat3kHaCE",fxhash_nfts_v2:"KT1U6EHmNxJTkvaWJ4ThczG4FSDaHC21ssvi",aggregator_tracker:"KT1Gv1tPJ3nU5T6VmFc12M6NKc5i51MYVPjG",aggregator_tracker_id:"09616c6c64617461",api_key:n.apiKey}};default:throw new Error("Unsupported tezos network for config")}};var y=new Map;function f(e){var t=e.split(":"),n=r(t,2),a=n[0],i=n[1];if(a!==s.Blockchain.TEZOS)throw new Error("Not an tezos address: ".concat(e));return i}function m(e){if("TEZOS_RARIBLE_V2"!==e.data["@type"])throw new Error("Unsupported order data type");return{type:"RARIBLE_V2",maker:T(e.maker),maker_edpk:e.data.makerEdpk,taker:void 0!==e.taker?T(e.taker):void 0,taker_edpk:e.data.takerEdpk,make:{asset_type:b(e.make.type),value:new c.default(e.make.value)},take:{asset_type:b(e.take.type),value:new c.default(e.take.value)},salt:e.salt,start:e.startedAt?parseInt(e.startedAt):void 0,end:e.endedAt?parseInt(e.endedAt):void 0,signature:e.signature,data:{data_type:"V1",payouts:v(e.data.payouts),origin_fees:v(e.data.originFees)}}}function b(e){switch(e["@type"]){case"XTZ":return{asset_class:"XTZ"};case"TEZOS_FT":return{asset_class:"FT",contract:h(e.contract),token_id:e.tokenId?new c.default(e.tokenId):void 0};case"TEZOS_NFT":return{asset_class:"NFT",contract:h(e.contract),token_id:new c.default(e.tokenId)};case"TEZOS_MT":return{asset_class:"MT",contract:h(e.contract),token_id:new c.default(e.tokenId)};default:throw new Error("Invalid take asset type")}}function v(e){return(null===e||void 0===e?void 0:e.map((function(e){return{account:f(e.account),value:new c.default(e.value)}})))||[]}function h(e){var t=e.split(":"),n=r(t,2),a=n[0],i=n[1];if(a!==s.Blockchain.TEZOS)throw new Error("Not a tezos contract address: ".concat(e));return i}function T(e){var t=e.split(":"),n=r(t,2),a=n[0],i=n[1];if(a!==s.Blockchain.TEZOS)throw new Error("Not a tezos address: ".concat(e));return i}function g(e){return(0,d.toContractAddress)("".concat(s.Blockchain.TEZOS,":").concat(e))}function w(e){return"TEZOS_NFT"===e["@type"]}function k(e){return"TEZOS_MT"===e["@type"]}t.checkChainId=function(e){var t;return i.__awaiter(this,void 0,void 0,a().mark((function n(){var r;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=y.get(e.tezos)){n.next=6;break}return n.next=4,null===(t=e.tezos)||void 0===t?void 0:t.chain_id();case 4:r=n.sent,y.set(e.tezos,r);case 6:if(r===e.config.chain_id){n.next=8;break}throw new Error("Config chainId=".concat(e.config.chain_id,", but wallet chainId=").concat(r));case 8:case"end":return n.stop()}}),n)})))},t.getRequiredProvider=function(e){if(!l(e))throw new Error("Tezos provider is required");return e},t.getTezosOrderId=function(e){if(!e)throw new Error("OrderId has not been specified");var t=e.split(":"),n=r(t,2),a=n[0],i=n[1];if(a!==s.Blockchain.TEZOS)throw new Error("Not an TEZOS order");return i},t.getTezosItemData=function(e){var t=e.split(":"),n=r(t,3),a=n[0],i=n[1],o=n[2];if(a!==s.Blockchain.TEZOS)throw new Error("Not an tezos item: ".concat(e));return{itemId:"".concat(i,":").concat(o),contract:i,tokenId:o,domain:a}},t.getTezosAddress=f,t.getMakerPublicKey=function(e){return i.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,o.get_public_key)(e);case 2:if(n=t.sent){t.next=5;break}throw new Error("Maker does not exist");case 5:return t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)})))},t.getPayouts=function(e,t){return i.__awaiter(this,void 0,void 0,a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",v(t)||[]);case 1:case"end":return e.stop()}}),e)})))},t.getRoyalties=function(e){return(null===e||void 0===e?void 0:e.reduce((function(e,t){return e[f(t.account)]=new c.default(t.value),e}),{}))||{}},t.getSupportedCurrencies=function(){return[{blockchain:s.Blockchain.TEZOS,type:"NATIVE"},{blockchain:s.Blockchain.TEZOS,type:"TEZOS_FT"}]},t.convertOrderToFillOrder=function(e){return Object.assign(Object.assign({},m(e)),{makeStock:(0,p.toBigNumber)(e.makeStock)})},t.convertOrderToOrderForm=m,t.getTezosAssetType=b,t.covertToLibAsset=function(e){switch(e.assetType.assetClass){case"XTZ":return{asset_type:{asset_class:e.assetType.assetClass},value:new c.default(e.value)};case"FT":return{asset_type:{asset_class:e.assetType.assetClass,contract:e.assetType.contract,token_id:void 0===e.assetType.tokenId?void 0:new c.default(e.assetType.tokenId)},value:new c.default(e.value)};case"NFT":case"MT":return{asset_type:{asset_class:e.assetType.assetClass,contract:e.assetType.contract,token_id:new c.default(e.assetType.tokenId)},value:new c.default(e.value)};default:throw new Error("Unknown Asset Class")}},t.convertTezosToUnionAsset=function(e){switch(e.assetClass){case"XTZ":return{"@type":"XTZ"};case"FT":return{"@type":"TEZOS_FT",contract:g(e.contract),tokenId:e.tokenId?(0,p.toBigNumber)(e.tokenId):void 0};case"NFT":return{"@type":"TEZOS_NFT",contract:g(e.contract),tokenId:(0,p.toBigNumber)(e.tokenId)};case"MT":return{"@type":"TEZOS_MT",contract:g(e.contract),tokenId:(0,p.toBigNumber)(e.tokenId)};default:throw new Error("Invalid asset type")}},t.getCollectionTypeAssetClass=function(e){switch(e){case s.CollectionType.TEZOS_MT:return"MT";case s.CollectionType.TEZOS_NFT:return"NFT";default:throw new Error("Unrecognized NFT collection type")}},t.convertUnionParts=v,t.convertFromContractAddress=h,t.convertUnionAddress=T,t.convertTezosOrderId=function(e){return(0,d.toOrderId)("".concat(s.Blockchain.TEZOS,":").concat(e))},t.convertTezosItemId=function(e){return(0,d.toItemId)("".concat(s.Blockchain.TEZOS,":").concat(e))},t.convertTezosToContractAddress=g,t.convertTezosToCollectionAddress=function(e){return(0,d.toCollectionId)("".concat(s.Blockchain.TEZOS,":").concat(e))},t.convertTezosToUnionAddress=function(e){return(0,d.toUnionAddress)("".concat(s.Blockchain.TEZOS,":").concat(e))},t.getTezosAssetTypeV2=function(e,t){return i.__awaiter(this,void 0,void 0,a().mark((function n(){var r,i;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=t["@type"],n.next="XTZ"===n.t0?3:"TEZOS_FT"===n.t0?4:24;break;case 3:return n.abrupt("return",{type:o.AssetTypeV2.XTZ,asset_contract:void 0,asset_token_id:void 0});case 4:return r=h(t.contract),i=o.AssetTypeV2.FA2,n.prev=6,n.next=9,(0,u.get_ft_type)(e,r);case 9:i=n.sent,n.next=15;break;case 12:n.prev=12,n.t1=n.catch(6),console.log("error get_ft_type",n.t1,r);case 15:if(i!==o.AssetTypeV2.FA2){n.next=19;break}return n.abrupt("return",{type:o.AssetTypeV2.FA2,asset_contract:r,asset_token_id:new c.default(t.tokenId||0)});case 19:if(i!==o.AssetTypeV2.FA12){n.next=23;break}return n.abrupt("return",{type:o.AssetTypeV2.FA12,asset_contract:r,asset_token_id:void 0});case 23:throw new Error("Unrecognized FT contract type, check contract and network");case 24:throw new Error("Invalid asset type");case 25:case"end":return n.stop()}}),n,null,[[6,12]])})))},t.getTokenIdString=function(e){return void 0!==e?e.toString():void 0},t.isNftAssetType=w,t.isMTAssetType=k,t.isXtzAssetType=function(e){return"XTZ"===e["@type"]},t.isFTAssetType=function(e){return"TEZOS_FT"===e["@type"]},t.isNftOrMTAssetType=function(e){return w(e)||k(e)},t.getRequestAmount=function(e,t){if(t===s.CollectionType.TEZOS_MT){if(void 0===e)throw new Error("You should set amount of asset");return new c.default(e.toFixed())}},t.getTezosOrderLegacyForm=function(e){if("TEZOS_RARIBLE_V2"!==e.data["@type"])throw new Error("Tezos order is not legacy (orderId=".concat(e.id,")"));var t,n=e.data;if(!n.legacyData)throw new Error("Tezos legacy order have to include legacyData (orderId=".concat(e.id,")"));try{t=JSON.parse(n.legacyData)}catch(r){throw new Error("Tezos legacy order parse data error")}return(0,o.order_of_json)(t)}},2928:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.FlowMint=void 0;var s=n(19),o=n(115),u=n(146),c=n(45),d=n(614),p=n(1271),l=n(269),y=n(2929),f=function(){function e(t,n,r){a(this,e),this.sdk=t,this.apis=n,this.network=r,this.prepare=this.prepare.bind(this),this.mintBasic=this.mintBasic.bind(this)}return i(e,[{key:"prepare",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,p.getCollection)(this.apis.collection,e);case 2:if("FLOW"!==(n=t.sent).type){t.next=6;break}return a=(0,l.getFlowCollection)(n.id),t.abrupt("return",{multiple:!1,supportsRoyalties:!0,supportsLazyMint:!1,submit:o.Action.create({id:"mint",run:function(e){return s.__awaiter(i,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sdk.nft.mint(a,e.uri,(0,y.prepareFlowRoyalties)(e.royalties));case 2:return n=t.sent,t.abrupt("return",{type:d.MintType.ON_CHAIN,itemId:(0,l.convertFlowItemId)(n.tokenId),transaction:new u.BlockchainFlowTransaction(n,this.network)});case 4:case"end":return t.stop()}}),t,this)})))}})});case 6:throw new Error("Unsupported collection type");case 7:case"end":return t.stop()}}),t,this)})))}},{key:"mintBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.prepare(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"preprocessMeta",value:function(e){var t,n;if(e.blockchain!==c.Blockchain.FLOW)throw new Error("Wrong blockchain");return{name:e.name,description:e.description,image:null===(t=e.image)||void 0===t?void 0:t.url,animation_url:null===(n=e.animation)||void 0===n?void 0:n.url,external_url:e.external,attributes:e.attributes}}}]),e}();t.FlowMint=f},2929:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareFlowRoyalties=void 0;var r=n(176),a=n(64),i=n(269);t.prepareFlowRoyalties=function(e){return e&&e.length>0?e.map((function(e){if((0,r.toBn)(e.value).gt(1e4))throw new Error("Value for royalty too big");return{account:(0,i.parseFlowAddressFromUnionAddress)(e.account),value:(0,a.toBigNumber)((0,r.toBn)(e.value).div(1e4).toString())}})):[]}},2930:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.FlowSell=void 0;var o=n(19),u=n(64),c=n(631),d=n(115),p=n(176),l=n(45),y=n(216),f=n(267),m=n(306),b=n(269),v=n(987),h=function(){function e(t,n){i(this,e),this.sdk=t,this.apis=n,this.sell=this.sell.bind(this),this.update=this.update.bind(this),this.sellBasic=this.sellBasic.bind(this),this.sellUpdateBasic=this.sellUpdateBasic.bind(this)}return s(e,[{key:"getPreparedOrder",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.apis.order.getOrderById({id:e}));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getFutureOrderFees",value:function(){return o.__awaiter(this,void 0,void 0,a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{originFeeSupport:y.OriginFeeSupport.FULL,baseFee:(0,v.getFlowBaseFee)(this.sdk)});case 1:case"end":return e.stop()}}),e,this)})))}},{key:"sell",value:function(){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=d.Action.create({id:"send-tx",run:function(e){return o.__awaiter(r,void 0,void 0,a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.sellCommon(e));case 1:case"end":return t.stop()}}),t,this)})))}}).after((function(e){return(0,b.convertFlowOrderId)(e.orderId)})),t.abrupt("return",{supportedCurrencies:e.supportedCurrencies,baseFee:(0,v.getFlowBaseFee)(this.sdk),originFeeSupport:y.OriginFeeSupport.FULL,payoutsSupport:y.PayoutsSupport.NONE,maxFeesBasePointSupport:y.MaxFeesBasePointSupport.IGNORED,supportsExpirationDate:!1,submit:n});case 2:case"end":return t.stop()}}),t,this)})))}},{key:"sellCommon",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r,i,s,o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("FLOW_FT"!==(n=(0,f.getCurrencyAssetType)(e.currency))["@type"]){t.next=5;break}return r=(0,b.getFungibleTokenName)(n.contract),i=(0,b.parseFlowItemIdFromUnionItemId)(e.itemId),s=i.itemId,o=i.contract,t.abrupt("return",this.sdk.order.sell({collection:o,currency:r,itemId:(0,c.toFlowItemId)("".concat(o,":").concat(s)),sellItemPrice:(0,p.toBn)(e.price).decimalPlaces(8).toString(),originFees:(0,b.toFlowParts)(e.originFees),end:e.expirationDate}));case 5:throw new Error("Unsupported currency type: ".concat(n["@type"]));case 6:case"end":return t.stop()}}),t,this)})))}},{key:"update",value:function(t){return o.__awaiter(this,void 0,void 0,a().mark((function n(){var i,s,c,f,h,T,g=this;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=t.orderId.split(":"),s=r(i,2),c=s[0],f=s[1],c===l.Blockchain.FLOW){n.next=3;break}throw new Error("Not an flow order");case 3:return n.next=5,this.getPreparedOrder(t.orderId);case 5:return h=n.sent,T=d.Action.create({id:"send-tx",run:function(e){return o.__awaiter(g,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("FLOW_FT"!==h.take.type["@type"]){t.next=7;break}if(n=(0,b.getFungibleTokenName)(h.take.type.contract),"FLOW_NFT"!==h.make.type["@type"]){t.next=6;break}return t.next=5,this.sdk.order.updateOrder({collection:(0,b.getFlowCollection)(h.make.type.contract),currency:n,order:parseInt(f),sellItemPrice:(0,u.toBigNumber)((0,p.toBn)(e.price).decimalPlaces(8).toString())});case 5:return t.abrupt("return",t.sent);case 6:throw new Error("Unsupported make asset: ".concat(h.make.type["@type"]));case 7:throw new Error("Unsupported take asset: ".concat(h.take.type["@type"]));case 8:case"end":return t.stop()}}),t,this)})))}}).after((function(e){return(0,b.convertFlowOrderId)(e.orderId)})),n.abrupt("return",{supportedCurrencies:e.supportedCurrencies,originFeeSupport:y.OriginFeeSupport.FULL,payoutsSupport:y.PayoutsSupport.NONE,maxFeesBasePointSupport:y.MaxFeesBasePointSupport.IGNORED,baseFee:(0,v.getFlowBaseFee)(this.sdk),submit:T,orderData:{nftCollection:(0,m.getNftContractAddress)(h.make.type)}});case 8:case"end":return n.stop()}}),n,this)})))}},{key:"sellBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sellCommon(e);case 2:return n=t.sent,t.abrupt("return",(0,b.convertFlowOrderId)(n.orderId));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"sellUpdateBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,i,s,o,c,d,y;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.orderId.split(":"),i=r(n,2),s=i[0],o=i[1],s===l.Blockchain.FLOW){t.next=3;break}throw new Error("Not an flow order");case 3:return t.next=5,this.getPreparedOrder(e.orderId);case 5:if("FLOW_FT"!==(c=t.sent).take.type["@type"]){t.next=14;break}if(d=(0,b.getFungibleTokenName)(c.take.type.contract),"FLOW_NFT"!==c.make.type["@type"]){t.next=13;break}return t.next=11,this.sdk.order.updateOrder({collection:(0,b.getFlowCollection)(c.make.type.contract),currency:d,order:parseInt(o),sellItemPrice:(0,u.toBigNumber)((0,p.toBn)(e.price).decimalPlaces(8).toString())});case 11:return y=t.sent,t.abrupt("return",(0,b.convertFlowOrderId)(y.orderId));case 13:throw new Error("Unsupported make asset: ".concat(c.make.type["@type"]));case 14:throw new Error("Unsupported take asset: ".concat(c.take.type["@type"]));case 15:case"end":return t.stop()}}),t,this)})))}}]),e}();t.FlowSell=h,h.supportedCurrencies=[{blockchain:l.Blockchain.FLOW,type:"NATIVE"}]},2931:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.FlowBuy=void 0;var s=n(19),o=n(515),u=n(115),c=n(146),d=n(216),p=n(306),l=s.__importStar(n(269)),y=n(269),f=n(987),m=function(){function e(t,n,r){a(this,e),this.sdk=t,this.apis=n,this.network=r,this.buy=this.buy.bind(this),this.buyBasic=this.buyBasic.bind(this),this.acceptBidBasic=this.acceptBidBasic.bind(this)}return i(e,[{key:"getPreparedOrder",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!("order"in e)){t.next=2;break}return t.abrupt("return",e.order);case 2:if(!("orderId"in e)){t.next=4;break}return t.abrupt("return",this.apis.order.getOrderById({id:e.orderId}));case 4:throw new Error("Incorrect request");case 5:case"end":return t.stop()}}),t,this)})))}},{key:"getFlowNftContract",value:function(e){if("FLOW_NFT"===e.make.type["@type"])return e.make.type.contract;if("FLOW_NFT"===e.take.type["@type"])return e.take.type.contract;throw new Error("This is not FLOW order")}},{key:"getFlowCurrency",value:function(e){if("FLOW_FT"===e.take.type["@type"])return l.getFungibleTokenName(e.take.type.contract);if("FLOW_FT"===e.make.type["@type"])return l.getFungibleTokenName(e.make.type.contract);throw new Error("No Flow fungible token found in order take and make values")}},{key:"fillCommon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,s=this;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getPreparedOrder(e);case 2:return a=n.sent,i=u.Action.create({id:"send-tx",run:function(t){return s.buyCommon(Object.assign(Object.assign(Object.assign({},t),e),{order:a}))}}),n.abrupt("return",{multiple:!1,maxAmount:(0,o.toBigNumber)("1"),baseFee:(0,f.getFlowBaseFee)(this.sdk),supportsPartialFill:!1,originFeeSupport:d.OriginFeeSupport.FULL,payoutsSupport:d.PayoutsSupport.NONE,maxFeesBasePointSupport:d.MaxFeesBasePointSupport.IGNORED,submit:i,orderData:{platform:a.platform,nftCollection:(0,p.getNftContractAddress)(t?a.take.type:a.make.type)}});case 5:case"end":return n.stop()}}),n,this)})))}},{key:"buy",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.fillCommon(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"acceptBid",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.fillCommon(e,!0));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"buyCommon",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,s,o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getFlowCurrency(e.order),a=l.parseFlowAddressFromUnionAddress(e.order.maker),i=l.getFlowCollection(this.getFlowNftContract(e.order)),s=l.parseOrderId(e.order.id),t.next=6,this.sdk.order.fill(i,n,s,a,(0,y.toFlowParts)(e.originFees));case 6:return o=t.sent,t.abrupt("return",new c.BlockchainFlowTransaction(o,this.network));case 8:case"end":return t.stop()}}),t,this)})))}},{key:"buyBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPreparedOrder(e);case 2:return n=t.sent,t.abrupt("return",this.buyCommon(Object.assign(Object.assign({},e),{order:n})));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"acceptBidBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPreparedOrder(e);case 2:return n=t.sent,t.abrupt("return",this.buyCommon(Object.assign(Object.assign({},e),{order:n})));case 4:case"end":return t.stop()}}),t,this)})))}}]),e}();t.FlowBuy=m},2932:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.FlowTransfer=void 0;var s=n(19),o=n(115),u=n(146),c=n(515),d=n(269),p=function(){function e(t,n){a(this,e),this.sdk=t,this.network=n,this.transfer=this.transfer.bind(this),this.transferBasic=this.transferBasic.bind(this)}return i(e,[{key:"transfer",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,p=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,d.parseFlowItemIdFromUnionItemId)(e.itemId),a=n.itemId,i=n.contract,t.abrupt("return",{multiple:!1,maxAmount:(0,c.toBigNumber)("1"),submit:o.Action.create({id:"transfer",run:function(e){return s.__awaiter(p,void 0,void 0,r().mark((function t(){var n,s;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,d.parseFlowAddressFromUnionAddress)(e.to),t.next=3,this.sdk.nft.transfer(i,parseInt(a),n);case 3:return s=t.sent,t.abrupt("return",new u.BlockchainFlowTransaction(s,this.network));case 5:case"end":return t.stop()}}),t,this)})))}})});case 2:case"end":return t.stop()}}),t)})))}},{key:"transferBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.transfer(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}}]),e}();t.FlowTransfer=p},2933:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.FlowBurn=void 0;var s=n(19),o=n(115),u=n(64),c=n(146),d=n(269),p=function(){function e(t,n){a(this,e),this.sdk=t,this.network=n,this.burn=this.burn.bind(this),this.burnBasic=this.burnBasic.bind(this)}return i(e,[{key:"burn",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,p=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.itemId){t.next=2;break}throw new Error("ItemId has not been specified");case 2:return n=(0,d.parseFlowItemIdFromUnionItemId)(e.itemId),a=n.itemId,i=n.contract,t.abrupt("return",{multiple:!1,maxAmount:(0,u.toBigNumber)("1"),submit:o.Action.create({id:"burn",run:function(e){return s.__awaiter(p,void 0,void 0,r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sdk.nft.burn(i,parseInt(a));case 2:return t=e.sent,e.abrupt("return",new c.BlockchainFlowTransaction(t,this.network));case 4:case"end":return e.stop()}}),e,this)})))}})});case 4:case"end":return t.stop()}}),t)})))}},{key:"burnBasic",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.burn(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}}]),e}();t.FlowBurn=p},2934:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.FlowCancel=void 0;var s=n(19),o=n(146),u=n(269),c=function(){function e(t,n,r){a(this,e),this.sdk=t,this.apis=n,this.network=r,this.cancel=this.cancel.bind(this)}return i(e,[{key:"cancel",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,s;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.orderId){t.next=2;break}throw new Error("OrderId has not been specified");case 2:return n=(0,u.parseOrderId)(e.orderId),t.next=5,this.apis.order.getOrderById({id:e.orderId});case 5:a=t.sent,t.t0=a.make.type["@type"],t.next="FLOW_NFT"===t.t0?9:"FLOW_FT"===t.t0?15:21;break;case 9:if("FLOW_FT"===a.take.type["@type"]){t.next=11;break}throw new Error("Invalid Flow order, make asset is not a Flow asset");case 11:return t.next=13,this.sdk.order.cancelOrder((0,u.getFlowCollection)(a.make.type.contract),n);case 13:return i=t.sent,t.abrupt("return",new o.BlockchainFlowTransaction(i,this.network));case 15:if("FLOW_NFT"===a.take.type["@type"]){t.next=17;break}throw new Error("Invalid Flow bid order, take asset is not a Flow asset");case 17:return t.next=19,this.sdk.order.cancelBid((0,u.getFlowCollection)(a.take.type.contract),n);case 19:return s=t.sent,t.abrupt("return",new o.BlockchainFlowTransaction(s,this.network));case 21:throw new Error("Not an Flow order");case 22:case"end":return t.stop()}}),t,this)})))}}]),e}();t.FlowCancel=c},2935:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.FlowBalance=void 0;var s=n(19),o=n(176),u=n(252),c=n(146),d=n(267),p=n(1373),l=n(269),y=n(1374),f=n(1375),m=function(){function e(t,n,r,i){a(this,e),this.sdk=t,this.env=n,this.network=r,this.wallet=i,this.getBalance=this.getBalance.bind(this),this.transfer=this.transfer.bind(this)}return i(e,[{key:"getBalance",value:function(e,t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,u,c,m=this;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=(0,d.getCurrencyAssetType)(t),!this.wallet){n.next=8;break}return i=(0,l.parseFlowAddressFromUnionAddress)(e),u=(0,y.getFlowCurrencyFromAssetType)(a),n.next=6,(0,p.retry)(10,1e3,(function(){return s.__awaiter(m,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sdk.wallet.getFungibleBalance(i,u);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}));case 6:return c=n.sent,n.abrupt("return",(0,o.toBn)(c));case 8:return n.next=10,(0,p.retry)(10,1e3,(function(){return s.__awaiter(m,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,f.getSimpleFlowFungibleBalance)(this.env,e,a);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})))}));case 10:return n.abrupt("return",n.sent);case 11:case"end":return n.stop()}}),n,this)})))}},{key:"transfer",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,s;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.wallet){t.next=2;break}throw new u.Warning("Wallet is undefined");case 2:return n=(0,d.getCurrencyAssetType)(e.currency),a=(0,l.parseFlowAddressFromUnionAddress)(e.recipient),i=(0,y.getFlowCurrencyFromAssetType)(n),t.next=7,this.sdk.wallet.transferFunds({recipient:a,currency:i,amount:e.amount});case 7:return s=t.sent,t.abrupt("return",new c.BlockchainFlowTransaction(s,this.network));case 9:case"end":return t.stop()}}),t,this)})))}}]),e}();t.FlowBalance=m},2936:function(e,t,n){"use strict";var r=n(48).default,a=n(20).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.FlowBid=void 0;var o=n(19),u=n(631),c=n(115),d=n(632),p=n(515),l=n(45),y=n(216),f=n(267),m=n(269),b=n(987),v=function(){function e(t){i(this,e),this.sdk=t,this.bid=this.bid.bind(this),this.update=this.update.bind(this),this.bidBasic=this.bidBasic.bind(this),this.bidUpdateBasic=this.bidUpdateBasic.bind(this)}return s(e,[{key:"getConvertableValue",value:function(){return o.__awaiter(this,void 0,void 0,a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",void 0);case 1:case"end":return e.stop()}}),e)})))}},{key:"getBidObjectData",value:function(e){if("collectionId"in e)throw new Error("Bid collection is not supported");if(!e.itemId)throw new Error("ItemId has not been specified");var t=e.itemId.split(":"),n=r(t,3),a=n[0],i=n[1],s=n[2];if(a!==l.Blockchain.FLOW)throw new Error("Not an flow item: ".concat(e.itemId));return{contract:i,tokenId:s,itemId:(0,d.toFlowItemId)("".concat(i,":").concat(s))}}},{key:"bid",value:function(t){return o.__awaiter(this,void 0,void 0,a().mark((function n(){var r,i,s=this;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=this.getBidObjectData(t),i=c.Action.create({id:"send-tx",run:function(e){return o.__awaiter(s,void 0,void 0,a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.bidCommon(e,r));case 1:case"end":return t.stop()}}),t,this)})))}}).after((function(e){return(0,m.convertFlowOrderId)(e.orderId)})),n.abrupt("return",{originFeeSupport:y.OriginFeeSupport.FULL,payoutsSupport:y.PayoutsSupport.NONE,maxFeesBasePointSupport:y.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:e.supportedCurrencies,multiple:!1,maxAmount:(0,p.toBigNumber)("1"),baseFee:(0,b.getFlowBaseFee)(this.sdk),getConvertableValue:this.getConvertableValue,supportsExpirationDate:!1,submit:i});case 3:case"end":return n.stop()}}),n,this)})))}},{key:"bidCommon",value:function(e,t){return o.__awaiter(this,void 0,void 0,a().mark((function n(){var r,i;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("FLOW_FT"!==(r=(0,f.getCurrencyAssetType)(e.currency))["@type"]){n.next=4;break}return i=(0,m.getFungibleTokenName)(r.contract),n.abrupt("return",this.sdk.order.bid((0,u.toFlowContractAddress)(t.contract),i,t.itemId,(0,p.toBigNumber)(e.price.toString()),(0,m.toFlowParts)(e.originFees)));case 4:throw new Error("Unsupported currency type: ".concat(r["@type"]));case 5:case"end":return n.stop()}}),n,this)})))}},{key:"update",value:function(t){return o.__awaiter(this,void 0,void 0,a().mark((function n(){var i,s,d,f,v,h,T=this;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.orderId){n.next=2;break}throw new Error("OrderId has not been specified");case 2:if(i=t.orderId.split(":"),s=r(i,2),d=s[0],f=s[1],d===l.Blockchain.FLOW){n.next=5;break}throw new Error("Not an flow order");case 5:return n.next=7,this.sdk.apis.order.getOrderByOrderId({orderId:f});case 7:return v=n.sent,h=c.Action.create({id:"send-tx",run:function(e){return o.__awaiter(T,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("fungible"!==v.make["@type"]){t.next=3;break}return n=(0,m.getFungibleTokenName)((0,m.convertFlowContractAddress)(v.make.contract)),t.abrupt("return",this.sdk.order.bidUpdate((0,u.toFlowContractAddress)(v.take.contract),n,v,(0,p.toBigNumber)(e.price.toString())));case 3:throw new Error("Unsupported currency type: ".concat(v.make["@type"]));case 4:case"end":return t.stop()}}),t,this)})))}}).after((function(e){return(0,m.convertFlowOrderId)(e.orderId)})),n.abrupt("return",{originFeeSupport:y.OriginFeeSupport.FULL,payoutsSupport:y.PayoutsSupport.NONE,maxFeesBasePointSupport:y.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:e.supportedCurrencies,baseFee:(0,b.getFlowBaseFee)(this.sdk),getConvertableValue:this.getConvertableValue,submit:h,orderData:{nftCollection:"contract"in v.take?(0,m.convertFlowContractAddress)(v.take.contract):void 0}});case 10:case"end":return n.stop()}}),n,this)})))}},{key:"bidBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getBidObjectData(e),t.next=3,this.bidCommon(e,n);case 3:return r=t.sent,t.abrupt("return",(0,m.convertFlowOrderId)(r.orderId));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"bidUpdateBasic",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.update(e);case 2:return n=t.sent,t.abrupt("return",n.submit(e));case 4:case"end":return t.stop()}}),t,this)})))}}]),e}();t.FlowBid=v,v.supportedCurrencies=[{blockchain:l.Blockchain.FLOW,type:"NATIVE"}]},2937:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.FlowSetupAccount=void 0;var s=n(19),o=n(146),u=n(269),c=function(){function e(t,n){a(this,e),this.sdk=t,this.network=n,this.setupAccount=this.setupAccount.bind(this),this.checkInitMattelCollections=this.checkInitMattelCollections.bind(this),this.setupMattelCollections=this.setupMattelCollections.bind(this)}return i(e,[{key:"setupAccount",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,u.getFlowCollection)(e),t.next=3,this.sdk.collection.setupAccount(n);case 3:return a=t.sent,t.abrupt("return",new o.BlockchainFlowTransaction(a,this.network));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"checkInitMattelCollections",value:function(){return s.__awaiter(this,void 0,void 0,r().mark((function e(){var t,n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sdk.collection.checkInitMattelCollections();case 2:return t=e.sent,n=Object.keys(t).every((function(e){return t[e]})),e.abrupt("return",{initCollections:n,collections:t});case 5:case"end":return e.stop()}}),e,this)})))}},{key:"setupMattelCollections",value:function(){return s.__awaiter(this,void 0,void 0,r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sdk.collection.setupMattelCollections();case 2:return t=e.sent,e.abrupt("return",new o.BlockchainFlowTransaction(t,this.network));case 4:case"end":return e.stop()}}),e,this)})))}}]),e}();t.FlowSetupAccount=c},2939:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2940:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default,s=n(37).default,o=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.FclConnectionProvider=void 0;var u=n(19),c=n(143),d=n(162),p=n(178),l="fcl",y=function(e){s(y,e);var t=o(y);function y(e){var n;return a(this,y),(n=t.call(this)).config=e,n.instance=(0,p.cache)((function(){return n._connect()})),n.connection=n.instance.pipe((0,d.mergeMap)((function(e){return n.toConnectState(e)})),(0,d.startWith)((0,p.getStateConnecting)({providerId:l}))),n}return i(y,[{key:"toConnectState",value:function(e){var t=function(){return e.unauthenticate()};return(0,c.defer)((function(){return e.currentUser().authenticate()})).pipe((0,d.map)((function(n){var r=n.addr;return r?(0,p.getStateConnected)({connection:{fcl:e,address:r},disconnect:t}):(0,p.getStateDisconnected)()})))}},{key:"getId",value:function(){return l}},{key:"getConnection",value:function(){return this.connection}},{key:"_connect",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then((function(){return u.__importStar(n(682))}));case 2:return(t=e.sent).config().put("accessNode.api",this.config.accessNode).put("discovery.wallet",this.config.walletDiscovery).put("env",this.config.network).put("app.detail.title",this.config.applicationTitle).put("app.detail.icon",this.config.applicationIcon),e.abrupt("return",t);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"getOption",value:function(){return Promise.resolve(l)}},{key:"isAutoConnected",value:function(){return Promise.resolve(!1)}},{key:"isConnected",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.instance.pipe((0,d.first)()).toPromise();case 2:return t=e.sent,e.abrupt("return",!!(null===t||void 0===t?void 0:t.currentUser()));case 4:case"end":return e.stop()}}),e,this)})))}}]),y}(p.AbstractConnectionProvider);t.FclConnectionProvider=y},298:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19);r.__exportStar(n(1752),t),r.__exportStar(n(907),t),r.__exportStar(n(1173),t)},301:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILL_CALLDATA_TAG=t.FEE_CONFIG_URL=void 0,t.FEE_CONFIG_URL="https://raw.githubusercontent.com/rarible/sdk/master/packages/ethereum/sdk/src/config/fees.json",t.FILL_CALLDATA_TAG="09616c6c64617461"},3013:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default,s=n(37).default,o=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.MEWConnectionProvider=void 0;var u=n(19),c=n(162),d=n(178),p="mew",l=function(e){s(l,e);var t=o(l);function l(e){var n;return a(this,l),(n=t.call(this)).config=e,n.instance=(0,d.cache)((function(){return n._connect()})),n.connection=n.instance.pipe((0,c.mergeMap)((function(e){return(0,d.connectToWeb3)(e.makeWeb3Provider(),{disconnect:function(){return e.disconnect()}})})),(0,c.startWith)((0,d.getStateConnecting)({providerId:p}))),n}return i(l,[{key:"_connect",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){var t,a,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then((function(){return u.__importStar(n(3014))}));case 2:return t=e.sent,a=t.default,i=new a.Provider({chainId:this.config.networkId,rpcUrl:this.config.rpcUrl,noUrlCheck:!0,windowClosedError:!0}),e.next=7,i.enable();case 7:return e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)})))}},{key:"getId",value:function(){return p}},{key:"getConnection",value:function(){return this.connection}},{key:"getOption",value:function(){return Promise.resolve(p)}},{key:"isAutoConnected",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)})))}},{key:"isConnected",value:function(){var e;return u.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.instance.pipe((0,c.first)()).toPromise();case 2:return n=t.sent,t.abrupt("return",!!(null===(e=null===n||void 0===n?void 0:n.Provider)||void 0===e?void 0:e.isConnected));case 4:case"end":return t.stop()}}),t,this)})))}}]),l}(d.AbstractConnectionProvider);t.MEWConnectionProvider=l},302:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRequiredWallet=void 0;var r=n(1173);t.getRequiredWallet=function(e){if(!e)throw new r.WalletIsUndefinedError;return e}},303:function(e,t,n){"use strict";var r,a=n(204).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getConduitByKey=t.KNOWN_CONDUIT_KEYS_TO_CONDUIT=t.DOMAIN_REGISTRY_ADDRESS=t.CROSS_CHAIN_SEAPORT_V1_5_ADDRESS=t.CROSS_CHAIN_SEAPORT_V1_4_ADDRESS=t.CROSS_CHAIN_SEAPORT_ADDRESS=t.NO_CONDUIT=t.ONE_HUNDRED_PERCENT_BP=t.MAX_INT=t.BasicOrderRouteType=t.Side=t.ItemType=t.OrderType=t.EIP_712_BULK_ORDER_TYPE=t.EIP_712_ORDER_TYPE=t.OPENSEA_CONDUIT_ADDRESS=t.OPENSEA_CONDUIT_KEY=t.SEAPORT_CONTRACT_VERSION_V1_4=t.SEAPORT_CONTRACT_VERSION=t.SEAPORT_CONTRACT_NAME=void 0;var i=n(121);t.SEAPORT_CONTRACT_NAME="Seaport",t.SEAPORT_CONTRACT_VERSION="1.5",t.SEAPORT_CONTRACT_VERSION_V1_4="1.4",t.OPENSEA_CONDUIT_KEY="0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000",t.OPENSEA_CONDUIT_ADDRESS="0x1e0049783f008a0085193e00003d00cd54003c71",t.EIP_712_ORDER_TYPE={OrderComponents:[{name:"offerer",type:"address"},{name:"zone",type:"address"},{name:"offer",type:"OfferItem[]"},{name:"consideration",type:"ConsiderationItem[]"},{name:"orderType",type:"uint8"},{name:"startTime",type:"uint256"},{name:"endTime",type:"uint256"},{name:"zoneHash",type:"bytes32"},{name:"salt",type:"uint256"},{name:"conduitKey",type:"bytes32"},{name:"counter",type:"uint256"}],OfferItem:[{name:"itemType",type:"uint8"},{name:"token",type:"address"},{name:"identifierOrCriteria",type:"uint256"},{name:"startAmount",type:"uint256"},{name:"endAmount",type:"uint256"}],ConsiderationItem:[{name:"itemType",type:"uint8"},{name:"token",type:"address"},{name:"identifierOrCriteria",type:"uint256"},{name:"startAmount",type:"uint256"},{name:"endAmount",type:"uint256"},{name:"recipient",type:"address"}]},t.EIP_712_BULK_ORDER_TYPE={BulkOrder:[{name:"tree",type:"OrderComponents[2][2][2][2][2][2][2]"}],OrderComponents:[{name:"offerer",type:"address"},{name:"zone",type:"address"},{name:"offer",type:"OfferItem[]"},{name:"consideration",type:"ConsiderationItem[]"},{name:"orderType",type:"uint8"},{name:"startTime",type:"uint256"},{name:"endTime",type:"uint256"},{name:"zoneHash",type:"bytes32"},{name:"salt",type:"uint256"},{name:"conduitKey",type:"bytes32"},{name:"counter",type:"uint256"}],OfferItem:[{name:"itemType",type:"uint8"},{name:"token",type:"address"},{name:"identifierOrCriteria",type:"uint256"},{name:"startAmount",type:"uint256"},{name:"endAmount",type:"uint256"}],ConsiderationItem:[{name:"itemType",type:"uint8"},{name:"token",type:"address"},{name:"identifierOrCriteria",type:"uint256"},{name:"startAmount",type:"uint256"},{name:"endAmount",type:"uint256"},{name:"recipient",type:"address"}]},function(e){e[e.FULL_OPEN=0]="FULL_OPEN",e[e.PARTIAL_OPEN=1]="PARTIAL_OPEN",e[e.FULL_RESTRICTED=2]="FULL_RESTRICTED",e[e.PARTIAL_RESTRICTED=3]="PARTIAL_RESTRICTED"}(t.OrderType||(t.OrderType={})),function(e){e[e.NATIVE=0]="NATIVE",e[e.ERC20=1]="ERC20",e[e.ERC721=2]="ERC721",e[e.ERC1155=3]="ERC1155",e[e.ERC721_WITH_CRITERIA=4]="ERC721_WITH_CRITERIA",e[e.ERC1155_WITH_CRITERIA=5]="ERC1155_WITH_CRITERIA"}(t.ItemType||(t.ItemType={})),function(e){e[e.OFFER=0]="OFFER",e[e.CONSIDERATION=1]="CONSIDERATION"}(t.Side||(t.Side={})),function(e){e[e.ETH_TO_ERC721=0]="ETH_TO_ERC721",e[e.ETH_TO_ERC1155=1]="ETH_TO_ERC1155",e[e.ERC20_TO_ERC721=2]="ERC20_TO_ERC721",e[e.ERC20_TO_ERC1155=3]="ERC20_TO_ERC1155",e[e.ERC721_TO_ERC20=4]="ERC721_TO_ERC20",e[e.ERC1155_TO_ERC20=5]="ERC1155_TO_ERC20"}(t.BasicOrderRouteType||(t.BasicOrderRouteType={})),t.MAX_INT=(0,i.toBn)("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.ONE_HUNDRED_PERCENT_BP=1e4,t.NO_CONDUIT="0x0000000000000000000000000000000000000000000000000000000000000000",t.CROSS_CHAIN_SEAPORT_ADDRESS="0x00000000006c3852cbef3e08e8df289169ede581",t.CROSS_CHAIN_SEAPORT_V1_4_ADDRESS="0x00000000000001ad428e4906aE43D8F9852d0dD6",t.CROSS_CHAIN_SEAPORT_V1_5_ADDRESS="0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC",t.DOMAIN_REGISTRY_ADDRESS="0x000000000DaD0DE04D2B2D4a5A74581EBA94124A",t.KNOWN_CONDUIT_KEYS_TO_CONDUIT=(a(r={},t.OPENSEA_CONDUIT_KEY,t.OPENSEA_CONDUIT_ADDRESS),a(r,t.NO_CONDUIT,t.CROSS_CHAIN_SEAPORT_V1_5_ADDRESS),r),t.getConduitByKey=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.NO_CONDUIT,n=arguments.length>1?arguments[1]:void 0;if(e===t.OPENSEA_CONDUIT_KEY)return t.OPENSEA_CONDUIT_ADDRESS;if(e===t.NO_CONDUIT)return n;throw new Error("Unexpected conduit key: ".concat(e))}},304:function(e,t,n){"use strict";var r=n(78).default,a=n(204).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getMaximumSizeForOrder=t.getSummedTokenAndIdentifierAmounts=t.getPresentItemAmount=t.isCriteriaItem=t.isErc1155Item=t.isErc721Item=t.isErc20Item=t.isNativeCurrencyItem=t.isCurrencyItem=void 0;var i=n(121),s=n(121),o=n(1255),u=n(621),c=n(303);t.isCurrencyItem=function(e){var t=e.itemType;return[c.ItemType.NATIVE,c.ItemType.ERC20].includes(t)};t.isNativeCurrencyItem=function(e){return e.itemType===c.ItemType.NATIVE};t.isErc20Item=function(e){return e===c.ItemType.ERC20};t.isErc721Item=function(e){return[c.ItemType.ERC721,c.ItemType.ERC721_WITH_CRITERIA].includes(e)};t.isErc1155Item=function(e){return[c.ItemType.ERC1155,c.ItemType.ERC1155_WITH_CRITERIA].includes(e)};t.isCriteriaItem=function(e){return[c.ItemType.ERC721_WITH_CRITERIA,c.ItemType.ERC1155_WITH_CRITERIA].includes(e)};t.getPresentItemAmount=function(e){var t=e.startAmount,n=e.endAmount,r=e.timeBasedItemParams,a=(0,s.toBn)(t),i=(0,s.toBn)(n);if(!r)return a.gt(i)?a:i;var o=r.isConsiderationItem,u=r.currentBlockTimestamp,c=r.ascendingAmountTimestampBuffer,d=r.startTime,p=r.endTime,l=(0,s.toBn)(p).minus(d),y=i.gt(t),f=(0,s.toBn)(y?u+c:u);if(f.lt(d))return a;var m=(f.gt(p)?(0,s.toBn)(p):f).minus(d),b=l.minus(m);return a.multipliedBy(b).plus(i.multipliedBy(m)).plus(o?l.minus(1):0).div(l)};t.getSummedTokenAndIdentifierAmounts=function(e){var n=e.items,r=e.criterias,o=e.timeBasedItemParams,c=(0,u.getItemToCriteriaMap)(n,r),d=n.reduce((function(e,n){var r,i,u,d,p=null!==(i=null===(r=c.get(n))||void 0===r?void 0:r.identifier)&&void 0!==i?i:n.identifierOrCriteria;return Object.assign(Object.assign({},e),a({},n.token,Object.assign(Object.assign({},e[n.token]),a({},p,(0,s.toBn)(null!==(d=null===(u=e[n.token])||void 0===u?void 0:u[p])&&void 0!==d?d:(0,s.toBn)(0)).plus((0,t.getPresentItemAmount)({startAmount:n.startAmount,endAmount:n.endAmount,timeBasedItemParams:o}))))))}),{});return Object.keys(d).forEach((function(e){Object.keys(d[e]).forEach((function(t){var n;d[e][t]=null===(n=d[e][t])||void 0===n?void 0:n.integerValue(i.BigNumber.ROUND_CEIL)}))})),d};t.getMaximumSizeForOrder=function(e){var t=e.parameters,n=t.offer,a=t.consideration,i=[].concat(r(n),r(a)).flatMap((function(e){return[e.startAmount,e.endAmount]}));return(0,o.findGcd)(i)}},306:function(e,t,n){"use strict";var r=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getContractFromMintRequest=t.getCollectionFromItemId=t.getItemIdData=t.getOrderNftContractAddress=t.getNftContractAddress=t.getOrderIdFromFillRequest=void 0;var a=n(64);function i(e){switch(e["@type"]){case"FLOW_NFT":case"TEZOS_NFT":case"ERC721":case"ERC721_Lazy":case"ERC1155":case"ERC1155_Lazy":case"CRYPTO_PUNKS":case"GEN_ART":case"COLLECTION":case"AMM_NFT":return e.contract;default:return}}function s(e){if(!e)throw new Error("Not an item: ".concat(e));var t=e.split(":"),n=r(t,3),i=n[0],s=n[1],o=n[2];return{collection:(0,a.toCollectionId)("".concat(i,":").concat(s)),contract:s,tokenId:o,blockchain:i}}t.getOrderIdFromFillRequest=function(e){var t;if(e)return"orderId"in e?null===e||void 0===e?void 0:e.orderId:"order"in e?null===(t=null===e||void 0===e?void 0:e.order)||void 0===t?void 0:t.id:void 0},t.getNftContractAddress=i,t.getOrderNftContractAddress=function(e){return i(e.make.type)||i(e.take.type)},t.getItemIdData=s,t.getCollectionFromItemId=function(e){return s(e).collection},t.getContractFromMintRequest=function(e){if("collection"in e)return e.collection.id;if("collectionId"in e)return e.collectionId;throw new Error("Wrong request: collection or collectionId has not been found")}},307:function(e,t,n){"use strict";(function(e){var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getTokenAmount=t.getAssociatedTokenAccountForMint=t.getAccountInfo=t.getPriceWithMantissa=t.getMasterEdition=t.getMetadata=t.createAssociatedTokenAccountInstruction=t.getTokenWallet=void 0;var a=n(19),i=n(32),s=n(138),o=a.__importDefault(n(53)),u=n(532);t.getTokenWallet=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.PublicKey.findProgramAddress([e.toBuffer(),s.TOKEN_PROGRAM_ID.toBuffer(),t.toBuffer()],u.SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID);case 2:return n.abrupt("return",n.sent[0]);case 3:case"end":return n.stop()}}),n)})))},t.createAssociatedTokenAccountInstruction=function(t,n,r,a){var o=[{pubkey:n,isSigner:!0,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:a,isSigner:!1,isWritable:!1},{pubkey:i.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:s.TOKEN_PROGRAM_ID,isSigner:!1,isWritable:!1},{pubkey:i.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];return new i.TransactionInstruction({keys:o,programId:u.SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID,data:e.from([])})},t.getMetadata=function(t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.PublicKey.findProgramAddress([e.from("metadata"),u.TOKEN_METADATA_PROGRAM_ID.toBuffer(),t.toBuffer()],u.TOKEN_METADATA_PROGRAM_ID);case 2:return n.abrupt("return",n.sent[0]);case 3:case"end":return n.stop()}}),n)})))},t.getMasterEdition=function(t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.PublicKey.findProgramAddress([e.from("metadata"),u.TOKEN_METADATA_PROGRAM_ID.toBuffer(),t.toBuffer(),e.from("edition")],u.TOKEN_METADATA_PROGRAM_ID);case 2:return n.abrupt("return",n.sent[0]);case 3:case"end":return n.stop()}}),n)})))},t.getPriceWithMantissa=function(e,t,n,i){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var u,c,d,p;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=new s.Token(e,n,s.TOKEN_PROGRAM_ID,i),r.next=3,u.getMintInfo();case 3:if(c=r.sent,d=Math.pow(10,c.decimals),!(p=t.multipliedBy(d).integerValue(o.default.ROUND_CEIL)).gt(Math.pow(2,64))){r.next=8;break}throw new Error("Total price with mantissa for lot ".concat(p.toString()," ")+"is lager than maximum allowed value ".concat(Math.pow(2,64),". Try to split lot, or reduce item price."));case 8:return r.abrupt("return",p);case 9:case"end":return r.stop()}}),a)})))},t.getAccountInfo=function(e,t,n,i){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var o;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=new s.Token(e,t,s.TOKEN_PROGRAM_ID,n),r.next=3,o.getAccountInfo(i);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),a)})))},t.getAssociatedTokenAccountForMint=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.PublicKey.findProgramAddress([t.toBuffer(),s.TOKEN_PROGRAM_ID.toBuffer(),e.toBuffer()],u.SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID);case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),n)})))},t.getTokenAmount=function(e,t,n,s){var c,d=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return a.__awaiter(this,void 0,void 0,r().mark((function t(){var a,p;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=new o.default(0),s.equals(u.WRAPPED_SOL_MINT)){t.next=15;break}return t.prev=2,t.next=5,e.getTokenAccountBalance(n,"confirmed");case 5:p=t.sent,(null===(c=null===p||void 0===p?void 0:p.value)||void 0===c?void 0:c.uiAmount)&&(a=d?new o.default(p.value.uiAmount).multipliedBy(Math.pow(10,p.value.decimals)):new o.default(p.value.uiAmount)),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(2),console.error(t.t0),console.info("Account ",n.toBase58(),"didnt return value. Assuming 0 tokens.");case 13:t.next=21;break;case 15:return t.t1=o.default,t.next=18,e.getBalance(n,"confirmed");case 18:t.t2=t.sent,a=new t.t1(t.t2),a=d?a:a.dividedBy(i.LAMPORTS_PER_SOL);case 21:return t.abrupt("return",a);case 22:case"end":return t.stop()}}),t,null,[[2,9]])})))}}).call(this,n(15).Buffer)},3261:function(e,t){},3360:function(e,t){},3367:function(e,t){},3492:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3493:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default,s=n(37).default,o=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.BeaconConnectionProvider=void 0;var u=n(19),c=n(143),d=n(162),p=n(178),l="beacon",y=function(e){s(y,e);var t=o(y);function y(e){var n;return a(this,y),(n=t.call(this)).config=e,n.instance=(0,p.cache)((function(){return n._connect()})),n.connection=n.instance.pipe((0,d.mergeMap)((function(e){var t=e.beaconWallet,r=e.tezosToolkit;return n.toConnectState(t,r)})),(0,d.startWith)((0,p.getStateConnecting)({providerId:l}))),n}return i(y,[{key:"toConnectState",value:function(e,t){var n=this,a=function(){return u.__awaiter(n,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.disconnect();case 2:return t.next=4,e.client.removeAllPeers();case 4:return t.next=6,e.client.removeAllAccounts();case 6:return t.next=8,e.client.destroy();case 8:case"end":return t.stop()}}),t)})))};return(0,c.defer)((function(){return n.getAddress(e)})).pipe((0,d.map)((function(n){return(0,p.getStateConnected)({connection:{address:n,toolkit:t,wallet:e},disconnect:a})})))}},{key:"getAddress",value:function(e){return u.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.client.getActiveAccount();case 2:if(!(a=t.sent)){t.next=7;break}n=Promise.resolve(a.address),t.next=10;break;case 7:return t.next=9,e.requestPermissions({network:{type:this.config.network,rpcUrl:this.config.accessNode}});case 9:n=e.getPKH();case 10:return t.abrupt("return",n);case 11:case"end":return t.stop()}}),t,this)})))}},{key:"getId",value:function(){return l}},{key:"getConnection",value:function(){return this.connection}},{key:"_connect",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){var t,a,i,s,o,c;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then((function(){return u.__importStar(n(579))}));case 2:return t=e.sent,a=t.TezosToolkit,e.next=6,Promise.resolve().then((function(){return u.__importStar(n(3980))}));case 6:return i=e.sent,s=i.BeaconWallet,o=new s({name:this.config.appName,preferredNetwork:this.config.network}),(c=new a(this.config.accessNode)).setWalletProvider(o),e.abrupt("return",{beaconWallet:o,tezosToolkit:c});case 12:case"end":return e.stop()}}),e,this)})))}},{key:"getOption",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",l);case 1:case"end":return e.stop()}}),e)})))}},{key:"isAutoConnected",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)})))}},{key:"isConnected",value:function(){return u.__awaiter(this,void 0,void 0,r().mark((function e(){var t,n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.instance.pipe((0,d.first)()).toPromise();case 2:return t=e.sent,e.next=5,null===t||void 0===t?void 0:t.beaconWallet.client.getActiveAccount();case 5:return n=e.sent,e.abrupt("return",!!n);case 7:case"end":return e.stop()}}),e,this)})))}}]),y}(p.AbstractConnectionProvider);t.BeaconConnectionProvider=y},3497:function(e,t){},3507:function(e,t){},3509:function(e,t){},3516:function(e,t){},3530:function(e,t){},3549:function(e,t){},3551:function(e,t){},3554:function(e,t){},3612:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitUntil=void 0,t.waitUntil=function(e,t,n){var r=Date.now();function a(i,s){e()?i():Date.now()-r>n?s():setTimeout((function(){return a(i,s)}),t)}return new Promise((function(e,t){a(e,t)}))}},3613:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3614:function(e,t){},3619:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},362:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.waitTx=void 0;var a=n(19);t.waitTx=function(e){return a.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:if(void 0===(n=t.sent)){t.next=6;break}return t.next=6,n.wait();case 6:case"end":return t.stop()}}),t)})))}},3620:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapEthereumWallet=void 0;var r=n(19),a=n(89),i=n(1181),s=r.__importDefault(n(3621)),o=n(45);t.mapEthereumWallet=function(e){return e.map((function(e){var t=function(e){switch(e){case 137:case 80001:case 300501:case 200501:return o.Blockchain.POLYGON;case 5e3:case 5001:return o.Blockchain.MANTLE;default:return o.Blockchain.ETHEREUM}}(e.chainId),n=new s.default(e.provider);return{wallet:new a.EthereumWallet(new i.Web3Ethereum({web3:n,from:e.address})),address:e.address,blockchain:t}}))}},3622:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapFlowWallet=void 0;var r=n(89),a=n(45);t.mapFlowWallet=function(e){return e.map((function(e){return{wallet:new r.FlowWallet(e.fcl,"auth"in e?e.auth:void 0),address:e.address,blockchain:a.Blockchain.FLOW}}))}},3623:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.mapTezosWallet=void 0;var a=n(19),i=n(89),s=n(45);t.mapTezosWallet=function(e){var t=this;return e.map((function(e){return a.__awaiter(t,void 0,void 0,r().mark((function t(){var o,u,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return a.__importStar(n(3624))}));case 2:return o=t.sent,u=o.beacon_provider,t.next=6,u(e.wallet,e.toolkit);case 6:return c=t.sent,t.abrupt("return",{wallet:new i.TezosWallet(c),address:e.address,blockchain:s.Blockchain.TEZOS});case 8:case"end":return t.stop()}}),t)})))}))}},3625:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapSolanaWallet=void 0;var r=n(89),a=n(45);t.mapSolanaWallet=function(e){return e.map((function(e){return{wallet:new r.SolanaWallet({publicKey:e.publicKey,signTransaction:e.signTransaction,signAllTransactions:e.signAllTransactions,signMessage:e.signMessage}),address:e.address,blockchain:a.Blockchain.SOLANA}}))}},3626:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3627:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapImmutableXWallet=void 0;var r=n(45),a=n(89);t.mapImmutableXWallet=function(e){return e.map((function(e){return{wallet:new a.ImmutableXWallet(e.wallet),address:e.address,blockchain:r.Blockchain.IMMUTABLEX}}))}},363:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBasisPointsPlusAccount=t.calcValueWithFees=t.originFeeValueConvert=t.getPackedFeeValue=t.setFeesCurrency=t.packFeesToUint=t.ZERO_FEE_VALUE=void 0;var r=n(121),a=n(121),i=n(73);function s(e){var t=o(e[0]),n=o(e[1]);return(0,i.toBigNumber)("0x"+"0".repeat(56)+t+n)}function o(e){var t;return null!==(t=null===e||void 0===e?void 0:e.toString(16).padStart(4,"0"))&&void 0!==t?t:"0000"}t.ZERO_FEE_VALUE=(0,i.toBigNumber)("0x"+"0".repeat(64)),t.packFeesToUint=s,t.setFeesCurrency=function(e,t){var n=(e.startsWith("0x")?e.slice(2):e).padStart(13,"0").split("");return n[n.length-13]=Number(t).toString(),(0,i.toBigNumber)("0x"+n.join(""))},t.getPackedFeeValue=o,t.originFeeValueConvert=function(e){var t,n,r,a,o,u,c,d,p,l;if(e&&e.length>2)throw new Error("This method supports max up to 2 origin fee values");var y=s([null===(t=null===e||void 0===e?void 0:e[0])||void 0===t?void 0:t.value,null===(n=null===e||void 0===e?void 0:e[1])||void 0===n?void 0:n.value]),f=[null!==(a=null===(r=null===e||void 0===e?void 0:e[0])||void 0===r?void 0:r.account)&&void 0!==a?a:i.ZERO_ADDRESS,null!==(u=null===(o=null===e||void 0===e?void 0:e[1])||void 0===o?void 0:o.account)&&void 0!==u?u:i.ZERO_ADDRESS];return{encodedFeesValue:y,totalFeeBasisPoints:(null!==(d=null===(c=null===e||void 0===e?void 0:e[0])||void 0===c?void 0:c.value)&&void 0!==d?d:0)+(null!==(l=null===(p=null===e||void 0===e?void 0:e[1])||void 0===p?void 0:p.value)&&void 0!==l?l:0),feeAddresses:f}},t.calcValueWithFees=function(e,t){return(0,r.toBn)(t).dividedBy(1e4).multipliedBy(e).integerValue(a.BigNumber.ROUND_FLOOR).plus(e)},t.encodeBasisPointsPlusAccount=function(e,t){var n=(0,r.toBn)("0x"+e.toString(16)+"0".repeat(40));return(0,i.toBigNumber)("0x"+n.plus(t).toString(16))}},364:function(e,t,n){"use strict";var r=n(22).default,a=n(21).default,i=n(203).default,s=n(37).default,o=n(38).default,u=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WrongNetworkWarning=t.checkChainId=void 0;var c=n(19),d=n(406),p=n(302);t.checkChainId=function(e,t){return c.__awaiter(this,void 0,void 0,u().mark((function n(){var r,a;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=(0,p.getRequiredWallet)(e),n.next=3,r.getChainId();case 3:if(a=n.sent,t.chainId===a){n.next=6;break}throw new l(a,t.chainId);case 6:return n.abrupt("return",!0);case 7:case"end":return n.stop()}}),n)})))};var l=function(e){s(n,e);var t=o(n);function n(e,r){var s;return a(this,n),(s=t.call(this,"Change network of your wallet. Required chainId ".concat(r,", but active is ").concat(e))).name="WrongNetworkWarning",Object.setPrototypeOf(i(s),n.prototype),s}return r(n)}(d.Warning);t.WrongNetworkWarning=l},3646:function(e,t){},3651:function(e,t){},366:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkPayouts=void 0;var r=n(252);t.checkPayouts=function(e){if(null===e||void 0===e?void 0:e.length){var t=e.reduce((function(e,t){return e+ +t.value}),0);if(1e4!==t)throw new r.Warning("Sum of the values of Payouts objects should be equal to 10000 basis points, passed=".concat(t))}}},367:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.alignBn=t.bigNumToBn=t.bigNumToBuffer=t.bnToBuffer=void 0;var r=n(956);function a(t,n,r){return t.toArrayLike(e,n,r)}function i(e){return new r.BN(e.toString())}t.bnToBuffer=a,t.bigNumToBuffer=function(e,t,n){return a(i(e),t,n)},t.bigNumToBn=i,t.alignBn=function(e,t){return new r.BN(a(e,"le",t))}}).call(this,n(15).Buffer)},3976:function(e,t,n){"use strict";function r(e,t){if(typeof e!==typeof t)return!1;if("object"!==typeof e||null===e||null===t)return e===t;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var i=0,s=n;i2&&void 0!==arguments[2]?arguments[2]:1e3;return a.__awaiter(this,void 0,void 0,r().mark((function s(){var o=this;return r().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",(0,i.retry)(10,n,(function(){return a.__awaiter(o,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e();case 2:if(a=n.sent,!t){n.next=6;break}if(t(a)){n.next=6;break}throw new Error("Predicate is not matched");case 6:return n.abrupt("return",a);case 7:case"end":return n.stop()}}),n)})))})));case 1:case"end":return s.stop()}}),s)})))}},3979:function(e,t,n){"use strict";n.r(t);var r=n(10),a=n.n(r),i=n(442),s=n.n(i),o=n(157),u=n(4114),c=n(4130),d=n(4132),p=n(4139),l=n(113),y=n(4131),f=n(893),m=n(3);function b(e){var t=e.header,n=e.children;return Object(m.jsxs)("div",{children:[t&&Object(m.jsx)(f.a,{variant:"h4",component:"h1",gutterBottom:!0,children:t}),n]})}function v(e){var t=e.wrap,n=e.children;return Object(m.jsx)("code",{style:{display:"inline-block",background:"#eee",borderRadius:3,padding:"0 4px",color:"#df3d3d",wordBreak:t?"break-word":"normal",userSelect:"all"},children:n})}function h(){return Object(m.jsxs)(b,{header:"About this example",children:["With this example, you can:",Object(m.jsxs)("ul",{children:[Object(m.jsx)("li",{children:"Connect wallets"}),Object(m.jsx)("li",{children:"Deploy collections"}),Object(m.jsx)("li",{children:"Mint NFTs"}),Object(m.jsx)("li",{children:"Sell NFTs"}),Object(m.jsx)("li",{children:"Buy NFTs"}),Object(m.jsx)("li",{children:"Make and accept Bid"}),Object(m.jsx)("li",{children:"Transfer & Burn NFT"})]}),"This example uses:",Object(m.jsxs)("ul",{children:[Object(m.jsxs)("li",{children:[Object(m.jsx)(v,{children:"@rarible/sdk"})," \u2014 ",Object(m.jsx)(y.a,{href:"https://github.com/rarible/sdk",target:"_blank",children:"Rarible Protocol SDK"})]}),Object(m.jsxs)("li",{children:[Object(m.jsx)(v,{children:"@rarible/connector"})," \u2014 ",Object(m.jsx)(y.a,{href:"https://github.com/rarible/sdk/tree/master/packages/connector",target:"_blank",children:"Rarible SDK Wallet Connector"})]}),Object(m.jsxs)("li",{children:[Object(m.jsx)(v,{children:"@rixio/react"})," \u2014 ",Object(m.jsx)(y.a,{href:"https://github.com/roborox/rixio",target:"_blank",children:"Rixio"})]})]}),"See more information about SDK usage in ",Object(m.jsx)(y.a,{href:"https://docs.rarible.org/",target:"_blank",children:"Protocol documentation"}),"."]})}var T=n(27),g=n(12),w=n(222),k=n(4125),x=["comment","children"];function O(e){var t=e.comment,n=e.children,r=Object(w.a)(e,x);return Object(m.jsxs)(k.a,Object(T.a)(Object(T.a)({container:!0,rowSpacing:1,spacing:1,columns:{xs:1,lg:2}},r),{},{children:[Object(m.jsx)(k.a,{item:!0,xs:1,children:n}),Object(m.jsx)(k.a,{item:!0,xs:1,children:t&&Object(m.jsx)(d.a,{sx:function(e){var t;return t={p:1},Object(g.a)(t,e.breakpoints.up("lg"),{borderLeft:"5px solid #eee",height:"100%"}),Object(g.a)(t,e.breakpoints.down("lg"),{borderTop:"5px solid #eee",borderBottom:"5px solid #eee"}),t},children:t})})]}))}var _=n(179),E=n(846),A=n(4117),C=n(4104),I=n(4116),S=n(4126),R=n(4127),j=n(178),P=n(93),B=n(853),M=n(64),F=n(45),N=n(427),D=n(25),L=n(0),U=n(9),V=n(137),W=n(1622),H=n(1639),K=n(1644),z=n(1645),G=n(1650),Z=n(1657),q=n(1658),Y=n(1659),X=n(282),J=n(1661),Q=n(1662),$=n(1663),ee={1:"https://node-mainnet.rarible.com",3:"https://node-ropsten.rarible.com",4:"https://node-rinkeby.rarible.com",5:"https://goerli-ethereum-node.rarible.com",17:"https://node-e2e.rarible.com",137:"https://polygon-rpc.com",80001:"https://rpc-mumbai.matic.today"},te={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",17:"e2e",137:"polygon",80001:"mumbai"};function ne(e){return"prod"===e?"prod":"testnet"}var re={getValue:function(){return Object(U.a)(Object(L.a)().mark((function e(){var t;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=localStorage.getItem("saved_provider"),e.abrupt("return",t||void 0);case 2:case"end":return e.stop()}}),e)})))()},setValue:function(e){return Object(U.a)(Object(L.a)().mark((function t(){return Object(L.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:localStorage.setItem("saved_provider",e||"");case 1:case"end":return t.stop()}}),t)})))()}};function ae(e){var t=function(e){return"prod"===e?1:5}(e),n=te[t],r=["mainnet","goerli"].includes(n),a=function(e){return"prod"===e?{network:"mainnet",accessNode:"https://access.onflow.org",walletDiscovery:"https://flow-wallet.blocto.app/authn"}:{network:"testnet",accessNode:"https://access-testnet.onflow.org",walletDiscovery:"https://flow-wallet-testnet.blocto.app/authn"}}(e),i=function(e){return"prod"===e?{accessNode:"https://rpc.tzkt.io/mainnet",network:V.NetworkType.MAINNET}:{accessNode:"https://rpc.tzkt.io/ghostnet",network:V.NetworkType.CUSTOM}}(e),s=Object(X.mapEthereumWallet)(new j.InjectedWeb3ConnectionProvider({prefer:[j.DappType.Metamask]})),o=Object(X.mapEthereumWallet)(new H.MEWConnectionProvider({networkId:t,rpcUrl:ee[t]})),u=Object(X.mapEthereumWallet)(new K.NFIDConnectionProvider({origin:Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TESTNETS_API_KEY:"2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5",REACT_APP_PROD_API_KEY:"666ad781-aa60-4000-9e3e-cf5ae2d41bd3",REACT_APP_WALLET_CONNECT_V2_PROJECT_ID:"27c21e9982ee7b6e3f22764ab806719b"}).REACT_APP_NFID_ORIGIN||"https://nfid.one"})),c=Object(X.mapTezosWallet)(new z.BeaconConnectionProvider({appName:"Rarible Test",accessNode:i.accessNode,network:i.network})),d=Object(X.mapFlowWallet)(new W.FclConnectionProvider({accessNode:a.accessNode,walletDiscovery:a.walletDiscovery,network:a.network,applicationTitle:"Rari Test",applicationIcon:"https://rarible.com/favicon.png?2d8af2455958e7f0c812"})),p=Object(X.mapFlowWallet)(new Q.MattelConnectionProvider({magicProviderId:"JeTIUJ7GJNnfwnxMwtPRa7JzbzRVxA4p3TdQsXryggM=",magicAPIKey:"pk_live_63A5A557D1D4882D",auth0Domain:"login-test.mattel.com",auth0ClientId:"nXpDI0BnWhxB5DIhQVGOrB2LwgOvKIhd",auth0RedirectUrl:"https://test-virtual.mattel.com",accessNode:a.accessNode,network:a.network})),l=void 0;r&&(l=Object(X.mapEthereumWallet)(new G.TorusConnectionProvider({network:{host:n}})));var y=Object(X.mapEthereumWallet)(new Z.WalletLinkConnectionProvider({networkId:t,estimationUrl:ee[t],url:ee[t]},{appName:"Rarible",appLogoUrl:"https://rarible.com/static/logo-500.static.png",darkMode:!1})),f=Object(X.mapEthereumWallet)(new $.WalletConnectConnectionProviderV2({projectId:"4f9fb88799dfa8d3654bdd130be840f2",chains:[t],optionalChains:Object.keys(ee).map((function(e){return+e})).filter((function(e){return e!==t})),showQrModal:!0,methods:["eth_sendTransaction","personal_sign","eth_signTypedData"],optionalMethods:["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],events:["chainChanged","accountsChanged"],optionalEvents:["message","disconnect","connect"],rpcMap:ee})),m=Object(X.mapSolanaWallet)(new q.PhantomConnectionProvider),b=Object(X.mapSolanaWallet)(new Y.SolflareConnectionProvider({network:"prod"===e?"mainnet-beta":"devnet"})),v=Object(X.mapImmutableXWallet)(new J.ImmutableXLinkConnectionProvider({env:ne(e)})),h=j.Connector.create(s,re).add(u).add(y).add(o).add(c).add(d).add(f).add(m).add(b).add(v).add(p);return l?h.add(l):h}var ie=a.a.createContext({environment:"prod",setEnvironment:void 0}),se="saved_environment";function oe(e){var t=e.children,n=Object(r.useState)(function(){var e=localStorage.getItem(se);return e&&["development","testnet","prod"].includes(e)?e:"testnet"}()),a=Object(D.a)(n,2),i=a[0],s=a[1],o=ae(i),u={environment:i,setEnvironment:function(e){localStorage.setItem(se,e),s(e)}};return Object(m.jsx)(ie.Provider,{value:u,children:t(o)})}var ue=a.a.createContext({connector:void 0,state:Object(j.getStateDisconnected)(),sdk:void 0,walletAddress:void 0});function ce(e,t){switch(t){case F.Blockchain.ETHEREUM:case F.Blockchain.POLYGON:case F.Blockchain.MANTLE:case F.Blockchain.IMMUTABLEX:return Object(M.toUnionAddress)("ETHEREUM:"+e);case F.Blockchain.FLOW:case F.Blockchain.SOLANA:case F.Blockchain.TEZOS:return Object(M.toUnionAddress)(t+":"+e);default:throw new Error("Unsupported blockchain "+t)}}function de(e){var t=e.connector,n=e.children,a=Object(r.useContext)(ie).environment,i=Object(E.useRxOrThrow)(t.connection),s={connector:t,state:i,sdk:"connected"===i.status?Object(B.createRaribleSdk)(i.connection.wallet,a,{logs:N.LogsLevel.ERROR,apiKey:pe(a),blockchain:Object(g.a)({},B.WalletType.ETHEREUM,{useDataV3:!0,marketplaceMarker:"0x12345678900000000000000000000000000123456789face"})}):void 0,walletAddress:"connected"===i.status?ce(i.connection.address,i.connection.blockchain):void 0};return Object(m.jsx)(ue.Provider,{value:s,children:n})}function pe(e){var t;return"prod"===e?"666ad781-aa60-4000-9e3e-cf5ae2d41bd3":null!==(t="2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5")?t:void 0}var le=n(1682);function ye(e){return Object(m.jsx)(le.a,Object(T.a)({style:{fontSize:14},fixedWidth:!0},e))}var fe=[{value:"prod",label:"Production"},{value:"development",label:"Development"},{value:"testnet",label:"Testnet"}];function me(e){var t,n;return null!==(t=null===(n=fe.find((function(t){return t.value===e})))||void 0===n?void 0:n.label)&&void 0!==t?t:"unknown"}function be(){var e=Object(r.useContext)(ie),t=e.environment,n=e.setEnvironment,a=Object(r.useContext)(ue),i=a.connector,s=a.state,o=Object(r.useMemo)((function(){return i?Object(_.a)(i.getOptions()):Object(_.a)([])}),[i]),u=Object(r.useCallback)((function(e){null===n||void 0===n||n(e.target.value)}),[n]);if(!i)return null;var c={justifyContent:"start",pl:"3rem","& .MuiButton-startIcon":{position:"absolute",left:"1.25rem"}};return Object(m.jsx)(d.a,{sx:{maxWidth:300},children:Object(m.jsx)(E.Rx,{value$:o,children:function(e){return Object(m.jsxs)(C.a,{spacing:1,children:[Object(m.jsx)(I.a,{select:!0,size:"small",label:"Environment",disabled:"connected"===(null===s||void 0===s?void 0:s.status),value:t,onChange:u,children:fe.map((function(e){return Object(m.jsx)(S.a,{value:e.value,children:e.label},e.value)}))}),e.map((function(e){var t=function(e){switch(e){case"walletlink":return{label:"Coinbase"};case"fcl":return{label:"Blocto"};default:return{label:e}}}(e.option);return Object(m.jsx)(A.a,{onClick:function(){var t;"mattel"===e.provider.getId()&&"connected"!==(null===s||void 0===s?void 0:s.status)&&(((t=e.provider)&&t instanceof j.MappedConnectionProvider||"source"in t&&"mapper"in t)&&e.provider.getProvider().setPopupConfig({popup:ve("")}));i.connect(e)},loading:"connecting"===s.status&&s.providerId===e.provider.getId(),loadingPosition:"start",startIcon:Object(m.jsx)(ye,{icon:P.d}),sx:c,variant:"outlined",disabled:"connected"===(null===s||void 0===s?void 0:s.status),fullWidth:!0,children:t.label},e.option)})),Object(m.jsx)(R.a,{onClick:s.disconnect,startIcon:Object(m.jsx)(ye,{icon:P.j}),color:"error",sx:c,variant:"outlined",disabled:"connected"!==(null===s||void 0===s?void 0:s.status),fullWidth:!0,children:"Disconnect"})]})}})})}function ve(e){var t=window.screenX+(window.innerWidth-400)/2,n=window.screenY+(window.innerHeight-600)/2;return window.open(e,"auth0:authorize:popup","left=".concat(t,",top=").concat(n,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))}var he=n(4121),Te=n(4110),ge=n(4111);function we(e){var t,n=e.children,r=e.theme,a=e.language,i=e.wrap;return Object(m.jsx)(he.a,{language:null!==a&&void 0!==a?a:"typescript",style:"light"===r?Te.a:ge.a,wrapLongLines:!0,wrapLines:i,lineProps:i?{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}}:void 0,children:null!==(t=null===n||void 0===n?void 0:n.trim())&&void 0!==t?t:""})}function ke(){return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)(f.a,{gutterBottom:!0,children:["To simplify connection to various wallets, we moved this logic to a separate package ",Object(m.jsx)(v,{children:"@rarible/connector"}),"."]}),Object(m.jsx)(we,{children:'\nimport { Connector, InjectedWeb3ConnectionProvider } from "@rarible/connector"\nimport { MEWConnectionProvider } from "@rarible/connector-mew"\n\n// 1. Configure providers\t\t\t\nconst injected = new InjectedWeb3ConnectionProvider({\n // optional, order of dapps preferred to connect \n prefer: [DappType.Metamask, DappType.Coinbase],\n})\nconst mew = new MEWConnectionProvider({\n networkId: 4,\n rpcUrl: ethereumRpcMap[4]\n})\n\t\t\t\n// 2. Create connector\t\t\t\nconst connector = Connector\n .create(injected)\n .add(mew)\n \n// 3. Connector ready to use\nconnector.connection.subscribe((con) => { \n if (con.status === "connected") {\n // use connection to create sdk here\n }\n})\n\n// get list of available options\nconst options = await connector.getOptions()\n// connect to first one\nawait connector.connect(options[0]) \n\t\t'}),Object(m.jsxs)(f.a,{gutterBottom:!0,children:["Check out more ",Object(m.jsx)(y.a,{href:"https://github.com/rarible/sdk/tree/master/packages/connector",target:"_blank",children:"documentation in package repository"}),"."]})]})}var xe=n(439),Oe=n(4118),_e=n(4137),Ee=function(e,t){return e&&t&&t-50&&Object(m.jsx)(d.a,{sx:{mt:2},children:Object(m.jsx)(R.a,{startIcon:Object(m.jsx)(ye,{icon:P.a}),color:"inherit",variant:"text",onClick:function(){return o({type:"prev"})},children:"Back"})})]})}function At(e){var t=e.disabled,n=e.onComplete,a=e.itemId,i=Object(l.f)(),s=Object(r.useContext)(ue),o=Object(Ze.a)(),u=o.handleSubmit,c=$e(),p=c.result,y=c.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:u(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.t0=n,e.next=6,s.sdk.order.sell.prepare({itemId:Object(M.toItemId)(t.itemId)});case 6:e.t1=e.sent,(0,e.t0)(e.t1),i("/sell/".concat(t.itemId),{}),e.next=14;break;case 11:e.prev=11,e.t2=e.catch(2),y(e.t2);case 14:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{form:o,defaultValue:a,name:"itemId",label:"Item ID"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:o,label:"Next",state:et(p.type),icon:P.d,disabled:t})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:p})})]})}var Ct=n(216),It=n(868);function St(e){return{"@type":"ETH",blockchain:e}}function Rt(e){return{"@type":"ERC20",contract:e}}var jt={"@type":"XTZ"},Pt={"@type":"SOLANA_SOL"},Bt={"@type":"FLOW_FT",contract:Object(M.toContractAddress)("FLOW:A.7e60df042a9c0868.FlowToken")},Mt={"@type":"FLOW_FT",contract:Object(M.toContractAddress)("FLOW:A.a983fecbed621163.FiatToken")};function Ft(e,t,n){switch(e){case F.Blockchain.ETHEREUM:case F.Blockchain.POLYGON:if("NATIVE"===t)return St(e);if("TOKEN"===t)return Rt(n);throw new Error("Unsupported option subtype");case F.Blockchain.MANTLE:if("TOKEN"===t)return Rt(n);throw new Error("Unsupported option subtype");case F.Blockchain.IMMUTABLEX:if("NATIVE"===t)return St(e);throw new Error("Unsupported option subtype");case F.Blockchain.TEZOS:if("NATIVE"===t)return jt;throw new Error("Unsupported option subtype");case F.Blockchain.SOLANA:if("NATIVE"===t)return Pt;throw new Error("Unsupported blockchain or asset type");case F.Blockchain.FLOW:if("NATIVE"===t)return Bt;if("TOKEN"===t&&n===Mt.contract)return Mt;throw new Error("Unsupported currency subtype");default:throw new Error("Unsupported blockchain")}}function Nt(e,t){return e.flatMap((function(e){switch(e.blockchain){case F.Blockchain.ETHEREUM:if("NATIVE"===e.type)return{type:"NATIVE",label:"ETH",blockchain:F.Blockchain.ETHEREUM};if("ERC20"===e.type){var n=[];switch(t){case"development":n.push({type:"TOKEN",label:"Rarible Test ERC20",blockchain:F.Blockchain.ETHEREUM,contract:"ETHEREUM:0xA4A70E8627e858567a9f1F08748Fe30691f72b9e"});break;case"testnet":n.push({type:"TOKEN",label:"Rarible Test ERC20",blockchain:F.Blockchain.ETHEREUM,contract:"ETHEREUM:0xCfaF03B6254363bcA1A9D8e529270B5660bF3109"}),n.push({type:"TOKEN",label:"Goerli WETH",blockchain:F.Blockchain.ETHEREUM,contract:"ETHEREUM:0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6"});break;case"staging":n.push({type:"TOKEN",label:"Rarible Test ERC20",blockchain:F.Blockchain.ETHEREUM,contract:"ETHEREUM:0x02cc113a068B643e4f98195935496aaf3E572e86"});break;case"prod":n.push({type:"TOKEN",label:"WETH",blockchain:F.Blockchain.ETHEREUM,contract:"ETHEREUM:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"})}return n.push({type:"TOKEN",label:"Custom ERC20",blockchain:F.Blockchain.ETHEREUM,contract:null}),n}return[];case F.Blockchain.POLYGON:if("NATIVE"===e.type)return{type:"NATIVE",label:"ETH",blockchain:F.Blockchain.POLYGON};if("ERC20"===e.type){var r=[];switch(t){case"development":r.push({type:"TOKEN",label:"Rarible Test ERC20",blockchain:F.Blockchain.POLYGON,contract:"POLYGON:0xf4520E73A0212166C07279428527b9d300295203"});break;case"testnet":r.push({type:"TOKEN",label:"Rarible Test ERC20",blockchain:F.Blockchain.POLYGON,contract:"POLYGON:0xd6e804e7EDB5B2AecB31D9cCC9d9F3940a7b4cE2"},{type:"TOKEN",label:"WETH",blockchain:F.Blockchain.POLYGON,contract:"POLYGON:0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa"});break;case"staging":r.push({type:"TOKEN",label:"Rarible Test ERC20",blockchain:F.Blockchain.ETHEREUM,contract:"POLYGON:0x32CcA2bB34B36409b29166FbEC9b617CdA1E0410"});break;case"prod":r.push({type:"TOKEN",label:"WETH",blockchain:F.Blockchain.POLYGON,contract:"POLYGON:0x7ceb23fd6bc0add59e62ac25578270cff1b9f619"})}return r.push({type:"TOKEN",label:"Custom ERC20",blockchain:F.Blockchain.POLYGON,contract:null}),r}return[];case F.Blockchain.MANTLE:if("ERC20"===e.type){var a=[];switch(t){case"testnet":case"prod":a.push({type:"TOKEN",label:"WETH",blockchain:F.Blockchain.MANTLE,contract:"MANTLE:0xdeaddeaddeaddeaddeaddeaddeaddeaddead1111"})}return a}return[];case F.Blockchain.IMMUTABLEX:return"NATIVE"===e.type?{type:"NATIVE",label:"ETH",blockchain:F.Blockchain.IMMUTABLEX}:[];case F.Blockchain.TEZOS:return"NATIVE"===e.type?{type:"NATIVE",label:"XTZ",blockchain:F.Blockchain.TEZOS}:[];case F.Blockchain.SOLANA:return"NATIVE"===e.type?{type:"NATIVE",label:"SOL",blockchain:F.Blockchain.SOLANA}:[];case F.Blockchain.FLOW:return"NATIVE"===e.type?[{type:"NATIVE",label:"FLOW",blockchain:F.Blockchain.FLOW},{type:"TOKEN",label:"USDC",blockchain:F.Blockchain.FLOW,contract:"FLOW:A.a983fecbed621163.FiatToken"}]:[];default:throw new Error("Unsupported blockchain")}}))}function Dt(e){return"".concat(e.blockchain,"::").concat("TOKEN"===e.type?e.type+"::"+e.contract:e.type)}function Lt(e){var t=e.split("::"),n=Object(D.a)(t,3),r=n[0],a=n[1],i=n[2];return{blockchain:r,type:a,contract:i&&"null"!==i?Object(M.toContractAddress)(i):void 0}}function Ut(e,t){return t.find((function(t){return Dt(t)===e}))}function Vt(e){var t=e.form,n=e.currencyOptions,a=e.max,i=n||[],s=void 0!==i,o=Object(r.useState)(i[0]&&Dt(i[0])),u=Object(D.a)(o,2),c=u[0],d=u[1],p=Ut(c,i);return Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsxs)(k.a,{container:!0,spacing:2,children:[Object(m.jsx)(k.a,{item:!0,xs:8,children:Object(m.jsx)(pt,{type:"number",inputProps:{min:0,step:"any",max:a||void 0},form:t,options:{min:0,max:a||void 0},name:"price",label:"Price"})}),s&&i.length?Object(m.jsx)(k.a,{item:!0,xs:4,children:Object(m.jsx)(Qe,{form:t,value:c,onChange:function(e){var n;d(e.target.value);var r=Ut(e.target.value,i);t.setValue("contract","TOKEN"===(null===r||void 0===r?void 0:r.type)&&null!==(n=r.contract)&&void 0!==n?n:"")},name:"currencyType",label:"Currency",children:i.map((function(e){var t=Dt(e);return Object(m.jsx)(S.a,{value:t,children:e.label},t)}))})}):null]}),"TOKEN"===(null===p||void 0===p?void 0:p.type)&&s?Object(m.jsx)(pt,{type:"text",form:t,defaultValue:p.contract,disabled:null!==p.contract,name:"contract",label:"Contract"}):null]})}function Wt(e){var t=e.prepare,n=e.disabled,a=e.onComplete,i=Object(r.useContext)(ie).environment,s=Object(r.useContext)(ue),o=Object(Ze.a)(),u=o.handleSubmit,c=$e(),p=c.result,l=c.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:u(function(){var e=Object(U.a)(Object(L.a)().mark((function e(n){var r,i,o;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.sdk){e.next=2;break}return e.abrupt("return");case 2:return r=void 0,t.maxFeesBasePointSupport===Ct.MaxFeesBasePointSupport.REQUIRED&&(r=1e3),e.prev=4,o=Lt(n.currencyType),e.t0=a,e.next=9,t.submit({price:Object(M.toBigNumber)(n.price),amount:parseInt(n.amount),currency:Ft(o.blockchain,o.type,null!==(i=o.contract)&&void 0!==i?i:n.contract),maxFeesBasePoint:r,originFees:[],expirationDate:Object(It.generateExpirationDate)()});case 9:e.t1=e.sent,(0,e.t0)(e.t1),e.next=16;break;case 13:e.prev=13,e.t2=e.catch(4),l(e.t2);case 16:case"end":return e.stop()}}),e,null,[[4,13]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(Vt,{form:o,currencyOptions:Nt(t.supportedCurrencies,i)}),Object(m.jsx)(pt,{type:"number",inputProps:{min:1,max:t.maxAmount,step:1},form:o,options:{min:1,max:Number(t.maxAmount)},defaultValue:Math.min(1,Number(t.maxAmount)),name:"amount",label:"Amount"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:o,label:"Submit",state:et(p.type),disabled:n})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:p})})]})}function Ht(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:'\n// get sell info\nconst sell = await connection.sdk.order.sell.prepare({\n itemId: \n})\n// sell: {\n// baseFee: number\n// maxAmount: BigNumber\n// multiple: boolean\n// submit: Function\n// supportedCurrencies: - supported currencies list \n// }\n\n// send transaction\nconst result = await sell.submit({\n price: 2,\n currency: {"@type": "ETH"},\n amount: 1,\n})\n// result: string - order id\n\t\t'})})}function Kt(e){return!!e}function zt(){var e,t,n=Object(l.g)(),a=null===(e=Object(r.useContext)(ue).sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType;return Object(m.jsxs)(b,{header:"Sell Token",children:[!Kt(a)&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsx)(ot,{blockchain:a})}),Object(m.jsx)(O,{sx:{my:2},comment:Object(m.jsx)(Ht,{}),children:Object(m.jsx)(Et,{steps:[{label:"Get Item Info",render:function(e){return Object(m.jsx)(At,{onComplete:e,disabled:!Kt(a),itemId:n.itemId})}},{label:"Send Transaction",render:function(e,t){return Object(m.jsx)(Wt,{onComplete:e,prepare:t,disabled:!Kt(a)})}},{label:"Done",render:function(e,t){return Object(m.jsx)(tt,{result:{type:"complete",data:t},completeRender:function(e){return Object(m.jsx)(m.Fragment,{children:Object(m.jsxs)(d.a,{sx:{my:2},children:[Object(m.jsx)(f.a,{variant:"overline",children:"Order ID:"}),Object(m.jsxs)("div",{children:[Object(m.jsx)(v,{wrap:!0,children:e})," ",Object(m.jsx)(nt,{value:e})]})]})})}})}}]})})]})}function Gt(e){var t=e.orderId,n=e.disabled,a=e.onComplete,i=Object(l.f)(),s=Object(r.useContext)(ue),o=Object(Ze.a)(),u=o.handleSubmit,c=$e(),p=c.result,y=c.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:u(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){var n;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,n=Object(M.toOrderId)(t.orderId),e.t0=a,e.next=7,s.sdk.order.buy.prepare({orderId:n});case 7:return e.t1=e.sent,e.next=10,s.sdk.apis.order.getOrderById({id:n});case 10:e.t2=e.sent,e.t3={prepare:e.t1,order:e.t2},(0,e.t0)(e.t3),i("/buy/".concat(t.orderId),{}),e.next=19;break;case 16:e.prev=16,e.t4=e.catch(2),y(e.t4);case 19:case"end":return e.stop()}}),e,null,[[2,16]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{form:o,defaultValue:t,name:"orderId",label:"Order ID"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:o,label:"Next",state:et(p.type),icon:P.d,disabled:n})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:p})})]})}var Zt=n(1083),qt=n(869),Yt=n.n(qt),Xt=n(870),Jt=n.n(Xt);function Qt(e){var t=e.prepare,n=e.form,a=e.namePrefix,i=e.isFillBatch,s=Object(r.useState)(1),o=Object(D.a)(s,2),u=o[0],c=o[1];return Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{type:"number",inputProps:{min:1,max:t.maxAmount,step:1},form:n,options:{min:1,max:Number(t.maxAmount)},name:en(a,"amount"),label:"Amount"}),i&&tn(e.order)?Object(m.jsxs)(m.Fragment,{children:[new Array(u).fill(0).map((function(t,n){return $t(Object(T.a)(Object(T.a)({},e),{},{key:n}))})),Object(m.jsxs)(d.a,{display:"flex",justifyContent:"flex-end",alignItems:"flex-end",children:[Object(m.jsx)(Me.a,{color:"primary",onClick:function(){n.setValue("".concat(a,"_itemsCounter"),u+1),c(u+1)},children:Object(m.jsx)(Yt.a,{})}),Object(m.jsx)(Me.a,{color:"error",disabled:u<=1,onClick:function(){n.setValue("".concat(a,"_itemsCounter"),u-1),c(Math.max(1,u-1))},children:Object(m.jsx)(Jt.a,{})})]})]}):$t(Object(T.a)({},e))]})}function $t(e){var t=e.form,n=e.order,r=e.namePrefix,a=e.key,i=e.isFillBatch,s=en(r,"itemId");if(i&&(s=s+"_"+a),tn(n))return Object(m.jsx)(pt,{type:"text",form:t,name:s,label:"Item Id"},a)}function en(e,t){return(e?e+"_":"")+t}function tn(e){return"AMM_NFT"===(null===e||void 0===e?void 0:e.make.type["@type"])}function nn(e){var t=e.prepare,n=e.order,a=e.disabled,i=e.onComplete,s=Object(r.useContext)(ue),o=Object(Ze.a)(),u=o.handleSubmit,c=$e(),p=c.result,l=c.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:u(function(){var e=Object(U.a)(Object(L.a)().mark((function e(n){return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.t0=i,e.next=6,t.submit({amount:parseInt(n.amount),itemId:n.itemId?Object(Zt.toItemId)(n.itemId):void 0});case 6:e.t1=e.sent,(0,e.t0)(e.t1),e.next=13;break;case 10:e.prev=10,e.t2=e.catch(2),l(e.t2);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(Qt,{form:o,prepare:t,order:n}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:o,label:"Submit",state:et(p.type),disabled:a})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:p})})]})}function rn(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:"\n// get order info\nconst buy = await sdk.order.buy({\n orderId: \n})\n// buy: {\n// baseFee: number\n// maxAmount: BigNumber\n// multiple: boolean\n// submit: Function\n// supportsPartialFill: boolean\n// } \n\n// send transaction\nconst result = await buy.submit({\n amount: 1,\n})\n// result: IBlockchainTransaction\n\t\t"})})}function an(e){return!!e}function sn(){var e,t,n=Object(l.g)(),a=null===(e=Object(r.useContext)(ue).sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType;return Object(m.jsxs)(b,{header:"Buy Token",children:[!an(a)&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsx)(ot,{blockchain:a})}),Object(m.jsx)(O,{sx:{my:2},comment:Object(m.jsx)(rn,{}),children:Object(m.jsx)(Et,{steps:[{label:"Get Order Info",render:function(e){return Object(m.jsx)(Gt,{onComplete:e,disabled:!an(a),orderId:n.orderId})}},{label:"Send Transaction",render:function(e,t){return Object(m.jsx)(nn,{onComplete:e,prepare:t.prepare,order:t.order,disabled:!an(a)})}},{label:"Done",render:function(e,t){return Object(m.jsx)(tt,{result:{type:"complete",data:t},completeRender:function(e){return Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(st,{transaction:e})})}})}}]})})]})}function on(e){var t,n,a=e.disabled,i=e.onComplete,s=Object(r.useContext)(ue),o=Object(r.useContext)(ie).environment,u=Object(Ze.a)(),c=u.handleSubmit,p=$e(),l=p.result,y=p.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:c(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){var n;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,s.sdk.apis.collection.getCollectionById({collection:t.collectionId});case 5:return n=e.sent,e.t0=i,e.next=9,s.sdk.nft.mint.prepare({collection:n});case 9:e.t1=e.sent,(0,e.t0)(e.t1),e.next=16;break;case 13:e.prev=13,e.t2=e.catch(2),y(e.t2);case 16:case"end":return e.stop()}}),e,null,[[2,13]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{form:u,name:"collectionId",label:"Collection ID",defaultValue:"connected"===s.state.status?un(o,null===(t=s.state)||void 0===t||null===(n=t.connection)||void 0===n?void 0:n.blockchain):""}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:u,label:"Next",state:et(l.type),icon:P.d,disabled:a})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:l})})]})}function un(e,t){return console.log("env",e,t,cn(e)),t===F.Blockchain.ETHEREUM?"".concat(t,":").concat(cn(e)):""}function cn(e){switch(e){case"development":return"0x6972347e66A32F40ef3c012615C13cB88Bf681cc";case"testnet":return"0xD8560C88D1DC85f9ED05b25878E366c49B68bEf9";case"staging":return"0xBf558E78CfdE95AfbF17a4ABe394Cb2cC42E6270";case"prod":return"0xc9154424B823b10579895cCBE442d41b9Abd96Ed";default:return""}}function dn(e){var t=e.prepare,n=e.disabled,a=e.onComplete,i=Object(r.useContext)(ue),s=Object(Ze.a)(),o=s.handleSubmit,u=$e(),c=u.result,p=u.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:o(function(){var e=Object(U.a)(Object(L.a)().mark((function e(n){var r,s;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.t0=a,e.next=6,t.submit({uri:n.metadataUri,supply:null!==(r=parseFloat(n.supply))&&void 0!==r?r:1,lazyMint:null!==(s=n.lazy)&&void 0!==s&&s});case 6:e.t1=e.sent,(0,e.t0)(e.t1),e.next=13;break;case 10:e.prev=10,e.t2=e.catch(2),p(e.t2);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{form:s,name:"metadataUri",label:"Metadata URI",defaultValue:"ipfs://ipfs/QmfVqzkQcKR1vCNqcZkeVVy94684hyLki7QcVzd9rmjuG5"}),Object(m.jsx)(pt,{type:"number",form:s,name:"supply",label:"Supply",defaultValue:1,disabled:!t.multiple,helperText:t.multiple?null:"Collection does not support multiple mint"}),Object(m.jsx)(mt,{form:s,name:"lazy",label:"Lazy-mint",disabled:!t.supportsLazyMint}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:s,label:"Submit",state:et(c.type),disabled:n})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:c})})]})}function pn(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:'\n// get collection by id\t\t\t\nconst collection = await sdk.apis.collection.getCollectionById({\n collection: \n})\n\n// get mint info\nconst mint = await sdk.nft.mint({ collection })\n// mint: {\n// multiple: boolean, \n// supportsRoyalties: boolean, \n// supportsLazyMint: boolean, \n// submit: Function\n// }\n\n// send transaction\nconst result = await mint.submit({\n uri: "TOKEN URI",\n supply: 1,\n lazyMint: false\n})\n// result: {\n// type: "on-chain", \n// itemId: string, \n// transaction: IBlockchainTransaction\n// } | {\n// type: "off-chain", \n// itemId: string\n// }\n\t\t'})})}function ln(e){return!!e}function yn(){var e,t,n=null===(e=Object(r.useContext)(ue).sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType;return Object(m.jsxs)(b,{header:"Mint Token",children:[!ln(n)&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsx)(ot,{blockchain:n})}),Object(m.jsx)(O,{sx:{my:2},comment:Object(m.jsx)(pn,{}),children:Object(m.jsx)(Et,{steps:[{label:"Get Collection & Prepare Mint",render:function(e){return Object(m.jsx)(on,{onComplete:e,disabled:!ln(n)})}},{label:"Send Transaction",render:function(e,t){return Object(m.jsx)(dn,{onComplete:e,prepare:t,disabled:!ln(n)})}},{label:"Done",render:function(e,t){return Object(m.jsx)(tt,{result:{type:"complete",data:t},completeRender:function(e){return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)(d.a,{sx:{my:2},children:[Object(m.jsx)(f.a,{variant:"overline",children:"Type:"}),Object(m.jsx)("div",{children:Object(m.jsx)(v,{wrap:!0,children:e.type})})]}),Object(m.jsxs)(d.a,{sx:{my:2},children:[Object(m.jsx)(f.a,{variant:"overline",children:"Item ID:"}),Object(m.jsxs)("div",{children:[Object(m.jsx)(v,{wrap:!0,children:e.itemId})," ",Object(m.jsx)(nt,{value:e.itemId})]})]}),"on-chain"===e.type&&Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(st,{transaction:e.transaction})})]})}})}}]})})]})}function fn(e){var t=e.itemId,n=e.disabled,a=e.onComplete,i=Object(l.f)(),s=Object(r.useContext)(ue),o=Object(Ze.a)(),u=o.handleSubmit,c=$e(),p=c.result,y=c.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:u(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.t0=a,e.next=6,s.sdk.order.bid.prepare({itemId:Object(M.toItemId)(t.itemId)});case 6:e.t1=e.sent,(0,e.t0)(e.t1),i("/bid/".concat(t.itemId),{}),e.next=14;break;case 11:e.prev=11,e.t2=e.catch(2),y(e.t2);case 14:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{form:o,defaultValue:t,name:"itemId",label:"Item ID"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:o,label:"Next",state:et(p.type),icon:P.d,disabled:n})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:p})})]})}function mn(e){var t=e.prepare,n=e.disabled,a=e.onComplete,i=Object(r.useContext)(ie).environment,s=Object(r.useContext)(ue),o=Object(Ze.a)(),u=o.handleSubmit,c=$e(),p=c.result,l=c.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:u(function(){var e=Object(U.a)(Object(L.a)().mark((function e(n){var r,i;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,i=Lt(n.currencyType),e.t0=a,e.next=7,t.submit({price:Object(M.toBigNumber)(n.price),amount:parseInt(n.amount),currency:Ft(i.blockchain,i.type,null!==(r=i.contract)&&void 0!==r?r:n.contract),expirationDate:Object(It.generateExpirationDate)()});case 7:e.t1=e.sent,(0,e.t0)(e.t1),e.next=14;break;case 11:e.prev=11,e.t2=e.catch(2),l(e.t2);case 14:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(Vt,{form:o,currencyOptions:Nt(t.supportedCurrencies,i)}),Object(m.jsx)(pt,{type:"number",inputProps:{min:1,max:t.maxAmount,step:1},form:o,options:{min:1,max:Number(t.maxAmount)},defaultValue:Math.min(1,Number(t.maxAmount)),name:"amount",label:"Amount"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:o,label:"Submit",state:et(p.type),disabled:n})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:p})})]})}function bn(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:'\n// get sell info\nconst bid = await sdk.order.bid({\n itemId: \n})\n\n// send transaction\nconst result = await bid.submit({\n price: 2,\n currency: {\n \t"@type": "ERC20",\n \tcontract: "ETHEREUM:0xc778417E063141139Fce010982780140Aa0cD5Ab" // WETH contract address\n },\n amount: 1,\n})\n// result: string - order id\n\t\t'})})}function vn(e){return!!e}function hn(){var e,t,n=Object(l.g)(),a=null===(e=Object(r.useContext)(ue).sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType;return Object(m.jsxs)(b,{header:"Make Bid",children:[!vn(a)&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsx)(ot,{blockchain:a})}),Object(m.jsx)(O,{sx:{my:2},comment:Object(m.jsx)(bn,{}),children:Object(m.jsx)(Et,{steps:[{label:"Get Item Info",render:function(e){return Object(m.jsx)(fn,{onComplete:e,disabled:!vn(a),itemId:n.itemId})}},{label:"Send Transaction",render:function(e,t){return Object(m.jsx)(mn,{onComplete:e,prepare:t,disabled:!vn(a)})}},{label:"Done",render:function(e,t){return Object(m.jsx)(tt,{result:{type:"complete",data:t},completeRender:function(e){return Object(m.jsx)(m.Fragment,{children:Object(m.jsxs)(d.a,{sx:{my:2},children:[Object(m.jsx)(f.a,{variant:"overline",children:"Order ID:"}),Object(m.jsxs)("div",{children:[Object(m.jsx)(v,{wrap:!0,children:e})," ",Object(m.jsx)(nt,{value:e})]})]})})}})}}]})})]})}function Tn(e){var t=e.orderId,n=e.disabled,a=e.onComplete,i=Object(l.f)(),s=Object(r.useContext)(ue),o=Object(Ze.a)(),u=o.handleSubmit,c=$e(),p=c.result,y=c.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:u(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.t0=a,e.next=6,s.sdk.order.acceptBid.prepare({orderId:Object(M.toOrderId)(t.orderId)});case 6:e.t1=e.sent,(0,e.t0)(e.t1),i("/accept-bid/".concat(t.orderId),{}),e.next=14;break;case 11:e.prev=11,e.t2=e.catch(2),y(e.t2);case 14:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{form:o,defaultValue:t,name:"orderId",label:"Order ID"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:o,label:"Next",state:et(p.type),icon:P.d,disabled:n})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:p})})]})}function gn(e){var t=e.prepare,n=e.disabled,a=e.onComplete,i=Object(r.useContext)(ue),s=Object(Ze.a)(),o=s.handleSubmit,u=$e(),c=u.result,p=u.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:o(function(){var e=Object(U.a)(Object(L.a)().mark((function e(n){var r;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.sdk){e.next=2;break}return e.abrupt("return");case 2:return r=void 0,t.maxFeesBasePointSupport===Ct.MaxFeesBasePointSupport.REQUIRED&&(r=1e3),e.prev=4,e.t0=a,e.next=8,t.submit({amount:parseInt(n.amount),maxFeesBasePoint:r});case 8:e.t1=e.sent,(0,e.t0)(e.t1),e.next=15;break;case 12:e.prev=12,e.t2=e.catch(4),p(e.t2);case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{type:"number",inputProps:{min:1,max:t.maxAmount,step:1},form:s,options:{min:1,max:Number(t.maxAmount)},name:"amount",label:"Amount"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:s,label:"Submit",state:et(c.type),disabled:n})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:c})})]})}function wn(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:"\n// get order info\nconst accept = await connection.sdk.order.acceptBid.prepare({\n orderId: \n})\n\n// send transaction\nconst result = await accept.submit({\n amount: 1,\n})\n// result: IBlockchainTransaction\n\t\t"})})}function kn(e){return!!e}function xn(){var e,t,n=Object(l.g)(),a=null===(e=Object(r.useContext)(ue).sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType;return Object(m.jsxs)(b,{header:"Accept Bid",children:[!kn(a)&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsx)(ot,{blockchain:a})}),Object(m.jsx)(O,{sx:{my:2},comment:Object(m.jsx)(wn,{}),children:Object(m.jsx)(Et,{steps:[{label:"Get Order Info",render:function(e){return Object(m.jsx)(Tn,{onComplete:e,disabled:!kn(a),orderId:n.orderId})}},{label:"Send Transaction",render:function(e,t){return Object(m.jsx)(gn,{onComplete:e,prepare:t,disabled:!kn(a)})}},{label:"Done",render:function(e,t){return Object(m.jsx)(tt,{result:{type:"complete",data:t},completeRender:function(e){return Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(st,{transaction:e})})}})}}]})})]})}var On=n(33),_n=n(4144),En=n(4145),An=n(4146),Cn=n(4147),In=n(4148),Sn=n(1677),Rn=n.n(Sn),jn=n(1676),Pn=n.n(jn);function Bn(e){var t,n=Object(On.a)(e||[]);try{for(n.s();!(t=n.n()).done;){var r=t.value;if("IMAGE"===r["@type"])return r.url}}catch(a){n.e(a)}finally{n.f()}return null}function Mn(e){var t=e.url;return t?Object(m.jsx)(_n.a,{component:"img",image:t,sx:{height:194,objectFit:"contain"}}):Object(m.jsx)(d.a,{display:"flex",justifyContent:"center",alignItems:"center",sx:{height:194},children:Object(m.jsx)(f.a,{variant:"body2",color:"text.secondary",sx:{textAlign:"center"},children:Object(m.jsx)("strong",{children:"No media provided"})})})}function Fn(e){var t,n=e.item;return Object(m.jsxs)(En.a,{sx:{width:200},children:[Object(m.jsx)(An.a,{sx:{display:"flex",overflow:"hidden","& .MuiCardHeader-content":{overflow:"hidden"}},title:Object(m.jsx)(f.a,{noWrap:!0,gutterBottom:!0,variant:"h6",component:"h4",children:n.meta?n.meta.name:"No metadata"})}),Object(m.jsx)(Mn,{url:Bn(null===(t=n.meta)||void 0===t?void 0:t.content)}),Object(m.jsx)(Cn.a,{children:Object(m.jsx)(f.a,{variant:"body2",color:"text.secondary",sx:{textAlign:"right"},children:Object(m.jsxs)("strong",{children:["Supply: ",n.supply]})})}),Object(m.jsxs)(In.a,{children:[Object(m.jsx)(R.a,{size:"small",component:o.b,to:"/sell/".concat(n.id),children:"Sell"}),Object(m.jsx)(Me.a,{size:"small",component:o.b,to:"/transfer/".concat(n.id),title:"Transfer",children:Object(m.jsx)(Pn.a,{})}),Object(m.jsx)(Me.a,{size:"small",color:"warning",component:o.b,to:"/burn/".concat(n.id),title:"Burn",children:Object(m.jsx)(Rn.a,{})})]})]})}function Nn(e){var t,n=e.items;return null!==n&&void 0!==n&&null!==(t=n.items)&&void 0!==t&&t.length?Object(m.jsx)(d.a,{sx:{my:2,display:"flex",gap:2,flexWrap:"wrap"},children:null===n||void 0===n?void 0:n.items.map((function(e){return Object(m.jsx)(Fn,{item:e},e.id)}))}):Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(f.a,{variant:"h5",color:"text.secondary",sx:{textAlign:"center"},children:"No Items found"})})}function Dn(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:'\n// get items by owner\t\t\nconst items = await sdk.apis.item.getItemsByOwner({\n\towner: "ETHEREUM:...", // wallet address in union format \n})\n// Items: {\n// total: number;\n// continuation?: string;\n// items: Array;\n// }[]\n\t\t'})})}function Ln(e,t,n){var a=Object(r.useState)(null),i=Object(D.a)(a,2),s=i[0],o=i[1],u=Object(r.useState)(!1),c=Object(D.a)(u,2),d=c[0],p=c[1],l=Object(r.useState)(null),y=Object(D.a)(l,2),f=y[0],m=y[1];function b(){return(b=Object(U.a)(Object(L.a)().mark((function r(){var a;return Object(L.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,n){r.next=3;break}throw new Error("useFetchItems: blockchain should be specified");case 3:return p(!0),r.next=6,null===e||void 0===e?void 0:e.apis.item.getItemsByOwner({owner:t,blockchains:n?[n]:[]});case 6:a=r.sent,o(null!==a&&void 0!==a?a:null),m(!1),r.next=22;break;case 11:if(r.prev=11,r.t0=r.catch(0),!r.t0.json){r.next=21;break}return r.t1=m,r.next=17,r.t0.json();case 17:r.t2=r.sent,(0,r.t1)(r.t2),r.next=22;break;case 21:m(r.t0);case 22:return r.prev=22,p(!1),r.finish(22);case 25:case"end":return r.stop()}}),r,null,[[0,11,22,25]])})))).apply(this,arguments)}return Object(r.useEffect)((function(){t?function(){return b.apply(this,arguments)}().catch((function(e){return m(e)})):o(null)}),[t]),{items:s,fetching:d,error:f}}function Un(){var e=Object(r.useContext)(ue);if("connected"!==e.state.status)return null;var t=Ln(e.sdk,e.walletAddress,e.state.connection.blockchain),n=t.items,a=t.fetching,i=t.error;return Object(m.jsx)(b,{header:"My Items",children:Object(m.jsxs)(O,{sx:{my:2},comment:Object(m.jsx)(Dn,{}),children:[i&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsxs)(Oe.a,{severity:"error",children:[Object(m.jsx)(_e.a,{children:"Items fetch error"}),i.message||i.toString()]})}),a?Object(m.jsx)(d.a,{sx:{my:4,display:"flex",justifyContent:"center"},children:Object(m.jsx)(rt.a,{})}):n&&Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(Nn,{items:n})})]})})}var Vn=n(4133);function Wn(e){var t=e.form,n=e.name,r=e.disabled,a=t.register;return Object(m.jsx)(m.Fragment,{children:Object(m.jsxs)("label",{htmlFor:"file-input",children:[Object(m.jsx)(Vn.a,Object(T.a)(Object(T.a)({id:"file-input",type:"file"},a(n,{required:!0,disabled:r})),{},{style:{display:"none"}})),Object(m.jsx)(R.a,{variant:"outlined",component:"span",children:"Select file"})]})})}function Hn(e){var t,n,a=e.onComplete,i=Object(r.useContext)(ue),s=Object(Ze.a)(),o=s.handleSubmit,u=$e().result,c=null===(t=i.sdk)||void 0===t||null===(n=t.wallet)||void 0===n?void 0:n.walletType,p=Object(r.useState)(!0),l=Object(D.a)(p,2),y=l[0],f=l[1];return Object(r.useEffect)((function(){var e=s.watch((function(e){var t=e.name,n=e.description,r=e.image,a=e.accountAddress;f(!(t&&n&&r.length&&a))}));return function(){return e.unsubscribe()}}),[s,s.watch]),Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:o(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){var n,r,s,o,u,d;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.sdk){e.next=2;break}return e.abrupt("return");case 2:return n=t.name,r=t.description,s=t.image,o=t.animationUrl,u=t.nftStorageApiKey,d=t.accountAddress,e.t0=a,e.next=6,i.sdk.nft.uploadMeta({accountAddress:Object(M.toUnionAddress)("".concat(c,":").concat(d)),nftStorageApiKey:u,properties:{name:n,description:r,image:s[0],animationUrl:o,attributes:[]},royalty:""});case 6:e.t1=e.sent,(0,e.t0)(e.t1);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{form:s,name:"nftStorageApiKey",label:"NftStorage Api Key"}),Object(m.jsx)(pt,{form:s,name:"accountAddress",label:"Account address"}),Object(m.jsx)(pt,{form:s,name:"name",label:"Name"}),Object(m.jsx)(pt,{form:s,name:"description",label:"Description"}),Object(m.jsx)(Wn,{form:s,name:"image"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:s,label:"Next",state:et(u.type),icon:P.d,disabled:y})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:u})})]})}function Kn(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:"\n// upload metadata\nconst uploadMeta = await sdk.nft.uploadMeta(\n\tYOUR_NFT_STORAGE_API_KEY: string, \n\taccountAddress: string,\n\tproperties: {\n\t\tname: string\n\t\tdescription?: string\n\t\timage?: File\n\t\tanimationUrl?: File\n\t\tattributes: {key: string, value: string}[]\n\t},\n\troyalty: string\n)\n\n// uploadMeta: {\n// \toriginalFile: File\n// \tURL: string\n// \tIPFSURL: string\n// } \n\t\t\t"})})}function zn(e){var t=e.result;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(f.a,{variant:"overline",children:"Upload result:"}),Object(m.jsx)(we,{theme:"light",language:"json",wrap:!0,children:JSON.stringify({url:t.URL,ipfsUrl:t.IPFSURL},null," ")})]})}function Gn(){return Object(m.jsx)(b,{header:"Upload metadata",children:Object(m.jsx)(O,{sx:{my:2},comment:Object(m.jsx)(Kn,{}),children:Object(m.jsx)(Et,{steps:[{label:"Get Meta Info",render:function(e,t){return console.log(t),Object(m.jsx)(Hn,{onComplete:e})}},{label:"Done",render:function(e,t){return Object(m.jsx)(tt,{result:{type:"complete",data:t},completeRender:function(e){return Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(zn,{result:e})})}})}}]})})})}function Zn(e){var t=e.disabled,n=e.onComplete,a=e.prepare,i=Object(r.useContext)(ue),s=Object(Ze.a)(),o=s.handleSubmit,u=$e(),c=u.result,p=u.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)(Oe.a,{severity:"warning",sx:{my:2},children:[Object(m.jsx)(_e.a,{children:"Warning"}),"Submitting this form will destroy token"]}),Object(m.jsx)("form",{onSubmit:o(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.t0=n,e.next=6,a.submit({amount:parseInt(t.amount)});case 6:e.t1=e.sent,(0,e.t0)(e.t1),e.next=13;break;case 10:e.prev=10,e.t2=e.catch(2),p(e.t2);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{type:"number",inputProps:{min:1,max:a.maxAmount,step:1},form:s,options:{min:1,max:Number(a.maxAmount)},name:"amount",label:"Amount"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:s,label:"Burn",state:et(c.type),disabled:t})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:c})})]})}function qn(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:"\n// get item info\nconst prepare = await sdk.nft.burn({\n itemId: \n})\n// prepare: {\n// multiple: boolean,\n// maxAmount: BigNumber\n// submit: Function\n// } \n\n// send transaction\nconst result = await prepare.submit({\n amount: 1,\n})\n// result: IBlockchainTransaction\n\t\t"})})}function Yn(e){var t=e.itemId,n=e.disabled,a=e.onComplete,i=Object(l.f)(),s=Object(r.useContext)(ue),o=Object(Ze.a)(),u=o.handleSubmit,c=$e(),p=c.result,y=c.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:u(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.t0=a,e.next=6,s.sdk.nft.burn.prepare({itemId:Object(M.toItemId)(t.itemId)});case 6:e.t1=e.sent,(0,e.t0)(e.t1),i("/burn/".concat(t.itemId),{}),e.next=14;break;case 11:e.prev=11,e.t2=e.catch(2),y(e.t2);case 14:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{form:o,defaultValue:t,name:"itemId",label:"Item ID"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:o,label:"Next",state:et(p.type),icon:P.d,disabled:n})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:p})})]})}function Xn(e){return!!e}function Jn(){var e,t,n=Object(l.g)(),a=null===(e=Object(r.useContext)(ue).sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType;return Object(m.jsxs)(b,{header:"Burn Token",children:[!Xn(a)&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsx)(ot,{blockchain:a})}),Object(m.jsx)(O,{sx:{my:2},comment:Object(m.jsx)(qn,{}),children:Object(m.jsx)(Et,{steps:[{label:"Get Item Info",render:function(e){return Object(m.jsx)(Yn,{onComplete:e,disabled:!Xn(a),itemId:n.itemId})}},{label:"Send Transaction",render:function(e,t){return Object(m.jsx)(Zn,{onComplete:e,prepare:t,disabled:!Xn(a)})}},{label:"Done",render:function(e,t){return Object(m.jsx)(tt,{result:{type:"complete",data:t},completeRender:function(e){return Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(st,{transaction:e})})}})}}]})})]})}function Qn(e){var t=e.disabled,n=e.onComplete,a=e.prepare,i=Object(r.useContext)(ue),s=Object(Ze.a)(),o=s.handleSubmit,u=$e(),c=u.result,p=u.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:o(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.t0=n,e.next=6,a.submit({amount:parseInt(t.amount),to:Object(M.toUnionAddress)(t.to)});case 6:e.t1=e.sent,(0,e.t0)(e.t1),e.next=13;break;case 10:e.prev=10,e.t2=e.catch(2),p(e.t2);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{form:s,name:"to",label:"Receiver Address"}),Object(m.jsx)(pt,{type:"number",inputProps:{min:1,max:a.maxAmount,step:1},form:s,options:{min:1,max:Number(a.maxAmount)},name:"amount",label:"Amount"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:s,label:"Transfer",state:et(c.type),disabled:t})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:c})})]})}function $n(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:"\n// get item info\nconst prepare = await sdk.nft.transfer({\n itemId: \n})\n// prepare: {\n// multiple: boolean,\n// maxAmount: BigNumber\n// submit: Function\n// } \n\n// send transaction\nconst result = await prepare.submit({\n amount: 1,\n to: UnionAddress\n})\n// result: IBlockchainTransaction\n\t\t"})})}function er(e){var t=e.itemId,n=e.disabled,a=e.onComplete,i=Object(l.f)(),s=Object(r.useContext)(ue),o=Object(Ze.a)(),u=o.handleSubmit,c=$e(),p=c.result,y=c.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:u(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.t0=a,e.next=6,s.sdk.nft.transfer.prepare({itemId:Object(M.toItemId)(t.itemId)});case 6:e.t1=e.sent,(0,e.t0)(e.t1),i("/transfer/".concat(t.itemId),{}),e.next=14;break;case 11:e.prev=11,e.t2=e.catch(2),y(e.t2);case 14:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{form:o,defaultValue:t,name:"itemId",label:"Item ID"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:o,label:"Next",state:et(p.type),icon:P.d,disabled:n})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:p})})]})}function tr(e){return!!e}function nr(){var e,t,n=Object(l.g)(),a=null===(e=Object(r.useContext)(ue).sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType;return Object(m.jsxs)(b,{header:"Transfer Token",children:[!tr(a)&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsx)(ot,{blockchain:a})}),Object(m.jsx)(O,{sx:{my:2},comment:Object(m.jsx)($n,{}),children:Object(m.jsx)(Et,{steps:[{label:"Get Item Info",render:function(e){return Object(m.jsx)(er,{onComplete:e,disabled:!tr(a),itemId:n.itemId})}},{label:"Send Transaction",render:function(e,t){return Object(m.jsx)(Qn,{onComplete:e,prepare:t,disabled:!tr(a)})}},{label:"Done",render:function(e,t){return Object(m.jsx)(tt,{result:{type:"complete",data:t},completeRender:function(e){return Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(st,{transaction:e})})}})}}]})})]})}function rr(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:'\n// get items by owner\t\t\nconst balance = await sdk.balances.getBalance(\n\t"ETHEREUM:...", // wallet address \n\t{ "@type": "ETH", blockchain: "ETHEREUM" } // currency type\n)\n\t\t'})})}function ar(e,t,n){var a=Object(r.useState)(null),i=Object(D.a)(a,2),s=i[0],o=i[1],u=Object(r.useState)(!1),c=Object(D.a)(u,2),d=c[0],p=c[1],l=Object(r.useState)(null),y=Object(D.a)(l,2),f=y[0],m=y[1];function b(){return(b=Object(U.a)(Object(L.a)().mark((function r(){var a;return Object(L.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,p(!0),r.next=4,null===e||void 0===e?void 0:e.balances.getBalance(t,n);case 4:a=r.sent,o(a.toString()),m(!1),r.next=20;break;case 9:if(r.prev=9,r.t0=r.catch(0),!r.t0.json){r.next=19;break}return r.t1=m,r.next=15,r.t0.json();case 15:r.t2=r.sent,(0,r.t1)(r.t2),r.next=20;break;case 19:m(r.t0);case 20:return r.prev=20,p(!1),r.finish(20);case 23:case"end":return r.stop()}}),r,null,[[0,9,20,23]])})))).apply(this,arguments)}return Object(r.useEffect)((function(){t?function(){return b.apply(this,arguments)}().catch((function(e){return m(e)})):o(null)}),[t,n["@type"]]),{balance:s,fetching:d,error:f}}function ir(e){var t,n,a=e.sdk,i=e.walletAddress,s=Object(r.useContext)(ue),o=Object(Ze.a)(),u=o.handleSubmit,c=Object(r.useContext)(ie).environment,p="connected"===s.state.status?s.state.connection.blockchain:null===(t=s.sdk)||void 0===t||null===(n=t.wallet)||void 0===n?void 0:n.walletType,l=or(p,c),y="POLYGON"===p?"MATIC":"ETH",f=[{label:"".concat(y," -> WETH"),from:{"@type":"ETH",blockchain:p},to:{"@type":"ERC20",contract:l}},{label:"WETH -> ".concat(y),from:{"@type":"ERC20",contract:l},to:{"@type":"ETH",blockchain:p}}],b=Object(r.useState)(f[0]),v=Object(D.a)(b,2),h=v[0],T=v[1],g=ar(a,i,h.from),w=g.balance,x=g.fetching,O=$e(),_=O.result,E=O.isFetching,A=O.setError,C=O.setComplete;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:u(Object(U.a)(Object(L.a)().mark((function e(){var t;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"connected"!==s.state.status){e.next=8;break}return e.next=4,null===a||void 0===a?void 0:a.balances.convert({blockchain:s.state.connection.blockchain,value:o.getValues("value"),isWrap:"ETH"===h.from["@type"]});case 4:return t=e.sent,C(t),e.next=8,t.wait();case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),A(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))),children:Object(m.jsxs)(k.a,{container:!0,spacing:2,children:[Object(m.jsx)(k.a,{item:!0,xs:5,children:Object(m.jsx)(pt,{type:"number",inputProps:{min:0,max:w,step:"any"},form:o,options:{min:0,max:w||void 0},name:"value",label:"Value"})}),Object(m.jsx)(k.a,{item:!0,xs:4,children:Object(m.jsx)(Qe,{form:o,value:h.label,onChange:function(e){var t=f.find((function(t){return t.label===e.target.value}));T(t)},name:"currencyType",label:"Currency",children:f.map((function(e,t){return Object(m.jsx)(S.a,{value:e.label,children:e.label},t+"-value")}))})}),Object(m.jsx)(k.a,{item:!0,xs:2,children:Object(m.jsx)(Ye,{form:o,label:"Convert",state:x||E?"normal":"success",disabled:x||E})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:_,completeRender:function(e){return Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(st,{transaction:e})})}})})]})}var sr=Object(g.a)({},F.Blockchain.ETHEREUM,{prod:Object(M.toContractAddress)("ETHEREUM:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"),testnet:Object(M.toContractAddress)("ETHEREUM:0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6"),staging:Object(M.toContractAddress)("ETHEREUM:0x8618444D5916c52Ef2BA9a64dDE5fE04249F6001"),development:Object(M.toContractAddress)("ETHEREUM:0x55eB2809896aB7414706AaCDde63e3BBb26e0BC6")});function or(e,t){if(e&&t&&sr&&sr[e]){var n=sr[e];return n&&n[t]}}function ur(e){switch(e){case"testnet":return Object(M.toContractAddress)("FLOW:A.7e60df042a9c0868.FlowToken");case"prod":return Object(M.toContractAddress)("FLOW:A.1654653399040a61.FlowToken");default:throw new Error("Can't find FlowToken address on env=".concat(e))}}function cr(e){var t,n,a=e.sdk,i=e.wallet,s=e.walletAddress,o=Object(r.useContext)(ie).environment,u=Object(r.useContext)(ue),c=function(e,t,n){switch(e){case qe.WalletType.ETHEREUM:return[{isNative:!0,requireContract:!1,getAssetType:function(){var e;return{"@type":"ETH",blockchain:"connected"===(null===n||void 0===n||null===(e=n.state)||void 0===e?void 0:e.status)?n.state.connection.blockchain:F.Blockchain.ETHEREUM}}}];case qe.WalletType.IMMUTABLEX:return[{isNative:!0,requireContract:!1,getAssetType:function(){return{"@type":"ETH",blockchain:F.Blockchain.IMMUTABLEX}}}];case qe.WalletType.SOLANA:return[{isNative:!0,requireContract:!1,getAssetType:function(){return{"@type":"SOLANA_SOL"}}}];case qe.WalletType.TEZOS:return[{isNative:!0,requireContract:!1,getAssetType:function(){return{"@type":"XTZ"}}}];case qe.WalletType.FLOW:return[{isNative:!0,requireContract:!1,getAssetType:function(){return{"@type":"FLOW_FT",contract:ur(t)}}}];default:throw new Error("Unsupported blockchain")}}(i.walletType,o,u),d=ar(a,s,null===(t=c.find((function(e){return e.isNative})))||void 0===t?void 0:t.getAssetType()),p=d.balance,l=d.fetching,y=d.error,f=!((null===(n=u.state)||void 0===n?void 0:n.connection.blockchain)===F.Blockchain.MANTLE)&&!!or(i.walletType,o);return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)("div",{style:{marginBottom:20},children:["Native Balance: ",l?Object(m.jsx)(rt.a,{size:14}):y?Object(m.jsx)("b",{children:y.message}):Object(m.jsx)(m.Fragment,{children:p})]}),f&&Object(m.jsx)(ir,{sdk:a,walletAddress:s})]})}function dr(e){return!!e}function pr(){var e,t,n=Object(r.useContext)(ue),a=null===(e=n.sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType;return Object(m.jsxs)(b,{header:"Balances",children:[!dr(a)&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsx)(ot,{blockchain:a})}),Object(m.jsx)(O,{sx:{my:2},comment:Object(m.jsx)(rr,{}),children:Object(m.jsx)(d.a,{sx:{my:2},children:n.sdk&&n.sdk.wallet&&n.walletAddress?Object(m.jsx)(cr,{sdk:n.sdk,walletAddress:n.walletAddress,wallet:n.sdk.wallet}):null})})]})}function lr(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:"\n// get order info\nconst result = await sdk.order.cancel({\n orderId: \n})\n// result: IBlockchainTransaction\n\t\t"})})}function yr(e){var t=e.disabled,n=e.onComplete,a=Object(r.useContext)(ue),i=Object(Ze.a)(),s=i.handleSubmit,o=$e(),u=o.result,c=o.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:s(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.t0=n,e.next=6,a.sdk.order.cancel({orderId:t.orderId});case 6:e.t1=e.sent,(0,e.t0)(e.t1),e.next=13;break;case 10:e.prev=10,e.t2=e.catch(2),c(e.t2);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{form:i,name:"orderId",label:"Order ID"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:i,label:"Submit",state:et(u.type),disabled:t})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:u})})]})}function fr(e){return!!e}function mr(){var e,t,n=null===(e=Object(r.useContext)(ue).sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType;return Object(m.jsxs)(b,{header:"Cancel Order",children:[!fr(n)&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsx)(ot,{blockchain:n})}),Object(m.jsx)(O,{sx:{my:2},comment:Object(m.jsx)(lr,{}),children:Object(m.jsx)(Et,{steps:[{label:"Send Transaction",render:function(e){return Object(m.jsx)(yr,{onComplete:e,disabled:!fr(n)})}},{label:"Done",render:function(e,t){return Object(m.jsx)(tt,{result:{type:"complete",data:t},completeRender:function(e){return Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(st,{transaction:e})})}})}}]})})]})}function br(e){var t=e.orderId,n=e.disabled,a=e.onComplete,i=Object(r.useState)(2),s=Object(D.a)(i,2),o=s[0],u=s[1],c=Object(r.useContext)(ue),p=Object(Ze.a)(),l=p.handleSubmit,y=$e(),f=y.result,b=y.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:l(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,console.log("formData",t),e.t0=a,e.next=7,c.sdk.order.batchBuy.prepare(t.orderId.filter((function(e){return e})).map((function(e){return{orderId:Object(M.toOrderId)(e)}})));case 7:return e.t1=e.sent,e.next=10,c.sdk.apis.order.getOrdersByIds({orderIds:{ids:t.orderId.filter((function(e){return e}))}});case 10:e.t2=e.sent.orders,e.t3={prepare:e.t1,orders:e.t2},(0,e.t0)(e.t3),e.next=18;break;case 15:e.prev=15,e.t4=e.catch(2),b(e.t4);case 18:case"end":return e.stop()}}),e,null,[[2,15]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[new Array(o).fill(0).map((function(e,n){return Object(m.jsx)(pt,{form:p,defaultValue:t,name:"orderId[".concat(n,"]"),label:"Order ID"},n)})),Object(m.jsxs)(d.a,{display:"flex",justifyContent:"flex-end",alignItems:"flex-end",children:[Object(m.jsx)(Me.a,{color:"primary",onClick:function(){return u(o+1)},children:Object(m.jsx)(Yt.a,{})}),Object(m.jsx)(Me.a,{color:"error",disabled:o<=1,onClick:function(){return u(Math.max(1,o-1))},children:Object(m.jsx)(Jt.a,{})})]}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:p,label:"Next",state:et(f.type),icon:P.d,disabled:n})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:f})})]})}function vr(e){var t=e.prepare,n=e.orders,a=e.disabled,i=e.onComplete,s=Object(r.useContext)(ue),o=Object(Ze.a)(),u=o.handleSubmit,c=$e(),p=c.result,l=c.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:u(function(){var e=Object(U.a)(Object(L.a)().mark((function e(n){return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.t0=i,e.next=6,t.submit(t.prepared.map((function(e){var t=parseInt(n[e.orderId+"_itemsCounter"]||1),r=new Array(t).fill(0).map((function(t,r){return console.log("maps, index",e.orderId+"_itemId_".concat(r),n[e.orderId+"_itemId_".concat(r)]),n[e.orderId+"_itemId_".concat(r)]?Object(M.toItemId)(n[e.orderId+"_itemId_".concat(r)]):void 0}));return console.log("itemId",r,"itemsCounter",t),{orderId:e.orderId,amount:parseInt(n[e.orderId+"_amount"]),itemId:1===r.length?r[0]:r}})));case 6:e.t1=e.sent,(0,e.t0)(e.t1),e.next=13;break;case 10:e.prev=10,e.t2=e.catch(2),l(e.t2);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[t.prepared.map((function(e,t){return Object(m.jsxs)(d.a,{children:[Object(m.jsxs)("p",{children:["OrderId: ",e.orderId]}),Object(m.jsx)(Qt,{form:o,prepare:e,namePrefix:e.orderId,order:n.find((function(t){return t.id===e.orderId})),isFillBatch:!0})]},e.orderId+t)})),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:o,label:"Submit",state:et(p.type),disabled:a})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:p})})]})}function hr(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:"\n// get orders info\nconst batchBuy = await connection.sdk.order.batchBuy([\n {orderId: },\n {orderId: }\n])\n\n// batchBuy: {\n// submit: Function,\n// prepared: [{\n// orderId: OrderId\t\t\n// baseFee: number\n// maxAmount: BigNumber\n// multiple: boolean\n// supportsPartialFill: boolean\n// }, {\n// orderId: OrderId\n// baseFee: number\n// maxAmount: BigNumber\n// multiple: boolean\n// supportsPartialFill: boolean\n// }]\n// } \n\n// send transaction\nconst result = await buy.submit([{\n \torderId: ,\n \tamount: 1,\n }, {\n \torderId: \n \tamount: 1,\n \toriginFees: [],\n}])\n// result: IBlockchainTransaction\n\t\t"})})}function Tr(e){return!!e&&[qe.WalletType.ETHEREUM,qe.WalletType.TEZOS].includes(e)}function gr(){var e,t,n=Object(l.g)(),a=null===(e=Object(r.useContext)(ue).sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType;return Object(m.jsxs)(b,{header:"Batch Buy Tokens",children:[!Tr(a)&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsx)(ot,{blockchain:a})}),Object(m.jsx)(O,{sx:{my:2},comment:Object(m.jsx)(hr,{}),children:Object(m.jsx)(Et,{steps:[{label:"Get Order Info",render:function(e){return Object(m.jsx)(br,{onComplete:e,disabled:!Tr(a),orderId:n.orderId})}},{label:"Send Transaction",render:function(e,t){return Object(m.jsx)(vr,{onComplete:e,prepare:t.prepare,orders:t.orders,disabled:!Tr(a)})}},{label:"Done",render:function(e,t){return Object(m.jsx)(tt,{result:{type:"complete",data:t},completeRender:function(e){return Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(st,{transaction:e})})}})}}]})})]})}function wr(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:"\n// sign message\t\t\nconst signResult = await sdk.wallet?.signPersonalMessage(input)\n\n// signResult : {\n// signature: string\n// publicKey: string\n// }\n\t\t"})})}function kr(e){return!!e}function xr(){var e,t,n=Object(r.useContext)(ue),a=null===(e=n.sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType,i=Object(r.useState)(""),s=Object(D.a)(i,2),o=s[0],u=s[1],c=Object(r.useState)(!1),p=Object(D.a)(c,2),l=p[0],y=p[1],h=Object(r.useState)(void 0),T=Object(D.a)(h,2),g=T[0],w=T[1],k=Object(r.useState)(void 0),x=Object(D.a)(k,2),_=x[0],E=x[1];return Object(m.jsxs)(b,{header:"Sign Message",children:[!kr(a)&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsx)(ot,{blockchain:a})}),Object(m.jsxs)(O,{sx:{my:2},comment:Object(m.jsx)(wr,{}),children:[Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(I.a,{fullWidth:!0,label:"Input Text",multiline:!0,value:o,onChange:function(e){return u(e.target.value)}})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(A.a,{loading:l,loadingPosition:"start",startIcon:Object(m.jsx)(ye,{icon:P.h}),color:"primary",variant:"contained",disabled:""===o||!kr(a),onClick:Object(U.a)(Object(L.a)().mark((function e(){var t,r,a;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,y(!0),e.next=4,null===n||void 0===n||null===(t=n.sdk)||void 0===t||null===(r=t.wallet)||void 0===r?void 0:r.signPersonalMessage(o);case 4:a=e.sent,y(!1),E(a),w(void 0),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(0),console.error(e.t0),y(!1),w(e.t0.message||e.t0.toString());case 15:case"end":return e.stop()}}),e,null,[[0,10]])}))),children:"Sign"})}),Object(m.jsxs)(d.a,{sx:{my:2},children:[g&&Object(m.jsx)(Oe.a,{variant:"outlined",severity:"error",icon:Object(m.jsx)(ye,{icon:P.f}),children:g}),!g&&_&&Object(m.jsxs)(Oe.a,{variant:"outlined",severity:"success",icon:Object(m.jsx)(ye,{icon:P.b}),children:[Object(m.jsx)(f.a,{variant:"overline",children:"Signature:"}),Object(m.jsxs)("div",{children:[Object(m.jsx)(v,{wrap:!0,children:_.signature})," ",Object(m.jsx)(nt,{value:_.signature})]}),Object(m.jsxs)(d.a,{sx:{my:2},children:[Object(m.jsx)(f.a,{variant:"overline",children:"Public Key:"}),Object(m.jsxs)("div",{children:[Object(m.jsx)(v,{wrap:!0,children:_.publicKey})," ",Object(m.jsx)(nt,{value:_.publicKey})]})]})]})]})]})]})}function Or(){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(we,{children:'\n// get order info\nconst sellUpdateResponse = await sdk.order.sellUpdate.prepare({\n orderId: \n})\n// buy: {\n// originFeeSupport: OriginFeeSupport.NONE | OriginFeeSupport.AMOUNT_ONLY | OriginFeeSupport.FULL\n// payoutsSupport: \n// maxFeesBasePointSupport: BigNumber\n// supportedCurrencies: Array\n// baseFee: number\n// submit: Function\n// } \n\n// send transaction\nconst result = await sellUpdateResponse.submit({\n price: "0.1",\n})\n// result: IBlockchainTransaction\n\t\t'})})}function _r(e){var t=e.prepare,n=e.disabled,a=e.onComplete,i=Object(r.useContext)(ue),s=Object(Ze.a)(),o=s.handleSubmit,u=$e(),c=u.result,p=u.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:o(function(){var e=Object(U.a)(Object(L.a)().mark((function e(n){return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.t0=a,e.next=6,t.submit({price:n.price});case 6:e.t1=e.sent,(0,e.t0)(e.t1),e.next=13;break;case 10:e.prev=10,e.t2=e.catch(2),p(e.t2);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(Vt,{form:s}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:s,label:"Submit",state:et(c.type),disabled:n})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:c})})]})}function Er(e){var t=e.orderId,n=e.disabled,a=e.onComplete,i=Object(l.f)(),s=Object(r.useContext)(ue),o=Object(Ze.a)(),u=o.handleSubmit,c=$e(),p=c.result,y=c.setError;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("form",{onSubmit:u(function(){var e=Object(U.a)(Object(L.a)().mark((function e(t){var n;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.sdk){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,n=Object(M.toOrderId)(t.orderId),e.t0=a,e.next=7,s.sdk.order.sellUpdate.prepare({orderId:n});case 7:return e.t1=e.sent,e.next=10,s.sdk.apis.order.getOrderById({id:n});case 10:e.t2=e.sent,e.t3={prepare:e.t1,order:e.t2},(0,e.t0)(e.t3),i("/sell-update/".concat(t.orderId),{}),e.next=19;break;case 16:e.prev=16,e.t4=e.catch(2),y(e.t4);case 19:case"end":return e.stop()}}),e,null,[[2,16]])})));return function(t){return e.apply(this,arguments)}}()),children:Object(m.jsxs)(C.a,{spacing:2,children:[Object(m.jsx)(pt,{form:o,defaultValue:t,name:"orderId",label:"Order ID"}),Object(m.jsx)(d.a,{children:Object(m.jsx)(Ye,{form:o,label:"Next",state:et(p.type),icon:P.d,disabled:n})})]})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(tt,{result:p})})]})}function Ar(e){return!!e}function Cr(){var e,t,n=Object(l.g)(),a=null===(e=Object(r.useContext)(ue).sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType;return Object(m.jsxs)(b,{header:"Change Price",children:[!Ar(a)&&Object(m.jsx)(O,{sx:{my:2},children:Object(m.jsx)(ot,{blockchain:a})}),Object(m.jsx)(O,{sx:{my:2},comment:Object(m.jsx)(Or,{}),children:Object(m.jsx)(Et,{steps:[{label:"Get Order Info",render:function(e){return Object(m.jsx)(Er,{onComplete:e,disabled:!Ar(a),orderId:n.orderId})}},{label:"Send Transaction",render:function(e,t){return Object(m.jsx)(_r,{onComplete:e,prepare:t.prepare,order:t.order,disabled:!Ar(a)})}},{label:"Done",render:function(e,t){return Object(m.jsx)(tt,{result:{type:"complete",data:t},completeRender:function(e){return Object(m.jsx)(m.Fragment,{children:Object(m.jsxs)(d.a,{sx:{my:2},children:[Object(m.jsx)(f.a,{variant:"overline",children:"Updated order ID:"}),Object(m.jsxs)("div",{children:[Object(m.jsx)(v,{wrap:!0,children:e})," ",Object(m.jsx)(nt,{value:e})]})]})})}})}}]})})]})}var Ir=n(1678);function Sr(){var e,t,n=Object(r.useContext)(ie).environment,a=$e(),i=a.result,s=a.isFetching,o=a.setError,u=a.setComplete,c=Object(r.useContext)(ue),p=(null===(e=c.sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType)===qe.WalletType.FLOW,l=Object(Ze.a)(),y=l.handleSubmit;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)("form",{onSubmit:y(Object(U.a)(Object(L.a)().mark((function e(){var t,n,r;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,null===c||void 0===c||null===(t=c.sdk)||void 0===t||null===(n=t.flow)||void 0===n?void 0:n.setupAccount(l.getValues("collection"));case 3:r=e.sent,u(r),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),o(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))),children:[Object(m.jsx)(f.a,{sx:{my:2},variant:"h6",component:"h2",gutterBottom:!0,children:"Setup Flow collection"}),Object(m.jsxs)(k.a,{container:!0,spacing:2,children:[Object(m.jsx)(k.a,{item:!0,xs:4,children:Object(m.jsx)(pt,{type:"text",form:l,defaultValue:Rr(n),name:"collection",label:"Collection",disabled:!p})}),Object(m.jsx)(k.a,{item:!0,xs:2,children:Object(m.jsx)(Ye,{form:l,label:"Setup",state:s?"normal":"success",disabled:s||!p})})]})]}),Object(m.jsx)(tt,{result:i,completeRender:function(e){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(st,{transaction:e})})})}})]})}function Rr(e){return"testnet"===e?"FLOW:A.80102bce1de42dc4.HWGaragePackV2":"FLOW:"}function jr(){var e,t,n=$e(),a=n.result,i=n.isFetching,s=n.setError,o=n.setComplete,u=Object(r.useContext)(ue),c=Object(r.useState)(""),p=Object(D.a)(c,2),l=p[0],y=p[1],b=(null===(e=u.sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType)===qe.WalletType.FLOW,v=Object(Ze.a)(),h=v.handleSubmit;function T(){var e;null!==u&&void 0!==u&&null!==(e=u.sdk)&&void 0!==e&&e.flow&&u.sdk.flow.checkInitMattelCollections().then((function(e){return y(JSON.stringify(e,null," "))})).catch(console.error)}return Object(r.useEffect)((function(){T()}),[]),Object(m.jsxs)("div",{style:{marginTop:20},children:[Object(m.jsxs)("form",{onSubmit:h(Object(U.a)(Object(L.a)().mark((function e(){var t,n,r;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,null===u||void 0===u||null===(t=u.sdk)||void 0===t||null===(n=t.flow)||void 0===n?void 0:n.setupMattelCollections();case 3:r=e.sent,o(r),T(),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),s(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))),children:[Object(m.jsx)(f.a,{sx:{my:2},variant:"h6",component:"h2",gutterBottom:!0,children:"Setup Mattel collections"}),Object(m.jsx)(k.a,{container:!0,spacing:2,children:Object(m.jsx)(k.a,{item:!0,xs:4,children:l?Object(m.jsxs)("div",{children:["Collection state: ",Object(m.jsx)("pre",{children:l})]}):null})}),Object(m.jsx)(k.a,{item:!0,xs:2,children:Object(m.jsx)(Ye,{form:v,label:"Setup",state:i?"normal":"success",disabled:i||!b})})]}),Object(m.jsx)(tt,{result:a,completeRender:function(e){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(st,{transaction:e})})})}})]})}function Pr(){var e,t,n,a=$e(),i=a.result,s=a.isFetching,o=a.setError,u=a.setComplete,c=Object(r.useContext)(ue),d=(null===(e=c.sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType)===qe.WalletType.FLOW,p=Object(Ze.a)(),l=p.handleSubmit,y=function(){var e,t=Object(r.useContext)(ue),n=null===(e=t.connector)||void 0===e?void 0:e.getCurrentProvider();if(n)return n.getProvider();return}();return"mattel"!==(null===(n=y)||void 0===n?void 0:n.getId())?Object(m.jsx)(m.Fragment,{}):Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)("form",{onSubmit:l(Object(U.a)(Object(L.a)().mark((function e(){var t,n,r,a,i,s,d,l,f,m;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c.sdk){e.next=3;break}return e.abrupt("return");case 3:return e.prev=3,e.next=6,null===(n=c.sdk.flow)||void 0===n?void 0:n.checkInitMattelCollections();case 6:if(r=e.sent,console.log("accountInitStatus",r),null!==r&&void 0!==r&&r.initCollections){e.next=14;break}return e.next=11,null===(a=c.sdk.flow)||void 0===a?void 0:a.setupMattelCollections();case 11:return i=e.sent,e.next=14,null===i||void 0===i?void 0:i.wait();case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(3),console.log("err init status",e.t0);case 19:return s=p.getValues("orderId"),e.next=22,c.sdk.apis.order.getOrderById({id:s});case 22:if("FLOW_NFT"===(d=e.sent).make.type["@type"]){e.next=25;break}throw new Error("Is not a sell order");case 25:return e.next=27,c.sdk.apis.item.getItemById({itemId:Object(M.toItemId)("".concat(d.make.type.contract,":").concat(d.make.type.tokenId))});case 27:return l=e.sent,f=null===(t=l.meta)||void 0===t?void 0:t.content.find((function(e){return"IMAGE"===e["@type"]})),e.next=31,y.sardinePurchase({orderId:s,orderMaker:d.maker,purchaseOptions:{nft:{name:"test nft",imageUrl:f?f.url:"https://cdn.shopify.com/s/files/1/0568/1132/3597/files/HWNFT_S4_modular-grid_584x800b.jpg?v=1669157307"}}});case 31:m=e.sent,u(m),e.next=38;break;case 35:e.prev=35,e.t1=e.catch(0),o(JSON.stringify(e.t1,null," "));case 38:case"end":return e.stop()}}),e,null,[[0,35],[3,16]])})))),children:[Object(m.jsx)(f.a,{sx:{my:2},variant:"h6",component:"h2",gutterBottom:!0,children:"Buy Flow item by Sardine"}),Object(m.jsxs)(k.a,{container:!0,spacing:2,children:[Object(m.jsx)(k.a,{item:!0,xs:4,children:Object(m.jsx)(pt,{type:"text",form:p,name:"orderId",label:"Order Id",disabled:!d})}),Object(m.jsx)(k.a,{item:!0,xs:2,children:Object(m.jsx)(Ye,{form:p,label:"Buy",state:s?"normal":"success",disabled:s||!d})})]})]}),Object(m.jsx)(tt,{result:i,completeRender:function(e){return Object(m.jsxs)(m.Fragment,{children:["result: ",e.toString()]})}})]})}var Br=n(480),Mr=n(198),Fr=n(273);function Nr(){var e,t,n=Object(r.useContext)(ie).environment,a=$e(),i=a.result,s=a.isFetching,o=a.setError,u=a.setComplete,c=Object(r.useContext)(ue),p=Object(r.useState)(""),l=Object(D.a)(p,2),y=l[0],b=l[1],v=(null===(e=c.sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType)===qe.WalletType.FLOW,h=Object(Ze.a)(),T=h.handleSubmit;function g(){try{var e=function(e){switch(e){case"development":case"testnet":case"staging":return"testnet";case"prod":return"mainnet";default:throw new Error("Unrecognized env")}}(n),t=Object(Br.replaceImportAddresses)(y,Fr.CONFIGS[e].mainAddressMap);b(t)}catch(r){console.error(r)}}return Object(m.jsxs)("div",{style:{marginTop:20},children:[Object(m.jsxs)("form",{onSubmit:T(Object(U.a)(Object(L.a)().mark((function e(){var t,n,r,a,i,s,d;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(null===(t=c.sdk)||void 0===t||null===(n=t.wallet)||void 0===n?void 0:n.walletType)!==qe.WalletType.FLOW){e.next=12;break}return r=c.sdk.wallet,a=r.fcl,i=r.auth,e.next=5,Dr(a,{cadence:y,args:a.args([])},i);case 5:return s=e.sent,console.log("tx id=",s),e.next=9,Object(Mr.waitForSeal)(a,s);case 9:d=e.sent,console.log("tx",d),u(d);case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),o(e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,14]])})))),children:[Object(m.jsx)(f.a,{sx:{my:2},variant:"h6",component:"h2",gutterBottom:!0,children:"Execute raw FLOW transaction"}),Object(m.jsx)(k.a,{container:!0,spacing:2,children:Object(m.jsxs)(k.a,{item:!0,xs:6,children:[Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(I.a,{fullWidth:!0,label:"Input Text",multiline:!0,value:y,onChange:function(e){return b(e.target.value)}})}),Object(m.jsx)(R.a,{variant:"outlined",component:"span",onClick:function(){return g()},children:"Replace addresses"})]})}),Object(m.jsx)(k.a,{item:!0,xs:2,children:Object(m.jsx)(Ye,{form:h,label:"Setup",state:s?"normal":"success",disabled:s||!v})})]}),Object(m.jsx)(tt,{result:i,completeRender:function(e){return Object(m.jsx)(m.Fragment,{children:Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(st,{transaction:e})})})}})]})}var Dr=function(){var e=Object(U.a)(Object(L.a)().mark((function e(t,n,r){var a,i,s,o=arguments;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=o.length>3&&void 0!==o[3]?o[3]:999,(i=[t.limit(a)]).push(t.payer(r||t.authz),t.proposer(r||t.authz),t.authorizations([r||t.authz])),n.args&&i.push(n.args),i.push(t.transaction(n.cadence)),e.next=7,t.send(i);case 7:return s=e.sent,e.abrupt("return",s.transactionId);case 9:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();function Lr(){var e=$e(),t=e.result,n=e.isFetching,a=e.setError,i=e.setComplete,s=Object(r.useContext)(ue),o=Object(r.useState)(""),u=Object(D.a)(o,2),c=u[0],p=u[1],l=Object(Ze.a)(),y=l.handleSubmit;return Object(m.jsxs)("div",{style:{marginTop:20},children:[Object(m.jsxs)("form",{onSubmit:y(Object(U.a)(Object(L.a)().mark((function e(){var t,n,r,o,u;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(null===(t=s.sdk)||void 0===t||null===(n=t.wallet)||void 0===n?void 0:n.walletType)!==qe.WalletType.ETHEREUM){e.next=8;break}return r=s.sdk.wallet,o=JSON.parse(c),e.next=6,r.ethereum.signTypedData(o);case 6:u=e.sent,i(u);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),a(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))),children:[Object(m.jsx)(f.a,{sx:{my:2},variant:"h6",component:"h2",gutterBottom:!0,children:"Sign typed data"}),Object(m.jsx)(k.a,{container:!0,spacing:2,children:Object(m.jsxs)(k.a,{item:!0,xs:6,children:[Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(I.a,{fullWidth:!0,label:"Sign data",multiline:!0,value:c,onChange:function(e){return p(e.target.value)}})}),Object(m.jsx)(Ye,{form:l,label:"Sign",state:n?"normal":"success",disabled:n})]})})]}),Object(m.jsx)("div",{style:{marginTop:20,maxWidth:500,wordBreak:"break-all"},children:Object(m.jsx)(tt,{result:t,completeRender:function(e){return Object(m.jsx)(m.Fragment,{children:Object(m.jsxs)(d.a,{sx:{my:2},children:["signature: ",e]})})}})})]})}function Ur(){var e=Object(r.useContext)(ue),t=Object(r.useState)(""),n=Object(D.a)(t,2),a=n[0],i=n[1],s=$e(),o=s.result,u=s.setComplete;function c(){return(c=Object(U.a)(Object(L.a)().mark((function t(){var n,r,a,i,s;return Object(L.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((null===(n=e.sdk)||void 0===n||null===(r=n.wallet)||void 0===r?void 0:r.walletType)!==qe.WalletType.ETHEREUM){t.next=5;break}return t.next=3,null===(a=e.sdk)||void 0===a?void 0:a.wallet.ethereum.getFrom();case 3:s=t.sent,null===(i=e.sdk)||void 0===i||i.wallet.ethereum.getCurrentProvider().request({method:"eth_sendTransaction",params:[{from:s,to:"0x0c54FcCd2e384b4BB6f2E405Bf5Cbc15a017AaFb",value:"0x0",gasLimit:"0x5028",gasPrice:"0x2540be400",type:"0x0"}]});case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(){return(p=Object(U.a)(Object(L.a)().mark((function t(){var n,r,a,i;return Object(L.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((null===(n=e.sdk)||void 0===n||null===(r=n.wallet)||void 0===r?void 0:r.walletType)!==qe.WalletType.ETHEREUM){t.next=5;break}return t.next=3,null===(a=e.sdk)||void 0===a?void 0:a.wallet.ethereum.getFrom();case 3:i=t.sent,u(i);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return Object(m.jsxs)("div",{children:[Object(m.jsx)(f.a,{sx:{my:2},variant:"h4",component:"h2",gutterBottom:!0,children:"Provider actions"}),Object(m.jsxs)(k.a,{container:!0,spacing:2,children:[Object(m.jsxs)(k.a,{item:!0,xs:6,children:[Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(I.a,{fullWidth:!0,label:"Switch to chain id",value:a,onChange:function(e){return i(e.target.value)}})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(R.a,{variant:"outlined",component:"span",onClick:function(){return function(){var t,n,r;(null===(t=e.sdk)||void 0===t||null===(n=t.wallet)||void 0===n?void 0:n.walletType)===qe.WalletType.ETHEREUM&&(null===(r=e.sdk)||void 0===r||r.wallet.ethereum.getCurrentProvider().request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+parseInt(a).toString(16)}]}))}()},children:"Switch to chain"})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(R.a,{variant:"outlined",component:"span",onClick:function(){return function(){return c.apply(this,arguments)}()},children:"Send transaction"})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(R.a,{variant:"outlined",component:"span",onClick:function(){return function(){return p.apply(this,arguments)}()},children:"Get from"})})]}),Object(m.jsx)("div",{style:{marginTop:20,maxWidth:500,wordBreak:"break-all"},children:Object(m.jsx)(tt,{result:o,completeRender:function(e){return Object(m.jsx)(m.Fragment,{children:Object(m.jsxs)(d.a,{sx:{my:2},children:["result: ",e]})})}})})]})]})}var Vr=new Ir.OffRampClient("7e15bfe6-b698-49d2-a392-fd4b1855992e","4f361bcc-d7a2-4c44-b877-1f81938bb558","sandbox");function Wr(){window.addEventListener("message",(function(e){if(e.data)try{var t,n=JSON.parse(e.data);if(["failed","expired","cancelled","error"].includes(n.status)||console.log(n.data.depositAddress),"draft"===n.status)console.log("orderId",null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.orderId)}catch(e){}}),!1)}function Hr(){var e,t,n=Object(r.useContext)(ue),a=null===(e=n.sdk)||void 0===e||null===(t=e.wallet)||void 0===t?void 0:t.walletType,i=a===qe.WalletType.FLOW,s=a===qe.WalletType.ETHEREUM,o=Object(r.useState)(""),u=Object(D.a)(o,2),c=u[0],p=u[1],l=Object(r.useState)(""),y=Object(D.a)(l,2),f=y[0],v=y[1],h=Object(r.useState)(""),T=Object(D.a)(h,2),g=T[0],w=T[1];function k(){return(k=Object(U.a)(Object(L.a)().mark((function e(){var t,r,a;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=n.sdk)||void 0===t||null===(r=t.wallet)||void 0===r?void 0:r.walletType)!==qe.WalletType.ETHEREUM||!n.walletAddress){e.next=7;break}return e.next=3,Vr.getSellLink({address:n.walletAddress,cryptoAmount:"0.04",fiatCurrency:"USD",assetType:{"@type":"ETH"}});case 3:a=e.sent,p(a),e.next=8;break;case 7:throw new Error("Available only for ETH");case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(){return(x=Object(U.a)(Object(L.a)().mark((function e(){var t,r,a;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=n.sdk)||void 0===t||null===(r=t.wallet)||void 0===r?void 0:r.walletType)!==qe.WalletType.ETHEREUM||!n.walletAddress){e.next=7;break}return e.next=3,Vr.getQuotes({cryptoAmount:"0.04",fiatCurrency:"USD",assetType:{"@type":"ETH"},address:n.walletAddress});case 3:a=e.sent,v(JSON.stringify(a,null," ")),e.next=8;break;case 7:throw new Error("Available only for ETH");case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(){return(O=Object(U.a)(Object(L.a)().mark((function e(){var t;return Object(L.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Vr.getSupportedTokens();case 2:t=e.sent,w(JSON.stringify(t,null," "));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(m.jsxs)(b,{header:"Utils page",children:[i&&Object(m.jsx)(Kr,{}),s&&Object(m.jsx)(zr,{}),Object(m.jsxs)(d.a,{sx:{my:2},children:[Object(m.jsx)(R.a,{style:{marginRight:10},variant:"outlined",component:"span",onClick:function(){return function(){return x.apply(this,arguments)}()},children:"Get Offramp Quotes"}),"for wallet: ",null===n||void 0===n?void 0:n.walletAddress]}),f&&Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)("pre",{children:f})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(R.a,{style:{marginRight:10},variant:"outlined",component:"span",onClick:function(){return function(){return O.apply(this,arguments)}()},children:"Get supported tokens"})}),g&&Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)("pre",{children:g})}),Object(m.jsx)(d.a,{sx:{my:2},children:Object(m.jsx)(R.a,{variant:"outlined",component:"span",onClick:function(){return function(){return k.apply(this,arguments)}()},children:"Render Offramp Iframe"})}),c&&Object(m.jsx)("iframe",{style:{border:0},src:c,onLoad:Wr,width:500,height:700,id:"sardine_iframe"})]})}function Kr(){return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Sr,{}),Object(m.jsx)(jr,{}),Object(m.jsx)(Pr,{}),Object(m.jsx)(Nr,{})]})}function zr(){return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Lr,{}),Object(m.jsx)(Ur,{})]})}function Gr(){return Object(m.jsx)(oe,{children:function(e){return Object(m.jsx)(de,{connector:e,children:Object(m.jsxs)(d.a,{children:[Object(m.jsx)(Ue,{}),Object(m.jsxs)(p.a,{maxWidth:"xl",sx:{mt:2,display:"grid",gridTemplateColumns:"minmax(250px, 20%) 1fr",gap:"20px"},children:[Object(m.jsx)(d.a,{component:"nav",children:Object(m.jsx)(Ge,{})}),Object(m.jsx)(d.a,{component:"main",children:Object(m.jsxs)(l.c,{children:[Object(m.jsx)(l.a,{path:"/",element:Object(m.jsx)(h,{})}),Object(m.jsx)(l.a,{path:"about",element:Object(m.jsx)(h,{})}),Object(m.jsx)(l.a,{path:"connect",element:Object(m.jsx)(Ie,{})}),Object(m.jsx)(l.a,{path:"balance",element:Object(m.jsx)(pr,{})}),Object(m.jsx)(l.a,{path:"deploy",element:Object(m.jsx)(kt,{})}),Object(m.jsx)(l.a,{path:"upload-meta",element:Object(m.jsx)(Gn,{})}),Object(m.jsx)(l.a,{path:"mint",element:Object(m.jsx)(yn,{})}),Object(m.jsx)(l.a,{path:"sell",element:Object(m.jsx)(zt,{}),children:Object(m.jsx)(l.a,{path:":itemId",element:Object(m.jsx)(zt,{})})}),Object(m.jsx)(l.a,{path:"buy",element:Object(m.jsx)(sn,{}),children:Object(m.jsx)(l.a,{path:":orderId",element:Object(m.jsx)(sn,{})})}),Object(m.jsx)(l.a,{path:"sell-update",element:Object(m.jsx)(Cr,{}),children:Object(m.jsx)(l.a,{path:":orderId",element:Object(m.jsx)(Cr,{})})}),Object(m.jsx)(l.a,{path:"batch-buy",element:Object(m.jsx)(gr,{})}),Object(m.jsx)(l.a,{path:"bid",element:Object(m.jsx)(hn,{}),children:Object(m.jsx)(l.a,{path:":itemId",element:Object(m.jsx)(hn,{})})}),Object(m.jsx)(l.a,{path:"accept-bid",element:Object(m.jsx)(xn,{}),children:Object(m.jsx)(l.a,{path:":orderId",element:Object(m.jsx)(xn,{})})}),Object(m.jsx)(l.a,{path:"cancel",element:Object(m.jsx)(mr,{})}),Object(m.jsx)(l.a,{path:"transfer",element:Object(m.jsx)(nr,{}),children:Object(m.jsx)(l.a,{path:":itemId",element:Object(m.jsx)(nr,{})})}),Object(m.jsx)(l.a,{path:"burn",element:Object(m.jsx)(Jn,{}),children:Object(m.jsx)(l.a,{path:":itemId",element:Object(m.jsx)(Jn,{})})}),Object(m.jsx)(l.a,{path:"items",element:Object(m.jsx)(Un,{})}),Object(m.jsx)(l.a,{path:"sign",element:Object(m.jsx)(xr,{})}),Object(m.jsx)(l.a,{path:"utils",element:Object(m.jsx)(Hr,{})}),Object(m.jsx)(l.a,{path:"*",element:Object(m.jsx)(Se,{})})]})})]})]})})}})}var Zr=n(1679),qr=Object(Zr.a)({breakpoints:{values:{xs:0,sm:600,md:900,lg:1300,xl:1860}},palette:{primary:{main:"#4051b5"},secondary:{main:"#f50057"}}});s.a.render(Object(m.jsxs)(a.a.StrictMode,{children:[Object(m.jsx)(u.a,{}),Object(m.jsx)(c.a,{theme:qr,children:Object(m.jsx)(o.a,{children:Object(m.jsx)(Gr,{})})})]}),document.getElementById("root"))},407:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNft=void 0,t.isNft=function(e){switch(e.assetClass){case"ERC721":case"ERC721_LAZY":case"ERC1155":case"ERC1155_LAZY":case"CRYPTO_PUNKS":return!0;default:return!1}}},408:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default,i=n(78).default,s=n(111).default,o=n(21).default,u=n(22).default,c=n(903).default,d=n(203).default,p=n(37).default,l=n(38).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Middlewarer=t.WrappedAdvancedFn=void 0;var y=n(19),f=n(115),m=y.__importDefault(n(730)),b=n(409),v=n(2321),h=Symbol("SKIP_MIDDLEWARE"),T=function(e){p(n,e);var t=l(n);function n(e,r){var a,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o(this,n),(a=t.call(this,"fnCallable")).fn=e,a.args=r,a.parent=null===i||void 0===i?void 0:i.parent,Object.defineProperty(d(a),"name",{value:i.name||"fnCallable",writable:!1}),c(a,d(a))}return u(n,[{key:"fnCallable",value:function(){return this.fn.apply(this,arguments)}},{key:"setContext",value:function(e){this.context=e}}],[{key:"isWrappedAdvancedFn",value:function(e){return e instanceof n}},{key:"getParent",value:function(e){if(e)return e instanceof n||"WrappedAdvancedFn"===e.constructor.name?e.getParent():void 0}}]),n}(m.default);t.WrappedAdvancedFn=T;var g=function(){function e(){o(this,e),this.middlewares=[]}return u(e,[{key:"use",value:function(e){return this.middlewares.push(e),this}},{key:"call",value:function(e,t){var n=t.args,o=t.parent,u=t.saveContext;return y.__awaiter(this,void 0,void 0,r().mark((function t(){var c,d,p,l,y,f,m,b,h,g,w,k,x;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c=e,d=[],(u||o)&&(c=new T(c,n,{parent:o,name:e.name})),p=s(this.middlewares),t.prev=4,p.s();case 6:if((l=p.n()).done){t.next=18;break}return y=l.value,f=void 0,t.next=11,y(c,n);case 11:m=t.sent,b=a(m,2),c=b[0],(f=b[1])&&d.push(f);case 16:t.next=6;break;case 18:t.next=23;break;case 20:t.prev=20,t.t0=t.catch(4),p.e(t.t0);case 23:return t.prev=23,p.f(),t.finish(23);case 26:for(h=(0,v.toPromise)(c.apply(void 0,i(n))),g=0,w=d;g1&&void 0!==arguments[1]?arguments[1]:{};if(e.hasOwnProperty(h))return e;var n,r=(null===t||void 0===t?void 0:t.methodName)||e.name||"anonymous";return(n=e)instanceof f.Action||n&&"after"in n&&"before"in n&&"start"in n?(this.wrapAction(e,r,{parent:t.parent}),e):function(e){return e instanceof b.MethodWithPrepare||e&&"simplifiedMethod"in e&&"prepare"in e}(e)?this.wrapMethodWithPrepare(e,r):this.wrapFunction(e,r,{parent:t.parent})}},{key:"wrapMethodWithPrepare",value:function(e,t){var n=this.wrapFunction(e,t);return n.prepare=this.wrapFunction(e.prepare,"".concat(t,".prepare"),{saveContext:!0}),n}},{key:"wrapFunction",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.saveContext,i=r.parent;return Object.defineProperty(e,"name",{value:t,writable:!1}),function(){for(var t=arguments.length,r=new Array(t),s=0;s2&&void 0!==arguments[2]?arguments[2]:{}).parent,i=s(e.steps);try{var o=function(){var e=n.value,i=e.run;e.run=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},p=arguments.length>2?arguments[2]:void 0,l=(0,c.getSdkConfig)(e),y=new s.Configuration(Object.assign({basePath:l.basePath,headers:"string"===typeof n.apiKey?{"X-API-KEY":n.apiKey}:{},exceptionHandler:function(e,n,r){return i.__awaiter(t,void 0,void 0,a().mark((function t(){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new o.NetworkError({status:-1,url:decodeURIComponent(n),formData:null===(i=null===r||void 0===r?void 0:r.body)||void 0===i?void 0:i.toString(),method:null===r||void 0===r?void 0:r.method,data:{message:e.message}});case 1:case"end":return t.stop()}}),t)})))},middleware:[].concat(r(p!==u.LogsLevel.DISABLED?[d()]:[]),r((null===n||void 0===n?void 0:n.middleware)||[]))},n));return{collection:new s.CollectionControllerApi(y),currency:new s.CurrencyControllerApi(y),auction:new s.AuctionControllerApi(y),item:new s.ItemControllerApi(y),ownership:new s.OwnershipControllerApi(y),order:new s.OrderControllerApi(y),activity:new s.ActivityControllerApi(y)}},t.getErrorHandlerMiddleware=d,function(e){e.NETWORK_ERR="NETWORK_ERR",e.ETHEREUM_NETWORK_ERR="ETHEREUM_NETWORK_ERR",e.FLOW_NETWORK_ERR="FLOW_NETWORK_ERR",e.IMX_NETWORK_ERR="IMX_NETWORK_ERR",e.TEZOS_EXTERNAL_ERR="TEZOS_EXTERNAL_ERR",e.SOLANA_EXTERNAL_ERR="SOLANA_EXTERNAL_ERR",e.META_EXTERNAL_ERR="META_EXTERNAL_ERR"}(t.NetworkErrorCode||(t.NetworkErrorCode={}))},427:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogsLevel=void 0,function(e){e[e.DISABLED=0]="DISABLED",e[e.ERROR=1]="ERROR",e[e.TRACE=2]="TRACE"}(t.LogsLevel||(t.LogsLevel={}))},456:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERC1155VersionEnum=t.ERC721VersionEnum=void 0,function(e){e.ERC721V1="ERC721V1",e.ERC721V2="ERC721V2",e.ERC721V3="ERC721V3"}(t.ERC721VersionEnum||(t.ERC721VersionEnum={})),function(e){e.ERC1155V1="ERC1155V1",e.ERC1155V2="ERC1155V2"}(t.ERC1155VersionEnum||(t.ERC1155VersionEnum={}))},457:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ADDITIONAL_DATA_STRUCT=t.EXCHANGEV2_BULK_ABI=t.createExchangeWrapperContract=void 0,t.createExchangeWrapperContract=function(e,n){return e.createContract(t.EXCHANGEV2_BULK_ABI,n)},t.EXCHANGEV2_BULK_ABI=[{inputs:[{internalType:"address",name:"_wyvernExchange",type:"address"},{internalType:"address",name:"_exchangeV2",type:"address"},{internalType:"address",name:"_seaPort",type:"address"},{internalType:"address",name:"_x2y2",type:"address"},{internalType:"address",name:"_looksRare",type:"address"},{internalType:"address",name:"_sudoswap",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"result",type:"bool"}],name:"Execution",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"Paused",type:"event"},{inputs:[],name:"exchangeV2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"looksRare",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155BatchReceived",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC721Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[{internalType:"bool",name:"_paused",type:"bool"}],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"seaPort",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"sudoswap",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function",constant:!0},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"wyvernExchange",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"x2y2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{stateMutability:"payable",type:"receive",payable:!0},{inputs:[{components:[{internalType:"enum ExchangeWrapper.Markets",name:"marketId",type:"uint8"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"fees",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct ExchangeWrapper.PurchaseDetails",name:"purchaseDetails",type:"tuple"},{internalType:"address",name:"feeRecipientFirst",type:"address"},{internalType:"address",name:"feeRecipientSecond",type:"address"}],name:"singlePurchase",outputs:[],stateMutability:"payable",type:"function",payable:!0},{inputs:[{components:[{internalType:"enum ExchangeWrapper.Markets",name:"marketId",type:"uint8"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"fees",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct ExchangeWrapper.PurchaseDetails[]",name:"purchaseDetails",type:"tuple[]"},{internalType:"address",name:"feeRecipientFirst",type:"address"},{internalType:"address",name:"feeRecipientSecond",type:"address"},{internalType:"bool",name:"allowFail",type:"bool"}],name:"bulkPurchase",outputs:[],stateMutability:"payable",type:"function",payable:!0}],t.ADDITIONAL_DATA_STRUCT={components:[{name:"data",type:"bytes"},{name:"additionalRoyalties",type:"uint[]"}],name:"data",type:"tuple"}},458:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExchangeWrapperOrderType=void 0,function(e){e[e.RARIBLE_V2=0]="RARIBLE_V2",e[e.OPENSEA_V1=1]="OPENSEA_V1",e[e.SEAPORT_ADVANCED_ORDERS=2]="SEAPORT_ADVANCED_ORDERS",e[e.X2Y2=3]="X2Y2",e[e.LOOKSRARE_ORDERS=4]="LOOKSRARE_ORDERS",e[e.AAM=5]="AAM",e[e.SEAPORT_V14=6]="SEAPORT_V14",e[e.LOOKSRARE_V2_ORDERS=7]="LOOKSRARE_V2_ORDERS",e[e.SEAPORT_V15=9]="SEAPORT_V15"}(t.ExchangeWrapperOrderType||(t.ExchangeWrapperOrderType={}))},461:function(e,t,n){"use strict";(function(e){var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAuctionHouseBuyerEscrow=t.getAuctionHouseTradeState=t.getAuctionHouseProgramAsSigner=t.loadAuctionHouseProgram=void 0;var a=n(19),i=n(32),s=n(956),o=n(532),u=n(367);t.loadAuctionHouseProgram=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=new s.Provider(e,t,{preflightCommitment:"recent"}),n.next=3,s.Program.fetchIdl(o.AUCTION_HOUSE_PROGRAM_ID,a);case 3:return i=n.sent,n.abrupt("return",new s.Program(i,o.AUCTION_HOUSE_PROGRAM_ID,a));case 5:case"end":return n.stop()}}),n)})))},t.getAuctionHouseProgramAsSigner=function(){return a.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.PublicKey.findProgramAddress([e.from(o.AUCTION_HOUSE),e.from("signer")],o.AUCTION_HOUSE_PROGRAM_ID);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))},t.getAuctionHouseTradeState=function(t,n,s,c,d,p,l){return a.__awaiter(this,void 0,void 0,r().mark((function a(){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,i.PublicKey.findProgramAddress([e.from(o.AUCTION_HOUSE),n.toBuffer(),t.toBuffer(),s.toBuffer(),c.toBuffer(),d.toBuffer(),(0,u.bigNumToBuffer)(l,"le",8),(0,u.bigNumToBuffer)(p,"le",8)],o.AUCTION_HOUSE_PROGRAM_ID);case 2:return r.abrupt("return",r.sent);case 3:case"end":return r.stop()}}),a)})))},t.getAuctionHouseBuyerEscrow=function(t,n){return a.__awaiter(this,void 0,void 0,r().mark((function a(){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,i.PublicKey.findProgramAddress([e.from(o.AUCTION_HOUSE),t.toBuffer(),n.toBuffer()],o.AUCTION_HOUSE_PROGRAM_ID);case 2:return r.abrupt("return",r.sent);case 3:case"end":return r.stop()}}),a)})))}}).call(this,n(15).Buffer)},520:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cryptoPunksAbi=t.createCryptoPunksMarketContract=void 0,t.createCryptoPunksMarketContract=function(e,n){return e.createContract(t.cryptoPunksAbi,n)},t.cryptoPunksAbi=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"punksOfferedForSale",outputs:[{name:"isForSale",type:"bool"},{name:"punkIndex",type:"uint256"},{name:"seller",type:"address"},{name:"minValue",type:"uint256"},{name:"onlySellTo",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"}],name:"enterBidForPunk",outputs:[],payable:!0,type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"},{name:"minPrice",type:"uint256"}],name:"acceptBidForPunk",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"addresses",type:"address[]"},{name:"indices",type:"uint256[]"}],name:"setInitialOwners",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[],name:"withdraw",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[],name:"imageHash",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"nextPunkIndexToAssign",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"punkIndexToAddress",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"standard",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"punkBids",outputs:[{name:"hasBid",type:"bool"},{name:"punkIndex",type:"uint256"},{name:"bidder",type:"address"},{name:"value",type:"uint256"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[],name:"allInitialOwnersAssigned",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[],name:"allPunksAssigned",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"}],name:"buyPunk",outputs:[],payable:!0,type:"function"},{constant:!1,inputs:[{name:"to",type:"address"},{name:"punkIndex",type:"uint256"}],name:"transferPunk",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"}],name:"withdrawBidForPunk",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"to",type:"address"},{name:"punkIndex",type:"uint256"}],name:"setInitialOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"},{name:"minSalePriceInWei",type:"uint256"},{name:"toAddress",type:"address"}],name:"offerPunkForSaleToAddress",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[],name:"punksRemainingToAssign",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"},{name:"minSalePriceInWei",type:"uint256"}],name:"offerPunkForSale",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"}],name:"getPunk",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"pendingWithdrawals",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"}],name:"punkNoLongerForSale",outputs:[],payable:!1,type:"function"},{inputs:[],payable:!0,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"punkIndex",type:"uint256"}],name:"Assign",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"punkIndex",type:"uint256"}],name:"PunkTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"punkIndex",type:"uint256"},{indexed:!1,name:"minValue",type:"uint256"},{indexed:!0,name:"toAddress",type:"address"}],name:"PunkOffered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"punkIndex",type:"uint256"},{indexed:!1,name:"value",type:"uint256"},{indexed:!0,name:"fromAddress",type:"address"}],name:"PunkBidEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"punkIndex",type:"uint256"},{indexed:!1,name:"value",type:"uint256"},{indexed:!0,name:"fromAddress",type:"address"}],name:"PunkBidWithdrawn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"punkIndex",type:"uint256"},{indexed:!1,name:"value",type:"uint256"},{indexed:!0,name:"fromAddress",type:"address"},{indexed:!0,name:"toAddress",type:"address"}],name:"PunkBought",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"punkIndex",type:"uint256"}],name:"PunkNoLongerForSale",type:"event"}]},521:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc20Abi=t.createErc20Contract=void 0,t.createErc20Contract=function(e,n){return e.createContract(t.erc20Abi,n)},t.erc20Abi=[{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"}]},524:function(e,t,n){"use strict";var r=n(22).default,a=n(21).default,i=n(203).default,s=n(37).default,o=n(38).default,u=n(193).default;Object.defineProperty(t,"__esModule",{value:!0}),t.nonImplementedAction=t.notImplemented=t.getNonImplementedAction=t.getNotImplementedFn=void 0;var c=n(115);function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Not implemented";return function(){throw new p(e)}}t.getNotImplementedFn=d;var p=function(e){s(n,e);var t=o(n);function n(e){var r;return a(this,n),(r=t.call(this,e)).name="NotImplementedError",Object.setPrototypeOf(i(r),n.prototype),r}return r(n)}(u(Error));function l(e){return c.Action.create({id:"non-implemented",run:d(e)})}t.getNonImplementedAction=l,t.notImplemented=d(),t.nonImplementedAction=l()},532:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID=t.AUCTION_HOUSE_PROGRAM_ID=t.TOKEN_METADATA_PROGRAM_ID=t.WRAPPED_SOL_MINT=t.AUCTION_HOUSE=void 0;var r=n(32);t.AUCTION_HOUSE="auction_house",t.WRAPPED_SOL_MINT=new r.PublicKey("So11111111111111111111111111111111111111112"),t.TOKEN_METADATA_PROGRAM_ID=new r.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),t.AUCTION_HOUSE_PROGRAM_ID=new r.PublicKey("hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk"),t.SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID=new r.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL")},533:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractPublicKey=t.extractAddress=void 0;var r=n(752);function a(e){return e.slice(e.indexOf(":")+1)}t.extractAddress=a,t.extractPublicKey=function(e){return(0,r.toPublicKey)(a(e))}},607:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStateDisconnected=t.getStateConnecting=t.getStateConnected=t.STATE_INITIALIZING=void 0;var r={status:"disconnected"};t.STATE_INITIALIZING={status:"initializing"},t.getStateConnected=function(e){return Object.assign({status:"connected"},e)},t.getStateConnecting=function(e){return Object.assign({status:"connecting"},e)},t.getStateDisconnected=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0===e.error?r:Object.assign({status:"disconnected"},e)}},614:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MintType=void 0,function(e){e.OFF_CHAIN="off-chain",e.ON_CHAIN="on-chain"}(t.MintType||(t.MintType={}))},616:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAssetTransferProxy=t.pureApproveFn=t.approve=void 0;var a=n(19),i=n(1228),s=n(1229),o=n(1230),u=n(2052);function c(e){var t=e.ethereum,n=e.send,c=e.operator,d=e.owner,p=e.asset,l=e.infinite;return a.__awaiter(this,void 0,void 0,r().mark((function e(){var a,y,f,m,b,v;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=p.assetType.assetClass,e.next="ERC20"===e.t0?3:"ERC721"===e.t0?5:"ERC1155"===e.t0?7:"ERC721_LAZY"===e.t0?9:"ERC1155_LAZY"===e.t0?11:"CRYPTO_PUNKS"===e.t0?13:15;break;case 3:return a=p.assetType.contract,e.abrupt("return",(0,i.approveErc20)(t,n,a,d,c,p.value,void 0===l||l));case 5:return y=p.assetType.contract,e.abrupt("return",(0,s.approveErc721)(t,n,y,d,c));case 7:return f=p.assetType.contract,e.abrupt("return",(0,o.approveErc1155)(t,n,f,d,c));case 9:return m=p.assetType.contract,e.abrupt("return",(0,s.approveErc721)(t,n,m,d,c));case 11:return b=p.assetType.contract,e.abrupt("return",(0,o.approveErc1155)(t,n,b,d,c));case 13:return v=p.assetType.contract,e.abrupt("return",(0,u.approveCryptoPunk)(t,n,v,d,c,p.assetType.tokenId));case 15:return e.abrupt("return",void 0);case 16:case"end":return e.stop()}}),e)})))}function d(e,t){switch(e){case"ERC20":return t.erc20;case"ERC721":case"ERC1155":return t.nft;case"ERC721_LAZY":return t.erc721Lazy;case"ERC1155_LAZY":return t.erc1155Lazy;case"CRYPTO_PUNKS":return t.cryptoPunks;default:return}}t.approve=function(e,t,n,i,s){var o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return a.__awaiter(this,void 0,void 0,r().mark((function a(){var u;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(u=d(s.assetType.assetClass,n)){r.next=3;break}return r.abrupt("return",void 0);case 3:return r.abrupt("return",c({ethereum:e,send:t,operator:u,owner:i,asset:s,infinite:o}));case 4:case"end":return r.stop()}}),a)})))},t.pureApproveFn=c,t.getAssetTransferProxy=d},617:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc721Abi=t.createErc721Contract=void 0,t.createErc721Contract=function(e,n){return e.createContract(t.erc721Abi,n)},t.erc721Abi=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"baseURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}]},618:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc1155Abi=t.createErc1155Contract=void 0,t.createErc1155Contract=function(e,n){return e.createContract(t.erc1155Abi,n)},t.erc1155Abi=[{inputs:[{internalType:"string",name:"uri_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}]},619:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.isErc1155v1Collection=t.isErc1155v2Collection=t.isErc721v1Collection=t.isErc721v2Collection=t.isErc721v3Collection=t.mint=t.MintResponseTypeEnum=void 0;var a=n(19),i=n(733),s=n(406),o=n(2208),u=n(1239);!function(e){e.OFF_CHAIN="off-chain",e.ON_CHAIN="on-chain"}(t.MintResponseTypeEnum||(t.MintResponseTypeEnum={})),t.mint=function(e,t,n,i,f,m,b){return a.__awaiter(this,void 0,void 0,r().mark((function a(){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,m();case 2:if(e){r.next=4;break}throw new Error("Wallet undefined");case 4:if(void 0!==b.uri){r.next=6;break}throw new s.Warning("URI should be not undefined");case 6:if(!l(b)){r.next=12;break}if(!p(b)){r.next=11;break}if(!b.lazy){r.next=10;break}return r.abrupt("return",(0,o.mintOffChain)(e,n,i,f,b));case 10:return r.abrupt("return",(0,u.mintErc1155v2)(e,t,i,b));case 11:return r.abrupt("return",(0,u.mintErc1155v1)(e,t,i,b));case 12:if(!y(b)){r.next=20;break}if(!d(b)){r.next=17;break}if(!b.lazy){r.next=16;break}return r.abrupt("return",(0,o.mintOffChain)(e,n,i,f,b));case 16:return r.abrupt("return",(0,u.mintErc721v3)(e,t,i,b));case 17:if(!c(b)){r.next=19;break}return r.abrupt("return",(0,u.mintErc721v2)(e,t,i,b));case 19:return r.abrupt("return",(0,u.mintErc721v1)(e,t,i,b));case 20:throw new Error("Unsupported collection");case 21:case"end":return r.stop()}}),a)})))};var c=function(e){return(0,t.isErc721v2Collection)(e.collection)},d=function(e){return(0,t.isErc721v3Collection)(e.collection)},p=function(e){return(0,t.isErc1155v2Collection)(e.collection)},l=function(e){return"ERC1155"===e.collection.type},y=function(e){return"ERC721"===e.collection.type};t.isErc721v3Collection=function(e){return-1!==e.features.indexOf(i.NftCollectionFeatures.MINT_AND_TRANSFER)&&"ERC721"===e.type};t.isErc721v2Collection=function(e){return-1!==e.features.indexOf(i.NftCollectionFeatures.SECONDARY_SALE_FEES)&&"ERC721"===e.type};t.isErc721v1Collection=function(e){return!(0,t.isErc721v3Collection)(e)&&!(0,t.isErc721v2Collection)(e)&&"ERC721"===e.type};t.isErc1155v2Collection=function(e){return-1!==e.features.indexOf(i.NftCollectionFeatures.MINT_AND_TRANSFER)&&"ERC1155"===e.type};t.isErc1155v1Collection=function(e){return!(0,t.isErc1155v2Collection)(e)&&"ERC1155"===e.type}},620:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getErc721Contract=void 0;var a=n(19),i=n(456);t.getErc721Contract=function(e,t,s){return a.__awaiter(this,void 0,void 0,r().mark((function o(){var u,c,d,p,l,y;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=t,r.next=r.t0===i.ERC721VersionEnum.ERC721V3?3:r.t0===i.ERC721VersionEnum.ERC721V2?8:r.t0===i.ERC721VersionEnum.ERC721V1?13:18;break;case 3:return r.next=5,Promise.resolve().then((function(){return a.__importStar(n(2209))}));case 5:return u=r.sent,c=u.erc721v3Abi,r.abrupt("return",e.createContract(c,s));case 8:return r.next=10,Promise.resolve().then((function(){return a.__importStar(n(2210))}));case 10:return d=r.sent,p=d.erc721v2Abi,r.abrupt("return",e.createContract(p,s));case 13:return r.next=15,Promise.resolve().then((function(){return a.__importStar(n(2211))}));case 15:return l=r.sent,y=l.erc721v1Abi,r.abrupt("return",e.createContract(y,s));case 18:throw new Error("Unsupported ERC721 version");case 19:case"end":return r.stop()}}),o)})))}},621:function(e,t,n){"use strict";var r=n(78).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getItemToCriteriaMap=t.generateCriteriaResolvers=void 0;var a=n(303),i=n(304);t.generateCriteriaResolvers=function(e){var t=e.orders,n=e.offerCriterias,s=void 0===n?[[]]:n,o=e.considerationCriterias,u=void 0===o?[[]]:o,c=t.flatMap((function(e,t){return e.parameters.offer.map((function(e,n){return{orderIndex:t,item:e,index:n,side:a.Side.OFFER}})).filter((function(e){var t=e.item;return(0,i.isCriteriaItem)(t.itemType)}))})),d=t.flatMap((function(e,t){return e.parameters.consideration.map((function(e,n){return{orderIndex:t,item:e,index:n,side:a.Side.CONSIDERATION}})).filter((function(e){var t=e.item;return(0,i.isCriteriaItem)(t.itemType)}))})),p=function(e,t){return e.map((function(e){var n=e.orderIndex,r=e.item,a=e.index,i=e.side,s=r.identifierOrCriteria||"0",o=t[n][a];return{orderIndex:n,index:a,side:i,identifier:o.identifier,criteriaProof:"0"===s?[]:o.proof}}))};return[].concat(r(p(c,s)),r(p(d,u)))};t.getItemToCriteriaMap=function(e,t){var n=r(t);return e.reduce((function(e,t){return(0,i.isCriteriaItem)(t.itemType)&&e.set(t,n.shift()),e}),new Map)}},622:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testAuctionAbi=t.createEthereumAuctionContract=void 0,t.createEthereumAuctionContract=function(e,n){return e.createContract(t.testAuctionAbi,n)},t.testAuctionAbi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"auctionId",type:"uint256"}],name:"AuctionCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"auctionId",type:"uint256"},{components:[{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"sellAsset",type:"tuple"},{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"buyAsset",type:"tuple"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct AuctionHouseBase.Bid",name:"lastBid",type:"tuple"},{internalType:"address payable",name:"seller",type:"address"},{internalType:"address payable",name:"buyer",type:"address"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"minimalStep",type:"uint256"},{internalType:"uint256",name:"minimalPrice",type:"uint256"},{internalType:"uint256",name:"protocolFee",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],indexed:!1,internalType:"struct AuctionHouseBase.Auction",name:"auction",type:"tuple"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"auctionId",type:"uint256"},{components:[{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"sellAsset",type:"tuple"},{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"buyAsset",type:"tuple"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct AuctionHouseBase.Bid",name:"lastBid",type:"tuple"},{internalType:"address payable",name:"seller",type:"address"},{internalType:"address payable",name:"buyer",type:"address"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"minimalStep",type:"uint256"},{internalType:"uint256",name:"minimalPrice",type:"uint256"},{internalType:"uint256",name:"protocolFee",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],indexed:!1,internalType:"struct AuctionHouseBase.Auction",name:"auction",type:"tuple"}],name:"AuctionFinished",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"auctionId",type:"uint256"},{indexed:!1,internalType:"address",name:"buyer",type:"address"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],indexed:!1,internalType:"struct AuctionHouseBase.Bid",name:"bid",type:"tuple"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"BidPlaced",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes4",name:"assetType",type:"bytes4"},{indexed:!1,internalType:"address",name:"proxy",type:"address"}],name:"ProxyChange",type:"event"},{anonymous:!1,inputs:[{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],indexed:!1,internalType:"struct LibAsset.Asset",name:"asset",type:"tuple"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"bytes4",name:"transferDirection",type:"bytes4"},{indexed:!1,internalType:"bytes4",name:"transferType",type:"bytes4"}],name:"Transfer",type:"event"},{inputs:[],name:"defaultFeeReceiver",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"feeReceivers",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_collection",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getAuctionByToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155BatchReceived",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC721Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"royaltiesRegistry",outputs:[{internalType:"contract IRoyaltiesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address payable",name:"newDefaultFeeReceiver",type:"address"}],name:"setDefaultFeeReceiver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"wallet",type:"address"}],name:"setFeeReceiver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newProtocolFee",type:"uint256"}],name:"setProtocolFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IRoyaltiesProvider",name:"newRoyaltiesRegistry",type:"address"}],name:"setRoyaltiesRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"assetType",type:"bytes4"},{internalType:"address",name:"proxy",type:"address"}],name:"setTransferProxy",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract INftTransferProxy",name:"_transferProxy",type:"address"},{internalType:"contract IERC20TransferProxy",name:"_erc20TransferProxy",type:"address"},{internalType:"uint256",name:"newProtocolFee",type:"uint256"},{internalType:"address",name:"newDefaultFeeReceiver",type:"address"},{internalType:"contract IRoyaltiesProvider",name:"newRoyaltiesProvider",type:"address"}],name:"__AuctionHouse_init",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"_sellAsset",type:"tuple"},{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"_buyAsset",type:"tuple"},{internalType:"uint256",name:"minimalStep",type:"uint256"},{internalType:"uint256",name:"minimalPrice",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],name:"startAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct AuctionHouseBase.Bid",name:"bid",type:"tuple"}],name:"putBid",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"getMinimalNextBid",outputs:[{internalType:"uint256",name:"minBid",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"checkAuctionExistence",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"finishAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"checkAuctionRangeTime",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"cancel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct AuctionHouseBase.Bid",name:"bid",type:"tuple"}],name:"buyOut",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"getCurrentBuyer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"putBidWrapper",outputs:[],stateMutability:"payable",type:"function"}]},623:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBlockchainGroup=void 0;var r=n(19),a=n(45);t.toBlockchainGroup=function(e){switch(e){case a.Blockchain.ETHEREUM:case a.Blockchain.POLYGON:return a.Blockchain.ETHEREUM;default:return e}},r.__exportStar(n(1172),t)},625:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.PreparedTransaction=void 0;var s=n(19),o=n(1296),u=function(){function e(t,n,r,i,s){a(this,e),this.connection=t,this.data=n,this.signer=r,this.logger=i,this.onSubmit=s}return i(e,[{key:"submit",value:function(e){var t;return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,o.sendTransactionWithRetry)(this.connection,this.signer,this.data.instructions,this.data.signers,e,this.logger);case 2:return a=n.sent,null===(t=this.onSubmit)||void 0===t||t.call(this,a),n.abrupt("return",a);case 5:case"end":return n.stop()}}),n,this)})))}}]),e}();t.PreparedTransaction=u},731:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addFee=void 0;var r=n(73),a=n(121);t.addFee=function(e,t){var n=(0,a.toBn)(e.value).multipliedBy((0,a.toBn)(t).plus(1e4)).dividedBy(1e4).integerValue(a.BigNumber.ROUND_FLOOR);return Object.assign(Object.assign({},e),{value:(0,r.toBigNumber)(n.toFixed())})}},732:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.checkAssetType=void 0;var a=n(19),i=n(73);t.checkAssetType=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!("assetClass"in t)){n.next=4;break}return n.abrupt("return",t);case 4:return n.next=6,e.getNftCollectionByIdRaw({collection:t.contract});case 6:if(200!==(a=n.sent).status){n.next=16;break}n.t0=a.value.type,n.next="ERC721"===n.t0||"ERC1155"===n.t0?11:"CRYPTO_PUNKS"===n.t0?12:13;break;case 11:return n.abrupt("return",Object.assign(Object.assign({},t),{tokenId:(0,i.toBigNumber)("".concat(t.tokenId)),assetClass:a.value.type}));case 12:return n.abrupt("return",{assetClass:"CRYPTO_PUNKS",contract:t.contract,tokenId:parseInt("".concat(t.tokenId))});case 13:throw new Error("Unrecognized collection asset class ".concat(a.value.type));case 14:n.next=17;break;case 16:throw new Error("Can't get info of NFT collection with id ".concat(t.contract));case 17:case"end":return n.stop()}}),n)})))}},734:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getErc1155Contract=void 0;var a=n(19),i=n(456);t.getErc1155Contract=function(e,t,s){return a.__awaiter(this,void 0,void 0,r().mark((function o(){var u,c,d,p;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=t,r.next=r.t0===i.ERC1155VersionEnum.ERC1155V2?3:r.t0===i.ERC1155VersionEnum.ERC1155V1?8:13;break;case 3:return r.next=5,Promise.resolve().then((function(){return a.__importStar(n(2212))}));case 5:return u=r.sent,c=u.erc1155v2Abi,r.abrupt("return",e.createContract(c,s));case 8:return r.next=10,Promise.resolve().then((function(){return a.__importStar(n(2213))}));case 10:return d=r.sent,p=d.erc1155v1Abi,r.abrupt("return",e.createContract(p,s));case 13:throw new Error("Unsupported ERC1155 version");case 14:case"end":return r.stop()}}),o)})))}},735:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOwnershipId=void 0,t.getOwnershipId=function(e,t,n){return"".concat(e,":").concat(t,":").concat(n)}},737:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toVrs=void 0;var r=n(73);t.toVrs=function(e){var t=e.startsWith("0x")?e.substring(2):e,n="0x"+(t.substring(0,64)||r.ZERO_WORD.substring(2)),a="0x"+(t.substring(64,128)||r.ZERO_WORD.substring(2)),i=parseInt(t.substring(128,130),16)||0,s=1-i%2,o=parseInt(t.substring(64,66),16);s&&(o|=128);var u="".concat(o.toString(16)).concat(t.substring(66,128));return{r:n,v:i<27?i+27:i,s:a,compact:"".concat(n).concat(u)}}},738:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAssetWithFee=void 0;var r=n(731);t.getAssetWithFee=function(e,t){return"ETH"===e.assetType.assetClass||"ERC20"===e.assetType.assetClass?(0,r.addFee)(e,t):e}},739:function(e,t,n){"use strict";function r(e){return"ERC20"===e.assetClass}Object.defineProperty(t,"__esModule",{value:!0}),t.isWeth=t.isErc1155=t.isErc721=t.isErc20=t.isETH=void 0,t.isETH=function(e){return"ETH"===e.assetClass},t.isErc20=r,t.isErc721=function(e){return"ERC721"===e.assetClass},t.isErc1155=function(e){return"ERC1155"===e.assetClass},t.isWeth=function(e,t){return r(e)&&e.contract===t}},740:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareCaseInsensitive=void 0,t.compareCaseInsensitive=function(e,t){return(null===e||void 0===e?void 0:e.toLowerCase())===(null===t||void 0===t?void 0:t.toLowerCase())}},741:function(e,t,n){"use strict";var r=n(48).default,a=n(78).default,i=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.validateStandardFulfillBalancesAndApprovals=t.validateBasicFulfillBalancesAndApprovals=t.validateOfferBalancesAndApprovals=t.getInsufficientBalanceAndApprovalAmounts=t.getBalancesAndApprovals=void 0;var s=n(19),o=n(73),u=n(121),c=n(406),d=n(617),p=n(521),l=n(304),y=n(621),f=n(304),m=n(2249),b=n(303);t.getBalancesAndApprovals=function(e){var t=e.ethereum,n=e.owner,r=e.items,a=e.criterias,c=e.operator;return s.__awaiter(void 0,void 0,void 0,i().mark((function e(){var l;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=(0,y.getItemToCriteriaMap)(r,a),e.abrupt("return",Promise.all(r.map((function(e){return s.__awaiter(void 0,void 0,void 0,i().mark((function r(){var a,s,y,v,h,T;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(y=(0,u.toBn)(0),!(0,f.isErc721Item)(e.itemType)&&!(0,f.isErc1155Item)(e.itemType)){r.next=9;break}return v=(0,d.createErc721Contract)(t,(0,o.toAddress)(e.token)),r.next=5,v.functionCall("isApprovedForAll",n,c).call();case 5:h=r.sent,y=h?(0,u.toBn)(b.MAX_INT):(0,u.toBn)(0),r.next=19;break;case 9:if(!(0,f.isErc20Item)(e.itemType)){r.next=18;break}return T=(0,p.createErc20Contract)(t,(0,o.toAddress)(e.token)),r.t0=u.toBn,r.next=14,T.functionCall("allowance",n,c).call();case 14:r.t1=r.sent,y=(0,r.t0)(r.t1),r.next=19;break;case 18:y=(0,u.toBn)(b.MAX_INT);case 19:return r.t2=e.token,r.t3=null!==(s=null===(a=l.get(e))||void 0===a?void 0:a.identifier)&&void 0!==s?s:e.identifierOrCriteria,r.next=23,(0,m.balanceOf)(t,n,e,l.get(e));case 23:return r.t4=r.sent,r.t5=y,r.t6=e.itemType,r.abrupt("return",{token:r.t2,identifierOrCriteria:r.t3,balance:r.t4,approvedAmount:r.t5,itemType:r.t6});case 27:case"end":return r.stop()}}),r)})))}))));case 2:case"end":return e.stop()}}),e)})))};t.getInsufficientBalanceAndApprovalAmounts=function(e){var t=e.balancesAndApprovals,n=e.tokenAndIdentifierAmounts,i=e.operator,s=a(Object.entries(n).map((function(e){var t=r(e,2),n=t[0],a=t[1];return Object.entries(a).map((function(e){var t=r(e,2),a=t[0],i=t[1];return[n,a,i]}))}))).flat(),o=function(e){return s.filter((function(n){var a=r(n,3),i=a[0],s=a[1],o=a[2];return h(t,i,s)[e].lt(o)})).map((function(n){var a=r(n,3),i=a[0],s=a[1],o=a[2],u=h(t,i,s);return{token:i,identifierOrCriteria:s,requiredAmount:o,amountHave:u[e],itemType:u.itemType}}))},u=[o("balance"),o("approvedAmount").map((function(e){return{token:e.token,identifierOrCriteria:e.identifierOrCriteria,approvedAmount:e.amountHave,requiredApprovedAmount:e.requiredAmount,itemType:e.itemType,operator:i}}))];return{insufficientBalances:u[0],insufficientApprovals:u[1]}};t.validateOfferBalancesAndApprovals=function(e){var n=e.offer,r=e.criterias,a=e.balancesAndApprovals,i=e.timeBasedItemParams,s=e.throwOnInsufficientBalances,o=void 0===s||s,u=e.throwOnInsufficientApprovals,c=e.operator,d=(0,t.getInsufficientBalanceAndApprovalAmounts)({balancesAndApprovals:a,tokenAndIdentifierAmounts:(0,l.getSummedTokenAndIdentifierAmounts)({items:n,criterias:r,timeBasedItemParams:i?Object.assign(Object.assign({},i),{isConsiderationItem:!1}):void 0}),operator:c}),p=d.insufficientBalances,y=d.insufficientApprovals;if(o&&p.length>0)throw new Error("The offerer does not have the amount needed to create or fulfill.");if(u&&y.length>0)throw new Error("The offerer does not have the sufficient approvals.");return y};t.validateBasicFulfillBalancesAndApprovals=function(e){var n=e.offer,r=e.consideration,a=e.offererBalancesAndApprovals,i=e.fulfillerBalancesAndApprovals,s=e.timeBasedItemParams,o=e.offererOperator,u=e.fulfillerOperator;(0,t.validateOfferBalancesAndApprovals)({offer:n,criterias:[],balancesAndApprovals:a,timeBasedItemParams:s,throwOnInsufficientApprovals:!0,operator:o});var c=r.filter((function(e){return e.itemType!==n[0].itemType})),d=(0,t.getInsufficientBalanceAndApprovalAmounts)({balancesAndApprovals:i,tokenAndIdentifierAmounts:(0,l.getSummedTokenAndIdentifierAmounts)({items:c,criterias:[],timeBasedItemParams:Object.assign(Object.assign({},s),{isConsiderationItem:!0})}),operator:u}),p=d.insufficientBalances,y=d.insufficientApprovals;if(p.length>0)throw new Error("The fulfiller does not have the balances needed to fulfill.");return y};t.validateStandardFulfillBalancesAndApprovals=function(e){var n=e.offer,r=e.consideration,a=e.offerCriteria,i=e.considerationCriteria,s=e.offererBalancesAndApprovals,o=e.fulfillerBalancesAndApprovals,u=e.timeBasedItemParams,c=e.offererOperator,d=e.fulfillerOperator;(0,t.validateOfferBalancesAndApprovals)({offer:n,criterias:a,balancesAndApprovals:s,timeBasedItemParams:u,throwOnInsufficientApprovals:!0,operator:c});var p=v({items:n,criterias:a,balancesAndApprovals:o,timeBasedItemParams:u}),y=(0,t.getInsufficientBalanceAndApprovalAmounts)({balancesAndApprovals:p,tokenAndIdentifierAmounts:(0,l.getSummedTokenAndIdentifierAmounts)({items:r,criterias:i,timeBasedItemParams:Object.assign(Object.assign({},u),{isConsiderationItem:!0})}),operator:d}),f=y.insufficientBalances,m=y.insufficientApprovals;if(f.length>0)throw new Error("The fulfiller does not have the balances needed to fulfill.");return m};var v=function(e){var t=e.items,n=e.criterias,a=e.timeBasedItemParams,i=e.balancesAndApprovals,s=(0,l.getSummedTokenAndIdentifierAmounts)({items:t,criterias:n,timeBasedItemParams:Object.assign(Object.assign({},a),{isConsiderationItem:!1})}),o=i.map((function(e){return Object.assign({},e)}));return Object.entries(s).forEach((function(e){var t=r(e,2),n=t[0],a=t[1];return Object.entries(a).forEach((function(e){var t=r(e,2),a=t[0],i=t[1],s=h(o,n,a),u=o.indexOf(s);o[u].balance=o[u].balance.plus(i)}))})),o};function h(e,t,n){var r=e.find((function(e){var r=e.token,a=e.identifierOrCriteria;return t.toLowerCase()===r.toLowerCase()&&a.toLowerCase()===n.toLowerCase()}));if(!r)throw new c.Warning("Balances and approvals didn't contain all tokens and identifiers");return r}},742:function(e,t,n){"use strict";var r=n(1257).default,a=n(78).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAdvancedOrderNumeratorDenominator=t.generateFulfillOrdersFulfillments=t.validateAndSanitizeFromOrderStatus=t.shouldUseBasicFulfill=void 0;var i=n(121),s=n(73),o=n(303),u=n(621),c=n(304),d=n(743),p=n(1255);t.shouldUseBasicFulfill=function(e,t){var n=e.offer,u=e.consideration,p=e.offerer;if(!(0,i.toBn)(t).eq(0))return!1;if(n.length>1||0===u.length)return!1;var l=[].concat(a(n),a(u)),y=l.filter((function(e){var t=e.itemType;return[o.ItemType.ERC721,o.ItemType.ERC1155].includes(t)})),f=l.filter((function(e){var t=e.itemType;return(0,c.isCriteriaItem)(t)}));if((0,c.isNativeCurrencyItem)(n[0]))return!1;if(1!==y.length||0!==f.length)return!1;if(!(0,d.areAllCurrenciesSame)({offer:n,consideration:u}))return!1;if(l.some((function(e){return e.startAmount!==e.endAmount})))return!1;var m=r(u),b=m[0],v=m.slice(1);if(b.recipient.toLowerCase()!==p.toLowerCase())return!1;if(u.length>1&&v.every((function(e){return e.itemType===n[0].itemType}))&&(0,d.totalItemsAmount)(v).endAmount.gt(n[0].endAmount))return!1;var h=l.filter(c.isCurrencyItem),T=h.filter((function(e){return e.itemType===o.ItemType.NATIVE})).every((function(e){return e.token===s.ZERO_ADDRESS})),g=h.every((function(e){var t=e.identifierOrCriteria;return(0,i.toBn)(t).eq(0)})),w=y.filter((function(e){return e.itemType===o.ItemType.ERC721})).every((function(e){return"1"===e.endAmount}));return T&&g&&w},t.validateAndSanitizeFromOrderStatus=function(e,t){var n=t.isValidated,r=t.isCancelled,a=t.totalFilled,s=t.totalSize;if((0,i.toBn)(s).gt(0)&&(0,i.toBn)(a).div(s).eq(1))throw new Error("The order you are trying to fulfill is already filled");if(r)throw new Error("The order you are trying to fulfill is cancelled");return n?{parameters:Object.assign({},e.parameters),signature:"0x"}:e},t.generateFulfillOrdersFulfillments=function(e){var t=function(e){var t=e.sourceOrDestination,n=e.operator,r=void 0===n?"":n,a=e.token,i=e.identifier;return"".concat(t,"-").concat(r,"-").concat(a,"-").concat(i)},n={},r={};return e.forEach((function(e,r){var i=e.order,s=e.offererOperator,o=e.offerCriteria,d=(0,u.getItemToCriteriaMap)(i.parameters.offer,o);return i.parameters.offer.forEach((function(e,o){var u,p,l,y="".concat(t({sourceOrDestination:i.parameters.offerer,operator:s,token:e.token,identifier:null!==(p=null===(u=d.get(e))||void 0===u?void 0:u.identifier)&&void 0!==p?p:e.identifierOrCriteria})).concat((0,c.isErc721Item)(e.itemType)?o:"");n[y]=[].concat(a(null!==(l=n[y])&&void 0!==l?l:[]),[{orderIndex:r,itemIndex:o}])}))})),e.forEach((function(e,n){var i=e.order,s=e.considerationCriteria,o=e.tips,d=(0,u.getItemToCriteriaMap)(i.parameters.consideration,s);return[].concat(a(i.parameters.consideration),a(o)).forEach((function(e,i){var s,o,u,p="".concat(t({sourceOrDestination:e.recipient,token:e.token,identifier:null!==(o=null===(s=d.get(e))||void 0===s?void 0:s.identifier)&&void 0!==o?o:e.identifierOrCriteria})).concat((0,c.isErc721Item)(e.itemType)?i:"");r[p]=[].concat(a(null!==(u=r[p])&&void 0!==u?u:[]),[{orderIndex:n,itemIndex:i}])}))})),{offerFulfillments:Object.values(n),considerationFulfillments:Object.values(r)}};t.getAdvancedOrderNumeratorDenominator=function(e,t){var n=(0,c.getMaximumSizeForOrder)(e),r=(0,i.toBn)(t),a=(0,p.gcd)(r,n),s=t?r.div(a):(0,i.toBn)(1),o=t?n.div(a):(0,i.toBn)(1);return{numerator:"0x".concat(s.toString(16)),denominator:"0x".concat(o.toString(16))}}},743:function(e,t,n){"use strict";var r=n(78).default;Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseMatchForFulfill=t.mapOrderAmountsFromUnitsToFill=t.mapOrderAmountsFromFilledStatus=t.totalItemsAmount=t.areAllCurrenciesSame=t.mapInputItemToOfferItem=t.deductFees=t.feeToConsiderationItem=void 0;var a=n(121),i=n(73),s=n(2250),o=n(304),u=n(303),c=function(e,t){return(0,a.toBn)(e).multipliedBy((0,a.toBn)(t)).div(u.ONE_HUNDRED_PERCENT_BP)};t.feeToConsiderationItem=function(e){var t=e.fee,n=e.token,r=e.baseAmount,a=e.baseEndAmount,s=void 0===a?r:a;return{itemType:n===i.ZERO_ADDRESS?u.ItemType.NATIVE:u.ItemType.ERC20,token:n,identifierOrCriteria:"0",startAmount:c(r,t.basisPoints).toString(),endAmount:c(s,t.basisPoints).toString(),recipient:t.recipient}};t.deductFees=function(e,t){if(!t)return e;var n=t.reduce((function(e,t){return e+t.basisPoints}),0);return e.map((function(e){return Object.assign(Object.assign({},e),{startAmount:(0,o.isCurrencyItem)(e)?(0,a.toBn)(e.startAmount).minus(c(e.startAmount,n)).toString():e.startAmount,endAmount:(0,o.isCurrencyItem)(e)?(0,a.toBn)(e.endAmount).minus(c(e.endAmount,n)).toString():e.endAmount})}))};t.mapInputItemToOfferItem=function(e){var t,n,r,a,o,c,d;if("itemType"in e){if("identifiers"in e||"criteria"in e){var p="criteria"in e?e.criteria:new s.MerkleTree(e.identifiers).getRoot();return{itemType:e.itemType===u.ItemType.ERC721?u.ItemType.ERC721_WITH_CRITERIA:u.ItemType.ERC1155_WITH_CRITERIA,token:e.token,identifierOrCriteria:p,startAmount:null!==(t=e.amount)&&void 0!==t?t:"1",endAmount:null!==(r=null!==(n=e.endAmount)&&void 0!==n?n:e.amount)&&void 0!==r?r:"1"}}return"amount"in e||"endAmount"in e?{itemType:e.itemType,token:e.token,identifierOrCriteria:e.identifier,startAmount:e.amount,endAmount:null!==(o=null!==(a=e.endAmount)&&void 0!==a?a:e.amount)&&void 0!==o?o:"1"}:{itemType:e.itemType,token:e.token,identifierOrCriteria:e.identifier,startAmount:"1",endAmount:"1"}}return{itemType:e.token&&e.token!==i.ZERO_ADDRESS?u.ItemType.ERC20:u.ItemType.NATIVE,token:null!==(c=e.token)&&void 0!==c?c:i.ZERO_ADDRESS,identifierOrCriteria:"0",startAmount:e.amount,endAmount:null!==(d=e.endAmount)&&void 0!==d?d:e.amount}};t.areAllCurrenciesSame=function(e){var t=e.offer,n=e.consideration,a=[].concat(r(t),r(n)).filter(o.isCurrencyItem);return a.every((function(e){var t=e.itemType,n=e.token;return t===a[0].itemType&&n.toLowerCase()===a[0].token.toLowerCase()}))};t.totalItemsAmount=function(e){(0,a.toBn)(0),(0,a.toBn)(0);return e.map((function(e){return{startAmount:e.startAmount,endAmount:e.endAmount}})).reduce((function(e,t){var n=e.startAmount,r=e.endAmount,a=t.startAmount,i=t.endAmount;return{startAmount:n.plus(a),endAmount:r.plus(i)}}),{startAmount:(0,a.toBn)(0),endAmount:(0,a.toBn)(0)})};t.mapOrderAmountsFromFilledStatus=function(e,t){var n=t.totalFilled,r=t.totalSize;if((0,a.toBn)(n).eq(0)||(0,a.toBn)(r).eq(0))return e;var i=(0,a.toBn)(r).minus(n).multipliedBy(u.ONE_HUNDRED_PERCENT_BP).div(r);return{parameters:Object.assign(Object.assign({},e.parameters),{offer:e.parameters.offer.map((function(e){return Object.assign(Object.assign({},e),{startAmount:c(e.startAmount,i).toString(),endAmount:c(e.endAmount,i).toString()})})),consideration:e.parameters.consideration.map((function(e){return Object.assign(Object.assign({},e),{startAmount:c(e.startAmount,i).toString(),endAmount:c(e.endAmount,i).toString()})}))}),signature:e.signature}};var d=function(e,t,n){return(0,a.toBn)(e).multipliedBy(t).div(n)};t.mapOrderAmountsFromUnitsToFill=function(e,t){var n=t.unitsToFill,r=t.totalSize,i=(0,a.toBn)(n);if(i.lte(0))throw new Error("Units to fill must be greater than 1");var s=(0,o.getMaximumSizeForOrder)(e);return(0,a.toBn)(r).eq(0)&&(r=s),{parameters:Object.assign(Object.assign({},e.parameters),{offer:e.parameters.offer.map((function(e){return Object.assign(Object.assign({},e),{startAmount:d(e.startAmount,i,r).toString(),endAmount:d(e.endAmount,i,r).toString()})})),consideration:e.parameters.consideration.map((function(e){return Object.assign(Object.assign({},e),{startAmount:d(e.startAmount,i,r).toString(),endAmount:d(e.endAmount,i,r).toString()})}))}),signature:e.signature}};t.shouldUseMatchForFulfill=function(){return!0}},746:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getPrice=void 0;var a=n(19),i=n(176),s=n(1266);t.getPrice=function(e,t,n){return a.__awaiter(this,void 0,void 0,r().mark((function a(){var o;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,s.getDecimals)(e,t);case 2:o=r.sent,r.t0=t.assetClass,r.next="ETH"===r.t0?6:"ERC20"===r.t0?7:8;break;case 6:return r.abrupt("return",(0,i.toBn)(n).multipliedBy((0,i.toBn)(10).pow(o)));case 7:return r.abrupt("return",(0,i.toBn)(n).multipliedBy((0,i.toBn)(10).pow(Number(o))));case 8:throw new Error("Asset type should be either ETH or ERC-20, received=".concat(JSON.stringify(t)));case 9:case"end":return r.stop()}}),a)})))}},747:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.AUCTION_DATA_V1=t.AUCTION_BID_DATA_V1=t.AUCTION_HASH_TYPE=t.AUCTION_DATA_TYPE=t.calculatePartsSum=t.validateAuctionRangeTime=t.getAssetEncodedData=t.getAuctionHash=t.getAuctionOperationOptions=void 0;var r=n(454),a=n(241),i=n(731);t.getAuctionOperationOptions=function(e,t,n){return"ETH"===e.assetClass?{value:(0,i.addFee)({assetType:e,value:t},n).value}:{}},t.getAuctionHash=function(n,a,i){if(!n)throw new Error("Wallet is undefined");var s=n.encodeParameter(t.AUCTION_HASH_TYPE,{contractAddress:a.auction,auctionId:i});return"0x".concat((0,r.keccak256)(e.from(s.substring(2),"hex")).toString("hex"))},t.getAssetEncodedData=function(e,t){switch(t.assetClass){case"ETH":return"0x";case"ERC20":return e.encodeParameter("address",t.contract);case"ERC721":case"ERC1155":return e.encodeParameter({components:[{name:"contractAddress",type:"address"},{name:"tokenId",type:"uint256"}],name:"data",type:"tuple"},{contractAddress:t.contract,tokenId:t.tokenId});default:throw new Error("Unrecognized asset for auction")}},t.validateAuctionRangeTime=function(e){if(e.data.startTime){var t=new Date(e.data.startTime).getTime();if(t>0&&t>Date.now())return!1}if(e.endTime){var n=new Date(e.endTime).getTime();if(n>0&&n0&&void 0!==arguments[0]?arguments[0]:3600;return new Date(Date.now()+1e3*e)}t.OrderTestSuite=y,t.generateExpirationDate=f},89:function(e,t,n){"use strict";(function(e){var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getRaribleWallet=t.WalletType=t.isBlockchainWallet=t.ImmutableXWallet=t.SolanaWallet=t.TezosWallet=t.FlowWallet=t.EthereumWallet=void 0;var s=n(19),o=n(1889);Object.defineProperty(t,"WalletType",{enumerable:!0,get:function(){return o.WalletType}});var u=function(){function e(t){a(this,e),this.ethereum=t,this.walletType=o.WalletType.ETHEREUM}return i(e,[{key:"signPersonalMessage",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.ethereum.getFrom();case 2:if(n=t.sent){t.next=5;break}throw new Error("Not connected to Ethereum blockchain");case 5:return t.next=7,this.ethereum.personalSign(e);case 7:return t.t0=t.sent,t.t1=n,t.abrupt("return",{signature:t.t0,publicKey:t.t1});case 10:case"end":return t.stop()}}),t,this)})))}}]),e}();t.EthereumWallet=u;var c=function(){function t(e,n){a(this,t),this.fcl=e,this.auth=n,this.walletType=o.WalletType.FLOW}return i(t,[{key:"getAuth",value:function(){return this.auth}},{key:"signPersonalMessage",value:function(t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,s,o,u,c,d,p;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.length){n.next=2;break}throw new Error("Message can't be empty");case 2:return a=e.from(t).toString("hex"),i=this.fcl.currentUser(),n.next=6,this.fcl.currentUser().snapshot();case 6:if(s=n.sent,o=s.addr){n.next=10;break}throw new Error("Not connected to Flow blockchain");case 10:return n.next=12,this.fcl.account(o);case 12:return u=n.sent,n.next=15,i.signUserMessage(a);case 15:if("string"!==typeof(c=n.sent)){n.next=18;break}throw new Error(c);case 18:if(!(d=c.find((function(e){return e.addr.toLowerCase()===o.toLowerCase()})))){n.next=24;break}if(p=u.keys.find((function(e){return e.index===d.keyId}))){n.next=23;break}throw new Error('Key with index "'.concat(d.keyId,'" not found on account with address ').concat(o));case 23:return n.abrupt("return",{signature:d.signature,publicKey:p.publicKey});case 24:throw new Error('Signature of user address "'.concat(o,'" not found'));case 25:case"end":return n.stop()}}),n,this)})))}}]),t}();t.FlowWallet=c;var d=function(){function e(t){a(this,e),this.provider=t,this.walletType=o.WalletType.TEZOS}return i(e,[{key:"sign",value:function(e,t,n){return s.__awaiter(this,void 0,void 0,r().mark((function a(){var i,s;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=n||"message",r.next=3,e.public_key();case 3:if(void 0!==(i=r.sent)){r.next=6;break}throw new Error("cannot get public key from provider");case 6:return r.next=8,e.sign(t,n);case 8:return s=r.sent,r.abrupt("return",Object.assign({edpk:i},s));case 10:case"end":return r.stop()}}),a)})))}},{key:"signPersonalMessage",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.provider.public_key();case 2:if(void 0!==t.sent){t.next=5;break}throw new Error("Public key undefined");case 5:return t.next=7,this.sign(this.provider,e,"message");case 7:return n=t.sent,t.abrupt("return",{signature:n.signature,publicKey:"".concat(n.edpk,"_").concat(n.prefix)});case 9:case"end":return t.stop()}}),t,this)})))}}]),e}();t.TezosWallet=d;var p=function(){function t(e){a(this,t),this.provider=e,this.walletType=o.WalletType.SOLANA}return i(t,[{key:"signPersonalMessage",value:function(t){return s.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=(new TextEncoder).encode(t),n.next=3,this.provider.signMessage(a,"utf8");case 3:if(!(i=n.sent).signature){n.next=8;break}return n.abrupt("return",{signature:e.from(i.signature).toString("hex"),publicKey:i.publicKey.toString()});case 8:return n.abrupt("return",{signature:e.from(i).toString("hex"),publicKey:this.provider.publicKey.toString()});case 9:case"end":return n.stop()}}),n,this)})))}}]),t}();t.SolanaWallet=p;var l=function(){function e(t){a(this,e),this.wallet=t,this.walletType=o.WalletType.IMMUTABLEX}return i(e,[{key:"signPersonalMessage",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.wallet.link.sign({message:e,description:e});case 2:return t.t0=t.sent.result,t.t1=this.wallet.getConnectionData().address,t.abrupt("return",{signature:t.t0,publicKey:t.t1});case 5:case"end":return t.stop()}}),t,this)})))}}]),e}();t.ImmutableXWallet=l,t.isBlockchainWallet=function(e){return e instanceof u||e instanceof d||e instanceof c||e instanceof p||e instanceof l||(e.walletType===o.WalletType.ETHEREUM&&e.ethereum||e.walletType===o.WalletType.SOLANA&&e.provider||e.walletType===o.WalletType.FLOW&&e.fcl||e.walletType===o.WalletType.TEZOS&&e.provider||e.walletType===o.WalletType.IMMUTABLEX&&e.wallet)&&e.signPersonalMessage};var y=n(1180);Object.defineProperty(t,"getRaribleWallet",{enumerable:!0,get:function(){return y.getRaribleWallet}})}).call(this,n(15).Buffer)},907:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasName=t.isObjectLike=t.getDappType=t.DappType=t.getStringifiedData=void 0;var r,a=n(19);function i(e,t){try{if(t instanceof Error){var n={};return Object.getOwnPropertyNames(t).forEach((function(e){n[e]=t[e]})),n}}catch(r){}return t}a.__exportStar(n(1867),t),a.__exportStar(n(1172),t),a.__exportStar(n(1868),t),t.getStringifiedData=function(e){try{if("string"===typeof e)return e;var t=Object.getOwnPropertyNames(e).reduce((function(t,n){return t[n]=e[n],t}),{});return JSON.stringify(t,i," ")}catch(n){return}},function(e){e.AlphaWallet="AlphaWallet",e.AToken="AToken",e.Binance="Binance Smart Wallet",e.Bitpie="Bitpie",e.BlockWallet="BlockWallet",e.Brave="Brave",e.Coinbase="Coinbase Wallet",e.CoinbaseBrowser="Coinbase Browser",e.Dcent="D'CENT",e.Frame="Frame",e.HuobiWallet="Huobi Wallet",e.LedgerConnect="Ledger Connect",e.HyperPay="HyperPay",e.ImToken="imToken",e.Liquality="Liquality",e.MeetOne="MeetOne",e.Metamask="Metamask",e.MyKey="MyKey",e.Opera="Opera Wallet",e.OwnBit="OwnBit",e.Status="Status Wallet",e.Trust="Trust Wallet",e.TokenPocket="TokenPocket",e.TP="TP Wallet",e.WalletIo="Wallet.io",e.XDEFI="XDEFI Wallet",e.OneInch="1inch Wallet",e.Tokenary="Tokenary Wallet",e.Tally="Tally Wallet",e.GameStop="Game Stop",e.Dapper="Dapper",e.Cipher="Cipher",e.Mist="Mist",e.Parity="Parity",e.Mock="Mock",e.Generic="Web3",e.Unknown="Unknown"}(r=t.DappType||(t.DappType={})),t.getDappType=function(e){var t,n,a;if(e)return e.isAlphaWallet?r.AlphaWallet:e.isAToken?r.AToken:e.bbcSignTx?r.Binance:e.isBitpie?r.Bitpie:e.isBlockWallet?r.BlockWallet:e.isCoinbaseBrowser?r.CoinbaseBrowser:e.isCoinbaseWallet?r.Coinbase:e.isDcentWallet?r.Dcent:e.isFrame?r.Frame:e.isHbWallet?r.HuobiWallet:e.isHyperPay?r.HyperPay:e.isImToken?r.ImToken:e.isLiquality?r.Liquality:e.wallet?r.MeetOne:e.isMYKEY?r.MyKey:e.isOwnbit?r.OwnBit:e.isStatus?r.Status:e.isTrust?r.Trust:e.isTokenPocket?r.TokenPocket:e.isTp?r.TP:e.isWalletIO?r.WalletIo:e.isXDEFI?r.XDEFI:e.isOneInchIOSWallet?r.OneInch:e.isTokenary?r.Tokenary:e.isTally?r.Tally:e.isBraveWallet?r.Brave:e.isOpera?r.Opera:e.isLedgerConnect?r.LedgerConnect:e.isMetaMask?r.Metamask:e.isGamestop?r.GameStop:"Web3ProviderEngine"===(null===(t=null===e||void 0===e?void 0:e.constructor)||void 0===t?void 0:t.name)?r.Mock:"EthereumProvider"===(null===(n=null===e||void 0===e?void 0:e.constructor)||void 0===n?void 0:n.name)?r.Mist:"Web3FrameProvider"===(null===(a=null===e||void 0===e?void 0:e.constructor)||void 0===a?void 0:a.name)?r.Parity:r.Unknown},t.isObjectLike=function(e){return"object"===typeof e&&null!==e},t.hasName=function(e){return"object"===typeof e&&null!==e&&"name"in e}},930:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NFT_STORAGE_URL=t.getSdkConfig=t.configsDictionary=void 0;var r=n(2015),a=n(2016),i=n(2017),s=n(2018);t.configsDictionary={development:a.developmentConfig,testnet:i.testnetConfig,staging:s.stagingConfig,prod:r.prodConfig},t.getSdkConfig=function(e){return t.configsDictionary[e]},t.NFT_STORAGE_URL="https://api.nft.storage/upload"},931:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isErc721v1Collection=t.isErc1155v1Collection=t.isErc721v3Collection=t.isErc721v2Collection=t.isErc1155v2Collection=t.createRaribleSdk=void 0;var r=n(19),a=n(73),i=n(1224),s=n(2049),o=n(616),u=n(2053),c=n(934),d=n(2057),p=r.__importStar(n(2058)),l=n(732),y=n(619),f=n(2214),m=n(2219),b=n(2221),v=n(2222),h=n(2224),T=n(2244),g=n(2288),w=n(950),k=n(2299),x=n(2302),O=n(2305),_=n(938),E=n(2306),A=n(364),C=n(2309),I=n(2311),S=n(2312),R=n(2313),j=n(2314),P=n(939),B=n(747),M=n(2315),F=n(2317),N=n(949);function D(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2]&&arguments[2],u=(0,p.encodeRaribleV2OrderData)(e,t.data,o),c=r(u,2),d=c[0],l=c[1];return{maker:t.maker,makeAsset:f(e,t.make),taker:null!==(n=t.taker)&&void 0!==n?n:s.ZERO_ADDRESS,takeAsset:f(e,t.take),salt:t.salt,start:null!==(a=t.start)&&void 0!==a?a:0,end:null!==(i=t.end)&&void 0!==i?i:0,dataType:d,data:l}}function f(e,t){return{assetType:(0,c.assetTypeToStruct)(e,t.assetType),value:t.value}}t.signOrder=function(e,t,n){return i.__awaiter(this,void 0,void 0,a().mark((function r(){var i,o,c,p;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}throw new Error("Wallet undefined");case 2:r.t0=n.type,r.next="RARIBLE_V1"===r.t0?5:"RARIBLE_V2"===r.t0?11:19;break;case 5:return i=(0,u.hashLegacyOrder)(e,n),r.t1=s.toBinary,r.next=9,e.personalSign(i.substring(2));case 9:return r.t2=r.sent,r.abrupt("return",(0,r.t1)(r.t2));case 11:return o=l(t.chainId,t.exchange.v2),c=y(e,n),r.next=15,e.signTypedData({primaryType:d.EIP712_ORDER_TYPE,domain:o,types:d.EIP712_ORDER_TYPES,message:c});case 15:if(p=r.sent){r.next=18;break}throw new Error("signOrder error: signature=".concat(p,", data=").concat(JSON.stringify(c)));case 18:return r.abrupt("return",(0,s.toBinary)(p));case 19:throw new Error("Unsupported order type: ".concat(n.type));case 20:case"end":return r.stop()}}),r)})))},t.hashToSign=function(e,t,n){var r=l(e.chainId,e.exchange.v2);return o.TypedDataUtils.sign({primaryType:d.EIP712_ORDER_TYPE,domain:r,types:d.EIP712_ORDER_TYPES,message:y(t,n)})},t.orderToStruct=y},935:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assetTypeToStruct=void 0;var r=n(241);t.assetTypeToStruct=function(e,t){switch(t.assetClass){case"ETH":return{assetClass:(0,r.id)("ETH"),data:"0x"};case"ERC20":return{assetClass:(0,r.id)("ERC20"),data:e.encodeParameter("address",t.contract)};case"GEN_ART":return{assetClass:(0,r.id)("GEN_ART"),data:e.encodeParameter("address",t.contract)};case"COLLECTION":return{assetClass:(0,r.id)("COLLECTION"),data:e.encodeParameter("address",t.contract)};case"CRYPTO_PUNKS":return{assetClass:(0,r.id)("CRYPTO_PUNKS"),data:e.encodeParameter({root:a},{contract:t.contract,tokenId:t.tokenId})};case"ERC721":return{assetClass:(0,r.id)("ERC721"),data:e.encodeParameter({root:a},{contract:t.contract,tokenId:t.tokenId})};case"ERC1155":return{assetClass:(0,r.id)("ERC1155"),data:e.encodeParameter({root:a},{contract:t.contract,tokenId:t.tokenId})};case"ERC721_LAZY":var n=e.encodeParameter(i,{contract:t.contract,data:{tokenId:t.tokenId,uri:t.uri,creators:t.creators,royalties:t.royalties,signatures:t.signatures}});return{assetClass:(0,r.id)("ERC721_LAZY"),data:"0x".concat(n.substring(66))};case"ERC1155_LAZY":var o=e.encodeParameter(s,{contract:t.contract,data:{tokenId:t.tokenId,uri:t.uri,supply:t.supply,creators:t.creators,royalties:t.royalties,signatures:t.signatures}});return{assetClass:(0,r.id)("ERC1155_LAZY"),data:"0x".concat(o.substring(66))};default:throw new Error("Unsupported asset class")}};var a={contract:"address",tokenId:"uint256"},i={components:[{name:"contract",type:"address"},{components:[{name:"tokenId",type:"uint256"},{name:"uri",type:"string"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"creators",type:"tuple[]"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"royalties",type:"tuple[]"},{name:"signatures",type:"bytes[]"}],name:"data",type:"tuple"}],name:"data",type:"tuple"},s={components:[{name:"contract",type:"address"},{components:[{name:"tokenId",type:"uint256"},{name:"uri",type:"string"},{name:"supply",type:"uint256"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"creators",type:"tuple[]"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"royalties",type:"tuple[]"},{name:"signatures",type:"bytes[]"}],name:"data",type:"tuple"}],name:"data",type:"tuple"}},936:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeRaribleV2OrderData=t.encodePartToBuffer=void 0;var r=n(73),a=(0,r.toWord)("0x0000000000000000000000000000000000000000000000000000000000000000");function i(e){if(!e)return(0,r.toBigNumber)(a);var t=e.value.toString(16),n=e.account;return n.startsWith("0x")&&(n=n.substring(2)),(0,r.toBigNumber)("0x"+t.padStart(12,"0")+n)}t.encodePartToBuffer=i,t.encodeRaribleV2OrderData=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];switch(t.dataType){case"RARIBLE_V2_DATA_V3_BUY":return["0x1b18cdf6",e.encodeParameter(u,{payouts:i(t.payout),originFeeFirst:i(t.originFeeFirst),originFeeSecond:i(t.originFeeSecond),marketplaceMarker:t.marketplaceMarker||a})];case"RARIBLE_V2_DATA_V3_SELL":return["0x2fa3cfd3",e.encodeParameter(c,{payouts:i(t.payout),originFeeFirst:i(t.originFeeFirst),originFeeSecond:i(t.originFeeSecond),maxFeesBasePoint:t.maxFeesBasePoint,marketplaceMarker:t.marketplaceMarker||a})];case"RARIBLE_V2_DATA_V2":return["0x23d235ef",e.encodeParameter(o,{payouts:t.payouts,originFees:t.originFees,isMakeFill:t.isMakeFill})];case"RARIBLE_V2_DATA_V1":var r=e.encodeParameter(s,{payouts:t.payouts,originFees:t.originFees});return n?["0x4c234266","0x".concat(r.substring(66))]:["0x4c234266",r];default:throw new Error("Data type not supported: ".concat(t.dataType))}};var s={components:[{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"payouts",type:"tuple[]"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"originFees",type:"tuple[]"}],name:"data",type:"tuple"},o={components:[{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"payouts",type:"tuple[]"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"originFees",type:"tuple[]"},{name:"isMakeFill",type:"bool"}],name:"data",type:"tuple"},u={components:[{name:"payouts",type:"uint256"},{name:"originFeeFirst",type:"uint256"},{name:"originFeeSecond",type:"uint256"},{name:"marketplaceMarker",type:"bytes32"}],name:"data",type:"tuple"},c={components:[{name:"payouts",type:"uint256"},{name:"originFeeFirst",type:"uint256"},{name:"originFeeSecond",type:"uint256"},{name:"maxFeesBasePoint",type:"uint256"},{name:"marketplaceMarker",type:"bytes32"}],name:"data",type:"tuple"}},937:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.checkLazyAssetType=void 0;var a=n(19);t.checkLazyAssetType=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i,s;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=t.assetClass,n.next="ERC1155"===n.t0||"ERC721"===n.t0?3:20;break;case 3:return n.next=5,e.getNftItemByIdRaw({itemId:"".concat(t.contract,":").concat(t.tokenId)});case 5:if(200!==(a=n.sent).status||"0"!==a.value.lazySupply){n.next=8;break}return n.abrupt("return",t);case 8:return n.next=10,e.getNftLazyItemByIdRaw({itemId:"".concat(t.contract,":").concat(t.tokenId)});case 10:if(200!==(i=n.sent).status){n.next=19;break}s=i.value,n.t1=s["@type"],n.next="ERC721"===n.t1?16:"ERC1155"===n.t1?17:18;break;case 16:return n.abrupt("return",Object.assign(Object.assign({},s),{assetClass:"ERC721_LAZY"}));case 17:return n.abrupt("return",Object.assign(Object.assign({},s),{assetClass:"ERC1155_LAZY"}));case 18:case 19:case 20:return n.abrupt("return",t);case 21:case"end":return n.stop()}}),n)})))}},938:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogsLevel=void 0,function(e){e[e.DISABLED=0]="DISABLED",e[e.ERROR=1]="ERROR",e[e.TRACE=2]="TRACE"}(t.LogsLevel||(t.LogsLevel={}))},939:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkErrorCode=t.createRemoteLogger=t.getErrorMessageString=t.getEnvironment=void 0;var a=n(19),i=a.__importDefault(n(119)),s=n(406),o=n(121),u=n(2242);t.getEnvironment=function(e){switch(e){case"mainnet":case"polygon":return"prod";case"mumbai":return"staging";default:return"testnet"}};var c="ethereum-sdk",d="https://logging.rarible.com/";t.getErrorMessageString=function(e){return e?"string"===typeof e?e:e instanceof Error?e.message:e.message?"string"===typeof e.message?e.message:JSON.stringify(e.message):void 0!==e.status&&void 0!==e.statusText?JSON.stringify({url:e.url,status:e.status,statusText:e.statusText}):JSON.stringify(e):"not defined"},t.createRemoteLogger=function(e){var t=this;return new s.RemoteLogger((function(e){return i.default.post(d,e)}),{initialContext:a.__awaiter(t,void 0,void 0,r().mark((function t(){var n,a,i,s,d,p,l;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=c,t.t1=e.env,t.t2=null!==(n=e.sessionId)&&void 0!==n?n:(0,o.getRandomId)("ethereum"),t.t3=u.version,t.next=6,null===(a=e.ethereum)||void 0===a?void 0:a.getFrom();case 6:if(t.t5=i=t.sent,t.t4=null!==t.t5,!t.t4){t.next=10;break}t.t4=void 0!==i;case 10:if(!t.t4){t.next=14;break}t.t6=i,t.next=15;break;case 14:t.t6="unknown";case 15:return t.t7=t.t6,t.next=18,null===(s=e.ethereum)||void 0===s?void 0:s.getChainId();case 18:if(t.t10=d=t.sent,t.t9=null===t.t10,t.t9){t.next=22;break}t.t9=void 0===d;case 22:if(!t.t9){t.next=26;break}t.t11=void 0,t.next=27;break;case 26:t.t11=d.toString();case 27:if(t.t12=p=t.t11,t.t8=null!==t.t12,!t.t8){t.next=31;break}t.t8=void 0!==p;case 31:if(!t.t8){t.next=35;break}t.t13=p,t.next=36;break;case 35:t.t13="unknown";case 36:return t.t14=t.t13,l={service:t.t0,environment:t.t1,sessionId:t.t2,version:t.t3,web3Address:t.t7,ethNetwork:t.t14},void 0!==e.apiKey&&(l.apiKey=e.apiKey),t.abrupt("return",l);case 40:case"end":return t.stop()}}),t)}))),maxByteSize:51200})},function(e){e.ETHEREUM_EXTERNAL_ERR="ETHEREUM_EXTERNAL_ERR"}(t.NetworkErrorCode||(t.NetworkErrorCode={}))},941:function(e,t,n){"use strict";var r=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.invertOrder=void 0;var a=n(73),i=n(176),s=n(407),o=(0,a.toWord)("0x0000000000000000000000000000000000000000000000000000000000000000");t.invertOrder=function(e,t,n){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o,c=(0,s.isNft)(e.take.assetType)||"COLLECTION"===e.take.assetType.assetClass,d=function(e,t,n,r){return r?[n,(0,i.toBn)(n).multipliedBy(e).div(t)]:[(0,i.toBn)(n).multipliedBy(t).div(e),n]}((0,i.toBn)(e.make.value),(0,i.toBn)(e.take.value),t,c),p=r(d,2),l=p[0],y=p[1];return function(e){if(parseFloat(e.toString())<1)throw new Error("Invalid order. Price per one item is less than minimum allowable currency amount.")}(c?y:l),Object.assign(Object.assign({},e),{make:Object.assign(Object.assign({},e.take),{value:(0,a.toBigNumber)(l.toString())}),take:Object.assign(Object.assign({},e.make),{value:(0,a.toBigNumber)(y.toString())}),maker:n,taker:e.maker,salt:u,signature:void 0})}},942:function(e,t,n){"use strict";var r=n(78).default,a=n(20).default,i=n(21).default,s=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAtomicMatchArgCommonData=t.getAtomicMatchArgUints=t.getAtomicMatchArgAddressesForOpenseaWrapper=t.getAtomicMatchArgAddresses=t.getBuySellOrders=t.getMatchOpenseaOptions=t.OpenSeaOrderHandler=void 0;var o=n(19),u=n(733),c=n(73),d=n(1206),p=n(121),l=n(2245),y=n(1228),f=n(1229),m=n(1230),b=n(738),v=n(1252),h=n(737),T=n(362),g=n(302),w=n(620),k=n(456),x=n(2246),O=n(618),_=n(1236),E=n(241),A=n(457),C=n(458),I=n(1254),S=n(363),R=function(){function e(t,n,r,a,s,o){i(this,e),this.ethereum=t,this.send=n,this.config=r,this.apis=a,this.getBaseOrderFeeConfig=s,this.sdkConfig=o}return s(e,[{key:"getOrderMetadata",value:function(){var e=function(e,t){if(!t)return;switch(e){case"ETHEREUM":return t.ethereum;case"POLYGON":return t.polygon;case"MANTLE":return t.mantle;default:return}}((0,_.getBlockchainFromChainId)(this.config.chainId),this.sdkConfig);return e&&e.openseaOrdersMetadata?(0,c.toWord)(e.openseaOrdersMetadata):this.config.openSea.metadata||(0,E.id32)("RARIBLE")}},{key:"invert",value:function(e,t){var n,r=e.order,i=e.payouts;return o.__awaiter(this,void 0,void 0,a().mark((function e(){var s,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("BUY"!==r.data.side){e.next=2;break}throw new Error("Bid opensea orders is not supported yet");case 2:if(r.data.feeRecipient!==c.ZERO_ADDRESS){e.next=4;break}throw new Error("feeRecipient should be specified");case 4:return s=Object.assign(Object.assign({},r.data),{feeRecipient:c.ZERO_ADDRESS,side:u.OrderOpenSeaV1DataV1Side.BUY}),o=Object.assign(Object.assign({},r),{make:Object.assign({},r.take),take:Object.assign({},r.make),maker:i&&(null===(n=i[0])||void 0===n?void 0:n.account)?i[0].account:t,taker:r.maker,signature:void 0,data:s}),e.t0=Object,e.t1=Object.assign({},o.data),e.next=10,this.encodeOrder(o);case 10:return e.t2=e.sent,o.data=e.t0.assign.call(e.t0,e.t1,e.t2),e.abrupt("return",o);case 13:case"end":return e.stop()}}),e,this)})))}},{key:"encodeOrder",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r,i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.make.assetType,r=e.take.assetType,i=e.data.target&&e.data.target===this.config.openSea.merkleValidator?e.data.target:void 0,"ERC721"!==n.assetClass){t.next=7;break}return t.abrupt("return",this.getErc721EncodedData(n,e.maker,!0,i,e.data.callData));case 7:if("ERC1155"!==n.assetClass){t.next=11;break}return t.abrupt("return",this.getErc1155EncodedData(n,e.make.value,e.maker,!0,i));case 11:if("ERC721"!==r.assetClass){t.next=15;break}return t.abrupt("return",this.getErc721EncodedData(r,e.maker,!1,i,e.data.callData));case 15:if("ERC1155"!==r.assetClass){t.next=19;break}return t.abrupt("return",this.getErc1155EncodedData(r,e.take.value,e.maker,!1,i));case 19:throw new Error("should never happen");case 20:case"end":return t.stop()}}),t,this)})))}},{key:"getErc721EncodedData",value:function(e,t,n,i,s){return o.__awaiter(this,void 0,void 0,a().mark((function o(){var u,d,p,l,y,f,m,b,v,h;return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(u=(0,g.getRequiredWallet)(this.ethereum),d=[t,c.ZERO_ADDRESS],n||(d=[c.ZERO_ADDRESS,t]),!i){a.next=18;break}return p=(0,x.createMerkleValidatorContract)(u,i),l=s.startsWith(L),y=l?"matchERC721WithSafeTransferUsingCriteria":"matchERC721UsingCriteria",f=[].concat(r(d),[e.contract,e.tokenId,"0x",[]]),a.t0=n?I.ERC721_VALIDATOR_MAKE_REPLACEMENT:I.ERC721_VALIDATOR_TAKE_REPLACEMENT,a.t1=c.toBinary,a.next=12,p.functionCall.apply(p,[y].concat(r(f))).getData();case 12:return a.t2=a.sent,a.t3=(0,a.t1)(a.t2),a.t4=i,a.abrupt("return",{replacementPattern:a.t0,callData:a.t3,target:a.t4});case 18:if(b=[].concat(r(d),[e.tokenId]),!s.startsWith(U)){a.next=31;break}return a.next=23,(0,w.getErc721Contract)(u,k.ERC721VersionEnum.ERC721V3,e.contract);case 23:return v=a.sent,a.t5=c.toBinary,a.next=27,v.functionCall.apply(v,["safeTransferFrom"].concat(r(b))).getData();case 27:a.t6=a.sent,m=(0,a.t5)(a.t6),a.next=39;break;case 31:return a.next=33,(0,w.getErc721Contract)(u,k.ERC721VersionEnum.ERC721V2,e.contract);case 33:return h=a.sent,a.t7=c.toBinary,a.next=37,h.functionCall.apply(h,["transferFrom"].concat(r(b))).getData();case 37:a.t8=a.sent,m=(0,a.t7)(a.t8);case 39:return a.abrupt("return",{replacementPattern:n?I.ERC721_MAKE_REPLACEMENT:I.ERC721_TAKE_REPLACEMENT,target:e.contract,callData:m});case 40:case"end":return a.stop()}}),o,this)})))}},{key:"getErc1155EncodedData",value:function(e,t,n,i,s){return o.__awaiter(this,void 0,void 0,a().mark((function o(){var u,d,p,l,y,f;return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(u=(0,g.getRequiredWallet)(this.ethereum),d=[n,c.ZERO_ADDRESS],i||(d=[c.ZERO_ADDRESS,n]),!s){a.next=16;break}return p=(0,x.createMerkleValidatorContract)(u,s),l=[].concat(r(d),[e.contract,e.tokenId,t,"0x",[]]),a.t0=i?I.ERC1155_VALIDATOR_MAKE_REPLACEMENT:I.ERC1155_VALIDATOR_TAKE_REPLACEMENT,a.t1=s,a.t2=c.toBinary,a.next=11,p.functionCall.apply(p,["matchERC1155UsingCriteria"].concat(r(l))).getData();case 11:return a.t3=a.sent,a.t4=(0,a.t2)(a.t3),a.abrupt("return",{replacementPattern:a.t0,target:a.t1,callData:a.t4});case 16:return y=(0,O.createErc1155Contract)(u,e.contract),f=[].concat(r(d),[e.tokenId,t,"0x"]),a.t5=i?I.ERC1155_MAKE_REPLACEMENT:I.ERC1155_TAKE_REPLACEMENT,a.t6=e.contract,a.t7=c.toBinary,a.next=23,y.functionCall.apply(y,["safeTransferFrom"].concat(r(f))).getData();case 23:return a.t8=a.sent,a.t9=(0,a.t7)(a.t8),a.abrupt("return",{replacementPattern:a.t5,target:a.t6,callData:a.t9});case 26:case"end":return a.stop()}}),o,this)})))}},{key:"getBaseOrderFee",value:function(){return o.__awaiter(this,void 0,void 0,a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getBaseOrderFeeConfig("OPEN_SEA_V1"));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getOrderFee",value:function(e){return e.data.feeRecipient===c.ZERO_ADDRESS?(0,p.toBn)(e.data.takerProtocolFee).plus(e.data.takerRelayerFee).toNumber():(0,p.toBn)(e.data.makerProtocolFee).plus(e.data.makerRelayerFee).toNumber()}},{key:"approve",value:function(e,t){return o.__awaiter(this,void 0,void 0,a().mark((function n(){var r,i,s,o;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=this.getOrderFee(e),"BUY"!==e.data.side){n.next=7;break}return i=(0,b.getAssetWithFee)(e.make,r),n.next=5,(0,T.waitTx)(this.approveSingle(e.maker,i,t));case 5:n.next=13;break;case 7:return n.next=9,(0,T.waitTx)(this.approveSingle(e.maker,e.make,t));case 9:return s=(0,p.toBn)(e.take.value).multipliedBy(r).dividedBy(1e4).integerValue(p.BigNumber.ROUND_FLOOR).toFixed(),o=Object.assign(Object.assign({},e.take),{value:(0,c.toBigNumber)(s)}),n.next=13,(0,T.waitTx)(this.approveSingle(e.maker,o,t));case 13:case"end":return n.stop()}}),n,this)})))}},{key:"getTransactionData",value:function(e,t,n){return o.__awaiter(this,void 0,void 0,a().mark((function r(){var i,s,o,u,c,d,p,l,y,f,m,b;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.ethereum){r.next=2;break}throw new Error("Wallet undefined");case 2:return i="ETH"===e.take.assetType.assetClass,r.next=5,this.getAtomicMatchFunctionCall(e,t);case 5:if(s=r.sent,o=B(e,t),u=o.buy,!i){r.next=19;break}return c=(0,A.createExchangeWrapperContract)(this.ethereum,this.config.exchange.wrapper),d=(0,S.originFeeValueConvert)(n.originFees),p=d.encodedFeesValue,l=d.feeAddresses,r.next=12,this.getTransactionDataForExchangeWrapper(e,t,n.originFees,p);case 12:return y=r.sent,f=y.data,m=y.options,b=c.functionCall("singlePurchase",f,l[0],l[1]),r.abrupt("return",{functionCall:b,options:m});case 19:return r.t0=s,r.next=22,j(u);case 22:return r.t1=r.sent,r.abrupt("return",{functionCall:r.t0,options:r.t1});case 24:case"end":return r.stop()}}),r,this)})))}},{key:"getTransactionDataForExchangeWrapper",value:function(e,t,n,r){return o.__awaiter(this,void 0,void 0,a().mark((function i(){var s,o,u;return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.getAtomicMatchFunctionCall(e,t);case 2:return s=a.sent,o=B(e,t),u=o.buy,a.t0=C.ExchangeWrapperOrderType.OPENSEA_V1,a.next=7,j(u);case 7:return a.t1=a.sent.value,a.t2=r,a.next=11,s.getData();case 11:return a.t3=a.sent,a.t4={marketId:a.t0,amount:a.t1,fees:a.t2,data:a.t3},a.next=15,j(u,n);case 15:return a.t5=a.sent,a.abrupt("return",{data:a.t4,options:a.t5});case 17:case"end":return a.stop()}}),i,this)})))}},{key:"getAtomicMatchFunctionCall",value:function(e,t){return o.__awaiter(this,void 0,void 0,a().mark((function n(){var i,s,o,u,c,d,p,l,y;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.ethereum){n.next=2;break}throw new Error("Wallet undefined");case 2:return i="ETH"===e.take.assetType.assetClass,s=B(e,t),o=s.buy,u=s.sell,c=(0,I.convertOpenSeaOrderToDTO)(this.ethereum,u),d=(0,I.convertOpenSeaOrderToDTO)(this.ethereum,o),p=(0,v.createOpenseaContract)(this.ethereum,e.data.exchange),l=(0,h.toVrs)(o.signature||""),y=(0,h.toVrs)(u.signature||""),n.next=11,this.ordersCanMatch(p,d,c,i);case 11:if(n.sent){n.next=14;break}throw new Error("Orders cannot be matched");case 14:return n.abrupt("return",p.functionCall("atomicMatch_",this.getAddressesArrayForTransaction(d,c,i),[].concat(r(N(d)),r(N(c))),[].concat(r(D(d)),r(D(c))),d.calldata,c.calldata,d.replacementPattern,c.replacementPattern,d.staticExtradata,c.staticExtradata,[l.v,y.v],[l.r,l.s,y.r,y.s,this.getOrderMetadata()]));case 15:case"end":return n.stop()}}),n,this)})))}},{key:"ordersCanMatch",value:function(e,t,n,i){return o.__awaiter(this,void 0,void 0,a().mark((function s(){var o;return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,e.functionCall("ordersCanMatch_",this.getAddressesArrayForTransaction(t,n,i),[].concat(r(N(t)),r(N(n))),[].concat(r(D(t)),r(D(n))),t.calldata,n.calldata,t.replacementPattern,n.replacementPattern,t.staticExtradata,n.staticExtradata).call();case 2:return o=a.sent,a.abrupt("return",!!o);case 4:case"end":return a.stop()}}),s,this)})))}},{key:"getAddressesArrayForTransaction",value:function(e,t,n){return n?r(F(t,this.config.exchange.wrapper)):[].concat(r(M(e)),r(M(t)))}},{key:"approveSingle",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return o.__awaiter(this,void 0,void 0,a().mark((function r(){var i,s,o,u,c,d;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.ethereum){r.next=2;break}throw new Error("Wallet undefined");case 2:r.t0=t.assetType.assetClass,r.next="ERC20"===r.t0?5:"ERC721"===r.t0?8:"ERC1155"===r.t0?13:18;break;case 5:return i=t.assetType.contract,s=this.config.transferProxies.openseaV1,r.abrupt("return",(0,y.approveErc20)(this.ethereum,this.send,i,e,s,t.value,n));case 8:return o=t.assetType.contract,r.next=11,this.getRegisteredProxy(e);case 11:return u=r.sent,r.abrupt("return",(0,f.approveErc721)(this.ethereum,this.send,o,e,u));case 13:return c=t.assetType.contract,r.next=16,this.getRegisteredProxy(e);case 16:return d=r.sent,r.abrupt("return",(0,m.approveErc1155)(this.ethereum,this.send,c,e,d));case 18:return r.abrupt("return",void 0);case 19:case"end":return r.stop()}}),r,this)})))}},{key:"getRegisteredProxy",value:function(e){return o.__awaiter(this,void 0,void 0,a().mark((function t(){var n,r,i,s,u=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.ethereum){t.next=2;break}throw new Error("Wallet undefined");case 2:return n=this.config.openSea.proxyRegistry,r=(0,l.createOpenseaProxyRegistryEthContract)(this.ethereum,n),t.next=6,P(r,e);case 6:if((i=t.sent)!==c.ZERO_ADDRESS){t.next=14;break}return t.next=10,r.functionCall("registerProxy").send();case 10:return s=t.sent,t.next=13,s.wait();case 13:return t.abrupt("return",(0,d.backOff)((function(){return o.__awaiter(u,void 0,void 0,a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P(r,e);case 2:if((n=t.sent)!==c.ZERO_ADDRESS){t.next=5;break}throw new Error("Expected non-zero proxy address");case 5:return t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)})))}),{maxDelay:500,numOfAttempts:10,delayFirstAttempt:!0,startingDelay:100}));case 14:return t.abrupt("return",i);case 15:case"end":return t.stop()}}),t,this)})))}}]),e}();function j(e,t){return o.__awaiter(this,void 0,void 0,a().mark((function n(){var r,i,s;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("ETH"!==e.make.assetType.assetClass){n.next=7;break}return r=null===t||void 0===t?void 0:t.map((function(e){return e.value})).reduce((function(e,t){return e+t}),0),i=(0,p.toBn)(e.data.takerProtocolFee).plus(e.data.takerRelayerFee).plus(r||0).toNumber(),s=(0,b.getAssetWithFee)(e.make,i),n.abrupt("return",{value:s.value});case 7:return n.abrupt("return",{});case 8:case"end":return n.stop()}}),n)})))}function P(e,t){return o.__awaiter(this,void 0,void 0,a().mark((function n(){return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=c.toAddress,n.next=3,e.functionCall("proxies",t).call();case 3:return n.t1=n.sent,n.abrupt("return",(0,n.t0)(n.t1));case 5:case"end":return n.stop()}}),n)})))}function B(e,t){return"SELL"===e.data.side?{buy:t,sell:e}:{buy:e,sell:t}}function M(e){return[e.exchange,e.maker,e.taker,e.feeRecipient,e.target,e.staticTarget,e.paymentToken]}function F(e,t){return[e.exchange,t,e.maker,c.ZERO_ADDRESS,e.target,e.staticTarget,e.paymentToken].concat(r(M(e)))}function N(e){return[e.makerRelayerFee,e.takerRelayerFee,e.makerProtocolFee,e.takerProtocolFee,e.basePrice,e.extra,e.listingTime,e.expirationTime,e.salt]}function D(e){return[e.feeMethod,e.side,e.saleKind,e.howToCall]}t.OpenSeaOrderHandler=R,t.getMatchOpenseaOptions=j,t.getBuySellOrders=B,t.getAtomicMatchArgAddresses=M,t.getAtomicMatchArgAddressesForOpenseaWrapper=F,t.getAtomicMatchArgUints=N,t.getAtomicMatchArgCommonData=D;var L="0xc5a0236e",U="0x42842e0e"},943:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertAPIOrderToSeaport=void 0;var r=n(944);t.convertAPIOrderToSeaport=function(e){if(!e.signature)throw new Error("Signature should exists");if(void 0===e.start||void 0===e.end)throw new Error("Order should includes start/end fields");if(void 0===e.data.nonce)throw new Error("Converting Seaport order error: nonce is undefined");return{parameters:{counter:e.data.nonce,offerer:e.maker,zone:e.data.zone,orderType:(0,r.convertOrderType)(e.data.orderType),startTime:e.start.toString(),endTime:e.end.toString(),zoneHash:e.data.zoneHash,salt:e.salt,offer:e.data.offer.map((function(e){return{itemType:(0,r.convertItemType)(e.itemType),token:e.token,identifierOrCriteria:e.identifierOrCriteria,startAmount:e.startAmount,endAmount:e.endAmount}})),consideration:e.data.consideration.map((function(e){return{itemType:(0,r.convertItemType)(e.itemType),token:e.token,identifierOrCriteria:e.identifierOrCriteria,startAmount:e.startAmount,endAmount:e.endAmount,recipient:e.recipient}})),totalOriginalConsiderationItems:e.data.consideration.length,conduitKey:e.data.conduitKey},signature:e.signature}}},944:function(e,t,n){"use strict";var r=n(20).default,a=n(21).default,i=n(22).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getSeaportToken=t.convertItemType=t.convertOrderType=t.SeaportOrderHandler=void 0;var s=n(19),o=n(1233),u=n(1234),c=n(73),d=n(176),p=n(121),l=s.__importDefault(n(119)),y=n(407),f=n(302),m=n(739),b=n(303),v=n(2248),h=n(947),T=n(363),g=function(){function e(t,n,r,i,s,o,u){a(this,e),this.ethereum=t,this.send=n,this.config=r,this.apis=i,this.getBaseOrderFeeConfig=s,this.env=o,this.sdkConfig=u}return i(e,[{key:"sendTransaction",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getTransactionData(e);case 2:return n=t.sent,a=n.functionCall,i=n.options,t.abrupt("return",this.send(a,i));case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getSignature",value:function(e){var t,n,a,i,o,u,c,d=e.hash,p=e.protocol;return s.__awaiter(this,void 0,void 0,r().mark((function e(){var s,y,f,m,b,v;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.apis.orderSignature.getSeaportOrderSignature({hash:d});case 3:return s=e.sent,y=s.signature,e.abrupt("return",y);case 8:if(e.prev=8,e.t0=e.catch(0),"Error when generating fulfillment data","string"!==typeof(f=(null===(t=null===e.t0||void 0===e.t0?void 0:e.t0.value)||void 0===t?void 0:t.message)||(null===(n=null===e.t0||void 0===e.t0?void 0:e.t0.data)||void 0===n?void 0:n.message))||!f.includes("Error when generating fulfillment data")){e.next=14;break}throw new Error("Order is not active or cancelled");case 14:if("testnet"!==this.env&&"mumbai"!==this.env){e.next=35;break}return e.prev=15,e.t1={hash:d,chain:"testnet"===this.env?"goerli":"mumbai",protocol_address:p},e.next=19,null===(a=this.ethereum)||void 0===a?void 0:a.getFrom();case 19:return e.t2=e.sent,e.t3={address:e.t2},m={listing:e.t1,fulfiller:e.t3},e.next=24,l.default.post("https://testnets-api.opensea.io/v2/listings/fulfillment_data",m);case 24:return b=e.sent,v=b.data,e.abrupt("return",v.fulfillment_data.orders[0].signature);case 29:if(e.prev=29,e.t4=e.catch(15),console.error(e.t4),!Array.isArray(null===(o=null===(i=null===e.t4||void 0===e.t4?void 0:e.t4.response)||void 0===i?void 0:i.data)||void 0===o?void 0:o.errors)){e.next=34;break}throw new Error(null===(c=null===(u=null===e.t4||void 0===e.t4?void 0:e.t4.response)||void 0===u?void 0:u.data)||void 0===c?void 0:c.errors.join(","));case 34:throw e.t4;case 35:throw new Error("api.getSeaportOrderSignature error: ".concat(e.t0,", hash=").concat(d));case 36:case"end":return e.stop()}}),e,this,[[0,8],[15,29]])})))}},{key:"getTransactionData",value:function(e){return s.__awaiter(this,void 0,void 0,r().mark((function t(){var n,a,i,s,o,u,c,d,p;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=(0,f.getRequiredWallet)(this.ethereum),void 0!==(a=e.order).start&&void 0!==a.end){t.next=4;break}throw new Error("Order should includes start/end fields");case 4:if(!e.order.taker){t.next=6;break}throw new Error("You can't fill private orders");case 6:if(i=w(e),s=i.unitsToFill,o=i.takeIsNft,u=[],o||(u=this.convertOriginFeesToTips(e)),a.signature&&"0x"!==a.signature){t.next=17;break}if(e.order.hash){t.next=12;break}throw new Error("getSeaportOrderSignature error: order.hash does not exist");case 12:return t.next=14,this.getSignature({hash:e.order.hash,protocol:e.order.data.protocol});case 14:if(a.signature=t.sent,a.signature){t.next=17;break}throw new Error("Can't fetch Seaport order signature");case 17:return t.next=19,(0,h.fulfillOrder)(n,this.send.bind(this),a,{unitsToFill:s,tips:u});case 19:return c=t.sent,d=c.functionCall,p=c.options,t.abrupt("return",{functionCall:d,options:p});case 23:case"end":return t.stop()}}),t,this)})))}},{key:"convertOriginFeesToTips",value:function(e){var t,n=e.order.make,r="ERC1155"!==n.assetType.assetClass||(0,d.toBn)(e.amount).isEqualTo(n.value)?(0,d.toBn)(e.order.take.value):(0,d.toBn)(e.order.take.value).div(n.value).multipliedBy(e.amount);return null===(t=e.originFees)||void 0===t?void 0:t.map((function(t){return{token:k(e.order.take.assetType),amount:r.multipliedBy((0,d.toBn)(t.value)).dividedBy(1e4).integerValue(p.BigNumber.ROUND_FLOOR).toFixed(),recipient:t.account}}))}},{key:"getTransactionDataForExchangeWrapper",value:function(e,t,n){return s.__awaiter(this,void 0,void 0,r().mark((function a(){var i,s,o,u,c,d;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.ethereum){r.next=2;break}throw new Error("Wallet undefined");case 2:if(i=w(e),s=i.unitsToFill,o=(0,T.originFeeValueConvert)(t),u=o.totalFeeBasisPoints,e.order.signature&&"0x"!==e.order.signature){r.next=10;break}return r.next=7,this.getSignature({hash:e.order.hash,protocol:e.order.data.protocol});case 7:if(e.order.signature=r.sent,e.order.signature){r.next=10;break}throw new Error("Can't fetch Seaport order signature");case 10:if(this.config.exchange.wrapper){r.next=12;break}throw new Error("Exchange wrapper is not defined for Seaport tx");case 12:return c=e.order.take.assetType,d=n,(0,m.isWeth)(c,this.config.weth)&&(d=(0,T.setFeesCurrency)(d,!0)),r.abrupt("return",(0,v.prepareSeaportExchangeData)(this.ethereum,this.send.bind(this),e.order,{unitsToFill:s,encodedFeesValue:d,totalFeeBasisPoints:u}));case 16:case"end":return r.stop()}}),a,this)})))}},{key:"getAssetToApprove",value:function(e,t){var n=e.order,r=n.make,a=n.take,i=(0,d.toBn)(a.value).div(r.value).multipliedBy(e.amount),s=(0,T.calcValueWithFees)(i,t.totalFeeBasisPoints);return{assetType:a.assetType,value:(0,c.toBigNumber)(s.toFixed())}}},{key:"getBaseOrderFee",value:function(){return this.getBaseOrderFeeConfig("SEAPORT_V1")}},{key:"getOrderFee",value:function(){return 0}}]),e}();function w(e){var t,n=(0,y.isNft)(e.order.take.assetType),r=(0,y.isNft)(e.order.make.assetType),a="ERC1155"===e.order.make.assetType.assetClass||"ERC1155"===e.order.take.assetType.assetClass?e.amount:void 0,i="PARTIAL_RESTRICTED"===e.order.data.orderType||"PARTIAL_OPEN"===e.order.data.orderType;if(n)t=!!a&&a.toString()!==e.order.take.value.toString();else{if(!r)throw new Error("Make/take asset in order is non-nft asset");t=!!a&&a.toString()!==e.order.make.value.toString()}if(!i&&t)throw new Error("Order is not supported partial fill");return{unitsToFill:a,takeIsNft:n}}function k(e){switch(e.assetClass){case"ETH":return c.ZERO_ADDRESS;case"ERC20":return e.contract;default:throw new Error("Asset type should be currency token")}}t.SeaportOrderHandler=g,t.convertOrderType=function(e){switch(e){case o.SeaportOrderType.FULL_OPEN:return b.OrderType.FULL_OPEN;case o.SeaportOrderType.PARTIAL_OPEN:return b.OrderType.PARTIAL_OPEN;case o.SeaportOrderType.FULL_RESTRICTED:return b.OrderType.FULL_RESTRICTED;case o.SeaportOrderType.PARTIAL_RESTRICTED:return b.OrderType.PARTIAL_RESTRICTED;default:throw new Error("Unrecognized order type=".concat(e))}},t.convertItemType=function(e){switch(e){case u.SeaportItemType.NATIVE:return b.ItemType.NATIVE;case u.SeaportItemType.ERC20:return b.ItemType.ERC20;case u.SeaportItemType.ERC721:return b.ItemType.ERC721;case u.SeaportItemType.ERC721_WITH_CRITERIA:return b.ItemType.ERC721_WITH_CRITERIA;case u.SeaportItemType.ERC1155:return b.ItemType.ERC1155;case u.SeaportItemType.ERC1155_WITH_CRITERIA:return b.ItemType.ERC1155_WITH_CRITERIA;default:throw new Error("Unrecognized item type=".concat(e))}},t.getSeaportToken=k},947:function(e,t,n){"use strict";var r=n(20).default,a=n(78).default,i=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.approveBeforeStandardFulfillOrder=t.approveBeforeBasicFulfillOrder=t.fulfillOrder=t.getSeaportContract=void 0;var s=n(19),o=n(73),u=n(121),c=n(2281),d=n(2282),p=n(740),l=n(1256),y=n(741),f=n(742),m=n(304),b=n(743),v=n(741),h=n(2283),T=n(2284),g=n(2285),w=n(303),k=n(943);function x(e){var t=e.ethereum,n=e.send,i=e.order,o=e.tips,u=void 0===o?[]:o,c=e.offererBalancesAndApprovals,d=e.fulfillerBalancesAndApprovals,p=e.timeBasedItemParams,l=e.offererOperator,f=e.fulfillerOperator;return s.__awaiter(this,void 0,void 0,r().mark((function e(){var s,o,m,b,v,h;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=i.parameters,o=s.offer,m=s.consideration,b=[].concat(a(m),a(u)),v=(0,y.validateBasicFulfillBalancesAndApprovals)({offer:o,consideration:b,offererBalancesAndApprovals:c,fulfillerBalancesAndApprovals:d,timeBasedItemParams:p,offererOperator:l,fulfillerOperator:f}),e.next=5,(0,T.getApprovalActions)(t,n,v);case 5:return h=e.sent,e.next=8,Promise.all(h);case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)})))}function O(e){var t=e.ethereum,n=e.send,i=e.order,o=e.tips,u=void 0===o?[]:o,c=e.offererBalancesAndApprovals,d=e.fulfillerBalancesAndApprovals,p=e.timeBasedItemParams,l=e.offererOperator,f=e.fulfillerOperator,m=e.unitsToFill,v=void 0===m?0:m,h=e.totalSize,g=e.totalFilled,w=e.offerCriteria,k=e.considerationCriteria;return s.__awaiter(this,void 0,void 0,r().mark((function e(){var s,o,m,x,O,_,E;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=v?(0,b.mapOrderAmountsFromUnitsToFill)(i,{unitsToFill:v,totalSize:h}):(0,b.mapOrderAmountsFromFilledStatus)(i,{totalFilled:g,totalSize:h}),o=s.parameters,m=o.offer,x=o.consideration,O=[].concat(a(x),a(u)),_=(0,y.validateStandardFulfillBalancesAndApprovals)({offer:m,consideration:O,offerCriteria:w,considerationCriteria:k,offererBalancesAndApprovals:c,fulfillerBalancesAndApprovals:d,timeBasedItemParams:p,offererOperator:l,fulfillerOperator:f}),e.next=6,(0,T.getApprovalActions)(t,n,_);case 6:return E=e.sent,e.next=9,Promise.all(E);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e)})))}t.getSeaportContract=function(e,t){if((0,p.compareCaseInsensitive)(t,w.CROSS_CHAIN_SEAPORT_V1_4_ADDRESS)||(0,p.compareCaseInsensitive)(t,w.CROSS_CHAIN_SEAPORT_V1_5_ADDRESS))return(0,c.createSeaportV14Contract)(e,(0,o.toAddress)(t));if((0,p.compareCaseInsensitive)(t,w.CROSS_CHAIN_SEAPORT_ADDRESS))return(0,d.createSeaportContract)(e,(0,o.toAddress)(t));throw new Error("Unrecognized Seaport protocol")},t.fulfillOrder=function(e,t,n,d){var p=d.tips,y=d.unitsToFill;return s.__awaiter(this,void 0,void 0,r().mark((function s(){var d,T,_,E,A,C,I,S,R,j,P,B,M,F,N,D,L,U,V,W,H,K,z,G,Z;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return d=(0,c.createSeaportV14Contract)(e,(0,o.toAddress)(n.data.protocol)),T=(0,k.convertAPIOrderToSeaport)(n),_=T.parameters,E=_.offerer,A=_.offer,C=_.consideration,r.next=6,e.getFrom();case 6:return I=r.sent,S=w.OPENSEA_CONDUIT_KEY,R=(0,w.getConduitByKey)(_.conduitKey,n.data.protocol),j=(0,w.getConduitByKey)(S,n.data.protocol),P="0x",B=o.ZERO_ADDRESS,M=[],F=[],r.next=16,Promise.all([(0,v.getBalancesAndApprovals)({ethereum:e,owner:E,items:A,criterias:M,operator:R}),(0,v.getBalancesAndApprovals)({ethereum:e,owner:I,items:[].concat(a(A),a(C)),criterias:[].concat(M,F),operator:j}),d.functionCall("getOrderStatus",(0,l.getOrderHash)(_)).call()]);case 16:if(N=r.sent,D=i(N,3),L=D[0],U=D[1],(V=D[2]).totalFilled=(0,u.toBn)(V.totalFilled),V.totalSize=(0,u.toBn)(V.totalSize),W=V.totalFilled,H=V.totalSize,K=(0,f.validateAndSanitizeFromOrderStatus)(T,V),z={startTime:K.parameters.startTime,endTime:K.parameters.endTime,currentBlockTimestamp:Math.floor(Date.now()/1e3),ascendingAmountTimestampBuffer:300},G=(null===p||void 0===p?void 0:p.map((function(e){return Object.assign(Object.assign({},(0,b.mapInputItemToOfferItem)(e)),{recipient:e.recipient})})))||[],Z=B===o.ZERO_ADDRESS,y||!Z||!(0,f.shouldUseBasicFulfill)(K.parameters,W)){r.next=32;break}return r.next=31,x({ethereum:e,send:t,order:T,tips:G,offererBalancesAndApprovals:L,fulfillerBalancesAndApprovals:U,timeBasedItemParams:z,offererOperator:R,fulfillerOperator:j});case 31:return r.abrupt("return",(0,h.getfulfillBasicOrderData)({order:K,timeBasedItemParams:z,conduitKey:S,tips:G,seaportContract:d}));case 32:return r.next=34,O({ethereum:e,send:t,order:K,unitsToFill:y,totalFilled:W,totalSize:H.eq(0)?(0,m.getMaximumSizeForOrder)(K):H,offerCriteria:M,considerationCriteria:F,tips:G,offererBalancesAndApprovals:L,fulfillerBalancesAndApprovals:U,timeBasedItemParams:z,offererOperator:R,fulfillerOperator:j});case 34:return r.abrupt("return",(0,g.getFulfillStandardOrderData)({order:K,unitsToFill:y,totalFilled:W,totalSize:H.eq(0)?(0,m.getMaximumSizeForOrder)(K):H,offerCriteria:M,considerationCriteria:F,tips:G,extraData:P,timeBasedItemParams:z,conduitKey:S,recipientAddress:B,seaportContract:d}));case 35:case"end":return r.stop()}}),s)})))},t.approveBeforeBasicFulfillOrder=x,t.approveBeforeStandardFulfillOrder=O},948:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAmmItemsRoyalties=t.encodeDataWithRoyalties=t.addFeeDependsOnExternalFee=t.getRoyaltiesAmount=t.getMarketData=void 0;var a=n(19),i=n(615),s=n(176),o=n(121),u=n(302),c=n(457),d=n(363);function p(e,t){var n=e.reduce((function(e,t){return e+t.value}),0);return(0,s.toBn)(n).dividedBy(1e4).multipliedBy(t).integerValue(o.BigNumber.ROUND_FLOOR)}function l(e,t){var n,r;if(t)return(0,i.toBigNumber)("0x1"+t.toString().slice(-8).padStart(8,"0"));var a=(0,d.getPackedFeeValue)(null===(n=null===e||void 0===e?void 0:e[0])||void 0===n?void 0:n.value),s=(0,d.getPackedFeeValue)(null===(r=null===e||void 0===e?void 0:e[1])||void 0===r?void 0:r.value);if(a.length>4||s.length>4)throw new Error("Decrease origin fees values: fee_1 = ".concat(a,", fee_2=").concat(s));return(0,i.toBigNumber)("0x1"+a+s)}function y(e){var t=e.royalties,n=e.data,r=e.provider,a={data:n,additionalRoyalties:t.map((function(e){return(0,d.encodeBasisPointsPlusAccount)(e.value,e.account)}))};return console.log("dataForEncoding",JSON.stringify(a,null," ")),r.encodeParameter(c.ADDITIONAL_DATA_STRUCT,a)}function f(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var i,s=this;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.assetType){n.next=2;break}return n.abrupt("return",[]);case 2:if(!Array.isArray(t.assetType)){n.next=9;break}return n.next=5,Promise.all(t.assetType.map((function(t){return a.__awaiter(s,void 0,void 0,r().mark((function n(){var a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.nftItem.getNftItemRoyaltyById({itemId:"".concat(t.contract,":").concat(t.tokenId)});case 2:return a=n.sent,n.abrupt("return",a.royalty||[]);case 4:case"end":return n.stop()}}),n)})))})));case 5:return i=n.sent,n.abrupt("return",i.flat());case 9:return n.next=11,e.nftItem.getNftItemRoyaltyById({itemId:"".concat(t.assetType.contract,":").concat(t.assetType.tokenId)});case 11:if(n.t0=n.sent.royalty,n.t0){n.next=14;break}n.t0=[];case 14:return n.abrupt("return",n.t0);case 15:case"end":return n.stop()}}),n)})))}t.getMarketData=function(e,t,n){var o,c,m,b,v,h=n.request,T=n.fillData,g=n.marketId,w=n.feeValue;return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a,k,x,O,_,E,A,C,I;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=(0,u.getRequiredWallet)(e),k=(0,d.originFeeValueConvert)(h.originFees),x=k.totalFeeBasisPoints,O=k.encodedFeesValue,_=k.feeAddresses,E=(0,d.calcValueWithFees)((0,i.toBigNumber)(null!==(c=null===(o=T.options.value)||void 0===o?void 0:o.toString())&&void 0!==c?c:"0"),x),A={marketId:g,amount:null!==(m=T.options.value)&&void 0!==m?m:"0",fees:null!==w&&void 0!==w?w:O,data:T.data},!h.addRoyalty||!h.assetType){n.next=9;break}return n.next=7,f(t,h);case 7:(null===(C=n.sent)||void 0===C?void 0:C.length)&&(A.data=y({royalties:C,data:T.data,provider:a}),I=p(C,null!==(v=null===(b=T.options.value)||void 0===b?void 0:b.toString())&&void 0!==v?v:0),E=(0,s.toBn)(E.plus(I).toString()),A.fees=l(h.originFees,w));case 9:return console.log("getMarket data",A,E.toString()),n.abrupt("return",{originFees:{totalFeeBasisPoints:x,encodedFeesValue:O,feeAddresses:_},data:A,options:Object.assign(Object.assign({},T.options),{value:E.toString()})});case 11:case"end":return n.stop()}}),n)})))},t.getRoyaltiesAmount=p,t.addFeeDependsOnExternalFee=l,t.encodeDataWithRoyalties=y,t.getAmmItemsRoyalties=f},949:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUpdatedCalldata=void 0;var r=n(73),a=n(301);t.getUpdatedCalldata=function(e){if(null===e||void 0===e?void 0:e.marketplaceMarker){var t=(0,r.toBinary)(e.marketplaceMarker).slice(2).toString();if(!/^[0-9a-f]*$/i.test(t))throw new Error("MarketplaceMarker is not a hex value");if(48!==t.length)throw new Error("MarketplaceMarker has length = ".concat(t.length,", but should be = ").concat(48));return(0,r.toBinary)("0x".concat(t).concat(a.FILL_CALLDATA_TAG))}return(0,r.toBinary)("0x".concat("0".repeat(48)).concat(a.FILL_CALLDATA_TAG))}},950:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getBaseFee=void 0;var a=n(19),i=a.__importDefault(n(119)),s=n(406),o=n(2298);t.getBaseFee=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.CURRENT_ORDER_TYPE_VERSION;return a.__awaiter(this,void 0,void 0,r().mark((function a(){var o,u,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,i.default.get(e.feeConfigUrl);case 3:u=r.sent,o=u.data[t],r.next=12;break;case 7:r.prev=7,r.t0=r.catch(0),console.error(r.t0);try{c=JSON.stringify(r.t0)}catch(a){}throw new s.Warning("Getting fee error ".concat(c));case 12:if(o){r.next=14;break}throw new Error("Fee config was not found for ".concat(t));case 14:if(n in o){r.next=16;break}throw new Error("Unsupported fee type ".concat(n));case 16:return r.abrupt("return",Number(o[n]||0));case 17:case"end":return r.stop()}}),a,null,[[0,7]])})))}},954:function(e,t,n){"use strict";var r=n(20).default,a=n(48).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getCallableExtraFields=t.getInternalLoggerMiddleware=t.getErrorMessageString=t.formatDefaultError=t.getWalletInfo=t.loggerConfig=void 0;var i=n(19),s=n(252),o=n(89),u=i.__importDefault(n(119)),c=n(298),d=n(427),p=n(1291),l=n(408),y=n(306),f=n(2565);function m(e){return"unknown (".concat(b(e),")")}function b(e){try{return e?"string"===typeof e?e:e instanceof Error?(0,f.getExecRevertedMessage)(e.message):e.message?"string"===typeof e.message?(0,f.getExecRevertedMessage)(e.message):JSON.stringify(e.message):void 0!==e.status&&void 0!==e.statusText?JSON.stringify({url:e.url,status:e.status,statusText:e.statusText}):JSON.stringify(e):"not defined"}catch(t){return"getErrorMessageString parse error: ".concat(null===t||void 0===t?void 0:t.message)}}function v(e){var t;if((0,c.isCancelMessage)(null===e||void 0===e?void 0:e.message)||(0,c.isCancelCode)(null===(t=null===e||void 0===e?void 0:e.error)||void 0===t?void 0:t.code))return new c.UserCancelError(e)}t.loggerConfig={service:"union-sdk",elkUrl:"https://logging.rarible.com/"},t.getWalletInfo=function(e){var t,n;return i.__awaiter(this,void 0,void 0,r().mark((function i(){var s,u,d,p,l,y,f,b,v,h,T,g,w,k;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:s={"wallet.blockchain":e.walletType},r.t0=e.walletType,r.next=r.t0===o.WalletType.ETHEREUM?4:r.t0===o.WalletType.FLOW?13:r.t0===o.WalletType.TEZOS?22:r.t0===o.WalletType.SOLANA?32:r.t0===o.WalletType.IMMUTABLEX?34:39;break;case 4:return r.next=6,Promise.allSettled([e.ethereum.getChainId(),e.ethereum.getFrom()]);case 6:return u=r.sent,d=a(u,2),p=d[0],l=d[1],s["wallet.address"]="fulfilled"===l.status?null===(t=null===l||void 0===l?void 0:l.value)||void 0===t?void 0:t.toLowerCase():m(l.reason),s["wallet.chainId"]="fulfilled"===p.status?null===p||void 0===p?void 0:p.value:m(p.reason),r.abrupt("break",40);case 13:return r.next=15,(0,c.promiseSettledRequest)([e.fcl.currentUser().snapshot(),"function"===typeof e.auth?e.auth():void 0]);case 15:return y=r.sent,f=a(y,2),b=f[0],v=f[1],s["wallet.address"]=(null===b||void 0===b?void 0:b.addr)||(null===v||void 0===v?void 0:v.addr),s["wallet.flow.chainId"]=null===b||void 0===b?void 0:b.cid,r.abrupt("break",40);case 22:return s["wallet.tezos.kind"]=e.provider.kind,r.next=25,Promise.allSettled([e.provider.chain_id(),e.provider.address()]);case 25:return h=r.sent,T=a(h,2),g=T[0],w=T[1],s["wallet.address"]="fulfilled"===w.status?w.value:m(w.reason),s["wallet.tezos.chainId"]="fulfilled"===g.status?g.value:m(g.reason),r.abrupt("break",40);case 32:return s["wallet.address"]=null===(n=e.provider.publicKey)||void 0===n?void 0:n.toString(),r.abrupt("break",40);case 34:return k=e.wallet.getConnectionData(),s["wallet.address"]=k.address,s["wallet.network"]=k.ethNetwork,s["wallet.starkPubkey"]=k.starkPublicKey,r.abrupt("break",40);case 39:s["wallet.address"]="unknown";case 40:return r.abrupt("return",s);case 41:case"end":return r.stop()}}),i)})))},t.formatDefaultError=m,t.getErrorMessageString=b,t.getInternalLoggerMiddleware=function(e,n,a){var o=this,c=null!==a&&void 0!==a?a:new s.RemoteLogger((function(e){return u.default.post(t.loggerConfig.elkUrl,e)}),{initialContext:(0,p.getSdkContext)(n),dropBatchInterval:1e3,maxByteSize:30720});return function(t,a){return i.__awaiter(o,void 0,void 0,r().mark((function s(){var o,u=this;return r().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return o=Date.now(),s.abrupt("return",[t,function(s){return i.__awaiter(u,void 0,void 0,r().mark((function i(){var u,p;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return p=new f.LoggerDataContainer({args:a,callable:t,responsePromise:s,sdkContext:n,startTime:o}),r.prev=1,r.next=4,s;case 4:if(!(e>=d.LogsLevel.TRACE)){r.next=10;break}return r.t0=c,r.next=8,p.getTraceData();case 8:r.t1=r.sent,r.t0.raw.call(r.t0,r.t1);case 10:r.next=16;break;case 12:r.prev=12,r.t2=r.catch(1),u=v(r.t2),e>=d.LogsLevel.ERROR&&c.raw(p.getErrorData(u||r.t2));case 16:return r.abrupt("return",u?s.catch((function(){throw u})):s);case 17:case"end":return r.stop()}}),i,null,[[1,12]])})))}]);case 2:case"end":return s.stop()}}),s)})))}},t.getCallableExtraFields=function(e){var t,n,r,a,i,s,o,u;try{if("string"!==typeof(null===e||void 0===e?void 0:e.name))return{};if(function(e){var t;return e instanceof l.WrappedAdvancedFn||"WrappedAdvancedFn"===(null===(t=null===e||void 0===e?void 0:e.constructor)||void 0===t?void 0:t.name)}(e)){var c=e.parent;if(null===e||void 0===e?void 0:e.name.startsWith("order.buy.prepare.submit")){var d=null===c||void 0===c?void 0:c.args[0];return{orderId:(0,y.getOrderIdFromFillRequest)(d),platform:null===(n=null===(t=null===c||void 0===c?void 0:c.context)||void 0===t?void 0:t.orderData)||void 0===n?void 0:n.platform,collectionId:null===(a=null===(r=null===c||void 0===c?void 0:c.context)||void 0===r?void 0:r.orderData)||void 0===a?void 0:a.nftCollection}}if(null===e||void 0===e?void 0:e.name.startsWith("order.batchBuy.prepare.submit")){var p=null===c||void 0===c?void 0:c.args[0],f=Array.isArray(p)?p.map((function(e){return(0,y.getOrderIdFromFillRequest)(e)})).join(","):null,m=null===c||void 0===c?void 0:c.context,b=Array.isArray(null===m||void 0===m?void 0:m.prepared)?null===m||void 0===m?void 0:m.prepared.reduce((function(e,t){var n,r;return(null===(n=null===t||void 0===t?void 0:t.orderData)||void 0===n?void 0:n.platform)&&!e.includes(null===(r=null===t||void 0===t?void 0:t.orderData)||void 0===r?void 0:r.platform)&&e.push(t.orderData.platform),e}),[]).join(","):null,v=Array.isArray(null===m||void 0===m?void 0:m.prepared)?null===m||void 0===m?void 0:m.prepared.reduce((function(e,t){var n,r;return(null===(n=null===t||void 0===t?void 0:t.orderData)||void 0===n?void 0:n.nftCollection)&&!e.includes(null===(r=null===t||void 0===t?void 0:t.orderData)||void 0===r?void 0:r.nftCollection)&&e.push(t.orderData.nftCollection),e}),[]).join(","):null;return{orderId:"[".concat(f,"]"),platform:"[".concat(b,"]"),collectionId:"[".concat(v,"]")}}if(null===e||void 0===e?void 0:e.name.startsWith("order.bid.prepare.submit")){var h=null===c||void 0===c?void 0:c.args[0];return h?{itemId:"itemId"in h?h.itemId:void 0,collectionId:"collectionId"in h?h.collectionId:(0,y.getCollectionFromItemId)(h.itemId)}:{}}if(null===e||void 0===e?void 0:e.name.startsWith("order.bidUpdate.prepare.submit")){var T=null===c||void 0===c?void 0:c.args[0];return{orderId:null===T||void 0===T?void 0:T.orderId}}if(null===e||void 0===e?void 0:e.name.startsWith("order.cancel")){var g=null===c||void 0===c?void 0:c.args[0];return{orderId:null===g||void 0===g?void 0:g.orderId}}if(null===e||void 0===e?void 0:e.name.startsWith("order.sell.prepare.submit")){var w=null===c||void 0===c?void 0:c.args[0];return{itemId:null===w||void 0===w?void 0:w.itemId,collectionId:w?(0,y.getCollectionFromItemId)(w.itemId):void 0}}if(null===e||void 0===e?void 0:e.name.startsWith("order.sellUpdate.prepare.submit")){var k=null===c||void 0===c?void 0:c.args[0];return{orderId:null===k||void 0===k?void 0:k.orderId,collectionId:null===(s=null===(i=null===c||void 0===c?void 0:c.context)||void 0===i?void 0:i.orderData)||void 0===s?void 0:s.nftCollection}}if(null===e||void 0===e?void 0:e.name.startsWith("order.acceptBid.prepare.submit")){var x=null===c||void 0===c?void 0:c.args[0];return{orderId:(0,y.getOrderIdFromFillRequest)(x),collectionId:null===(u=null===(o=null===c||void 0===c?void 0:c.context)||void 0===o?void 0:o.orderData)||void 0===u?void 0:u.nftCollection}}if(null===e||void 0===e?void 0:e.name.startsWith("nft.transfer.prepare.submit")){var O=null===c||void 0===c?void 0:c.args[0];if(null===O||void 0===O?void 0:O.itemId)return{collectionId:(0,y.getCollectionFromItemId)(O.itemId)}}if(null===e||void 0===e?void 0:e.name.startsWith("nft.mint.prepare.submit")){var _=null===c||void 0===c?void 0:c.args[0];if(_)return{collectionId:(0,y.getContractFromMintRequest)(_)}}if(null===e||void 0===e?void 0:e.name.startsWith("nft.burn.prepare.submit")){var E=null===c||void 0===c?void 0:c.args[0];if(E)return{collectionId:(0,y.getCollectionFromItemId)(E.itemId)}}}}catch(A){}return{}}},961:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getTokensAmount=t.getPrice=t.getItemId=t.getMintId=t.getOrderData=t.getPreparedOrder=t.getOrderId=void 0;var a=n(19),i=a.__importDefault(n(53)),s=n(173),o=n(64),u=n(533);t.getOrderId=function(e,t,n,r){var a=(new TextEncoder).encode(t+n+e+r);return(0,o.toOrderId)("SOLANA:"+(0,s.keccak256)(a))},t.getPreparedOrder=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!("order"in e)){n.next=2;break}return n.abrupt("return",e.order);case 2:if(!("orderId"in e)){n.next=4;break}return n.abrupt("return",t.order.getOrderById({id:e.orderId}));case 4:throw new Error("Incorrect request");case 5:case"end":return n.stop()}}),n)})))},t.getOrderData=function(e){var t;if("SOLANA_AUCTION_HOUSE_V1"===(null===(t=e.data)||void 0===t?void 0:t["@type"]))return e.data;throw new Error("Not an auction house order")},t.getMintId=function(e){if("SOLANA_NFT"===e.make.type["@type"])return(0,u.extractPublicKey)(e.make.type.itemId);if("SOLANA_NFT"===e.take.type["@type"])return(0,u.extractPublicKey)(e.take.type.itemId);throw new Error("Unsupported type")},t.getItemId=function(e){return(0,o.toItemId)("SOLANA:"+e.toString())},t.getPrice=function(e){if("SOLANA_SOL"===e.take.type["@type"])return new i.default(e.take.value);if("SOLANA_SOL"===e.make.type["@type"])return new i.default(e.make.value);throw new Error("Unsupported currency type")},t.getTokensAmount=function(e){if("SOLANA_NFT"===e.make.type["@type"])return new i.default(e.make.value);if("SOLANA_NFT"===e.take.type["@type"])return new i.default(e.take.value);throw new Error("Unsupported asset type")}},962:function(e,t,n){"use strict";var r=n(20).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAuctionHouseFee=t.getAuctionHouse=void 0;var a=n(19),i=n(752),s=n(533),o={raria47jXd4tdW6Dj7T64mgahwTjMsVaDwFxMHt9Jbp:0};t.getAuctionHouse=function(e,t){if("SOLANA_SOL"===e["@type"])return t&&t.SOLANA_SOL?(0,i.toPublicKey)(t.SOLANA_SOL.address):(0,i.toPublicKey)("raria47jXd4tdW6Dj7T64mgahwTjMsVaDwFxMHt9Jbp");if("SOLANA_NFT"===e["@type"]){var n=(0,s.extractAddress)(e.itemId);if(t&&t[n])return(0,i.toPublicKey)(t[n].address)}throw new Error("Auction House for specified currency not found")},t.getAuctionHouseFee=function(e,t){return a.__awaiter(this,void 0,void 0,r().mark((function n(){var a,i;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=e.toString(),!t){n.next=5;break}if(!(i=Object.values(t).find((function(e){return e.address===a})))){n.next=5;break}return n.abrupt("return",i.baseFee);case 5:if(void 0!==o[a]){n.next=7;break}throw new Error("No fee info found for specified Auction House");case 7:return n.abrupt("return",o[a]);case 8:case"end":return n.stop()}}),n)})))}},987:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFlowBaseFee=void 0,t.getFlowBaseFee=function(e){return parseInt(e.order.getProtocolFee().sellerFee.value)}}},[[3979,1,2]]]); +//# sourceMappingURL=main.4918d51a.chunk.js.map \ No newline at end of file diff --git a/static/js/runtime-main.cda067ba.js b/static/js/runtime-main.cda067ba.js new file mode 100644 index 000000000..7bad2423b --- /dev/null +++ b/static/js/runtime-main.cda067ba.js @@ -0,0 +1,2 @@ +!function(e){function r(r){for(var n,a,i=r[0],c=r[1],l=r[2],p=0,s=[];p