/*! For license information please see main.ef7ee39b.js.LICENSE.txt */ !function(){var e={2956:function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=[],r=0,i=0;ie.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function i(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(c(e))}function o(e,t){if(e<56)return Uint8Array.from([e+t]);var n=p(e),r=p(t+55+n.length/2);return Uint8Array.from(d(r+n))}function a(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("undefined"===typeof e||null===e||0===e.length)return Uint8Array.from([]);var n=s(m(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function s(e){var t,n,o,a,u,c=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,o=128===l?Uint8Array.from([]):r(e,1,t),2===t&&o[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:o,remainder:e.slice(t)}}if(l<=191){if(n=l-182,e.length-1e.length)throw new Error("invalid RLP: total length is larger than the data");for(a=r(e,n,d);a.length;)u=s(a),c.push(u.data),a=u.remainder;return{data:c,remainder:e.slice(d)}}t.yH=void 0;var u=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));function c(e){for(var t="",n=0;n=2&&"0"===e[0]&&"x"===e[1]}function m(e){if(e instanceof Uint8Array)return e;if("string"===typeof e)return v(e)?d((t="string"!==typeof(n=e)?n:v(n)?n.slice(2):n).length%2?"0".concat(t):t):h(e);var t,n;if("number"===typeof e||"bigint"===typeof e)return e?d(p(e)):Uint8Array.from([]);if(null===e||void 0===e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.yH={encode:n,decode:a}},2056:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});var r="abi/5.7.0"},5054:function(e,t,n){"use strict";n.d(t,{R:function(){return N},$:function(){return Z}});var r=n(5671),i=n(3144),o=n(9716),a=n(520),s=n(9502),u=n(2056),c=n(3198),l=n(136),d=n(9388),f=n(7419),h=function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(e){return(0,r.Z)(this,n),t.call(this,"address","address",e,!1)}return(0,i.Z)(n,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{t=(0,f.Kn)(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return(0,f.Kn)((0,o.$m)(e.readValue().toHexString(),20))}}]),n}(c.XI),p=function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(e){var i;return(0,r.Z)(this,n),(i=t.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,i}return(0,i.Z)(n,[{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)}}]),n}(c.XI),v=new s.Yd(u.i);function m(e,t,n){var r=null;if(Array.isArray(n))r=n;else if(n&&"object"===typeof n){var i={};r=t.map((function(e){var t=e.localName;return t||v.throwError("cannot encode object for signature with missing names",s.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:n}),i[t]&&v.throwError("cannot encode object for signature with duplicate names",s.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:n}),i[t]=!0,n[t]}))}else v.throwArgumentError("invalid tuple value","tuple",n);t.length!==r.length&&v.throwArgumentError("types/value length mismatch","tuple",n);var o=new c.QV(e.wordSize),a=new c.QV(e.wordSize),u=[];t.forEach((function(e,t){var n=r[t];if(e.dynamic){var i=a.length;e.encode(a,n);var s=o.writeUpdatableValue();u.push((function(e){s(e+i)}))}else e.encode(o,n)})),u.forEach((function(e){e(o.length)}));var l=e.appendWriter(o);return l+=e.appendWriter(a)}function y(e,t){var n=[],r=e.subReader(0);t.forEach((function(t){var i=null;if(t.dynamic){var o=e.readValue(),a=r.subReader(o.toNumber());try{i=t.decode(a)}catch(u){if(u.code===s.Yd.errors.BUFFER_OVERRUN)throw u;(i=u).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(u){if(u.code===s.Yd.errors.BUFFER_OVERRUN)throw u;(i=u).baseType=t.name,i.name=t.localName,i.type=t.type}void 0!=i&&n.push(i)}));var i=t.reduce((function(e,t){var n=t.localName;return n&&(e[n]||(e[n]=0),e[n]++),e}),{});t.forEach((function(e,t){var r=e.localName;if(r&&1===i[r]&&("length"===r&&(r="_length"),null==n[r])){var o=n[t];o instanceof Error?Object.defineProperty(n,r,{enumerable:!0,get:function(){throw o}}):n[r]=o}}));for(var o=function(){var e=n[a];e instanceof Error&&Object.defineProperty(n,a,{enumerable:!0,get:function(){throw e}})},a=0;a=0?i:"")+"]",u=-1===i||e.dynamic;return(a=t.call(this,"array",s,o,u)).coder=e,a.length=i,a}return(0,i.Z)(n,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],n=0;ne._data.length&&v.throwError("insufficient data length",s.Yd.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var n=[],r=0;r256||r%8!==0)&&M.throwArgumentError("invalid "+n[1]+" bit length","param",e),new T(r/8,"int"===n[1],e.name)}if(n=e.type.match(j)){var i=parseInt(n[1]);return(0===i||i>32)&&M.throwArgumentError("invalid bytes length","param",e),new _(i,e.name)}return M.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new c.Ej(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new c.QV(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,n=e.map((function(e){return t._getCoder(I._R.from(e))}));return new O(n,"_").defaultValue()}},{key:"encode",value:function(e,t){var n=this;e.length!==t.length&&M.throwError("types/values length mismatch",s.Yd.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var r=e.map((function(e){return n._getCoder(I._R.from(e))})),i=new O(r,"_"),o=this._getWriter();return i.encode(o,t),o.data}},{key:"decode",value:function(e,t,n){var r=this,i=e.map((function(e){return r._getCoder(I._R.from(e))}));return new O(i,"_").decode(this._getReader((0,o.lE)(t),n))}}]),e}(),Z=new N},3198:function(e,t,n){"use strict";n.d(t,{BR:function(){return d},Ej:function(){return p},QV:function(){return h},XI:function(){return f}});var r=n(5671),i=n(3144),o=n(9716),a=n(2257),s=n(520),u=n(9502),c=n(2056),l=new u.Yd(c.i);function d(e){var t=[];return function e(n,r){if(Array.isArray(r))for(var i in r){var o=n.slice();o.push(i);try{e(o,r[i])}catch(a){t.push({path:o,error:a})}}}([],e),t}var f=function(){function e(t,n,i,o){(0,r.Z)(this,e),this.name=t,this.type=n,this.localName=i,this.dynamic=o}return(0,i.Z)(e,[{key:"_throwError",value:function(e,t){l.throwArgumentError(e,this.localName,t)}}]),e}(),h=function(){function e(t){(0,r.Z)(this,e),(0,s.zG)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return(0,i.Z)(e,[{key:"data",get:function(){return(0,o.xs)(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.zo)(e._data))}},{key:"writeBytes",value:function(e){var t=(0,o.lE)(e),n=t.length%this.wordSize;return n&&(t=(0,o.zo)([t,this._padding.slice(n)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=(0,o.lE)(a.O$.from(e));return t.length>this.wordSize&&l.throwError("value out-of-bounds",u.Yd.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,o.zo)([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(n){e._data[t]=e._getValue(n)}}}]),e}(),p=function(){function e(t,n,i,a){(0,r.Z)(this,e),(0,s.zG)(this,"_data",(0,o.lE)(t)),(0,s.zG)(this,"wordSize",n||32),(0,s.zG)(this,"_coerceFunc",i),(0,s.zG)(this,"allowLoose",a),this._offset=0}return(0,i.Z)(e,[{key:"data",get:function(){return(0,o.Dv)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,n){return this._coerceFunc?this._coerceFunc(t,n):e.coerce(t,n)}},{key:"_peekBytes",value:function(e,t,n){var r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?r=t:l.throwError("data out-of-bounds",u.Yd.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}},{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 n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}},{key:"readValue",value:function(){return a.O$.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}}]),e}()},3165:function(e,t,n){"use strict";n.d(t,{HY:function(){return x},IC:function(){return P},QV:function(){return k},Xg:function(){return E},YW:function(){return C},_R:function(){return b},pc:function(){return y}});var r=n(136),i=n(9388),o=n(5671),a=n(3144),s=n(2257),u=n(520),c=n(9502),l=n(2056),d=new c.Yd(l.i),f={},h={calldata:!0,memory:!0,storage:!0},p={calldata:!0,memory:!0};function v(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 n in t)(0,u.zG)(e,n,t[n])}var y=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),g=new RegExp(/^(.*)\[([0-9]*)\]$/),b=function(){function e(t,n){(0,o.Z)(this,e),t!==f&&d.throwError("use fromString",c.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),m(this,n);var r=this.type.match(g);m(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:e.fromObject({type:r[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,a.Z)(e,[{key:"format",value:function(e){if(e||(e=y.sighash),y[e]||d.throwArgumentError("invalid format type","format",e),e===y.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 n="";return"array"===this.baseType?(n+=this.arrayChildren.format(e),n+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==y.sighash&&(n+=this.type),n+="("+this.components.map((function(t){return t.format(e)})).join(e===y.full?", ":",")+")"):n+=this.type,e!==y.sighash&&(!0===this.indexed&&(n+=" indexed"),e===y.full&&this.name&&(n+=" "+this.name)),n}}],[{key:"from",value:function(t,n){return"string"===typeof t?e.fromString(t,n):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(f,{name:t.name||null,type:R(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,n){return r=function(e,t){var n=e;function r(t){d.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){var n={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(n.indexed=!1),n}e=e.replace(/\s/g," ");for(var o={type:"",name:"",state:{allowType:!0}},a=o,s=0;s2&&d.throwArgumentError("invalid human-readable ABI signature","value",e),n[1].match(/^[0-9]+$/)||d.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=s.O$.from(n[1]),n[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 S(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 E=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,o.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n,[{key:"format",value:function(e){if(e||(e=y.sighash),y[e]||d.throwArgumentError("invalid format type","format",e),e===y.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===y.sighash&&d.throwError("cannot format a constructor for sighash",c.Yd.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===y.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?n.fromString(e):n.fromObject(e)}},{key:"fromObject",value:function(e){if(n.isConstructorFragment(e))return e;"constructor"!==e.type&&d.throwArgumentError("invalid constructor object","value",e);var t=S(e);t.constant&&d.throwArgumentError("constructor cannot be constant","value",e);var r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(b.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?s.O$.from(e.gas):null};return new n(f,r)}},{key:"fromString",value:function(e){var t={type:"constructor"},r=(e=A(e,t)).match(M);return r&&"constructor"===r[1].trim()||d.throwArgumentError("invalid constructor string","value",e),t.inputs=w(r[2].trim(),!1),_(r[3].trim(),t),n.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),n}(x),C=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,o.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n,[{key:"format",value:function(e){if(e||(e=y.sighash),y[e]||d.throwArgumentError("invalid format type","format",e),e===y.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!==y.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===y.full?", ":",")+") ",e!==y.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?n.fromString(e):n.fromObject(e)}},{key:"fromObject",value:function(e){if(n.isFunctionFragment(e))return e;"function"!==e.type&&d.throwArgumentError("invalid function object","value",e);var t=S(e),r={type:e.type,name:I(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(b.fromObject):[],outputs:e.outputs?e.outputs.map(b.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?s.O$.from(e.gas):null};return new n(f,r)}},{key:"fromString",value:function(e){var t={type:"function"},r=(e=A(e,t)).split(" returns ");r.length>2&&d.throwArgumentError("invalid function string","value",e);var i=r[0].match(M);if(i||d.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&I(t.name),t.inputs=w(i[2],!1),_(i[3].trim(),t),r.length>1){var o=r[1].match(M);""==o[1].trim()&&""==o[3].trim()||d.throwArgumentError("unexpected tokens","value",e),t.outputs=w(o[2],!1)}else t.outputs=[];return n.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),n}(E);function T(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 P=function(e){(0,r.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,o.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n,[{key:"format",value:function(e){if(e||(e=y.sighash),y[e]||d.throwArgumentError("invalid format type","format",e),e===y.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!==y.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===y.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"===typeof e?n.fromString(e):n.fromObject(e)}},{key:"fromObject",value:function(e){if(n.isErrorFragment(e))return e;"error"!==e.type&&d.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:I(e.name),inputs:e.inputs?e.inputs.map(b.fromObject):[]};return T(new n(f,t))}},{key:"fromString",value:function(e){var t={type:"error"},r=e.match(M);return r||d.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&I(t.name),t.inputs=w(r[2],!1),T(n.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),n}(x);function R(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var O=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function I(e){return e&&e.match(O)||d.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var M=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},7303:function(e,t,n){"use strict";n.d(t,{CC:function(){return g},Hk:function(){return x},vU:function(){return _},vk:function(){return b}});var r=n(3144),i=n(5671),o=n(136),a=n(9388),s=n(7419),u=n(2257),c=n(9716),l=n(1583),d=n(8062),f=n(520),h=n(5054),p=n(3165),v=n(9502),m=n(2056),y=new v.Yd(m.i),g=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){return(0,i.Z)(this,n),t.apply(this,arguments)}return(0,r.Z)(n)}(f.dk),b=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){return(0,i.Z)(this,n),t.apply(this,arguments)}return(0,r.Z)(n)}(f.dk),w=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){return(0,i.Z)(this,n),t.apply(this,arguments)}return(0,r.Z)(n)}(f.dk),x=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){return(0,i.Z)(this,n),t.apply(this,arguments)}return(0,r.Z)(n,null,[{key:"isIndexed",value:function(e){return!(!e||!e._isIndexed)}}]),n}(f.dk),k={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function A(e,t){var n=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return n.error=t,n}var _=function(){function e(t){var n=this;(0,i.Z)(this,e);var r=[];r="string"===typeof t?JSON.parse(t):t,(0,f.zG)(this,"fragments",r.map((function(e){return p.HY.from(e)})).filter((function(e){return null!=e}))),(0,f.zG)(this,"_abiCoder",(0,f.tu)(this instanceof e?this.constructor:void 0,"getAbiCoder")()),(0,f.zG)(this,"functions",{}),(0,f.zG)(this,"errors",{}),(0,f.zG)(this,"events",{}),(0,f.zG)(this,"structs",{}),this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":return n.deploy?void y.warn("duplicate definition - constructor"):void(0,f.zG)(n,"deploy",e);case"function":t=n.functions;break;case"event":t=n.events;break;case"error":t=n.errors;break;default:return}var r=e.format();t[r]?y.warn("duplicate definition - "+r):t[r]=e})),this.deploy||(0,f.zG)(this,"deploy",p.Xg.from({payable:!1,type:"constructor"})),(0,f.zG)(this,"_isInterface",!0)}return(0,r.Z)(e,[{key:"format",value:function(e){e||(e=p.pc.full),e===p.pc.sighash&&y.throwArgumentError("interface does not support formatting sighash","format",e);var t=this.fragments.map((function(t){return t.format(e)}));return e===p.pc.json?JSON.stringify(t.map((function(e){return JSON.parse(e)}))):t}},{key:"getFunction",value:function(e){if((0,c.A7)(e)){for(var t in this.functions)if(e===this.getSighash(t))return this.functions[t];y.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),r=Object.keys(this.functions).filter((function(e){return e.split("(")[0]===n}));return 0===r.length?y.throwArgumentError("no matching function","name",n):r.length>1&&y.throwArgumentError("multiple matching functions","name",n),this.functions[r[0]]}var i=this.functions[p.YW.fromString(e).format()];return i||y.throwArgumentError("no matching function","signature",e),i}},{key:"getEvent",value:function(e){if((0,c.A7)(e)){var t=e.toLowerCase();for(var n in this.events)if(t===this.getEventTopic(n))return this.events[n];y.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var r=e.trim(),i=Object.keys(this.events).filter((function(e){return e.split("(")[0]===r}));return 0===i.length?y.throwArgumentError("no matching event","name",r):i.length>1&&y.throwArgumentError("multiple matching events","name",r),this.events[i[0]]}var o=this.events[p.QV.fromString(e).format()];return o||y.throwArgumentError("no matching event","signature",e),o}},{key:"getError",value:function(e){if((0,c.A7)(e)){var t=(0,f.tu)(this.constructor,"getSighash");for(var n in this.errors){if(e===t(this.errors[n]))return this.errors[n]}y.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var r=e.trim(),i=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===r}));return 0===i.length?y.throwArgumentError("no matching error","name",r):i.length>1&&y.throwArgumentError("multiple matching errors","name",r),this.errors[i[0]]}var o=this.errors[p.YW.fromString(e).format()];return o||y.throwArgumentError("no matching error","signature",e),o}},{key:"getSighash",value:function(e){if("string"===typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(n){throw t}}return(0,f.tu)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"===typeof e&&(e=this.getEvent(e)),(0,f.tu)(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 n=(0,c.lE)(t);return(0,c.Dv)(n.slice(0,4))!==this.getSighash(e)&&y.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",(0,c.Dv)(n)),this._decodeParams(e.inputs,n.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"===typeof e&&(e=this.getError(e)),(0,c.Dv)((0,c.zo)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var n=(0,c.lE)(t);return(0,c.Dv)(n.slice(0,4))!==this.getSighash(e)&&y.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",(0,c.Dv)(n)),this._decodeParams(e.inputs,n.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),(0,c.Dv)((0,c.zo)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var n=(0,c.lE)(t),r=null,i="",o=null,a=null,s=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch(d){}break;case 4:var u=(0,c.Dv)(n.slice(0,4)),l=k[u];if(l)o=this._abiCoder.decode(l.inputs,n.slice(4)),a=l.name,s=l.signature,l.reason&&(r=o[0]),"Error"===a?i="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(o[0])):"Panic"===a&&(i="; VM Exception while processing transaction: reverted with panic code ".concat(o[0]));else try{var d=this.getError(u);o=this._abiCoder.decode(d.inputs,n.slice(4)),a=d.name,s=d.format()}catch(d){}}return y.throwError("call revert exception"+i,v.Yd.errors.CALL_EXCEPTION,{method:e.format(),data:(0,c.Dv)(t),errorArgs:o,errorName:a,errorSignature:s,reason:r})}},{key:"encodeFunctionResult",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),(0,c.Dv)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var n=this;"string"===typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&y.throwError("too many arguments for "+e.format(),v.Yd.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var r=[];e.anonymous||r.push(this.getEventTopic(e));var i=function(e,t){return"string"===e.type?(0,l.id)(t):"bytes"===e.type?(0,d.w)((0,c.Dv)(t)):("bool"===e.type&&"boolean"===typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=u.O$.from(t).toHexString()),"address"===e.type&&n._abiCoder.encode(["address"],[t]),(0,c.$m)((0,c.Dv)(t),32))};for(t.forEach((function(t,n){var o=e.inputs[n];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?y.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((function(e){return i(o,e)}))):r.push(i(o,t)):null!=t&&y.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}},{key:"encodeEventLog",value:function(e,t){var n=this;"string"===typeof e&&(e=this.getEvent(e));var r=[],i=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&y.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,a){var s=t[a];if(e.indexed)if("string"===e.type)r.push((0,l.id)(s));else if("bytes"===e.type)r.push((0,d.w)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(n._abiCoder.encode([e.type],[s]))}else i.push(e),o.push(s)})),{data:this._abiCoder.encode(i,o),topics:r}}},{key:"decodeEventLog",value:function(e,t,n){if("string"===typeof e&&(e=this.getEvent(e)),null!=n&&!e.anonymous){var r=this.getEventTopic(e);(0,c.A7)(n[0],32)&&n[0].toLowerCase()===r||y.throwError("fragment/topic mismatch",v.Yd.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:r,value:n[0]}),n=n.slice(1)}var i=[],o=[],a=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(i.push(p._R.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(i.push(e),a.push(!1)):(o.push(e),a.push(!1))}));var s=null!=n?this._abiCoder.decode(i,(0,c.zo)(n)):null,u=this._abiCoder.decode(o,t,!0),l=[],d=0,f=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)l[t]=new x({_isIndexed:!0,hash:null});else if(a[t])l[t]=new x({_isIndexed:!0,hash:s[f++]});else try{l[t]=s[f++]}catch(r){l[t]=r}else try{l[t]=u[d++]}catch(r){l[t]=r}if(e.name&&null==l[e.name]){var n=l[t];n instanceof Error?Object.defineProperty(l,e.name,{enumerable:!0,get:function(){throw A("property ".concat(JSON.stringify(e.name)),n)}}):l[e.name]=n}}));for(var h=function(e){var t=l[e];t instanceof Error&&Object.defineProperty(l,e,{enumerable:!0,get:function(){throw A("index ".concat(e),t)}})},m=0;m=0)throw e;return f.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:n})}))),null==n.chainId?n.chainId=this.getChainId():n.chainId=Promise.all([Promise.resolve(n.chainId),this.getChainId()]).then((function(t){return 0!==t[1]&&t[0]!==t[1]&&f.throwArgumentError("chainId address mismatch","transaction",e),t[0]})),t.next=23,(0,c.mE)(n);case 23:return t.abrupt("return",t.sent);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"_checkProvider",value:function(e){this.provider||f.throwError("missing provider",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}}],[{key:"isSigner",value:function(e){return!(!e||!e._isSigner)}}]),e}(),m=function(e){(0,i.Z)(n,e);var t=(0,o.Z)(n);function n(e,i){var o;return(0,s.Z)(this,n),o=t.call(this),(0,c.zG)((0,r.Z)(o),"address",e),(0,c.zG)((0,r.Z)(o),"provider",i||null),o}return(0,u.Z)(n,[{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"_fail",value:function(e,t){return Promise.resolve().then((function(){f.throwError(e,l.Yd.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,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}},{key:"connect",value:function(e){return new n(this.address,e)}}]),n}(v)},7419:function(e,t,n){"use strict";n.d(t,{Kn:function(){return v},CR:function(){return g},hB:function(){return b},vU:function(){return y},UJ:function(){return m}});var r=n(9716),i=n(2257),o=n(8062),a=n(7986),s=new(n(9502).Yd)("address/5.7.0");function u(e){(0,r.A7)(e,20)||s.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),n=new Uint8Array(40),i=0;i<40;i++)n[i]=t[i].charCodeAt(0);for(var a=(0,r.lE)((0,o.w)(n)),u=0;u<40;u+=2)a[u>>1]>>4>=8&&(t[u]=t[u].toUpperCase()),(15&a[u>>1])>=8&&(t[u+1]=t[u+1].toUpperCase());return"0x"+t.join("")}for(var c={},l=0;l<10;l++)c[String(l)]=String(l);for(var d=0;d<26;d++)c[String.fromCharCode(65+d)]=String(10+d);var f,h=Math.floor((f=9007199254740991,Math.log10?Math.log10(f):Math.log(f)/Math.LN10));function p(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>=h;){var n=t.substring(0,h);t=parseInt(n,10)%97+t.substring(n.length)}for(var r=String(98-parseInt(t,10)%97);r.length<2;)r="0"+r;return r}function v(e){var t=null;if("string"!==typeof e&&s.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=u(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&s.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)!==p(e)&&s.throwArgumentError("bad icap checksum","address",e),t=(0,i.g$)(e.substring(4));t.length<40;)t="0"+t;t=u("0x"+t)}else s.throwArgumentError("invalid address","address",e);return t}function m(e){try{return v(e),!0}catch(t){}return!1}function y(e){for(var t=(0,i.t2)(v(e).substring(2)).toUpperCase();t.length<30;)t="0"+t;return"XE"+p("XE00"+t)+t}function g(e){var t=null;try{t=v(e.from)}catch(u){s.throwArgumentError("missing from address","transaction",e)}var n=(0,r.G1)((0,r.lE)(i.O$.from(e.nonce).toHexString()));return v((0,r.p3)((0,o.w)((0,a.encode)([t,n])),12))}function b(e,t,n){return 32!==(0,r.E1)(t)&&s.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,r.E1)(n)&&s.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",n),v((0,r.p3)((0,o.w)((0,r.zo)(["0xff",v(e),t,n])),12))}},7354:function(e,t,n){"use strict";n.d(t,{J:function(){return i},c:function(){return o}});var r=n(9716);function i(e){e=atob(e);for(var t=[],n=0;n0;)n.push(i%this.base),i=i/this.base|0}for(var s="",u=0;0===t[u]&&u=0;--c)s+=this.alphabet[n[c]];return s}},{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 n=0;n>=8;for(;i>0;)t.push(255&i),i>>=8}for(var s=0;e[s]===this._leader&&s0&&(10===arguments[0]?v||(v=!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()",u.Yd.errors.UNEXPECTED_ARGUMENT,{}):d.throwError("BigNumber.toString does not accept parameters",u.Yd.errors.UNEXPECTED_ARGUMENT,{})),b(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(f,y(t)):t.match(/^-?[0-9]+$/)?new e(f,y(new l(t))):d.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&w("underflow","BigNumber.from",t),(t>=h||t<=-h)&&w("overflow","BigNumber.from",t),e.from(String(t));var n=t;if("bigint"===typeof n)return e.from(n.toString());if((0,s._t)(n))return e.from((0,s.Dv)(n));if(n)if(n.toHexString){var r=n.toHexString();if("string"===typeof r)return e.from(r)}else{var i=n._hex;if(null==i&&"BigNumber"===n.type&&(i=n.hex),"string"===typeof i&&((0,s.A7)(i)||"-"===i[0]&&(0,s.A7)(i.substring(1))))return e.from(i)}return d.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]&&d.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 g(e){return m.from(y(e))}function b(e){var t=m.from(e).toHexString();return"-"===t[0]?new l("-"+t.substring(3),16):new l(t.substring(2),16)}function w(e,t,n){var r={fault:e,operation:t};return null!=n&&(r.value=n),d.throwError(e,u.Yd.errors.NUMERIC_FAULT,r)}function x(e){return new l(e,36).toString(16)}function k(e){return new l(e,16).toString(36)}},1503:function(e,t,n){"use strict";n.d(t,{Ox:function(){return y},S5:function(){return m},xs:function(){return b}});var r=n(5671),i=n(3144),o=n(9716),a=n(9502),s=n(6945),u=n(2257),c=new a.Yd(s.i),l={},d=u.O$.from(0),f=u.O$.from(-1);function h(e,t,n,r){var i={fault:t,operation:n};return void 0!==r&&(i.value=r),c.throwError(e,a.Yd.errors.NUMERIC_FAULT,i)}for(var p="0";p.length<256;)p+=p;function v(e){if("number"!==typeof e)try{e=u.O$.from(e).toNumber()}catch(t){}return"number"===typeof e&&e>=0&&e<=256&&!(e%1)?"1"+p.substring(0,e):c.throwArgumentError("invalid decimal size","decimals",e)}function m(e,t){null==t&&(t=0);var n=v(t),r=(e=u.O$.from(e)).lt(d);r&&(e=e.mul(f));for(var i=e.mod(n).toString();i.length2&&c.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>n.length-1&&h("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length80&&c.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new e(l,n,r,i)}}]),e}(),b=function(){function e(t,n,i,o){(0,r.Z)(this,e),t!==l&&c.throwError("cannot use FixedNumber constructor; use FixedNumber.from",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=o,this._hex=n,this._value=i,this._isFixedNumber=!0,Object.freeze(this)}return(0,i.Z)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&c.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var n=y(this._value,this.format.decimals),r=y(t._value,t.format.decimals);return e.fromValue(n.add(r),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var n=y(this._value,this.format.decimals),r=y(t._value,t.format.decimals);return e.fromValue(n.sub(r),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var n=y(this._value,this.format.decimals),r=y(t._value,t.format.decimals);return e.fromValue(n.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var n=y(this._value,this.format.decimals),r=y(t._value,t.format.decimals);return e.fromValue(n.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var n=e.from(t[0],this.format),r=!t[1].match(/^(0*)$/);return this.isNegative()&&r&&(n=n.subUnsafe(w.toFormat(n.format))),n}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var n=e.from(t[0],this.format),r=!t[1].match(/^(0*)$/);return!this.isNegative()&&r&&(n=n.addUnsafe(w.toFormat(n.format))),n}},{key:"round",value:function(t){null==t&&(t=0);var n=this.toString().split(".");if(1===n.length&&n.push("0"),(t<0||t>80||t%1)&&c.throwArgumentError("invalid decimal count","decimals",t),n[1].length<=t)return this;var r=e.from("1"+p.substring(0,t),this.format),i=x.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(i).floor().divUnsafe(r)}},{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&&c.throwArgumentError("invalid byte width","width",e);var t=u.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,o.$m)(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,n,r){return null!=r||null==n||(0,u.Zm)(n)||(r=n,n=null),null==n&&(n=0),null==r&&(r="fixed"),e.fromString(m(t,n),g.from(r))}},{key:"fromString",value:function(t,n){null==n&&(n="fixed");var r=g.from(n),i=y(t,r.decimals);!r.signed&&i.lt(d)&&h("unsigned value cannot be negative","overflow","value",t);var a=null;r.signed?a=i.toTwos(r.width).toHexString():(a=i.toHexString(),a=(0,o.$m)(a,r.width/8));var s=m(i,r.decimals);return new e(l,a,s,r)}},{key:"fromBytes",value:function(t,n){null==n&&(n="fixed");var r=g.from(n);if((0,o.lE)(t).length>r.width/8)throw new Error("overflow");var i=u.O$.from(t);r.signed&&(i=i.fromTwos(r.width));var a=i.toTwos((r.signed?0:1)+r.width).toHexString(),s=m(i,r.decimals);return new e(l,a,s,r)}},{key:"from",value:function(t,n){if("string"===typeof t)return e.fromString(t,n);if((0,o._t)(t))return e.fromBytes(t,n);try{return e.fromValue(t,0,n)}catch(r){if(r.code!==a.Yd.errors.INVALID_ARGUMENT)throw r}return c.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}(),w=b.from(1),x=b.from("0.5")},9716:function(e,t,n){"use strict";n.d(t,{lE:function(){return c},zo:function(){return l},xs:function(){return g},E1:function(){return m},p3:function(){return y},Ou:function(){return w},$P:function(){return b},$m:function(){return x},Dv:function(){return v},_t:function(){return u},Zq:function(){return a},A7:function(){return h},gV:function(){return A},N:function(){return k},G1:function(){return d},Bu:function(){return f}});var r=new(n(9502).Yd)("bytes/5.7.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function a(e){return h(e)&&!(e.length%2)||u(e)}function s(e){return"number"===typeof e&&e==e&&e%1===0}function u(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 c(e,t){if(t||(t={}),"number"===typeof e){r.checkSafeUint53(e,"invalid arrayify value");for(var n=[];e;)n.unshift(255&e),e=parseInt(String(e/256));return 0===n.length&&n.push(0),o(new Uint8Array(n))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),h(e)){var a=e.substring(2);a.length%2&&("left"===t.hexPad?a="0"+a:"right"===t.hexPad?a+="0":r.throwArgumentError("hex data is odd-length","value",e));for(var s=[],c=0;ct&&r.throwArgumentError("value out of range","value",arguments[0]);var n=new Uint8Array(t);return n.set(e,t-e.length),o(n)}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 v(e,t){if(t||(t={}),"number"===typeof e){r.checkSafeUint53(e,"invalid hexlify value");for(var n="";e;)n=p[15&e]+n,e=Math.floor(e/16);return n.length?(n.length%2&&(n="0"+n),"0x"+n):"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),i(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":r.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(u(e)){for(var o="0x",a=0;a>4]+p[15&s]}return o}return r.throwArgumentError("invalid hexlify value","value",e)}function m(e){if("string"!==typeof e)e=v(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function y(e,t,n){return"string"!==typeof e?e=v(e):(!h(e)||e.length%2)&&r.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=n?"0x"+e.substring(t,2+2*n):"0x"+e.substring(t)}function g(e){var t="0x";return e.forEach((function(e){t+=v(e).substring(2)})),t}function b(e){var t=w(v(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function w(e){"string"!==typeof e&&(e=v(e)),h(e)||r.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&r.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function k(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(e)){var n=c(e);64===n.length?(t.v=27+(n[32]>>7),n[32]&=127,t.r=v(n.slice(0,32)),t.s=v(n.slice(32,64))):65===n.length?(t.r=v(n.slice(0,32)),t.s=v(n.slice(32,64)),t.v=n[64]):r.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:r.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(n[32]|=128),t._vs=v(n.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 i=f(c(t._vs),32);t._vs=v(i);var o=i[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=o:t.recoveryParam!==o&&r.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),i[0]&=127;var s=v(i);null==t.s?t.s=s:t.s!==s&&r.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?r.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 u=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==u&&r.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&h(t.r)?t.r=x(t.r,32):r.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=x(t.s,32):r.throwArgumentError("signature missing or invalid s","signature",e);var l=c(t.s);l[0]>=128&&r.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(l[0]|=128);var d=v(l);t._vs&&(h(t._vs)||r.throwArgumentError("signature invalid _vs","signature",e),t._vs=x(t._vs,32)),null==t._vs?t._vs=d:t._vs!==d&&r.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 v(l([(e=k(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},8624:function(e,t,n){"use strict";n.d(t,{d:function(){return r}});var r="0x0000000000000000000000000000000000000000"},5422:function(e,t,n){"use strict";n.d(t,{$B:function(){return l},Bz:function(){return c},Ce:function(){return u},PS:function(){return d},Py:function(){return s},_Y:function(){return o},fh:function(){return a},tL:function(){return i}});var r=n(2257),i=r.O$.from(-1),o=r.O$.from(0),a=r.O$.from(1),s=r.O$.from(2),u=r.O$.from("1000000000000000000"),c=r.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),l=r.O$.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),d=r.O$.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},4867:function(e,t,n){"use strict";n.d(t,{R:function(){return r}});var r="0x0000000000000000000000000000000000000000000000000000000000000000"},4029:function(e,t,n){"use strict";n.d(t,{VZ:function(){return N},CH:function(){return Z},lV:function(){return D}});var r=n(3433),i=n(7326),o=n(8301),a=n(1120),s=n(136),u=n(9388),c=n(5671),l=n(3144),d=n(4165),f=n(3198),h=n(7303),p=n(9745),v=n(8408),m=n(7419),y=n(2257),g=n(9716),b=n(520),w=n(5452),x=n(9502),k=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},A=new x.Yd("contracts/5.7.0"),_={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 S(e,t){return k(this,void 0,void 0,(0,d.Z)().mark((function n(){var r,i;return(0,d.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t;case 2:return"string"!==typeof(r=n.sent)&&A.throwArgumentError("invalid address or ENS name","name",r),n.prev=4,n.abrupt("return",(0,m.Kn)(r));case 8:n.prev=8,n.t0=n.catch(4);case 10:return e||A.throwError("a provider or signer is needed to resolve ENS names",x.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"}),n.next=13,e.resolveName(r);case 13:return null==(i=n.sent)&&A.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n.abrupt("return",i);case 16:case"end":return n.stop()}}),n,null,[[4,8]])})))}function E(e,t,n){return k(this,void 0,void 0,(0,d.Z)().mark((function r(){return(0,d.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!Array.isArray(n)){r.next=4;break}return r.next=3,Promise.all(n.map((function(n,r){return E(e,Array.isArray(t)?t[r]:t[n.name],n)})));case 3:case 7:case 11:case 17:return r.abrupt("return",r.sent);case 4:if("address"!==n.type){r.next=8;break}return r.next=7,S(e,t);case 8:if("tuple"!==n.type){r.next=12;break}return r.next=11,E(e,t,n.components);case 12:if("array"!==n.baseType){r.next=18;break}if(Array.isArray(t)){r.next=15;break}return r.abrupt("return",Promise.reject(A.makeError("invalid value for array",x.Yd.errors.INVALID_ARGUMENT,{argument:"value",value:t})));case 15:return r.next=17,Promise.all(t.map((function(t){return E(e,t,n.arrayChildren)})));case 18:return r.abrupt("return",t);case 19:case"end":return r.stop()}}),r)})))}function C(e,t,n){return k(this,void 0,void 0,(0,d.Z)().mark((function r(){var i,o,a,s,u,c,l,f,h,p,v=this;return(0,d.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i={},n.length===t.inputs.length+1&&"object"===typeof n[n.length-1]&&(i=(0,b.DC)(n.pop())),A.checkArgumentCount(n.length,t.inputs.length,"passed to contract"),e.signer?i.from?i.from=(0,b.mE)({override:S(e.signer,i.from),signer:e.signer.getAddress()}).then((function(e){return k(v,void 0,void 0,(0,d.Z)().mark((function t(){return(0,d.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,m.Kn)(e.signer)!==e.override&&A.throwError("Contract with a Signer cannot override from",x.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.abrupt("return",e.override);case 2:case"end":return t.stop()}}),t)})))})):i.from=e.signer.getAddress():i.from&&(i.from=S(e.provider,i.from)),r.next=6,(0,b.mE)({args:E(e.signer||e.provider,n,t.inputs),address:e.resolvedAddress,overrides:(0,b.mE)(i)||{}});case 6:if(o=r.sent,a=e.interface.encodeFunctionData(t,o.args),s={data:a,to:o.address},null!=(u=o.overrides).nonce&&(s.nonce=y.O$.from(u.nonce).toNumber()),null!=u.gasLimit&&(s.gasLimit=y.O$.from(u.gasLimit)),null!=u.gasPrice&&(s.gasPrice=y.O$.from(u.gasPrice)),null!=u.maxFeePerGas&&(s.maxFeePerGas=y.O$.from(u.maxFeePerGas)),null!=u.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=y.O$.from(u.maxPriorityFeePerGas)),null!=u.from&&(s.from=u.from),null!=u.type&&(s.type=u.type),null!=u.accessList&&(s.accessList=(0,w.z7)(u.accessList)),null==s.gasLimit&&null!=t.gas){for(c=21e3,l=(0,g.lE)(a),f=0;f1)){e=e.substring(1);var n=t[0];try{null==i[e]&&(0,b.zG)(i,e,i[n])}catch(r){}null==i.functions[e]&&(0,b.zG)(i.functions,e,i.functions[n]),null==i.callStatic[e]&&(0,b.zG)(i.callStatic,e,i.callStatic[n]),null==i.populateTransaction[e]&&(0,b.zG)(i.populateTransaction,e,i.populateTransaction[n]),null==i.estimateGas[e]&&(0,b.zG)(i.estimateGas,e,i.estimateGas[n])}}))}return(0,l.Z)(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&&A.throwError("contract not deployed",x.Yd.errors.UNSUPPORTED_OPERATION,{contractAddress:t.address,operation:"getDeployed"}),t}))),this._deployedPromise}},{key:"fallback",value:function(e){var t=this;this.signer||A.throwError("sending a transactions require a signer",x.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var n=(0,b.DC)(e||{});return["from","to"].forEach((function(e){null!=n[e]&&A.throwError("cannot override "+e,x.Yd.errors.UNSUPPORTED_OPERATION,{operation:e})})),n.to=this.resolvedAddress,this.deployed().then((function(){return t.signer.sendTransaction(n)}))}},{key:"connect",value:function(e){"string"===typeof e&&(e=new v.b(e,this.provider));var t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&(0,b.zG)(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 M);if("event"===e)return this._normalizeRunningEvent(new I("event",null));if("*"===e)return this._normalizeRunningEvent(new B(this.address,this.interface));var t=this.interface.getEvent(e);return this._normalizeRunningEvent(new j(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{var n=e.topics[0];if("string"!==typeof n)throw new Error("invalid topic");var r=this.interface.getEvent(n);return this._normalizeRunningEvent(new j(this.address,this.interface,r,e.topics))}catch(o){}var i={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new I(O(i),i))}return this._normalizeRunningEvent(new B(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,n){var r=this,i=(0,b.p$)(t);return i.removeListener=function(){n&&(e.removeListener(n),r._checkRunningEvents(e))},i.getBlock=function(){return r.provider.getBlock(t.blockHash)},i.getTransaction=function(){return r.provider.getTransaction(t.transactionHash)},i.getTransactionReceipt=function(){return r.provider.getTransactionReceipt(t.transactionHash)},e.prepareEvent(i),i}},{key:"_addEventListener",value:function(e,t,n){var i=this;if(this.provider||A.throwError("events require a provider or a signer with a provider",x.Yd.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){var o=function(n){var o=i._wrapEvent(e,n,t);if(null==o.decodeError)try{var a=e.getEmit(o);i.emit.apply(i,[e.filter].concat((0,r.Z)(a)))}catch(s){o.decodeError=s.error}null!=e.filter&&i.emit("event",o),null!=o.decodeError&&i.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=o,null!=e.filter&&this.provider.on(e.filter,o)}}},{key:"queryFilter",value:function(e,t,n){var r=this,i=this._getRunningEvent(e),o=(0,b.DC)(i.filter);return"string"===typeof t&&(0,g.A7)(t,32)?(null!=n&&A.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),o.blockHash=t):(o.fromBlock=null!=t?t:0,o.toBlock=null!=n?n:"latest"),this.provider.getLogs(o).then((function(e){return e.map((function(e){return r._wrapEvent(i,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),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0;return this._checkRunningEvents(t),o}},{key:"listenerCount",value:function(e){var t=this;return this.provider?null==e?Object.keys(this._runningEvents).reduce((function(e,n){return e+t._runningEvents[n].listenerCount()}),0):this._getRunningEvent(e).listenerCount():0}},{key:"listeners",value:function(e){if(!this.provider)return[];if(null==e){var t=[];for(var n in this._runningEvents)this._runningEvents[n].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 n=this._runningEvents[t];n.removeAllListeners(),this._checkRunningEvents(n)}return this}var r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}},{key:"off",value:function(e,t){if(!this.provider)return this;var n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"getContractAddress",value:function(e){return(0,m.CR)(e)}},{key:"getInterface",value:function(e){return h.vU.isInterface(e)?e:new h.vU(e)}},{key:"isIndexed",value:function(e){return h.Hk.isIndexed(e)}}]),e}(),Z=function(e){(0,s.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,c.Z)(this,n),t.apply(this,arguments)}return(0,l.Z)(n)}(N),D=function(){function e(t,n,r){(0,c.Z)(this,e);var i=null;"0x"!==(i="string"===typeof n?n:(0,g._t)(n)?(0,g.Dv)(n):n&&"string"===typeof n.object?n.object:"!").substring(0,2)&&(i="0x"+i),(!(0,g.A7)(i)||i.length%2)&&A.throwArgumentError("invalid bytecode","bytecode",n),r&&!v.E.isSigner(r)&&A.throwArgumentError("invalid signer","signer",r),(0,b.zG)(this,"bytecode",i),(0,b.zG)(this,"interface",(0,b.tu)(this instanceof e?this.constructor:void 0,"getInterface")(t)),(0,b.zG)(this,"signer",r||null)}return(0,l.Z)(e,[{key:"getDeployTransaction",value:function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r0&&Array.isArray(t)?e(t,i-1):n.push(t)}))}(e,t),n}function d(e){return function(e){var t=0;return function(){return e[t++]}}(function(e){var t=0;function n(){return e[t++]<<8|e[t++]}for(var r=n(),i=1,o=[0,1],a=1;a>--c&1}for(var f=Math.pow(2,31),h=f>>>1,p=h>>1,v=f-1,m=0,y=0;y<31;y++)m=m<<1|d();for(var g=[],b=0,w=f;;){for(var x=Math.floor(((m-b+1)*i-1)/w),k=0,A=r;A-k>1;){var _=k+A>>>1;x>>1|d(),S=S<<1^h,E=(E^h)<<1|h|1;b=S,w=1+E-S}var C=r-4;return g.map((function(t){switch(t-C){case 3:return C+65792+(e[u++]<<16|e[u++]<<8|e[u++]);case 2:return C+256+(e[u++]<<8|e[u++]);case 1:return C+e[u++];default:return t-1}}))}(e))}function f(e){return 1&e?~e>>1:e>>1}function h(e,t){for(var n=Array(e),r=0,i=-1;r>=1),check:2==o}}()}(b),_=45,S=95;function E(e){return(0,i.XL)(e)}function C(e){return e.filter((function(e){return 65039!=e}))}function T(e){var t,n=(0,c.Z)(e.split("."));try{for(n.s();!(t=n.n()).done;){var r=t.value,i=E(r);try{for(var o=i.lastIndexOf(S)-1;o>=0;o--)if(i[o]!==S)throw new Error("underscore only allowed at start");if(i.length>=4&&i.every((function(e){return e<128}))&&i[2]===_&&i[3]===_)throw new Error("invalid label extension")}catch(a){throw new Error('Invalid label "'.concat(r,'": ').concat(a.message))}}}catch(a){n.e(a)}finally{n.f()}return e}function P(e){return T(function(e,t){var n=E(e).reverse(),r=[];for(;n.length;){var i=R(n);if(i)r.push.apply(r,(0,u.Z)(t(i)));else{var o=n.pop();if(w.has(o))r.push(o);else if(!x.has(o)){var a=k[o];if(!a)throw new Error("Disallowed codepoint: 0x".concat(o.toString(16).toUpperCase()));r.push.apply(r,(0,u.Z)(a))}}}return T((s=String.fromCodePoint.apply(String,r),s.normalize("NFC")));var s}(e,C))}function R(e,t){var n,r,i,o=A,a=[],s=e.length;t&&(t.length=0);for(var c=function(){var c=e[--s];if(!(o=null===(n=o.branches.find((function(e){return e.set.has(c)})))||void 0===n?void 0:n.node))return"break";if(o.save)i=c;else if(o.check&&c===i)return"break";a.push(c),o.fe0f&&(a.push(65039),s>0&&65039==e[s-1]&&s--),o.valid&&(r=a.slice(),2==o.valid&&r.splice(1,1),t&&t.push.apply(t,(0,u.Z)(e.slice(s).reverse())),e.length=s)};s;){if("break"===c())break}return r}var O=new a.Yd(s.i),I=new Uint8Array(32);function M(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function j(e){var t=(0,i.Y0)(P(e)),n=[];if(0===e.length)return n;for(var r=0,o=0;o=t.length)throw new Error("invalid ENS name; empty component");return n.push(M(t.slice(r))),n}function B(e){try{return 0!==j(e).length}catch(t){}return!1}function N(e){"string"!==typeof e&&O.throwArgumentError("invalid ENS name; not a string","name",e);for(var t=I,n=j(e);n.length;)t=(0,o.w)((0,r.zo)([t,(0,o.w)(n.pop())]));return(0,r.Dv)(t)}function Z(e){return(0,r.Dv)((0,r.zo)(j(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"}I.fill(0)},5992:function(e,t,n){"use strict";n.d(t,{E:function(){return P}});var r=n(4165),i=n(5671),o=n(3144),a=n(7419),s=n(2257),u=n(9716),c=n(8062),l=n(520),d=n(9502),f=n(9366),h=n(1583),p=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},v=new d.Yd(f.i),m=new Uint8Array(32);m.fill(0);var y=s.O$.from(-1),g=s.O$.from(0),b=s.O$.from(1),w=s.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var x=(0,u.$m)(b.toHexString(),32),k=(0,u.$m)(g.toHexString(),32),A={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},_=["name","version","chainId","verifyingContract","salt"];function S(e){return function(t){return"string"!==typeof t&&v.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var E={name:S("name"),version:S("version"),chainId:function(e){try{return s.O$.from(e).toString()}catch(t){}return v.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,a.Kn)(e).toLowerCase()}catch(t){}return v.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=(0,u.lE)(e);if(32!==t.length)throw new Error("bad length");return(0,u.Dv)(t)}catch(n){}return v.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function C(e){var t=e.match(/^(u?)int(\d*)$/);if(t){var n=""===t[1],r=parseInt(t[2]||"256");(r%8!==0||r>256||t[2]&&t[2]!==String(r))&&v.throwArgumentError("invalid numeric width","type",e);var i=w.mask(n?r-1:r),o=n?i.add(b).mul(y):g;return function(t){var n=s.O$.from(t);return(n.lt(o)||n.gt(i))&&v.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),(0,u.$m)(n.toTwos(256).toHexString(),32)}}var l=e.match(/^bytes(\d+)$/);if(l){var d=parseInt(l[1]);return(0===d||d>32||l[1]!==String(d))&&v.throwArgumentError("invalid bytes width","type",e),function(t){return(0,u.lE)(t).length!==d&&v.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=(0,u.lE)(e),n=t.length%32;return n?(0,u.xs)([t,m.slice(n)]):(0,u.Dv)(t)}(t)}}switch(e){case"address":return function(e){return(0,u.$m)((0,a.Kn)(e),32)};case"bool":return function(e){return e?x:k};case"bytes":return function(e){return(0,c.w)(e)};case"string":return function(e){return(0,h.id)(e)}}return null}function T(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var P=function(){function e(t){(0,i.Z)(this,e),(0,l.zG)(this,"types",Object.freeze((0,l.p$)(t))),(0,l.zG)(this,"_encoderCache",{}),(0,l.zG)(this,"_types",{});var n={},r={},o={};Object.keys(t).forEach((function(e){n[e]={},r[e]=[],o[e]={}}));var a=function(e){var i={};t[e].forEach((function(o){i[o.name]&&v.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(e)),"types",t),i[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===e&&v.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),C(a)||(r[a]||v.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),r[a].push(e),n[e][a]=!0)}))};for(var s in t)a(s);var u=Object.keys(r).filter((function(e){return 0===r[e].length}));for(var c in 0===u.length?v.throwArgumentError("missing primary type","types",t):u.length>1&&v.throwArgumentError("ambiguous primary types or unused types: ".concat(u.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),(0,l.zG)(this,"primaryType",u[0]),function e(i,a){a[i]&&v.throwArgumentError("circular type reference to ".concat(JSON.stringify(i)),"types",t),a[i]=!0,Object.keys(n[i]).forEach((function(t){r[t]&&(e(t,a),Object.keys(a).forEach((function(e){o[e][t]=!0})))})),delete a[i]}(this.primaryType,{}),o){var d=Object.keys(o[c]);d.sort(),this._types[c]=T(c,t[c])+d.map((function(e){return T(e,t[e])})).join("")}}return(0,o.Z)(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,n=C(e);if(n)return n;var r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){var i=r[1],o=this.getEncoder(i),a=parseInt(r[3]);return function(e){a>=0&&e.length!==a&&v.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var n=e.map(o);return t._types[i]&&(n=n.map(c.w)),(0,c.w)((0,u.xs)(n))}}var s=this.types[e];if(s){var l=(0,h.id)(this._types[e]);return function(e){var n=s.map((function(n){var r=n.name,i=n.type,o=t.getEncoder(i)(e[r]);return t._types[i]?(0,c.w)(o):o}));return n.unshift(l),(0,u.xs)(n)}}return v.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||v.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,c.w)(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,n){var r=this;if(C(e))return n(e,t);var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&v.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return r._visit(o,e,n)}))}var s=this.types[e];return s?s.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=r._visit(a,t[o],n),e}),{}):v.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,n,r){return e.from(n).hashStruct(t,r)}},{key:"hashDomain",value:function(t){var n=[];for(var r in t){var i=A[r];i||v.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(r)),"domain",t),n.push({name:r,type:i})}return n.sort((function(e,t){return _.indexOf(e.name)-_.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:n},t)}},{key:"encode",value:function(t,n,r){return(0,u.xs)(["0x1901",e.hashDomain(t),e.from(n).hash(r)])}},{key:"hash",value:function(t,n,r){return(0,c.w)(e.encode(t,n,r))}},{key:"resolveNames",value:function(t,n,i,o){return p(this,void 0,void 0,(0,r.Z)().mark((function a(){var s,c,d;return(0,r.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:t=(0,l.DC)(t),s={},t.verifyingContract&&!(0,u.A7)(t.verifyingContract,20)&&(s[t.verifyingContract]="0x"),(c=e.from(n)).visit(i,(function(e,t){return"address"!==e||(0,u.A7)(t,20)||(s[t]="0x"),t})),a.t0=(0,r.Z)().keys(s);case 6:if((a.t1=a.t0()).done){a.next=13;break}return d=a.t1.value,a.next=10,o(d);case 10:s[d]=a.sent,a.next=6;break;case 13:return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),i=c.visit(i,(function(e,t){return"address"===e&&s[t]?s[t]:t})),a.abrupt("return",{domain:t,value:i});case 16:case"end":return a.stop()}}),a)})))}},{key:"getPayload",value:function(t,n,r){e.hashDomain(t);var i={},o=[];_.forEach((function(e){var n=t[e];null!=n&&(i[e]=E[e](n),o.push({name:e,type:A[e]}))}));var a=e.from(n),c=(0,l.DC)(n);return c.EIP712Domain?v.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",n):c.EIP712Domain=o,a.encode(r),{types:c,domain:i,primaryType:a.primaryType,message:a.visit(r,(function(e,t){if(e.match(/^bytes(\d*)/))return(0,u.Dv)((0,u.lE)(t));if(e.match(/^u?int/))return s.O$.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!==typeof t&&v.throwArgumentError("invalid string","value",t),t}return v.throwArgumentError("unsupported type","type",e)}))}}}]),e}()},8062:function(e,t,n){"use strict";n.d(t,{w:function(){return a}});var r=n(7898),i=n.n(r),o=n(9716);function a(e){return"0x"+i().keccak_256((0,o.lE)(e))}},9502:function(e,t,n){"use strict";n.d(t,{jK:function(){return d},Yd:function(){return p}});var r=n(5671),i=n(3144),o=!1,a=!1,s={debug:1,default:2,info:2,warning:3,error:4,off:5},u=s.default,c=null;var l,d,f=function(){try{var e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(n){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"}(l||(l={})),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",e.ACTION_REJECTED="ACTION_REJECTED"}(d||(d={}));var h="0123456789abcdef",p=function(){function e(t){(0,r.Z)(this,e),Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}return(0,i.Z)(e,[{key:"_log",value:function(e,t){var n=e.toLowerCase();null==s[n]&&this.throwArgumentError("invalid log level name","logLevel",e),u>s[n]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r>4],n+=h[15&t[o]];i.push(e+"=Uint8Array(0x"+n+")")}else i.push(e+"="+JSON.stringify(t))}catch(c){i.push(e+"="+JSON.stringify(r[e].toString()))}})),i.push("code=".concat(n)),i.push("version=".concat(this.version));var o=t,s="";switch(n){case d.NUMERIC_FAULT:s="NUMERIC_FAULT";var u=t;switch(u){case"overflow":case"underflow":case"division-by-zero":s+="-"+u;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=n}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var c=new Error(t);return c.reason=o,c.code=n,Object.keys(r).forEach((function(e){c[e]=r[e]})),c}},{key:"throwError",value:function(e,t,n){throw this.makeError(e,t,n)}},{key:"throwArgumentError",value:function(t,n,r){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:n,value:r})}},{key:"assert",value:function(e,t,n,r){e||this.throwError(t,n,r)}},{key:"assertArgument",value:function(e,t,n,r){e||this.throwArgumentError(t,n,r)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),f&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:f})}},{key:"checkSafeUint53",value:function(t,n){"number"===typeof t&&(null==n&&(n="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,n,r){r=r?": "+r:"",tn&&this.throwError("too many arguments"+r,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:n})}},{key:"checkNew",value:function(t,n){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:n.name})}},{key:"checkAbstract",value:function(t,n){t===n?this.throwError("cannot instantiate abstract class "+JSON.stringify(n.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:n.name})}}],[{key:"globalLogger",value:function(){return c||(c=new e("logger/5.7.0")),c}},{key:"setCensorship",value:function(t,n){if(!t&&n&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}a=!!t,o=!!n}},{key:"setLogLevel",value:function(t){var n=s[t.toLowerCase()];null!=n?u=n:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();p.errors=d,p.levels=l},9083:function(e,t,n){"use strict";n.d(t,{H:function(){return l}});var r=new(n(9502).Yd)("networks/5.7.1");function i(e){var t=function(t,n){null==n&&(n={});var r=[];if(t.InfuraProvider&&"-"!==n.infura)try{r.push(new t.InfuraProvider(e,n.infura))}catch(s){}if(t.EtherscanProvider&&"-"!==n.etherscan)try{r.push(new t.EtherscanProvider(e,n.etherscan))}catch(s){}if(t.AlchemyProvider&&"-"!==n.alchemy)try{r.push(new t.AlchemyProvider(e,n.alchemy))}catch(s){}if(t.PocketProvider&&"-"!==n.pocket){try{var i=new t.PocketProvider(e,n.pocket);i.network&&-1===["goerli","ropsten","rinkeby","sepolia"].indexOf(i.network.name)&&r.push(i)}catch(s){}}if(t.CloudflareProvider&&"-"!==n.cloudflare)try{r.push(new t.CloudflareProvider(e))}catch(s){}if(t.AnkrProvider&&"-"!==n.ankr)try{var o=new t.AnkrProvider(e,n.ankr);o.network&&-1===["ropsten"].indexOf(o.network.name)&&r.push(o)}catch(s){}if(0===r.length)return null;if(t.FallbackProvider){var a=1;return null!=n.quorum?a=n.quorum:"homestead"===e&&(a=2),new t.FallbackProvider(r,a)}return r[0]};return t.renetwork=function(e){return i(e)},t}function o(e,t){var n=function(n,r){return n.JsonRpcProvider?new n.JsonRpcProvider(e,t):null};return n.renetwork=function(t){return o(e,t)},n}var a={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:i("homestead")},s={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:i("ropsten")},u={chainId:63,name:"classicMordor",_defaultProvider:o("https://www.ethercluster.com/mordor","classicMordor")},c={unspecified:{chainId:0,name:"unspecified"},homestead:a,mainnet:a,morden:{chainId:2,name:"morden"},ropsten:s,testnet:s,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:i("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:i("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:i("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:i("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:o("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:u,classicTestnet:u,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:o("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:i("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:i("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function l(e){if(null==e)return null;if("number"===typeof e){for(var t in c){var n=c[t];if(n.chainId===e)return{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress||null,_defaultProvider:n._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"===typeof e){var i=c[e];return null==i?null:{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress,_defaultProvider:i._defaultProvider||null}}var o=c[e.name];if(!o)return"number"!==typeof e.chainId&&r.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==o.chainId&&r.throwArgumentError("network chainId mismatch","network",e);var a,s=e._defaultProvider||null;return null==s&&o._defaultProvider&&(s=(a=o._defaultProvider)&&"function"===typeof a.renetwork?o._defaultProvider.renetwork(e):o._defaultProvider),{name:e.name,chainId:o.chainId,ensAddress:e.ensAddress||o.ensAddress||null,_defaultProvider:s}}},520:function(e,t,n){"use strict";n.d(t,{dk:function(){return g},uj:function(){return f},p$:function(){return y},zG:function(){return c},tu:function(){return l},mE:function(){return d},DC:function(){return h}});var r=n(3144),i=n(5671),o=n(4165),a=n(9502),s=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=new a.Yd("properties/5.7.0");function c(e,t,n){Object.defineProperty(e,t,{enumerable:!0,value:n,writable:!1})}function l(e,t){for(var n=0;n<32;n++){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,(0,o.Z)().mark((function t(){var n,r;return(0,o.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object.keys(e).map((function(t){var n=e[t];return Promise.resolve(n).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(n);case 3:return r=t.sent,t.abrupt("return",r.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))}function f(e,t){e&&"object"===typeof e||u.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((function(n){t[n]||u.throwArgumentError("invalid object key - "+n,"transaction:"+n,e)}))}function h(e){var t={};for(var n in e)t[n]=e[n];return t}var p={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function v(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),n=0;n0&&null==e[e.length-1];)e.pop();return e.map((function(e){if(Array.isArray(e)){var t={};e.forEach((function(e){t[T(e)]=!0}));var n=Object.keys(t);return n.sort(),n.join("|")}return T(e)})).join("&")}function R(e){if("string"===typeof e){if(e=e.toLowerCase(),32===(0,h.E1)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+P(e);if(c.Sg.isForkEvent(e))throw C.warn("not implemented"),new Error("not implemented");if(e&&"object"===typeof e)return"filter:"+(e.address||"*")+":"+P(e.topics||[])}throw new Error("invalid event - "+e)}function O(){return(new Date).getTime()}function I(e){return new Promise((function(t){setTimeout(t,e)}))}var M=["block","network","pending","poll"],j=function(){function e(t,n,r){(0,s.Z)(this,e),(0,y.zG)(this,"tag",t),(0,y.zG)(this,"listener",n),(0,y.zG)(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}return(0,u.Z)(e,[{key:"event",get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}},{key:"type",get:function(){return this.tag.split(":")[0]}},{key:"hash",get:function(){var e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}},{key:"filter",get:function(){var e=this.tag.split(":");if("filter"!==e[0])return null;var t,n=e[1],r=""===(t=e[2])?[]:t.split(/&/g).map((function(e){if(""===e)return[];var t=e.split("|").map((function(e){return"null"===e?null:e}));return 1===t.length?t[0]:t})),i={};return r.length>0&&(i.topics=r),n&&"*"!==n&&(i.address=n),i}},{key:"pollable",value:function(){return this.tag.indexOf(":")>=0||M.indexOf(this.tag)>=0}}]),e}(),B={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function N(e){return(0,h.$m)(f.O$.from(e).toHexString(),32)}function Z(e){return d.eU.encode((0,h.zo)([e,(0,h.p3)((0,g.JQ)((0,g.JQ)(e)),0,4)]))}var D=new RegExp("^(ipfs)://(.*)$","i"),F=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),D,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function L(e,t){try{return(0,b.ZN)(z(e,t))}catch(n){}return null}function z(e,t){if("0x"===e)return null;var n=f.O$.from((0,h.p3)(e,t,t+32)).toNumber(),r=f.O$.from((0,h.p3)(e,n,n+32)).toNumber();return(0,h.p3)(e,n+32,n+32+r)}function U(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):C.throwArgumentError("unsupported IPFS format","link",e),"https://gateway.ipfs.io/ipfs/".concat(e)}function W(e){var t=(0,h.lE)(e);if(t.length>32)throw new Error("internal; should not happen");var n=new Uint8Array(32);return n.set(t,32-t.length),n}function H(e){if(e.length%32===0)return e;var t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function q(e){for(var t=[],n=0,r=0;r=1&&o<=75)return Z((0,h.zo)([[n.p2pkh],"0x"+i[2]]))}}if(null!=n.p2sh){var a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){var s=parseInt(a[1],16);if(a[2].length===2*s&&s>=1&&s<=75)return Z((0,h.zo)([[n.p2sh],"0x"+a[2]]))}}if(null!=n.prefix){var u=r[1],c=r[0];if(0===c?20!==u&&32!==u&&(c=-1):c=-1,c>=0&&r.length===2+u&&u>=1&&u<=75){var l=k().toWords(r.slice(2));return l.unshift(c),k().encode(n.prefix,l)}}return null}},{key:"getAddress",value:function(e){return E(this,void 0,void 0,(0,a.Z)().mark((function t(){var n,r,i;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e&&(e=60),60!==e){t.next=16;break}return t.prev=2,t.next=5,this._fetch("0x3b3b57de");case 5:if("0x"!==(n=t.sent)&&n!==p.R){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",this.provider.formatter.callAddress(n));case 11:if(t.prev=11,t.t0=t.catch(2),t.t0.code!==A.Yd.errors.CALL_EXCEPTION){t.next=15;break}return t.abrupt("return",null);case 15:throw t.t0;case 16:return t.next=18,this._fetchBytes("0xf1cb7e06",N(e));case 18:if(null!=(r=t.sent)&&"0x"!==r){t.next=21;break}return t.abrupt("return",null);case 21:return null==(i=this._getAddress(e,r))&&C.throwError("invalid or unsupported coin data",A.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")"),coinType:e,data:r}),t.abrupt("return",i);case 24:case"end":return t.stop()}}),t,this,[[2,11]])})))}},{key:"getAvatar",value:function(){return E(this,void 0,void 0,(0,a.Z)().mark((function e(){var t,n,r,i,o,s,u,c,l,d,p,v,m,y,g,b;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[{type:"name",content:this.name}],e.prev=1,e.next=4,this.getText("avatar");case 4:if(null!=(n=e.sent)){e.next=7;break}return e.abrupt("return",null);case 7:r=0;case 8:if(!(r=0?null:JSON.stringify({data:o,sender:i}),r.next=12,(0,w.rd)({url:l,errorPassThrough:!0},d,(function(e,t){return e.status=t.statusCode,e}));case 12:if(!(f=r.sent).data){r.next=15;break}return r.abrupt("return",f.data);case 15:if(h=f.message||"unknown error",!(f.status>=400&&f.status<500)){r.next=18;break}return r.abrupt("return",C.throwError("response not found during CCIP fetch: ".concat(h),A.Yd.errors.SERVER_ERROR,{url:c,errorMessage:h}));case 18:s.push(h);case 19:u++,r.next=6;break;case 22:return r.abrupt("return",C.throwError("error encountered during CCIP fetch: ".concat(s.map((function(e){return JSON.stringify(e)})).join(", ")),A.Yd.errors.SERVER_ERROR,{urls:n,errorMessages:s}));case 23:case"end":return r.stop()}}),r,this)})))}},{key:"_getInternalBlockNumber",value:function(e){return E(this,void 0,void 0,(0,a.Z)().mark((function t(){var n,r,i,o,s=this;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._ready();case 2:if(!(e>0)){t.next=20;break}case 3:if(!this._internalBlockNumber){t.next=20;break}return n=this._internalBlockNumber,t.prev=5,t.next=8,n;case 8:if(r=t.sent,!(O()-r.respTime<=e)){t.next=11;break}return t.abrupt("return",r.blockNumber);case 11:return t.abrupt("break",20);case 14:if(t.prev=14,t.t0=t.catch(5),this._internalBlockNumber!==n){t.next=18;break}return t.abrupt("break",20);case 18:t.next=3;break;case 20:return i=O(),o=(0,y.mE)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((function(e){return null}),(function(e){return e}))}).then((function(e){var t=e.blockNumber,n=e.networkError;if(n)throw s._internalBlockNumber===o&&(s._internalBlockNumber=null),n;var r=O();return(t=f.O$.from(t).toNumber())1e3)C.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(r,")")),this.emit("error",C.makeError("network block skew detected",A.Yd.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(i=this._emitted.block+1;i<=r;i++)this.emit("block",i);return this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((function(e){if("block"!==e){var t=o._emitted[e];"pending"!==t&&r-t>12&&delete o._emitted[e]}}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((function(e){switch(e.type){case"tx":var t=e.hash,i=o.getTransactionReceipt(t).then((function(e){return e&&null!=e.blockNumber?(o._emitted["t:"+t]=e.blockNumber,o.emit(t,e),null):null})).catch((function(e){o.emit("error",e)}));n.push(i);break;case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);var a=e.filter;a.fromBlock=e._lastBlockNumber+1,a.toBlock=r;var s=a.toBlock-o._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);var u=o.getLogs(a).then((function(t){e._inflight=!1,0!==t.length&&t.forEach((function(t){t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),o._emitted["b:"+t.blockHash]=t.blockNumber,o._emitted["t:"+t.transactionHash]=t.blockNumber,o.emit(a,t)}))})).catch((function(t){o.emit("error",t),e._inflight=!1}));n.push(u)}}})),this._lastBlockNumber=r,Promise.all(n).then((function(){o.emit("didPoll",t)})).catch((function(e){o.emit("error",e)})),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"resetEventsBlock",value:function(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}},{key:"network",get:function(){return this._network}},{key:"detectNetwork",value:function(){return E(this,void 0,void 0,(0,a.Z)().mark((function e(){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",C.throwError("provider does not support network detection",A.Yd.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"}));case 1:case"end":return e.stop()}}),e)})))}},{key:"getNetwork",value:function(){return E(this,void 0,void 0,(0,a.Z)().mark((function e(){var t,n,r;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready();case 2:return t=e.sent,e.next=5,this.detectNetwork();case 5:if(n=e.sent,t.chainId===n.chainId){e.next=23;break}if(!this.anyNetwork){e.next=20;break}return this._network=n,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",n,t),e.next=19,I(0);case 19:return e.abrupt("return",this._network);case 20:throw r=C.makeError("underlying network changed",A.Yd.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:n}),this.emit("error",r),r;case 23:return e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"blockNumber",get:function(){var e=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then((function(t){e._setFastBlockNumber(t)}),(function(e){})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}},{key:"polling",get:function(){return null!=this._poller},set:function(e){var t=this;e&&!this._poller?(this._poller=setInterval((function(){t.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((function(){t.poll(),t._bootstrapPoll=setTimeout((function(){t._poller||t.poll(),t._bootstrapPoll=null}),t.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(e){var t=this;if("number"!==typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){t.poll()}),this._pollingInterval))}},{key:"_getFastBlockNumber",value:function(){var e=this,t=O();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise}},{key:"_setFastBlockNumber",value:function(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}},{key:"waitForTransaction",value:function(e,t,n){return E(this,void 0,void 0,(0,a.Z)().mark((function r(){return(0,a.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this._waitForTransaction(e,null==t?1:t,n||0,null));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"_waitForTransaction",value:function(e,t,n,r){return E(this,void 0,void 0,(0,a.Z)().mark((function i(){var o,s=this;return(0,a.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.getTransactionReceipt(e);case 2:if(!(((o=i.sent)?o.confirmations:0)>=t)){i.next=5;break}return i.abrupt("return",o);case 5:return i.abrupt("return",new Promise((function(i,o){var u=[],c=!1,l=function(){return!!c||(c=!0,u.forEach((function(e){e()})),!1)},d=function(e){e.confirmations0){var v=setTimeout((function(){l()||o(C.makeError("timeout exceeded",A.Yd.errors.TIMEOUT,{timeout:n}))}),n);v.unref&&v.unref(),u.push((function(){clearTimeout(v)}))}})));case 6:case"end":return i.stop()}}),i,this)})))}},{key:"getBlockNumber",value:function(){return E(this,void 0,void 0,(0,a.Z)().mark((function e(){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._getInternalBlockNumber(0));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getGasPrice",value:function(){return E(this,void 0,void 0,(0,a.Z)().mark((function e(){var t;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,this.perform("getGasPrice",{});case 4:return t=e.sent,e.prev=5,e.abrupt("return",f.O$.from(t));case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",C.throwError("bad result from backend",A.Yd.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e.t0}));case 12:case"end":return e.stop()}}),e,this,[[5,9]])})))}},{key:"getBalance",value:function(e,t){return E(this,void 0,void 0,(0,a.Z)().mark((function n(){var r,i;return(0,a.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,(0,y.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return r=n.sent,n.next=7,this.perform("getBalance",r);case 7:return i=n.sent,n.prev=8,n.abrupt("return",f.O$.from(i));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",C.throwError("bad result from backend",A.Yd.errors.SERVER_ERROR,{method:"getBalance",params:r,result:i,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"getTransactionCount",value:function(e,t){return E(this,void 0,void 0,(0,a.Z)().mark((function n(){var r,i;return(0,a.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,(0,y.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return r=n.sent,n.next=7,this.perform("getTransactionCount",r);case 7:return i=n.sent,n.prev=8,n.abrupt("return",f.O$.from(i).toNumber());case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",C.throwError("bad result from backend",A.Yd.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:i,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"getCode",value:function(e,t){return E(this,void 0,void 0,(0,a.Z)().mark((function n(){var r,i;return(0,a.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,(0,y.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return r=n.sent,n.next=7,this.perform("getCode",r);case 7:return i=n.sent,n.prev=8,n.abrupt("return",(0,h.Dv)(i));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",C.throwError("bad result from backend",A.Yd.errors.SERVER_ERROR,{method:"getCode",params:r,result:i,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"getStorageAt",value:function(e,t,n){return E(this,void 0,void 0,(0,a.Z)().mark((function r(){var i,o;return(0,a.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,(0,y.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then((function(e){return(0,h.$P)(e)}))});case 4:return i=r.sent,r.next=7,this.perform("getStorageAt",i);case 7:return o=r.sent,r.prev=8,r.abrupt("return",(0,h.Dv)(o));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",C.throwError("bad result from backend",A.Yd.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"_wrapTransaction",value:function(e,t,n){var r=this;if(null!=t&&32!==(0,h.E1)(t))throw new Error("invalid response - sendTransaction");var i=e;return null!=t&&e.hash!==t&&C.throwError("Transaction hash mismatch from Provider.sendTransaction.",A.Yd.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=function(t,i){return E(r,void 0,void 0,(0,a.Z)().mark((function r(){var o,s;return(0,a.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==t&&(t=1),null==i&&(i=0),o=void 0,0!==t&&null!=n&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n}),r.next=6,this._waitForTransaction(e.hash,t,i,o);case 6:if(null!=(s=r.sent)||0!==t){r.next=9;break}return r.abrupt("return",null);case 9:return this._emitted["t:"+e.hash]=s.blockNumber,0===s.status&&C.throwError("transaction failed",A.Yd.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:s}),r.abrupt("return",s);case 12:case"end":return r.stop()}}),r,this)})))},i}},{key:"sendTransaction",value:function(e){return E(this,void 0,void 0,(0,a.Z)().mark((function t(){var n,r,i,o;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,Promise.resolve(e).then((function(e){return(0,h.Dv)(e)}));case 4:return n=t.sent,null==(r=this.formatter.transaction(e)).confirmations&&(r.confirmations=0),t.next=9,this._getInternalBlockNumber(100+2*this.pollingInterval);case 9:return i=t.sent,t.prev=10,t.next=13,this.perform("sendTransaction",{signedTransaction:n});case 13:return o=t.sent,t.abrupt("return",this._wrapTransaction(r,o,i));case 17:throw t.prev=17,t.t0=t.catch(10),t.t0.transaction=r,t.t0.transactionHash=r.hash,t.t0;case 22:case"end":return t.stop()}}),t,this,[[10,17]])})))}},{key:"_getTransactionRequest",value:function(e){return E(this,void 0,void 0,(0,a.Z)().mark((function t(){var n,r,i=this;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return n=t.sent,r={},["from","to"].forEach((function(e){null!=n[e]&&(r[e]=Promise.resolve(n[e]).then((function(e){return e?i._getAddress(e):null})))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((function(e){null!=n[e]&&(r[e]=Promise.resolve(n[e]).then((function(e){return e?f.O$.from(e):null})))})),["type"].forEach((function(e){null!=n[e]&&(r[e]=Promise.resolve(n[e]).then((function(e){return null!=e?e:null})))})),n.accessList&&(r.accessList=this.formatter.accessList(n.accessList)),["data"].forEach((function(e){null!=n[e]&&(r[e]=Promise.resolve(n[e]).then((function(e){return e?(0,h.Dv)(e):null})))})),t.t0=this.formatter,t.next=12,(0,y.mE)(r);case 12:return t.t1=t.sent,t.abrupt("return",t.t0.transactionRequest.call(t.t0,t.t1));case 14:case"end":return t.stop()}}),t,this)})))}},{key:"_getFilter",value:function(e){return E(this,void 0,void 0,(0,a.Z)().mark((function t(){var n,r=this;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,n={},null!=e.address&&(n.address=this._getAddress(e.address)),["blockHash","topics"].forEach((function(t){null!=e[t]&&(n[t]=e[t])})),["fromBlock","toBlock"].forEach((function(t){null!=e[t]&&(n[t]=r._getBlockTag(e[t]))})),t.t0=this.formatter,t.next=10,(0,y.mE)(n);case 10:return t.t1=t.sent,t.abrupt("return",t.t0.filter.call(t.t0,t.t1));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"_call",value:function(e,t,n){return E(this,void 0,void 0,(0,a.Z)().mark((function r(){var i,o,s,u,c,l,d,p,v,m,y,g,b,w,x;return(0,a.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n>=10&&C.throwError("CCIP read exceeded maximum redirections",A.Yd.errors.SERVER_ERROR,{redirects:n,transaction:e}),i=e.to,r.next=4,this.perform("call",{transaction:e,blockTag:t});case 4:if(o=r.sent,!(n>=0&&"latest"===t&&null!=i&&"0x556f1830"===o.substring(0,10)&&(0,h.E1)(o)%32===4)){r.next=31;break}for(r.prev=6,s=(0,h.p3)(o,4),u=(0,h.p3)(s,0,32),f.O$.from(u).eq(i)||C.throwError("CCIP Read sender did not match",A.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o}),c=[],l=f.O$.from((0,h.p3)(s,32,64)).toNumber(),d=f.O$.from((0,h.p3)(s,l,l+32)).toNumber(),p=(0,h.p3)(s,l+32),v=0;vthis._emitted.block)){e.next=10;break}return e.abrupt("return",null);case 10:return e.abrupt("return",void 0);case 11:if(!t){e.next=34;break}o=null,s=0;case 14:if(!(s0}},{key:"_stopEvent",value:function(e){this.polling=this._events.filter((function(e){return e.pollable()})).length>0}},{key:"_addEventListener",value:function(e,t,n){var r=new j(R(e),t,n);return this._events.push(r),this._startEvent(r),this}},{key:"on",value:function(e,t){return this._addEventListener(e,t,!1)}},{key:"once",value:function(e,t){return this._addEventListener(e,t,!0)}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=0&&(t.throttleRetry=!0),t}return e.result}function K(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){var t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){var n=new Error("invalid response");throw n.result=JSON.stringify(e),n}if(e.error){var r=new Error(e.error.message||"unknown error");throw e.error.code&&(r.code=e.error.code),e.error.data&&(r.data=e.error.data),r}return e.result}function Q(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function J(e,t,n){if("call"===e&&t.code===b.Yd.errors.SERVER_ERROR){var r=t.error;if(r&&(r.message.match(/reverted/i)||r.message.match(/VM execution error/i))){var i=r.data;if(i&&(i="0x"+i.replace(/^.*0x/i,"")),(0,U.A7)(i))return i;V.throwError("missing revert data in call exception",b.Yd.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}var o=t.message;throw t.code===b.Yd.errors.SERVER_ERROR&&(t.error&&"string"===typeof t.error.message?o=t.error.message:"string"===typeof t.body?o=t.body:"string"===typeof t.responseText&&(o=t.responseText)),(o=(o||"").toLowerCase()).match(/insufficient funds/)&&V.throwError("insufficient funds for intrinsic transaction cost",b.Yd.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),o.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&V.throwError("nonce has already been used",b.Yd.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),o.match(/another transaction with same nonce/)&&V.throwError("replacement fee too low",b.Yd.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),o.match(/execution failed due to an exception|execution reverted/)&&V.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}var X=function(e){(0,c.Z)(n,e);var t=(0,l.Z)(n);function n(e,r){var i;return(0,a.Z)(this,n),i=t.call(this,e),(0,d.zG)((0,u.Z)(i),"baseUrl",i.getBaseUrl()),(0,d.zG)((0,u.Z)(i),"apiKey",r||null),i}return(0,s.Z)(n,[{key:"getBaseUrl",value:function(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return V.throwArgumentError("unsupported network","network",this.network.name)}},{key:"getUrl",value:function(e,t){var n=Object.keys(t).reduce((function(e,n){var r=t[n];return null!=r&&(e+="&".concat(n,"=").concat(r)),e}),""),r=this.apiKey?"&apikey=".concat(this.apiKey):"";return"".concat(this.baseUrl,"/api?module=").concat(e).concat(n).concat(r)}},{key:"getPostUrl",value:function(){return"".concat(this.baseUrl,"/api")}},{key:"getPostData",value:function(e,t){return t.module=e,t.apikey=this.apiKey,t}},{key:"fetch",value:function(e,t,n){return q(this,void 0,void 0,(0,h.Z)().mark((function r(){var i,o,a,s,u,c,l=this;return(0,h.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=n?this.getPostUrl():this.getUrl(e,t),o=n?this.getPostData(e,t):null,a="proxy"===e?K:Y,this.emit("debug",{action:"request",request:i,provider:this}),s={url:i,throttleSlotInterval:1e3,throttleCallback:function(e,t){return l.isCommunityResource()&&(0,f.vh)(),Promise.resolve(!0)}},u=null,o&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},u=Object.keys(o).map((function(e){return"".concat(e,"=").concat(o[e])})).join("&")),r.next=9,(0,H.rd)(s,u,a||K);case 9:return c=r.sent,this.emit("debug",{action:"response",request:i,response:(0,d.p$)(c),provider:this}),r.abrupt("return",c);case 12:case"end":return r.stop()}}),r,this)})))}},{key:"detectNetwork",value:function(){return q(this,void 0,void 0,(0,h.Z)().mark((function e(){return(0,h.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.network);case 1:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){var r=this,i=Object.create(null,{perform:{get:function(){return(0,v.Z)((0,m.Z)(n.prototype),"perform",r)}}});return q(this,void 0,void 0,(0,h.Z)().mark((function n(){var r,o,a,s,u,c,l,d,f;return(0,h.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=e,n.next="getBlockNumber"===n.t0?3:"getGasPrice"===n.t0?4:"getBalance"===n.t0?5:"getTransactionCount"===n.t0?6:"getCode"===n.t0?7:"getStorageAt"===n.t0?8:"sendTransaction"===n.t0?9:"getBlock"===n.t0?10:"getTransaction"===n.t0?13:"getTransactionReceipt"===n.t0?14:"call"===n.t0?15:"estimateGas"===n.t0?29:"getLogs"===n.t0?41:"getEtherPrice"===n.t0?65:72;break;case 3:return n.abrupt("return",this.fetch("proxy",{action:"eth_blockNumber"}));case 4:return n.abrupt("return",this.fetch("proxy",{action:"eth_gasPrice"}));case 5:return n.abrupt("return",this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag}));case 6:return n.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag}));case 7:return n.abrupt("return",this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag}));case 8:return n.abrupt("return",this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag}));case 9:return n.abrupt("return",this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((function(e){return J("sendTransaction",e,t.signedTransaction)})));case 10:if(!t.blockTag){n.next=12;break}return n.abrupt("return",this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"}));case 12:throw new Error("getBlock by blockHash not implemented");case 13:return n.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash}));case 14:return n.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash}));case 15:if("latest"===t.blockTag){n.next=17;break}throw new Error("EtherscanProvider does not support blockTag for call");case 17:return(r=G(t.transaction)).module="proxy",r.action="eth_call",n.prev=20,n.next=23,this.fetch("proxy",r,!0);case 23:return n.abrupt("return",n.sent);case 26:return n.prev=26,n.t1=n.catch(20),n.abrupt("return",J("call",n.t1,t.transaction));case 29:return(o=G(t.transaction)).module="proxy",o.action="eth_estimateGas",n.prev=32,n.next=35,this.fetch("proxy",o,!0);case 35:return n.abrupt("return",n.sent);case 38:return n.prev=38,n.t2=n.catch(32),n.abrupt("return",J("estimateGas",n.t2,t.transaction));case 41:return a={action:"getLogs"},t.filter.fromBlock&&(a.fromBlock=Q(t.filter.fromBlock)),t.filter.toBlock&&(a.toBlock=Q(t.filter.toBlock)),t.filter.address&&(a.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&V.throwError("unsupported topic count",b.Yd.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length&&("string"===typeof(s=t.filter.topics[0])&&66===s.length||V.throwError("unsupported topic format",b.Yd.errors.UNSUPPORTED_OPERATION,{topic0:s}),a.topic0=s)),n.next=48,this.fetch("logs",a);case 48:u=n.sent,c={},l=0;case 51:if(!(lt?null:(r+i)/2}function oe(e){if(null===e)return"null";if("number"===typeof e||"boolean"===typeof e)return JSON.stringify(e);if("string"===typeof e)return e;if(y.O$.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((function(e){return oe(e)})));if("object"===typeof e){var t=Object.keys(e);return t.sort(),"{"+t.map((function(t){var n=e[t];return n="function"===typeof n?"[function]":oe(n),JSON.stringify(t)+":"+n})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}var ae=1;function se(e){var t=null,n=null,r=new Promise((function(r){t=function(){n&&(clearTimeout(n),n=null),r()},n=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return r},wait:function(e){return r=r.then(e)}}}var ue=[b.Yd.errors.CALL_EXCEPTION,b.Yd.errors.INSUFFICIENT_FUNDS,b.Yd.errors.NONCE_EXPIRED,b.Yd.errors.REPLACEMENT_UNDERPRICED,b.Yd.errors.UNPREDICTABLE_GAS_LIMIT],ce=["address","args","errorArgs","errorSignature","method","transaction"];function le(e,t){var n={weight:e.weight};return Object.defineProperty(n,"provider",{get:function(){return e.provider}}),e.start&&(n.start=e.start),t&&(n.duration=t-e.start),e.done&&(e.error?n.error=e.error:n.result=e.result||null),n}function de(e,t,n){var r=oe;switch(t){case"getBlockNumber":return function(t){var n=t.map((function(e){return e.result})),r=ie(t.map((function(e){return e.result})),2);if(null!=r)return r=Math.ceil(r),n.indexOf(r+1)>=0&&r++,r>=e._highestBlockNumber&&(e._highestBlockNumber=r),e._highestBlockNumber};case"getGasPrice":return function(e){var t=e.map((function(e){return e.result}));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return ie(e.map((function(e){return e.result})))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":r=function(e){return null==e?null:((e=(0,d.DC)(e)).confirmations=-1,oe(e))};break;case"getBlock":r=n.includeTransactions?function(e){return null==e?null:((e=(0,d.DC)(e)).transactions=e.transactions.map((function(e){return(e=(0,d.DC)(e)).confirmations=-1,e})),oe(e))}:function(e){return null==e?null:oe(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(n){var r={};n.forEach((function(t){var n=e(t.result);r[n]||(r[n]={count:0,result:t.result}),r[n].count++}));for(var i=Object.keys(r),o=0;o=t)return a.result}}}(r,e.quorum)}function fe(e,t){return ee(this,void 0,void 0,(0,h.Z)().mark((function n(){var r;return(0,h.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(null!=(r=e.provider).blockNumber&&r.blockNumber>=t||-1===t)){n.next=3;break}return n.abrupt("return",r);case 3:return n.abrupt("return",(0,H.$l)((function(){return new Promise((function(n,i){setTimeout((function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}),0)}))}),{oncePoll:r}));case 4:case"end":return n.stop()}}),n)})))}function he(e,t,n,r){return ee(this,void 0,void 0,(0,h.Z)().mark((function i(){var o,a;return(0,h.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:o=e.provider,i.t0=n,i.next="getBlockNumber"===i.t0||"getGasPrice"===i.t0?4:"getEtherPrice"===i.t0?5:"getBalance"===i.t0||"getTransactionCount"===i.t0||"getCode"===i.t0?8:"getStorageAt"===i.t0?13:"getBlock"===i.t0?18:"call"===i.t0||"estimateGas"===i.t0?23:"getTransaction"===i.t0||"getTransactionReceipt"===i.t0?30:"getLogs"===i.t0?31:37;break;case 4:return i.abrupt("return",o[n]());case 5:if(!o.getEtherPrice){i.next=7;break}return i.abrupt("return",o.getEtherPrice());case 7:return i.abrupt("break",37);case 8:if(!r.blockTag||!(0,U.A7)(r.blockTag)){i.next=12;break}return i.next=11,fe(e,t);case 11:o=i.sent;case 12:return i.abrupt("return",o[n](r.address,r.blockTag||"latest"));case 13:if(!r.blockTag||!(0,U.A7)(r.blockTag)){i.next=17;break}return i.next=16,fe(e,t);case 16:o=i.sent;case 17:return i.abrupt("return",o.getStorageAt(r.address,r.position,r.blockTag||"latest"));case 18:if(!r.blockTag||!(0,U.A7)(r.blockTag)){i.next=22;break}return i.next=21,fe(e,t);case 21:o=i.sent;case 22:return i.abrupt("return",o[r.includeTransactions?"getBlockWithTransactions":"getBlock"](r.blockTag||r.blockHash));case 23:if(!r.blockTag||!(0,U.A7)(r.blockTag)){i.next=27;break}return i.next=26,fe(e,t);case 26:o=i.sent;case 27:if("call"!==n||!r.blockTag){i.next=29;break}return i.abrupt("return",o[n](r.transaction,r.blockTag));case 29:return i.abrupt("return",o[n](r.transaction));case 30:return i.abrupt("return",o[n](r.transactionHash));case 31:if(!((a=r.filter).fromBlock&&(0,U.A7)(a.fromBlock)||a.toBlock&&(0,U.A7)(a.toBlock))){i.next=36;break}return i.next=35,fe(e,t);case 35:o=i.sent;case 36:return i.abrupt("return",o.getLogs(a));case 37:return i.abrupt("return",te.throwError("unknown method error",b.Yd.errors.UNKNOWN_ERROR,{method:n,params:r}));case 38:case"end":return i.stop()}}),i)})))}var pe=function(e){(0,c.Z)(n,e);var t=(0,l.Z)(n);function n(e,i){var o;(0,a.Z)(this,n),0===e.length&&te.throwArgumentError("missing providers","providers",e);var s=e.map((function(e,t){if(r.zt.isProvider(e)){var n=(0,f.Gp)(e)?2e3:750;return Object.freeze({provider:e,weight:1,stallTimeout:n,priority:1})}var i=(0,d.DC)(e);null==i.priority&&(i.priority=1),null==i.stallTimeout&&(i.stallTimeout=(0,f.Gp)(e)?2e3:750),null==i.weight&&(i.weight=1);var o=i.weight;return(o%1||o>512||o<1)&&te.throwArgumentError("invalid weight; must be integer in [1, 512]","providers[".concat(t,"].weight"),o),Object.freeze(i)})),c=s.reduce((function(e,t){return e+t.weight}),0);null==i?i=c/2:i>c&&te.throwArgumentError("quorum will always fail; larger than total weight","quorum",i);var l=re(s.map((function(e){return e.provider.network})));return null==l&&(l=new Promise((function(e,t){setTimeout((function(){o.detectNetwork().then(e,t)}),0)}))),o=t.call(this,l),(0,d.zG)((0,u.Z)(o),"providerConfigs",Object.freeze(s)),(0,d.zG)((0,u.Z)(o),"quorum",i),o._highestBlockNumber=-1,o}return(0,s.Z)(n,[{key:"detectNetwork",value:function(){return ee(this,void 0,void 0,(0,h.Z)().mark((function e(){var t;return(0,h.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.providerConfigs.map((function(e){return e.provider.getNetwork()})));case 2:return t=e.sent,e.abrupt("return",re(t));case 4:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){return ee(this,void 0,void 0,(0,h.Z)().mark((function n(){var r,i,o,a,s,u,c,l,f,p,v=this;return(0,h.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("sendTransaction"!==e){n.next=13;break}return n.next=3,Promise.all(this.providerConfigs.map((function(e){return e.provider.sendTransaction(t.signedTransaction).then((function(e){return e.hash}),(function(e){return e}))})));case 3:r=n.sent,i=0;case 5:if(!(i=v.quorum)){n.next=22;break}if(void 0===(m=a(p))){n.next=18;break}return s.forEach((function(e){e.staller&&e.staller.cancel(),e.cancelled=!0})),n.abrupt("return",{v:m});case 18:if(l){n.next=21;break}return n.next=21,se(100).getPromise();case 21:l=!1;case 22:if(y=s.reduce((function(e,t){if(!t.done||null==t.error)return e;var n=t.error.code;return ue.indexOf(n)>=0&&(e[n]||(e[n]={error:t.error,weight:0}),e[n].weight+=t.weight),e}),{}),Object.keys(y).forEach((function(e){var t=y[e];if(!(t.weight=0&&a.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&A.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}function C(e){return new Promise((function(t){setTimeout(t,e)}))}function T(e){if(e.error){var t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function P(e){return e?e.toLowerCase():e}var R={},O=function(e){(0,c.Z)(n,e);var t=(0,l.Z)(n);function n(e,r,i){var o;if((0,a.Z)(this,n),o=t.call(this),e!==R)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return(0,v.zG)((0,u.Z)(o),"provider",r),null==i&&(i=0),"string"===typeof i?((0,v.zG)((0,u.Z)(o),"_address",o.provider.formatter.address(i)),(0,v.zG)((0,u.Z)(o),"_index",null)):"number"===typeof i?((0,v.zG)((0,u.Z)(o),"_index",i),(0,v.zG)((0,u.Z)(o),"_address",null)):A.throwArgumentError("invalid address or index","addressOrIndex",i),o}return(0,s.Z)(n,[{key:"connect",value:function(e){return A.throwError("cannot alter JSON-RPC Signer connection",b.Yd.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}},{key:"connectUnchecked",value:function(){return new I(R,this.provider,this._address||this._index)}},{key:"getAddress",value:function(){var e=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(t){return t.length<=e._index&&A.throwError("unknown account #"+e._index,b.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),e.provider.formatter.address(t[e._index])}))}},{key:"sendUncheckedTransaction",value:function(e){var t=this;e=(0,v.DC)(e);var n=this.getAddress().then((function(e){return e&&(e=e.toLowerCase()),e}));if(null==e.gasLimit){var r=(0,v.DC)(e);r.from=n,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((function(e){return k(t,void 0,void 0,(0,o.Z)().mark((function t(){var n;return(0,o.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=e){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this.provider.resolveName(e);case 4:return null==(n=t.sent)&&A.throwArgumentError("provided ENS name resolves to null","tx.to",e),t.abrupt("return",n);case 7:case"end":return t.stop()}}),t,this)})))}))),(0,v.mE)({tx:(0,v.mE)(e),sender:n}).then((function(n){var r=n.tx,i=n.sender;null!=r.from?r.from.toLowerCase()!==i&&A.throwArgumentError("from address mismatch","transaction",e):r.from=i;var o=t.provider.constructor.hexlifyTransaction(r,{from:!0});return t.provider.send("eth_sendTransaction",[o]).then((function(e){return e}),(function(e){return"string"===typeof e.message&&e.message.match(/user denied/i)&&A.throwError("user rejected transaction",b.Yd.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:r}),E("sendTransaction",e,o)}))}))}},{key:"signTransaction",value:function(e){return A.throwError("signing transactions is unsupported",b.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}},{key:"sendTransaction",value:function(e){return k(this,void 0,void 0,(0,o.Z)().mark((function t(){var n,r,i=this;return(0,o.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval);case 2:return n=t.sent,t.next=5,this.sendUncheckedTransaction(e);case 5:return r=t.sent,t.prev=6,t.next=9,(0,g.$l)((function(){return k(i,void 0,void 0,(0,o.Z)().mark((function e(){var t;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.getTransaction(r);case 2:if(null!==(t=e.sent)){e.next=5;break}return e.abrupt("return",void 0);case 5:return e.abrupt("return",this.provider._wrapTransaction(t,r,n));case 6:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this.provider});case 9:return t.abrupt("return",t.sent);case 12:throw t.prev=12,t.t0=t.catch(6),t.t0.transactionHash=r,t.t0;case 16:case"end":return t.stop()}}),t,this,[[6,12]])})))}},{key:"signMessage",value:function(e){return k(this,void 0,void 0,(0,o.Z)().mark((function t(){var n,r;return(0,o.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="string"===typeof e?(0,m.Y0)(e):e,t.next=3,this.getAddress();case 3:return r=t.sent,t.prev=4,t.next=7,this.provider.send("personal_sign",[(0,h.Dv)(n),r.toLowerCase()]);case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),"string"===typeof t.t0.message&&t.t0.message.match(/user denied/i)&&A.throwError("user rejected signing",b.Yd.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t.t0;case 14:case"end":return t.stop()}}),t,this,[[4,10]])})))}},{key:"_legacySignMessage",value:function(e){return k(this,void 0,void 0,(0,o.Z)().mark((function t(){var n,r;return(0,o.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="string"===typeof e?(0,m.Y0)(e):e,t.next=3,this.getAddress();case 3:return r=t.sent,t.prev=4,t.next=7,this.provider.send("eth_sign",[r.toLowerCase(),(0,h.Dv)(n)]);case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),"string"===typeof t.t0.message&&t.t0.message.match(/user denied/i)&&A.throwError("user rejected signing",b.Yd.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t.t0;case 14:case"end":return t.stop()}}),t,this,[[4,10]])})))}},{key:"_signTypedData",value:function(e,t,n){return k(this,void 0,void 0,(0,o.Z)().mark((function r(){var i,a,s=this;return(0,o.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,p.E.resolveNames(e,t,n,(function(e){return s.provider.resolveName(e)}));case 2:return i=r.sent,r.next=5,this.getAddress();case 5:return a=r.sent,r.prev=6,r.next=9,this.provider.send("eth_signTypedData_v4",[a.toLowerCase(),JSON.stringify(p.E.getPayload(i.domain,t,i.value))]);case 9:return r.abrupt("return",r.sent);case 12:throw r.prev=12,r.t0=r.catch(6),"string"===typeof r.t0.message&&r.t0.message.match(/user denied/i)&&A.throwError("user rejected signing",b.Yd.errors.ACTION_REJECTED,{action:"_signTypedData",from:a,messageData:{domain:i.domain,types:t,value:i.value}}),r.t0;case 16:case"end":return r.stop()}}),r,this,[[6,12]])})))}},{key:"unlock",value:function(e){return k(this,void 0,void 0,(0,o.Z)().mark((function t(){var n,r;return(0,o.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.provider,t.next=3,this.getAddress();case 3:return r=t.sent,t.abrupt("return",n.send("personal_unlockAccount",[r.toLowerCase(),e,null]));case 5:case"end":return t.stop()}}),t,this)})))}}]),n}(d.E),I=function(e){(0,c.Z)(n,e);var t=(0,l.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"sendTransaction",value:function(e){var t=this;return this.sendUncheckedTransaction(e).then((function(e){return{hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(n){return t.provider.waitForTransaction(e,n)}}}))}}]),n}(O),M={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},j=function(e){(0,c.Z)(n,e);var t=(0,l.Z)(n);function n(e,r){var i;(0,a.Z)(this,n);var o=r;return null==o&&(o=new Promise((function(e,t){setTimeout((function(){i.detectNetwork().then((function(t){e(t)}),(function(e){t(e)}))}),0)}))),i=t.call(this,o),e||(e=(0,v.tu)(i.constructor,"defaultUrl")()),"string"===typeof e?(0,v.zG)((0,u.Z)(i),"connection",Object.freeze({url:e})):(0,v.zG)((0,u.Z)(i),"connection",Object.freeze((0,v.DC)(e))),i._nextId=42,i}return(0,s.Z)(n,[{key:"_cache",get:function(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}},{key:"detectNetwork",value:function(){var e=this;return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((function(){e._cache.detectNetwork=null}),0)),this._cache.detectNetwork}},{key:"_uncachedDetectNetwork",value:function(){return k(this,void 0,void 0,(0,o.Z)().mark((function e(){var t,n;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C(0);case 2:return t=null,e.prev=3,e.next=6,this.send("eth_chainId",[]);case 6:t=e.sent,e.next=19;break;case 9:return e.prev=9,e.t0=e.catch(3),e.prev=11,e.next=14,this.send("net_version",[]);case 14:t=e.sent,e.next=19;break;case 17:e.prev=17,e.t1=e.catch(11);case 19:if(null==t){e.next=28;break}return n=(0,v.tu)(this.constructor,"getNetwork"),e.prev=21,e.abrupt("return",n(f.O$.from(t).toNumber()));case 25:return e.prev=25,e.t2=e.catch(21),e.abrupt("return",A.throwError("could not detect network",b.Yd.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e.t2}));case 28:return e.abrupt("return",A.throwError("could not detect network",b.Yd.errors.NETWORK_ERROR,{event:"noNetwork"}));case 29:case"end":return e.stop()}}),e,this,[[3,9],[11,17],[21,25]])})))}},{key:"getSigner",value:function(e){return new O(R,this,e)}},{key:"getUncheckedSigner",value:function(e){return this.getSigner(e).connectUnchecked()}},{key:"listAccounts",value:function(){var e=this;return this.send("eth_accounts",[]).then((function(t){return t.map((function(t){return e.formatter.address(t)}))}))}},{key:"send",value:function(e,t){var n=this,r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,v.p$)(r),provider:this});var i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];var o=(0,g.rd)(this.connection,JSON.stringify(r),T).then((function(e){return n.emit("debug",{action:"response",request:r,response:e,provider:n}),e}),(function(e){throw n.emit("debug",{action:"response",error:e,request:r,provider:n}),e}));return i&&(this._cache[e]=o,setTimeout((function(){n._cache[e]=null}),0)),o}},{key:"prepareRequest",value:function(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[P(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[P(t.address),t.blockTag]];case"getCode":return["eth_getCode",[P(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[P(t.address),(0,h.$m)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[(0,v.tu)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,v.tu)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=P(t.filter.address)),["eth_getLogs",[t.filter]]}return null}},{key:"perform",value:function(e,t){return k(this,void 0,void 0,(0,o.Z)().mark((function n(){var r,i,a;return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("call"!==e&&"estimateGas"!==e){n.next=8;break}if(!(r=t.transaction)||null==r.type||!f.O$.from(r.type).isZero()){n.next=8;break}if(null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas){n.next=8;break}return n.next=6,this.getFeeData();case 6:null==(i=n.sent).maxFeePerGas&&null==i.maxPriorityFeePerGas&&((t=(0,v.DC)(t)).transaction=(0,v.DC)(r),delete t.transaction.type);case 8:return null==(a=this.prepareRequest(e,t))&&A.throwError(e+" not implemented",b.Yd.errors.NOT_IMPLEMENTED,{operation:e}),n.prev=10,n.next=13,this.send(a[0],a[1]);case 13:return n.abrupt("return",n.sent);case 16:return n.prev=16,n.t0=n.catch(10),n.abrupt("return",E(e,n.t0,t));case 19:case"end":return n.stop()}}),n,this,[[10,16]])})))}},{key:"_startEvent",value:function(e){"pending"===e.tag&&this._startPending(),(0,r.Z)((0,i.Z)(n.prototype),"_startEvent",this).call(this,e)}},{key:"_startPending",value:function(){if(null==this._pendingFilter){var e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(n){return function r(){e.send("eth_getFilterChanges",[n]).then((function(n){if(e._pendingFilter!=t)return null;var r=Promise.resolve();return n.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",r=r.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),r.then((function(){return C(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){r()}),0),null;e.send("eth_uninstallFilter",[n])})).catch((function(e){}))}(),n})).catch((function(e){}))}}},{key:"_stopEvent",value:function(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),(0,r.Z)((0,i.Z)(n.prototype),"_stopEvent",this).call(this,e)}}],[{key:"defaultUrl",value:function(){return"http://localhost:8545"}},{key:"hexlifyTransaction",value:function(e,t){var n=(0,v.DC)(M);if(t)for(var r in t)t[r]&&(n[r]=!0);(0,v.uj)(e,n);var i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null!=e[t]){var n=(0,h.$P)(f.O$.from(e[t]));"gasLimit"===t&&(t="gas"),i[t]=n}})),["from","to","data"].forEach((function(t){null!=e[t]&&(i[t]=(0,h.Dv)(e[t]))})),e.accessList&&(i.accessList=(0,y.z7)(e.accessList)),i}}]),n}(x.Zk)},723:function(e,t,n){"use strict";n.d(t,{Q:function(){return v}});var r=n(5671),i=n(3144),o=n(7326),a=n(136),s=n(9388),u=n(520),c=n(9502),l=n(7059),d=n(1420),f=new c.Yd(l.i),h=1;function p(e,t){var n="Web3LegacyFetcher";return function(e,r){var i=this,o={method:e,params:r,id:h++,jsonrpc:"2.0"};return new Promise((function(e,r){i.emit("debug",{action:"request",fetcher:n,request:(0,u.p$)(o),provider:i}),t(o,(function(t,a){if(t)return i.emit("debug",{action:"response",fetcher:n,error:t,request:o,provider:i}),r(t);if(i.emit("debug",{action:"response",fetcher:n,request:o,response:a,provider:i}),a.error){var s=new Error(a.error.message);return s.code=a.error.code,s.data=a.error.data,r(s)}e(a.result)}))}))}}var v=function(e){(0,a.Z)(n,e);var t=(0,s.Z)(n);function n(e,i){var a;(0,r.Z)(this,n),null==e&&f.throwArgumentError("missing provider","provider",e);var s=null,c=null,l=null;return"function"===typeof e?(s="unknown:",c=e):(!(s=e.host||e.path||"")&&e.isMetaMask&&(s="metamask"),l=e,e.request?(""===s&&(s="eip-1193:"),c=function(e){return function(t,n){var r=this;null==n&&(n=[]);var i={method:t,params:n};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,u.p$)(i),provider:this}),e.request(i).then((function(e){return r.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,response:e,provider:r}),e}),(function(e){throw r.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,error:e,provider:r}),e}))}}(e)):e.sendAsync?c=p(0,e.sendAsync.bind(e)):e.send?c=p(0,e.send.bind(e)):f.throwArgumentError("unsupported provider","provider",e),s||(s="unknown:")),a=t.call(this,s,i),(0,u.zG)((0,o.Z)(a),"jsonRpcFetchFunc",c),(0,u.zG)((0,o.Z)(a),"provider",l),a}return(0,i.Z)(n,[{key:"send",value:function(e,t){return this.jsonRpcFetchFunc(e,t)}}]),n}(d.r)},2282:function(e,t,n){"use strict";function r(e){for(var t=(e=e.slice()).length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}n.d(t,{y:function(){return r}})},7986:function(e,t,n){"use strict";n.r(t),n.d(t,{decode:function(){return f},encode:function(){return c}});var r=n(9716),i=n(9502),o=new i.Yd("rlp/5.7.0");function a(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function s(e,t,n){for(var r=0,i=0;it+1+r&&o.throwError("child data too short",i.Yd.errors.BUFFER_OVERRUN,{})}return{consumed:1+r,result:a}}function d(e,t){if(0===e.length&&o.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{}),e[t]>=248){var n=e[t]-247;t+1+n>e.length&&o.throwError("data short segment too short",i.Yd.errors.BUFFER_OVERRUN,{});var a=s(e,t+1,n);return t+1+n+a>e.length&&o.throwError("data long segment too short",i.Yd.errors.BUFFER_OVERRUN,{}),l(e,t,t+1+n,n+a)}if(e[t]>=192){var u=e[t]-192;return t+1+u>e.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{}),l(e,t,t+1,u)}if(e[t]>=184){var c=e[t]-183;t+1+c>e.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{});var d=s(e,t+1,c);return t+1+c+d>e.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{}),{consumed:1+c+d,result:(0,r.Dv)(e.slice(t+1+c,t+1+c+d))}}if(e[t]>=128){var f=e[t]-128;return t+1+f>e.length&&o.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{}),{consumed:1+f,result:(0,r.Dv)(e.slice(t+1,t+1+f))}}return{consumed:1,result:(0,r.Dv)(e[t])}}function f(e){var t=(0,r.lE)(e),n=d(t,0);return n.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),n.result}},9598:function(e,t,n){"use strict";n.d(t,{Gy:function(){return f},bP:function(){return c},JQ:function(){return l},o:function(){return d}});var r=n(3125),i=n.n(r),o=n(9716),a=n(4667),s=n(9502),u=new s.Yd("sha2/5.7.0");function c(e){return"0x"+i().ripemd160().update((0,o.lE)(e)).digest("hex")}function l(e){return"0x"+i().sha256().update((0,o.lE)(e)).digest("hex")}function d(e){return"0x"+i().sha512().update((0,o.lE)(e)).digest("hex")}function f(e,t,n){return a.p[e]||u.throwError("unsupported algorithm "+e,s.Yd.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+i().hmac(i()[e],(0,o.lE)(t)).update((0,o.lE)(n)).digest("hex")}},4667:function(e,t,n){"use strict";var r;n.d(t,{p:function(){return r}}),function(e){e.sha256="sha256",e.sha512="sha512"}(r||(r={}))},8865:function(e,t,n){"use strict";n.d(t,{Et:function(){return Q},VW:function(){return X},LO:function(){return J}});var r=n(5671),i=n(3144),o=n(518),a=n.n(o),s=n(3125),u=n.n(s);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self&&self;function c(e,t,n){return n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===t||null===t)&&n.path)}},e(n,n.exports),n.exports}var l=d;function d(e,t){if(!e)throw new Error(t||"Assertion failed")}d.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var f=c((function(e,t){var n=t;function r(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",n=0;n>8,a=255&i;o?n.push(o,a):n.push(a)}return n},n.zero2=r,n.toHex=i,n.encode=function(e,t){return"hex"===t?i(e):e}})),h=c((function(e,t){var n=t;n.assert=l,n.toArray=f.toArray,n.zero2=f.zero2,n.toHex=f.toHex,n.encode=f.encode,n.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,r[a]=s,o.iushrn(1)}return r},n.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0===(1&u)?0:3!==(r=e.andln(7)+i&7)&&5!==r||2!==c?u:-u,n[0].push(a),s=0===(1&c)?0:3!==(r=t.andln(7)+o&7)&&5!==r||2!==u?c:-c,n[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return n},n.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.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")}})),p=h.getNAF,v=h.getJSF,m=h.assert;function y(e,t){this.type=e,this.p=new(a())(t.p,16),this.red=t.prime?a().red(t.prime):a().mont(this.p),this.zero=new(a())(0).toRed(this.red),this.one=new(a())(1).toRed(this.red),this.two=new(a())(2).toRed(this.red),this.n=t.n&&new(a())(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 n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var g=y;function b(e,t){this.curve=e,this.type=t,this.precomputed=null}y.prototype.point=function(){throw new Error("Not implemented")},y.prototype.validate=function(){throw new Error("Not implemented")},y.prototype._fixedNafMul=function(e,t){m(e.precomputed);var n=e._getDoubles(),r=p(t,1,this._bitLength),i=(1<=o;u--)a=(a<<1)+r[u];s.push(a)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(o=0;o=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=o[s];m(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},y.prototype._wnafMulAdd=function(e,t,n,r,i){var o,a,s,u=this._wnafT1,c=this._wnafT2,l=this._wnafT3,d=0;for(o=0;o=1;o-=2){var h=o-1,m=o;if(1===u[h]&&1===u[m]){var y=[t[h],null,null,t[m]];0===t[h].y.cmp(t[m].y)?(y[1]=t[h].add(t[m]),y[2]=t[h].toJ().mixedAdd(t[m].neg())):0===t[h].y.cmp(t[m].y.redNeg())?(y[1]=t[h].toJ().mixedAdd(t[m]),y[2]=t[h].add(t[m].neg())):(y[1]=t[h].toJ().mixedAdd(t[m]),y[2]=t[h].toJ().mixedAdd(t[m].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],b=v(n[h],n[m]);for(d=Math.max(b[0].length,d),l[h]=new Array(d),l[m]=new Array(d),a=0;a=0;o--){for(var _=0;o>=0;){var S=!0;for(a=0;a=0&&_++,k=k.dblp(_),o<0)break;for(a=0;a0?s=c[a][E-1>>1]:E<0&&(s=c[a][-E-1>>1].neg()),k="affine"===s.type?k.mixedAdd(s):k.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},b.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i=0&&(o=t,s=n),r.negative&&(r=r.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:r,b:i},{a:o,b:s}]},k.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),s=o.mul(r.a),u=i.mul(n.b),c=o.mul(r.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},k.prototype.pointFromX=function(e,t){(e=new(a())(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var i=r.fromRed().isOdd();return(t&&!i||!t&&i)&&(r=r.redNeg()),this.point(e,r)},k.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},k.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},_.prototype.isInfinity=function(){return this.inf},_.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 n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},_.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,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},_.prototype.getX=function(){return this.x.fromRed()},_.prototype.getY=function(){return this.y.fromRed()},_.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)},_.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},_.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},_.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))},_.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},_.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},w(S,g.BasePoint),k.prototype.jpoint=function(e,t,n){return new S(this,e,t,n)},S.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},S.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},S.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),s=r.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),d=r.redMul(c),f=u.redSqr().redIAdd(l).redISub(d).redISub(d),h=u.redMul(d.redISub(f)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},S.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=n.redSub(r),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),l=n.redMul(u),d=s.redSqr().redIAdd(c).redISub(l).redISub(l),f=s.redMul(l.redISub(d)).redISub(i.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},S.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 n=this;for(t=0;t=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},S.prototype.inspect=function(){return this.isInfinity()?"":""},S.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var E=c((function(e,t){var n=t;n.base=g,n.short=A,n.mont=null,n.edwards=null})),C=c((function(e,t){var n,r=t,i=h.assert;function o(e){"short"===e.type?this.curve=new E.short(e):"edwards"===e.type?this.curve=new E.edwards(e):this.curve=new E.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new o(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=o,a("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:u().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:u().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:u().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:u().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"]}),a("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:u().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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:u().sha256,gRed:!1,g:["9"]}),a("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:u().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=null.crash()}catch(s){n=void 0}a("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:u().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})}));function T(e){if(!(this instanceof T))return new T(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"),n=f.toArray(e.nonce,e.nonceEnc||"hex"),r=f.toArray(e.pers,e.persEnc||"hex");l(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}var P=T;T.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},T.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(r=n,n=t,t=null),n&&(n=f.toArray(n,r||"hex"),this._update(n));for(var i=[];i.length"};var M=h.assert;function j(e,t){if(e instanceof j)return e;this._importDER(e,t)||(M(e.r&&e.s,"Signature without r or s"),this.r=new(a())(e.r,16),this.s=new(a())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var B=j;function N(){this.place=0}function Z(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function D(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}j.prototype._importDER=function(e,t){e=h.toArray(e,t);var n=new N;if(48!==e[n.place++])return!1;var r=Z(e,n);if(!1===r)return!1;if(r+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var i=Z(e,n);if(!1===i)return!1;var o=e.slice(n.place,i+n.place);if(n.place+=i,2!==e[n.place++])return!1;var s=Z(e,n);if(!1===s)return!1;if(e.length!==s+n.place)return!1;var u=e.slice(n.place,s+n.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new(a())(o),this.s=new(a())(u),this.recoveryParam=null,!0},j.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=D(t),n=D(n);!n[0]&&!(128&n[1]);)n=n.slice(1);var r=[2];F(r,t.length),(r=r.concat(t)).push(2),F(r,n.length);var i=r.concat(n),o=[48];return F(o,i.length),o=o.concat(i),h.encode(o,e)};var L=function(){throw new Error("unsupported")},z=h.assert;function U(e){if(!(this instanceof U))return new U(e);"string"===typeof e&&(z(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 W=U;U.prototype.keyPair=function(e){return new I(this,e)},U.prototype.keyFromPrivate=function(e,t){return I.fromPrivate(this,e,t)},U.prototype.keyFromPublic=function(e,t){return I.fromPublic(this,e,t)},U.prototype.genKeyPair=function(e){e||(e={});for(var t=new P({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||L(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new(a())(2));;){var i=new(a())(t.generate(n));if(!(i.cmp(r)>0))return i.iaddn(1),this.keyFromPrivate(i)}},U.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},U.prototype.sign=function(e,t,n,r){"object"===typeof n&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new(a())(e,16));for(var i=this.n.byteLength(),o=t.getPrivate().toArray("be",i),s=e.toArray("be",i),u=new P({hash:this.hash,entropy:o,nonce:s,pers:r.pers,persEnc:r.persEnc||"utf8"}),c=this.n.sub(new(a())(1)),l=0;;l++){var d=r.k?r.k(l):new(a())(u.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(c)>=0)){var f=this.g.mul(d);if(!f.isInfinity()){var h=f.getX(),p=h.umod(this.n);if(0!==p.cmpn(0)){var v=d.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var m=(f.getY().isOdd()?1:0)|(0!==h.cmp(p)?2:0);return r.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),m^=1),new B({r:p,s:v,recoveryParam:m})}}}}}},U.prototype.verify=function(e,t,n,r){e=this._truncateToN(new(a())(e,16)),n=this.keyFromPublic(n,r);var i=(t=new B(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,u=o.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,n.getPublic(),l)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(c,n.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},U.prototype.recoverPubKey=function(e,t,n,r){z((3&n)===n,"The recovery param is more than two bits"),t=new B(t,r);var i=this.n,o=new(a())(e),s=t.r,u=t.s,c=1&n,l=n>>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),c):this.curve.pointFromX(s,c);var d=t.r.invm(i),f=i.sub(o).mul(d).umod(i),h=u.mul(d).umod(i);return this.g.mulAdd(f,s,h)},U.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new B(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")};var H=c((function(e,t){var n=t;n.version="6.5.4",n.utils=h,n.rand=function(){throw new Error("unsupported")},n.curve=E,n.curves=C,n.ec=W,n.eddsa=null})).ec,q=n(9716),V=n(520),G=new(n(9502).Yd)("signing-key/5.7.0"),Y=null;function K(){return Y||(Y=new H("secp256k1")),Y}var Q=function(){function e(t){(0,r.Z)(this,e),(0,V.zG)(this,"curve","secp256k1"),(0,V.zG)(this,"privateKey",(0,q.Dv)(t)),32!==(0,q.E1)(this.privateKey)&&G.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var n=K().keyFromPrivate((0,q.lE)(this.privateKey));(0,V.zG)(this,"publicKey","0x"+n.getPublic(!1,"hex")),(0,V.zG)(this,"compressedPublicKey","0x"+n.getPublic(!0,"hex")),(0,V.zG)(this,"_isSigningKey",!0)}return(0,i.Z)(e,[{key:"_addPoint",value:function(e){var t=K().keyFromPublic((0,q.lE)(this.publicKey)),n=K().keyFromPublic((0,q.lE)(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=K().keyFromPrivate((0,q.lE)(this.privateKey)),n=(0,q.lE)(e);32!==n.length&&G.throwArgumentError("bad digest length","digest",e);var r=t.sign(n,{canonical:!0});return(0,q.N)({recoveryParam:r.recoveryParam,r:(0,q.$m)("0x"+r.r.toString(16),32),s:(0,q.$m)("0x"+r.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=K().keyFromPrivate((0,q.lE)(this.privateKey)),n=K().keyFromPublic((0,q.lE)(X(e)));return(0,q.$m)("0x"+t.derive(n.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function J(e,t){var n=(0,q.N)(t),r={r:(0,q.lE)(n.r),s:(0,q.lE)(n.s)};return"0x"+K().recoverPubKey((0,q.lE)(e),r,n.recoveryParam).encode("hex",!1)}function X(e,t){var n=(0,q.lE)(e);if(32===n.length){var r=new Q(n);return t?"0x"+K().keyFromPrivate(n).getPublic(!0,"hex"):r.publicKey}return 33===n.length?t?(0,q.Dv)(n):"0x"+K().keyFromPublic(n).getPublic(!1,"hex"):65===n.length?t?"0x"+K().keyFromPublic(n).getPublic(!0,"hex"):(0,q.Dv)(n):G.throwArgumentError("invalid public or private key","key","[REDACTED]")}},4530:function(e,t,n){"use strict";n.d(t,{wn:function(){return m},P2:function(){return v},JQ:function(){return y}});var r=n(2257),i=n(9716),o=n(8062),a=n(9598),s=n(3374),u=n(9502),c=new RegExp("^bytes([0-9]+)$"),l=new RegExp("^(u?int)([0-9]*)$"),d=new RegExp("^(.*)\\[([0-9]*)\\]$"),f="0000000000000000000000000000000000000000000000000000000000000000",h=new u.Yd("solidity/5.7.0");function p(e,t,n){switch(e){case"address":return n?(0,i.Bu)(t,32):(0,i.lE)(t);case"string":return(0,s.Y0)(t);case"bytes":return(0,i.lE)(t);case"bool":return t=t?"0x01":"0x00",n?(0,i.Bu)(t,32):(0,i.lE)(t)}var o=e.match(l);if(o){var a=parseInt(o[2]||"256");return(o[2]&&String(a)!==o[2]||a%8!==0||0===a||a>256)&&h.throwArgumentError("invalid number type","type",e),n&&(a=256),t=r.O$.from(t).toTwos(a),(0,i.Bu)(t,a/8)}if(o=e.match(c)){var u=parseInt(o[1]);return(String(u)!==o[1]||0===u||u>32)&&h.throwArgumentError("invalid bytes type","type",e),(0,i.lE)(t).byteLength!==u&&h.throwArgumentError("invalid value for ".concat(e),"value",t),n?(0,i.lE)((t+f).substring(0,66)):t}if((o=e.match(d))&&Array.isArray(t)){var v=o[1];parseInt(o[2]||String(t.length))!=t.length&&h.throwArgumentError("invalid array length for ".concat(e),"value",t);var m=[];return t.forEach((function(e){m.push(p(v,e,!0))})),(0,i.zo)(m)}return h.throwArgumentError("invalid type","type",e)}function v(e,t){e.length!=t.length&&h.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);var n=[];return e.forEach((function(e,r){n.push(p(e,t[r]))})),(0,i.Dv)((0,i.zo)(n))}function m(e,t){return(0,o.w)(v(e,t))}function y(e,t){return(0,a.JQ)(v(e,t))}},3374:function(e,t,n){"use strict";n.d(t,{Uj:function(){return r},te:function(){return u},Uw:function(){return i},U$:function(){return f},uu:function(){return h},Y0:function(){return l},XL:function(){return v},ZN:function(){return p}});var r,i,o=n(9716),a=new(n(9502).Yd)("strings/5.7.0");function s(e,t,n,r,o){if(e===i.BAD_PREFIX||e===i.UNEXPECTED_CONTINUE){for(var a=0,s=t+1;s>6===2;s++)a++;return a}return e===i.OVERRUN?n.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(r||(r={})),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"}(i||(i={}));var u=Object.freeze({error:function(e,t,n,r,i){return a.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",n)},ignore:s,replace:function(e,t,n,r,o){return e===i.OVERLONG?(r.push(o),0):(r.push(65533),s(e,t,n))}});function c(e,t){null==t&&(t=u.error),e=(0,o.lE)(e);for(var n=[],r=0;r>7!==0){var s=null,c=null;if(192===(224&a))s=1,c=127;else if(224===(240&a))s=2,c=2047;else{if(240!==(248&a)){r+=t(128===(192&a)?i.UNEXPECTED_CONTINUE:i.BAD_PREFIX,r-1,e,n);continue}s=3,c=65535}if(r-1+s>=e.length)r+=t(i.OVERRUN,r-1,e,n);else{for(var l=a&(1<<8-s-1)-1,d=0;d1114111?r+=t(i.OUT_OF_RANGE,r-1-s,e,n,l):l>=55296&&l<=57343?r+=t(i.UTF16_SURROGATE,r-1-s,e,n,l):l<=c?r+=t(i.OVERLONG,r-1-s,e,n,l):n.push(l))}}else n.push(a)}return n}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.current;t!=r.current&&(a.checkNormalize(),e=e.normalize(t));for(var n=[],i=0;i>6|192),n.push(63&s|128);else if(55296==(64512&s)){i++;var u=e.charCodeAt(i);if(i>=e.length||56320!==(64512&u))throw new Error("invalid utf-8 string");var c=65536+((1023&s)<<10)+(1023&u);n.push(c>>18|240),n.push(c>>12&63|128),n.push(c>>6&63|128),n.push(63&c|128)}else n.push(s>>12|224),n.push(s>>6&63|128),n.push(63&s|128)}return(0,o.lE)(n)}function d(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function f(e,t){return'"'+c(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?d(e):d(55296+((e-=65536)>>10&1023))+d(56320+(1023&e))})).join("")+'"'}function h(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 p(e,t){return h(c(e,t))}function v(e){return c(l(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.current))}},5452:function(e,t,n){"use strict";n.d(t,{em:function(){return r},z7:function(){return k},db:function(){return g},Qc:function(){return T},RJ:function(){return b},qC:function(){return E}});var r,i=n(7419),o=n(2257),a=n(9716),s=n(5422),u=n(8062),c=n(520),l=n(7986),d=n(8865),f=n(9502),h=new f.Yd("transactions/5.7.0");function p(e){return"0x"===e?null:(0,i.Kn)(e)}function v(e){return"0x"===e?s._Y:o.O$.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(r||(r={}));var m=[{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"}],y={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function g(e){var t=(0,d.VW)(e);return(0,i.Kn)((0,a.p3)((0,u.w)((0,a.p3)(t,1)),12))}function b(e,t){return g((0,d.LO)((0,a.lE)(e),t))}function w(e,t){var n=(0,a.G1)(o.O$.from(e).toHexString());return n.length>32&&h.throwArgumentError("invalid length for "+t,"transaction:"+t,e),n}function x(e,t){return{address:(0,i.Kn)(e),storageKeys:(t||[]).map((function(t,n){return 32!==(0,a.E1)(t)&&h.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(n,"]"),t),t.toLowerCase()}))}}function k(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&h.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),x(e[0],e[1])):x(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var n=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return x(t,Object.keys(n).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function A(e){return k(e).map((function(e){return[e.address,e.storageKeys]}))}function _(e,t){if(null!=e.gasPrice){var n=o.O$.from(e.gasPrice),r=o.O$.from(e.maxFeePerGas||0);n.eq(r)||h.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:r})}var s=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(e.maxFeePerGas||0,"maxFeePerGas"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,i.Kn)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",A(e.accessList||[])];if(t){var u=(0,a.N)(t);s.push(w(u.recoveryParam,"recoveryParam")),s.push((0,a.G1)(u.r)),s.push((0,a.G1)(u.s))}return(0,a.xs)(["0x02",l.encode(s)])}function S(e,t){var n=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,i.Kn)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",A(e.accessList||[])];if(t){var r=(0,a.N)(t);n.push(w(r.recoveryParam,"recoveryParam")),n.push((0,a.G1)(r.r)),n.push((0,a.G1)(r.s))}return(0,a.xs)(["0x01",l.encode(n)])}function E(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&h.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,c.uj)(e,y);var n=[];m.forEach((function(t){var r=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),r=(0,a.lE)((0,a.Dv)(r,i)),t.length&&r.length!==t.length&&r.length>0&&h.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,r),t.maxLength&&(r=(0,a.G1)(r)).length>t.maxLength&&h.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,r),n.push((0,a.Dv)(r))}));var r=0;if(null!=e.chainId?"number"!==typeof(r=e.chainId)&&h.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!(0,a.Zq)(t)&&t.v>28&&(r=Math.floor((t.v-35)/2)),0!==r&&(n.push((0,a.Dv)(r)),n.push("0x"),n.push("0x")),!t)return l.encode(n);var i=(0,a.N)(t),o=27+i.recoveryParam;return 0!==r?(n.pop(),n.pop(),n.pop(),o+=2*r+8,i.v>28&&i.v!==o&&h.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&h.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),n.push((0,a.Dv)(o)),n.push((0,a.G1)((0,a.lE)(i.r))),n.push((0,a.G1)((0,a.lE)(i.s))),l.encode(n)}(e,t);switch(e.type){case 1:return S(e,t);case 2:return _(e,t)}return h.throwError("unsupported transaction type: ".concat(e.type),f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function C(e,t,n){try{var r=v(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(o){h.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,a.$m)(t[1],32),e.s=(0,a.$m)(t[2],32);try{var i=(0,u.w)(n(e));e.from=b(i,{r:e.r,s:e.s,recoveryParam:e.v})}catch(o){}}function T(e){var t=(0,a.lE)(e);if(t[0]>127)return function(e){var t=l.decode(e);9!==t.length&&6!==t.length&&h.throwArgumentError("invalid raw transaction","rawTransaction",e);var n={nonce:v(t[0]).toNumber(),gasPrice:v(t[1]),gasLimit:v(t[2]),to:p(t[3]),value:v(t[4]),data:t[5],chainId:0};if(6===t.length)return n;try{n.v=o.O$.from(t[6]).toNumber()}catch(c){return n}if(n.r=(0,a.$m)(t[7],32),n.s=(0,a.$m)(t[8],32),o.O$.from(n.r).isZero()&&o.O$.from(n.s).isZero())n.chainId=n.v,n.v=0;else{n.chainId=Math.floor((n.v-35)/2),n.chainId<0&&(n.chainId=0);var r=n.v-27,i=t.slice(0,6);0!==n.chainId&&(i.push((0,a.Dv)(n.chainId)),i.push("0x"),i.push("0x"),r-=2*n.chainId+8);var s=(0,u.w)(l.encode(i));try{n.from=b(s,{r:(0,a.Dv)(n.r),s:(0,a.Dv)(n.s),recoveryParam:r})}catch(c){}n.hash=(0,u.w)(e)}return n.type=null,n}(t);switch(t[0]){case 1:return function(e){var t=l.decode(e.slice(1));8!==t.length&&11!==t.length&&h.throwArgumentError("invalid component count for transaction type: 1","payload",(0,a.Dv)(e));var n={type:1,chainId:v(t[0]).toNumber(),nonce:v(t[1]).toNumber(),gasPrice:v(t[2]),gasLimit:v(t[3]),to:p(t[4]),value:v(t[5]),data:t[6],accessList:k(t[7])};return 8===t.length||(n.hash=(0,u.w)(e),C(n,t.slice(8),S)),n}(t);case 2:return function(e){var t=l.decode(e.slice(1));9!==t.length&&12!==t.length&&h.throwArgumentError("invalid component count for transaction type: 2","payload",(0,a.Dv)(e));var n=v(t[2]),r=v(t[3]),i={type:2,chainId:v(t[0]).toNumber(),nonce:v(t[1]).toNumber(),maxPriorityFeePerGas:n,maxFeePerGas:r,gasPrice:null,gasLimit:v(t[4]),to:p(t[5]),value:v(t[6]),data:t[7],accessList:k(t[8])};return 9===t.length||(i.hash=(0,u.w)(e),C(i,t.slice(9),_)),i}(t)}return h.throwError("unsupported transaction type: ".concat(t[0]),f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},6222:function(e,t,n){"use strict";n.d(t,{Fn:function(){return a},dF:function(){return c},bM:function(){return s},fi:function(){return l},vz:function(){return u}});var r=n(1503),i=new(n(9502).Yd)("units/5.7.0"),o=["wei","kwei","mwei","gwei","szabo","finney","ether"];function a(e){var t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&i.throwArgumentError("invalid value","value",e);var n=t[0],r="";for("-"===n.substring(0,1)&&(r="-",n=n.substring(1));"0"===n.substring(0,1);)n=n.substring(1);""===n&&(n="0");var o="";for(2===t.length&&(o="."+(t[1]||"0"));o.length>2&&"0"===o[o.length-1];)o=o.substring(0,o.length-1);for(var a=[];n.length;){if(n.length<=3){a.unshift(n);break}var s=n.length-3;a.unshift(n.substring(s)),n=n.substring(0,s)}return r+a.join(",")+o}function s(e,t){if("string"===typeof t){var n=o.indexOf(t);-1!==n&&(t=3*n)}return(0,r.S5)(e,null!=t?t:18)}function u(e,t){if("string"!==typeof e&&i.throwArgumentError("value must be a string","value",e),"string"===typeof t){var n=o.indexOf(t);-1!==n&&(t=3*n)}return(0,r.Ox)(e,null!=t?t:18)}function c(e){return s(e,18)}function l(e){return u(e,18)}},5889:function(e,t,n){"use strict";n.d(t,{MY:function(){return v},rd:function(){return m},$l:function(){return y}});var r=n(4165),i=n(7354),o=n(9716),a=n(520),s=n(3374),u=n(9502),c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};function l(e,t){return c(this,void 0,void 0,(0,r.Z)().mark((function n(){var i,a,s,u,c;return(0,r.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==t&&(t={}),i={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0},!0!==t.skipFetchSetup&&(i.mode="cors",i.cache="no-cache",i.credentials="same-origin",i.redirect="follow",i.referrer="client"),null!=t.fetchOptions&&((a=t.fetchOptions).mode&&(i.mode=a.mode),a.cache&&(i.cache=a.cache),a.credentials&&(i.credentials=a.credentials),a.redirect&&(i.redirect=a.redirect),a.referrer&&(i.referrer=a.referrer)),n.next=7,fetch(e,i);case 7:return s=n.sent,n.next=10,s.arrayBuffer();case 10:return u=n.sent,c={},s.headers.forEach?s.headers.forEach((function(e,t){c[t.toLowerCase()]=e})):s.headers.keys().forEach((function(e){c[e.toLowerCase()]=s.headers.get(e)})),n.abrupt("return",{headers:c,statusCode:s.status,statusMessage:s.statusText,body:(0,o.lE)(new Uint8Array(u))});case 14:case"end":return n.stop()}}),n)})))}var d=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},f=new u.Yd("web/5.7.1");function h(e){return new Promise((function(t){setTimeout(t,e)}))}function p(e,t){if(null==e)return null;if("string"===typeof e)return e;if((0,o.Zq)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,s.ZN)(e)}catch(n){}return(0,o.Dv)(e)}return e}function v(e,t,n){var o="object"===typeof e&&null!=e.throttleLimit?e.throttleLimit:12;f.assertArgument(o>0&&o%1===0,"invalid connection throttle limit","connection.throttleLimit",o);var c="object"===typeof e?e.throttleCallback:null,v="object"===typeof e&&"number"===typeof e.throttleSlotInterval?e.throttleSlotInterval:100;f.assertArgument(v>0&&v%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",v);var m="object"===typeof e&&!!e.errorPassThrough,y={},g=null,b={method:"GET"},w=!1,x=12e4;if("string"===typeof e)g=e;else if("object"===typeof e){if(null!=e&&null!=e.url||f.throwArgumentError("missing URL","connection.url",e),g=e.url,"number"===typeof e.timeout&&e.timeout>0&&(x=e.timeout),e.headers)for(var k in e.headers)y[k.toLowerCase()]={key:k,value:String(e.headers[k])},["if-none-match","if-modified-since"].indexOf(k.toLowerCase())>=0&&(w=!0);if(b.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==g.substring(0,6)&&!0!==e.allowInsecureAuthentication&&f.throwError("basic authentication requires a secure https url",u.Yd.errors.INVALID_ARGUMENT,{argument:"url",url:g,user:e.user,password:"[REDACTED]"});var A=e.user+":"+e.password;y.authorization={key:"Authorization",value:"Basic "+(0,i.c)((0,s.Y0)(A))}}null!=e.skipFetchSetup&&(b.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(b.fetchOptions=(0,a.DC)(e.fetchOptions))}var _,S=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),E=g?g.match(S):null;if(E)try{var C={statusCode:200,statusMessage:"OK",headers:{"content-type":E[1]||"text/plain"},body:E[2]?(0,i.J)(E[3]):(_=E[3],(0,s.Y0)(_.replace(/%([0-9a-f][0-9a-f])/gi,(function(e,t){return String.fromCharCode(parseInt(t,16))}))))},T=C.body;return n&&(T=n(C.body,C)),Promise.resolve(T)}catch(I){f.throwError("processing response error",u.Yd.errors.SERVER_ERROR,{body:p(E[1],E[2]),error:I,requestBody:null,requestMethod:"GET",url:g})}t&&(b.method="POST",b.body=t,null==y["content-type"]&&(y["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==y["content-length"]&&(y["content-length"]={key:"Content-Length",value:String(t.length)}));var P={};Object.keys(y).forEach((function(e){var t=y[e];P[t.key]=t.value})),b.headers=P;var R=function(){var e=null;return{promise:new Promise((function(t,n){x&&(e=setTimeout((function(){null!=e&&(e=null,n(f.makeError("timeout",u.Yd.errors.TIMEOUT,{requestBody:p(b.body,P["content-type"]),requestMethod:b.method,timeout:x,url:g})))}),x))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),O=function(){return d(this,void 0,void 0,(0,r.Z)().mark((function e(){var t,i,a,s,d,y,x,k,A,_;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t=300)&&(R.cancel(),f.throwError("bad response",u.Yd.errors.SERVER_ERROR,{status:i.statusCode,headers:i.headers,body:p(x,i.headers?i.headers["content-type"]:null),requestBody:p(b.body,P["content-type"]),requestMethod:b.method,url:g})),!n){e.next=60;break}return e.prev=37,e.next=40,n(x,i);case 40:return k=e.sent,R.cancel(),e.abrupt("return",k);case 45:if(e.prev=45,e.t1=e.catch(37),!(e.t1.throttleRetry&&ts)return void(a()&&r(new Error("retry limit reached")));var c=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));ct.ceiling&&(c=t.ceiling),setTimeout(i,c)}return null}),(function(e){a()&&r(e)}))}()}))}},9808:function(e,t){"use strict";function n(e){var t=void 0;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(t=window[e]),t}function r(e){var t=n(e);if(!t)throw new Error("".concat(e," is not defined in Window"));return t}t.$o=void 0,t.$o=function(){return n("localStorage")}},468:function(e){"use strict";!function(t){function n(e){return parseInt(e)===e}function r(e){if(!n(e.length))return!1;for(var t=0;t255)return!1;return!0}function i(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(!r(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(n(e.length)&&r(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function a(e,t,n,r,i){null==r&&null==i||(e=e.slice?e.slice(r,i):Array.prototype.slice.call(e,r,i)),t.set(e,n)}var s={toBytes:function(e){var t=[],n=0;for(e=encodeURI(e);n191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[n+1])),n+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return t.join("")}},u=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],n=0;n>4]+e[15&i])}return n.join("")}}}(),c={16:10,24:12,32:14},l=[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],f=[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],v=[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],y=[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],g=[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],b=[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],w=[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],x=[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],k=[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],A=[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 S(e){for(var t=[],n=0;n>2,this._Ke[n][t%4]=o[t],this._Kd[e-n][t%4]=o[t];for(var a,s=0,u=i;u>16&255]<<24^d[a>>8&255]<<16^d[255&a]<<8^d[a>>24&255]^l[s]<<24,s+=1,8!=i)for(t=1;t>8&255]<<8^d[a>>16&255]<<16^d[a>>24&255]<<24;for(t=i/2+1;t>2,h=u%4,this._Ke[f][h]=o[t],this._Kd[e-f][h]=o[t++],u++}for(var f=1;f>24&255]^k[a>>16&255]^A[a>>8&255]^_[255&a]},E.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,n=[0,0,0,0],r=S(e),i=0;i<4;i++)r[i]^=this._Ke[0][i];for(var a=1;a>24&255]^p[r[(i+1)%4]>>16&255]^v[r[(i+2)%4]>>8&255]^m[255&r[(i+3)%4]]^this._Ke[a][i];r=n.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Ke[t][i],u[4*i]=255&(d[r[i]>>24&255]^s>>24),u[4*i+1]=255&(d[r[(i+1)%4]>>16&255]^s>>16),u[4*i+2]=255&(d[r[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(d[255&r[(i+3)%4]]^s);return u},E.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,n=[0,0,0,0],r=S(e),i=0;i<4;i++)r[i]^=this._Kd[0][i];for(var a=1;a>24&255]^g[r[(i+3)%4]>>16&255]^b[r[(i+2)%4]>>8&255]^w[255&r[(i+1)%4]]^this._Kd[a][i];r=n.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Kd[t][i],u[4*i]=255&(f[r[i]>>24&255]^s>>24),u[4*i+1]=255&(f[r[(i+3)%4]>>16&255]^s>>16),u[4*i+2]=255&(f[r[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(f[255&r[(i+1)%4]]^s);return u};var C=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 E(t)};C.prototype.encrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),n=o(16),r=0;r=0;--t)this._counter[t]=e%256,e>>=8},O.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},O.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var I=function e(t,n){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",n instanceof O||(n=new O(n)),this._counter=n,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new E(t)};I.prototype.encrypt=function(e){for(var t=i(e,!0),n=0;n16)throw new Error("PKCS#7 padding byte out of range");for(var n=e.length-t,r=0;r>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){for(var t=1,n=0;n126)return"Invalid prefix ("+e+")";t=o(t)^r>>5}for(t=o(t),n=0;nt)return"Exceeds length limit";var r=e.toLowerCase(),i=e.toUpperCase();if(e!==r&&e!==i)return"Mixed-case string "+e;var s=(e=r).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var u=e.slice(0,s),c=e.slice(s+1);if(c.length<6)return"Data too short";var l=a(u);if("string"===typeof l)return l;for(var d=[],f=0;f=c.length||d.push(p)}return 1!==l?"Invalid checksum for "+e:{prefix:u,words:d}}function u(e,t,n,r){for(var i=0,o=0,a=(1<=n;)o-=n,s.push(i>>o&a);if(r)o>0&&s.push(i<=t)return"Excess padding";if(i<r)throw new TypeError("Exceeds length limit");var i=a(e=e.toLowerCase());if("string"===typeof i)throw new Error(i);for(var s=e+"1",u=0;u>5!==0)throw new Error("Non 5-bit word");i=o(i)^c,s+=t.charAt(c)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u){s+=t.charAt(i>>5*(5-u)&31)}return s},toWordsUnsafe:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},5395:function(e,t,n){var r;!function(i){"use strict";var o,a=1e6,s=1e6,u="[big.js] ",c=u+"Invalid ",l=c+"decimal places",d=c+"rounding mode",f=u+"Division by zero",h={},p=void 0,v=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function m(e,t,n,r){var i=e.c,o=e.e+t+1;if(o=5;else if(2===n)r=i[o]>5||5==i[o]&&(r||o<0||i[o+1]!==p||1&i[o-1]);else if(3===n)r=r||!!i[0];else if(r=!1,0!==n)throw Error(d);if(o<1)i.length=1,r?(e.e=-t,i[0]=1):i[0]=e.e=0;else{if(i.length=o--,r)for(;++i[o]>9;)i[o]=0,o--||(++e.e,i.unshift(1));for(o=i.length;!i[--o];)i.pop()}}else if(n<0||n>3||n!==~~n)throw Error(d);return e}function y(e,t,n,r){var i,o,s=e.constructor,u=!e.c[0];if(n!==p){if(n!==~~n||n<(3==t)||n>a)throw Error(3==t?c+"precision":l);for(n=r-(e=new s(e)).e,e.c.length>++r&&m(e,n,s.RM),2==t&&(r=e.e+n+1);e.c.length=s.PE))o=o.charAt(0)+(n>1?"."+o.slice(1):"")+(i<0?"e":"e+")+i;else if(i<0){for(;++i;)o="0"+o;o="0."+o}else if(i>0)if(++i>n)for(i-=n;i--;)o+="0";else i1&&(o=o.charAt(0)+"."+o.slice(1));return e.s<0&&(!u||4==t)?"-"+o:o}h.abs=function(){var e=new this.constructor(this);return e.s=1,e},h.cmp=function(e){var t,n=this,r=n.c,i=(e=new n.constructor(e)).c,o=n.s,a=e.s,s=n.e,u=e.e;if(!r[0]||!i[0])return r[0]?o:i[0]?-a:0;if(o!=a)return o;if(t=o<0,s!=u)return s>u^t?1:-1;for(a=(s=r.length)<(u=i.length)?s:u,o=-1;++oi[o]^t?1:-1;return s==u?0:s>u^t?1:-1},h.div=function(e){var t=this,n=t.constructor,r=t.c,i=(e=new n(e)).c,o=t.s==e.s?1:-1,s=n.DP;if(s!==~~s||s<0||s>a)throw Error(l);if(!i[0])throw Error(f);if(!r[0])return new n(0*o);var u,c,d,h,v,y=i.slice(),g=u=i.length,b=r.length,w=r.slice(0,u),x=w.length,k=e,A=k.c=[],_=0,S=s+(k.e=t.e-e.e)+1;for(k.s=o,o=S<0?0:S,y.unshift(0);x++x?1:-1;else for(v=-1,h=0;++vw[v]?1:-1;break}if(!(h<0))break;for(c=x==u?i:y;x;){if(w[--x]S&&m(k,s,n.RM,w[0]!==p),k},h.eq=function(e){return!this.cmp(e)},h.gt=function(e){return this.cmp(e)>0},h.gte=function(e){return this.cmp(e)>-1},h.lt=function(e){return this.cmp(e)<0},h.lte=function(e){return this.cmp(e)<1},h.minus=h.sub=function(e){var t,n,r,i,o=this,a=o.constructor,s=o.s,u=(e=new a(e)).s;if(s!=u)return e.s=-u,o.plus(e);var c=o.c.slice(),l=o.e,d=e.c,f=e.e;if(!c[0]||!d[0])return d[0]?(e.s=-u,e):new a(c[0]?o:0);if(s=l-f){for((i=s<0)?(s=-s,r=c):(f=l,r=d),r.reverse(),u=s;u--;)r.push(0);r.reverse()}else for(n=((i=c.length0)for(;u--;)c[t++]=0;for(u=t;n>s;){if(c[--n]0?(u=a,t=c):(i=-i,t=s),t.reverse();i--;)t.push(0);t.reverse()}for(s.length-c.length<0&&(t=c,c=s,s=t),i=c.length,o=0;i;s[i]%=10)o=(s[--i]=s[i]+c[i]+o)/10|0;for(o&&(s.unshift(o),++u),i=s.length;0===s[--i];)s.pop();return e.c=s,e.e=u,e},h.pow=function(e){var t=this,n=new t.constructor(1),r=n,i=e<0;if(e!==~~e||e<-1e6||e>s)throw Error(c+"exponent");for(i&&(e=-e);1&e&&(r=r.times(t)),e>>=1;)t=t.times(t);return i?n.div(r):r},h.round=function(e,t){var n=this.constructor;if(e===p)e=0;else if(e!==~~e||e<-a||e>a)throw Error(l);return m(new n(this),e,t===p?n.RM:t)},h.sqrt=function(){var e,t,n,r=this,i=r.constructor,o=r.s,a=r.e,s=new i(.5);if(!r.c[0])return new i(r);if(o<0)throw Error(u+"No square root");0===(o=Math.sqrt(r+""))||o===1/0?((t=r.c.join("")).length+a&1||(t+="0"),a=((a+1)/2|0)-(a<0||1&a),e=new i(((o=Math.sqrt(t))==1/0?"1e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+a)):e=new i(o),a=e.e+(i.DP+=4);do{n=e,e=s.times(n.plus(r.div(n)))}while(n.c.slice(0,a).join("")!==e.c.slice(0,a).join(""));return m(e,i.DP-=4,i.RM)},h.times=h.mul=function(e){var t,n=this,r=n.constructor,i=n.c,o=(e=new r(e)).c,a=i.length,s=o.length,u=n.e,c=e.e;if(e.s=n.s==e.s?1:-1,!i[0]||!o[0])return new r(0*e.s);for(e.e=u+c,au;)s=t[c]+o[u]*i[c-u-1]+s,t[c--]=s%10,s=s/10|0;t[c]=(t[c]+s)%10}for(s?++e.e:t.shift(),u=t.length;!t[--u];)t.pop();return e.c=t,e},h.toExponential=function(e){return y(this,1,e,e)},h.toFixed=function(e){return y(this,2,e,this.e+e)},h.toPrecision=function(e){return y(this,3,e,e-1)},h.toString=function(){return y(this)},h.valueOf=h.toJSON=function(){return y(this,4)},o=function e(){function t(n){var r=this;if(!(r instanceof t))return n===p?e():new t(n);n instanceof t?(r.s=n.s,r.e=n.e,r.c=n.c.slice()):function(e,t){var n,r,i;if(0===t&&1/t<0)t="-0";else if(!v.test(t+=""))throw Error(c+"number");e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".",""));(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length);for(i=t.length,r=0;r0&&"0"==t.charAt(--i););for(e.e=n-r-1,e.c=[],n=0;r<=i;)e.c[n++]=+t.charAt(r++)}}(r,n),r.constructor=t}return t.prototype=h,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.version="5.2.2",t}(),o.default=o.Big=o,void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},518:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(6601).Buffer}catch(T){}function s(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function u(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,i){for(var o=0,a=0,s=Math.min(e.length,n),u=t;u=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=u(e,t,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,l=n;l1&&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")]=d}catch(T){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){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"],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];o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?f[6-u.length]+u+n:u+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],l=p[e];n="";var d=this.clone();for(d.negative=0;!d.isZero();){var v=d.modrn(l).toString(e);n=(d=d.idivn(l)).isZero()?v+n:f[c-v.length]+v+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function v(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,d=67108863&u,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[c]=0|d,u=0|l}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}o.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i>8&255),n>16&255),6===o?(n>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===o?(n>=0&&(e[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},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 n=0;ne.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,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.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){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.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 n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,v=h>>>13,m=0|a[2],y=8191&m,g=m>>>13,b=0|a[3],w=8191&b,x=b>>>13,k=0|a[4],A=8191&k,_=k>>>13,S=0|a[5],E=8191&S,C=S>>>13,T=0|a[6],P=8191&T,R=T>>>13,O=0|a[7],I=8191&O,M=O>>>13,j=0|a[8],B=8191&j,N=j>>>13,Z=0|a[9],D=8191&Z,F=Z>>>13,L=0|s[0],z=8191&L,U=L>>>13,W=0|s[1],H=8191&W,q=W>>>13,V=0|s[2],G=8191&V,Y=V>>>13,K=0|s[3],Q=8191&K,J=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],de=8191&le,fe=le>>>13,he=0|s[9],pe=8191&he,ve=he>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(c+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,U))+Math.imul(f,z)|0))<<13)|0;c=((o=Math.imul(f,U))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(p,z),i=(i=Math.imul(p,U))+Math.imul(v,z)|0,o=Math.imul(v,U);var ye=(c+(r=r+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,q)|0)+Math.imul(f,H)|0))<<13)|0;c=((o=o+Math.imul(f,q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,z),i=(i=Math.imul(y,U))+Math.imul(g,z)|0,o=Math.imul(g,U),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,q)|0;var ge=(c+(r=r+Math.imul(d,G)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,G)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(w,z),i=(i=Math.imul(w,U))+Math.imul(x,z)|0,o=Math.imul(x,U),r=r+Math.imul(y,H)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,q)|0,r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Y)|0;var be=(c+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(A,z),i=(i=Math.imul(A,U))+Math.imul(_,z)|0,o=Math.imul(_,U),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,q)|0,r=r+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,J)|0;var we=(c+(r=r+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,$)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(E,z),i=(i=Math.imul(E,U))+Math.imul(C,z)|0,o=Math.imul(C,U),r=r+Math.imul(A,H)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,q)|0,r=r+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,J)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0;var xe=(c+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;c=((o=o+Math.imul(f,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(P,z),i=(i=Math.imul(P,U))+Math.imul(R,z)|0,o=Math.imul(R,U),r=r+Math.imul(E,H)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,q)|0,r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,J)|0,r=r+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(v,ne)|0,o=o+Math.imul(v,re)|0;var ke=(c+(r=r+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;c=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(I,z),i=(i=Math.imul(I,U))+Math.imul(M,z)|0,o=Math.imul(M,U),r=r+Math.imul(P,H)|0,i=(i=i+Math.imul(P,q)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,q)|0,r=r+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(g,ne)|0,o=o+Math.imul(g,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var Ae=(c+(r=r+Math.imul(d,ue)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(f,ue)|0))<<13)|0;c=((o=o+Math.imul(f,ce)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,z),i=(i=Math.imul(B,U))+Math.imul(N,z)|0,o=Math.imul(N,U),r=r+Math.imul(I,H)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,q)|0,r=r+Math.imul(P,G)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,Y)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,J)|0,r=r+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var _e=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;c=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(D,z),i=(i=Math.imul(D,U))+Math.imul(F,z)|0,o=Math.imul(F,U),r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,q)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,q)|0,r=r+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(M,G)|0,o=o+Math.imul(M,Y)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,J)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(A,ne)|0,i=(i=i+Math.imul(A,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,r=r+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0,r=r+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(v,de)|0,o=o+Math.imul(v,fe)|0;var Se=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ve)|0)+Math.imul(f,pe)|0))<<13)|0;c=((o=o+Math.imul(f,ve)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(D,H),i=(i=Math.imul(D,q))+Math.imul(F,H)|0,o=Math.imul(F,q),r=r+Math.imul(B,G)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,J)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(C,ne)|0,o=o+Math.imul(C,re)|0,r=r+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,r=r+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,fe)|0;var Ee=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,G),i=(i=Math.imul(D,Y))+Math.imul(F,G)|0,o=Math.imul(F,Y),r=r+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,J)|0,r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,r=r+Math.imul(A,ue)|0,i=(i=i+Math.imul(A,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Ce=(c+(r=r+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ve)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,Q),i=(i=Math.imul(D,J))+Math.imul(F,Q)|0,o=Math.imul(F,J),r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,r=r+Math.imul(A,de)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,fe)|0;var Te=(c+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(D,$),i=(i=Math.imul(D,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,r=r+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Pe=(c+(r=r+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,ve)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(D,ne),i=(i=Math.imul(D,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,r=r+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,ce)|0,r=r+Math.imul(P,de)|0,i=(i=i+Math.imul(P,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Re=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ve)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(D,oe),i=(i=Math.imul(D,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),r=r+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,r=r+Math.imul(I,de)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,fe)|0;var Oe=(c+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(D,ue),i=(i=Math.imul(D,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),r=r+Math.imul(B,de)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(N,de)|0,o=o+Math.imul(N,fe)|0;var Ie=(c+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ve)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,ve)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(D,de),i=(i=Math.imul(D,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Me=(c+(r=r+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,ve)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863;var je=(c+(r=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,ve))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,ve))+(i>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ye,u[2]=ge,u[3]=be,u[4]=we,u[5]=xe,u[6]=ke,u[7]=Ae,u[8]=_e,u[9]=Se,u[10]=Ee,u[11]=Ce,u[12]=Te,u[13]=Pe,u[14]=Re,u[15]=Oe,u[16]=Ie,u[17]=Me,u[18]=je,0!==c&&(u[19]=c,n.length++),n};function y(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function g(e,t,n){return y(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(m=v),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?v(this,e,t):n<1024?y(this,e,t):g(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},b.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,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()),n=0;n>>i&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var d=0|this.words[c];this.words[c]=l<<26-o|d>>>o,l=d&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},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){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=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(r("number"===typeof e),r(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)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!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&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):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 i,a,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 n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?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),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0===(n.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(d)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(u)):(n.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,f=1;0===(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},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){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(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 E(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(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 k(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){E.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,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},i(k,x),k.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}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 k;else if("p224"===e)t=new A;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return w[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(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):(l(e,e.umod(this.m)._forceRed(this)),e)},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 n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},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(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var d=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var v=h,m=0;0!==v.cmp(s);m++)v=v.redSqr();r(m=0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var d=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},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},o.mont=function(e){return new C(e)},i(C,E),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},3685:function(e,t){var n;n=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=new Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-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)?-306674912^e>>>1:e>>>1,t[n]=e;return"undefined"!==typeof Int32Array?new Int32Array(t):t}(),n=function(e){var t=0,n=0,r=0,i="undefined"!==typeof Int32Array?new Int32Array(4096):new Array(4096);for(r=0;256!=r;++r)i[r]=e[r];for(r=0;256!=r;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[255&n];var o=[];for(r=1;16!=r;++r)o[r-1]="undefined"!==typeof Int32Array?i.subarray(256*r,256*r+256):i.slice(256*r,256*r+256);return o}(t),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],c=n[6],l=n[7],d=n[8],f=n[9],h=n[10],p=n[11],v=n[12],m=n[13],y=n[14];e.table=t,e.bstr=function(e,n){for(var r=-1^n,i=0,o=e.length;i>>8^t[255&(r^e.charCodeAt(i++))];return~r},e.buf=function(e,n){for(var g=-1^n,b=e.length-15,w=0;w>8&255]^v[e[w++]^g>>16&255]^p[e[w++]^g>>>24]^h[e[w++]]^f[e[w++]]^d[e[w++]]^l[e[w++]]^c[e[w++]]^u[e[w++]]^s[e[w++]]^a[e[w++]]^o[e[w++]]^i[e[w++]]^r[e[w++]]^t[e[w++]];for(b+=15;w>>8^t[255&(g^e[w++])];return~g},e.str=function(e,n){for(var r=-1^n,i=0,o=e.length,a=0,s=0;i>>8^t[255&(r^a)]:a<2048?r=(r=r>>>8^t[255&(r^(192|a>>6&31))])>>>8^t[255&(r^(128|63&a))]:a>=55296&&a<57344?(a=64+(1023&a),s=1023&e.charCodeAt(i++),r=(r=(r=(r=r>>>8^t[255&(r^(240|a>>8&7))])>>>8^t[255&(r^(128|a>>2&63))])>>>8^t[255&(r^(128|s>>6&15|(3&a)<<4))])>>>8^t[255&(r^(128|63&s))]):r=(r=(r=r>>>8^t[255&(r^(224|a>>12&15))])>>>8^t[255&(r^(128|a>>6&63))])>>>8^t[255&(r^(128|63&a))];return~r}},"undefined"===typeof DO_NOT_EXPORT_CRC?n(t):n({})},4255:function(e,t,n){var r="undefined"!==typeof globalThis&&globalThis||"undefined"!==typeof self&&self||"undefined"!==typeof n.g&&n.g,i=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var n="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||"undefined"!==typeof n&&n,r="URLSearchParams"in n,i="Symbol"in n&&"iterator"in Symbol,o="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in n,s="ArrayBuffer"in n;if(s)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&u.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!==typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?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 p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function v(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=v(t);return t.readAsArrayBuffer(e),n}function y(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.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(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"))},o&&(this.blob=function(){var e=p(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(){if(this._bodyArrayBuffer){var e=p(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(m)}),this.text=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=v(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-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)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),("GET"===this.method||"HEAD"===this.method)&&("no-store"===t.cache||"no-cache"===t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function x(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function k(e){var t=new h;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function A(e,t){if(!(this instanceof A))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},g.call(w.prototype),g.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},A.error=function(){var e=new A(null,{status:0,statusText:""});return e.type="error",e};var _=[301,302,303,307,308];A.redirect=function(e,t){if(-1===_.indexOf(t))throw new RangeError("Invalid status code");return new A(null,{status:t,headers:{location:e}})},t.DOMException=n.DOMException;try{new t.DOMException}catch(E){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(i,a){var u=new w(e,r);if(u.signal&&u.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function l(){c.abort()}c.onload=function(){var e={status:c.status,statusText:c.statusText,headers:k(c.getAllResponseHeaders()||"")};e.url="responseURL"in c?c.responseURL:e.headers.get("X-Request-URL");var t="response"in c?c.response:c.responseText;setTimeout((function(){i(new A(t,e))}),0)},c.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.onabort=function(){setTimeout((function(){a(new t.DOMException("Aborted","AbortError"))}),0)},c.open(u.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?c.withCredentials=!0:"omit"===u.credentials&&(c.withCredentials=!1),"responseType"in c&&(o?c.responseType="blob":s&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(c.responseType="arraybuffer")),!r||"object"!==typeof r.headers||r.headers instanceof h?u.headers.forEach((function(e,t){c.setRequestHeader(t,e)})):Object.getOwnPropertyNames(r.headers).forEach((function(e){c.setRequestHeader(e,d(r.headers[e]))})),u.signal&&(u.signal.addEventListener("abort",l),c.onreadystatechange=function(){4===c.readyState&&u.signal.removeEventListener("abort",l)}),c.send("undefined"===typeof u._bodyInit?null:u._bodyInit)}))}S.polyfill=!0,n.fetch||(n.fetch=S,n.Headers=h,n.Request=w,n.Response=A),t.Headers=h,t.Request=w,t.Response=A,t.fetch=S}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=r.fetch?r:i;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},4234:function(e,t,n){var r;!function(i){"use strict";var o,a=1e9,s={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},u=!0,c="[DecimalError] ",l=c+"Invalid argument: ",d=c+"Exponent out of range: ",f=Math.floor,h=Math.pow,p=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,v=1e7,m=7,y=9007199254740991,g=f(y/m),b={};function w(e,t){var n,r,i,o,a,s,c,l,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),u?R(t,f):t;if(c=e.d,l=t.d,a=e.e,i=t.e,c=c.slice(),o=a-i){for(o<0?(r=c,o=-o,s=l.length):(r=l,i=a,s=c.length),o>(s=(a=Math.ceil(f/m))>s?a+1:s+1)&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for((s=c.length)-(o=l.length)<0&&(o=s,r=l,l=c,c=r),n=0;o;)n=(c[--o]=c[o]+l[o]+n)/v|0,c[o]%=v;for(n&&(c.unshift(n),++i),s=c.length;0==c[--s];)c.pop();return t.d=c,t.e=i,u?R(t,f):t}function x(e,t,n){if(e!==~~e||en)throw Error(l+e)}function k(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;te.e^o.s<0?1:-1;for(t=0,n=(r=o.d.length)<(i=e.d.length)?r:i;te.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1},b.decimalPlaces=b.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*m;if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},b.dividedBy=b.div=function(e){return A(this,new this.constructor(e))},b.dividedToIntegerBy=b.idiv=function(e){var t=this.constructor;return R(A(this,new t(e),0,1),t.precision)},b.equals=b.eq=function(e){return!this.cmp(e)},b.exponent=function(){return S(this)},b.greaterThan=b.gt=function(e){return this.cmp(e)>0},b.greaterThanOrEqualTo=b.gte=function(e){return this.cmp(e)>=0},b.isInteger=b.isint=function(){return this.e>this.d.length-2},b.isNegative=b.isneg=function(){return this.s<0},b.isPositive=b.ispos=function(){return this.s>0},b.isZero=function(){return 0===this.s},b.lessThan=b.lt=function(e){return this.cmp(e)<0},b.lessThanOrEqualTo=b.lte=function(e){return this.cmp(e)<1},b.logarithm=b.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(o))throw Error(c+"NaN");if(n.s<1)throw Error(c+(n.s?"NaN":"-Infinity"));return n.eq(o)?new r(0):(u=!1,t=A(T(n,a),T(e,a),a),u=!0,R(t,i))},b.minus=b.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):w(t,(e.s=-e.s,e))},b.modulo=b.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(!(e=new r(e)).s)throw Error(c+"NaN");return n.s?(u=!1,t=A(n,e,0,1).times(e),u=!0,n.minus(t)):R(new r(n),i)},b.naturalExponential=b.exp=function(){return _(this)},b.naturalLogarithm=b.ln=function(){return T(this)},b.negated=b.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},b.plus=b.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?w(t,e):O(t,(e.s=-e.s,e))},b.precision=b.sd=function(e){var t,n,r,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(l+e);if(t=S(i)+1,n=(r=i.d.length-1)*m+1,r=i.d[r]){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},b.squareRoot=b.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(c+"NaN")}for(e=S(s),u=!1,0==(i=Math.sqrt(+s))||i==1/0?(((t=k(s.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=f((e+1)/2)-(e<0||e%2),r=new l(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new l(i.toString()),i=a=(n=l.precision)+3;;)if(r=(o=r).plus(A(s,o,a+2)).times(.5),k(o.d).slice(0,a)===(t=k(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(R(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if("9999"!=t)break;a+=4}return u=!0,R(r,n)},b.times=b.mul=function(e){var t,n,r,i,o,a,s,c,l,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,(c=h.length)<(l=p.length)&&(o=h,h=p,p=o,a=c,c=l,l=a),o=[],r=a=c+l;r--;)o.push(0);for(r=l;--r>=0;){for(t=0,i=c+r;i>r;)s=o[i]+p[r]*h[i-r-1]+t,o[i--]=s%v|0,t=s/v|0;o[i]=(o[i]+t)%v|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,u?R(e,f.precision):e},b.toDecimalPlaces=b.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(x(e,0,a),void 0===t?t=r.rounding:x(t,0,8),R(n,e+S(n)+1,t))},b.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=I(r,!0):(x(e,0,a),void 0===t?t=i.rounding:x(t,0,8),n=I(r=R(new i(r),e+1,t),!0,e+1)),n},b.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?I(i):(x(e,0,a),void 0===t?t=o.rounding:x(t,0,8),n=I((r=R(new o(i),e+S(i)+1,t)).abs(),!1,e+S(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},b.toInteger=b.toint=function(){var e=this,t=e.constructor;return R(new t(e),S(e)+1,t.rounding)},b.toNumber=function(){return+this},b.toPower=b.pow=function(e){var t,n,r,i,a,s,l=this,d=l.constructor,h=+(e=new d(e));if(!e.s)return new d(o);if(!(l=new d(l)).s){if(e.s<1)throw Error(c+"Infinity");return l}if(l.eq(o))return l;if(r=d.precision,e.eq(o))return R(l,r);if(s=(t=e.e)>=(n=e.d.length-1),a=l.s,s){if((n=h<0?-h:h)<=y){for(i=new d(o),t=Math.ceil(r/m+4),u=!1;n%2&&M((i=i.times(l)).d,t),0!==(n=f(n/2));)M((l=l.times(l)).d,t);return u=!0,e.s<0?new d(o).div(i):R(i,r)}}else if(a<0)throw Error(c+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,l.s=1,u=!1,i=e.times(T(l,r+12)),u=!0,(i=_(i)).s=a,i},b.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?r=I(i,(n=S(i))<=o.toExpNeg||n>=o.toExpPos):(x(e,1,a),void 0===t?t=o.rounding:x(t,0,8),r=I(i=R(new o(i),e,t),e<=(n=S(i))||n<=o.toExpNeg,e)),r},b.toSignificantDigits=b.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(x(e,1,a),void 0===t?t=n.rounding:x(t,0,8)),R(new n(this),e,t)},b.toString=b.valueOf=b.val=b.toJSON=function(){var e=this,t=S(e),n=e.constructor;return I(e,t<=n.toExpNeg||t>=n.toExpPos)};var A=function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%v|0,r=n/v|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]1;)e.shift()}return function(r,i,o,a){var s,u,l,d,f,h,p,y,g,b,w,x,k,A,_,E,C,T,P=r.constructor,O=r.s==i.s?1:-1,I=r.d,M=i.d;if(!r.s)return new P(r);if(!i.s)throw Error(c+"Division by zero");for(u=r.e-i.e,C=M.length,_=I.length,y=(p=new P(O)).d=[],l=0;M[l]==(I[l]||0);)++l;if(M[l]>(I[l]||0)&&--u,(x=null==o?o=P.precision:a?o+(S(r)-S(i))+1:o)<0)return new P(0);if(x=x/m+2|0,l=0,1==C)for(d=0,M=M[0],x++;(l<_||d)&&x--;l++)k=d*v+(I[l]||0),y[l]=k/M|0,d=k%M|0;else{for((d=v/(M[0]+1)|0)>1&&(M=e(M,d),I=e(I,d),C=M.length,_=I.length),A=C,b=(g=I.slice(0,C)).length;b=v/2&&++E;do{d=0,(s=t(M,g,C,b))<0?(w=g[0],C!=b&&(w=w*v+(g[1]||0)),(d=w/E|0)>1?(d>=v&&(d=v-1),1==(s=t(f=e(M,d),g,h=f.length,b=g.length))&&(d--,n(f,C16)throw Error(d+S(e));if(!e.s)return new f(o);for(null==t?(u=!1,s=p):s=t,a=new f(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(s+=Math.log(h(2,l))/Math.LN10*2+5|0,n=r=i=new f(o),f.precision=s;;){if(r=R(r.times(e),s),n=n.times(++c),k((a=i.plus(A(r,n,s))).d).slice(0,s)===k(i.d).slice(0,s)){for(;l--;)i=R(i.times(i),s);return f.precision=p,null==t?(u=!0,R(i,p)):i}i=a}}function S(e){for(var t=e.e*m,n=e.d[0];n>=10;n/=10)t++;return t}function E(e,t,n){if(t>e.LN10.sd())throw u=!0,n&&(e.precision=n),Error(c+"LN10 precision limit exceeded");return R(new e(e.LN10),t)}function C(e){for(var t="";e--;)t+="0";return t}function T(e,t){var n,r,i,a,s,l,d,f,h,p=1,v=e,m=v.d,y=v.constructor,g=y.precision;if(v.s<1)throw Error(c+(v.s?"NaN":"-Infinity"));if(v.eq(o))return new y(0);if(null==t?(u=!1,f=g):f=t,v.eq(10))return null==t&&(u=!0),E(y,f);if(f+=10,y.precision=f,r=(n=k(m)).charAt(0),a=S(v),!(Math.abs(a)<15e14))return d=E(y,f+2,g).times(a+""),v=T(new y(r+"."+n.slice(1)),f-10).plus(d),y.precision=g,null==t?(u=!0,R(v,g)):v;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=k((v=v.times(e)).d)).charAt(0),p++;for(a=S(v),r>1?(v=new y("0."+n),a++):v=new y(r+"."+n.slice(1)),l=s=v=A(v.minus(o),v.plus(o),f),h=R(v.times(v),f),i=3;;){if(s=R(s.times(h),f),k((d=l.plus(A(s,new y(i),f))).d).slice(0,f)===k(l.d).slice(0,f))return l=l.times(2),0!==a&&(l=l.plus(E(y,f+2,g).times(a+""))),l=A(l,new y(p),f),y.precision=g,null==t?(u=!0,R(l,g)):l;l=d,i+=2}}function P(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(r,i)){if(i-=r,n=n-r-1,e.e=f(n/m),e.d=[],r=(n+1)%m,n<0&&(r+=m),rg||e.e<-g))throw Error(d+n)}else e.s=0,e.e=0,e.d=[0];return e}function R(e,t,n){var r,i,o,a,s,c,l,p,y=e.d;for(a=1,o=y[0];o>=10;o/=10)a++;if((r=t-a)<0)r+=m,i=t,l=y[p=0];else{if((p=Math.ceil((r+1)/m))>=(o=y.length))return e;for(l=o=y[p],a=1;o>=10;o/=10)a++;i=(r%=m)-m+a}if(void 0!==n&&(s=l/(o=h(10,a-i-1))%10|0,c=t<0||void 0!==y[p+1]||l%o,c=n<4?(s||c)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||c||6==n&&(r>0?i>0?l/h(10,a-i):0:y[p-1])%10&1||n==(e.s<0?8:7))),t<1||!y[0])return c?(o=S(e),y.length=1,t=t-o-1,y[0]=h(10,(m-t%m)%m),e.e=f(-t/m)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(0==r?(y.length=p,o=1,p--):(y.length=p+1,o=h(10,m-r),y[p]=i>0?(l/h(10,a-i)%h(10,i)|0)*o:0),c)for(;;){if(0==p){(y[0]+=o)==v&&(y[0]=1,++e.e);break}if(y[p]+=o,y[p]!=v)break;y[p--]=0,o=1}for(r=y.length;0===y[--r];)y.pop();if(u&&(e.e>g||e.e<-g))throw Error(d+S(e));return e}function O(e,t){var n,r,i,o,a,s,c,l,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),u?R(t,p):t;if(c=e.d,f=t.d,r=t.e,l=e.e,c=c.slice(),a=l-r){for((d=a<0)?(n=c,a=-a,s=f.length):(n=f,r=l,s=c.length),a>(i=Math.max(Math.ceil(p/m),s)+2)&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for((d=(i=c.length)<(s=f.length))&&(s=i),i=0;i0;--i)c[s++]=0;for(i=f.length;i>a;){if(c[--i]0?o=o.charAt(0)+"."+o.slice(1)+C(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+C(-i-1)+o,n&&(r=n-a)>0&&(o+=C(r))):i>=a?(o+=C(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+C(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=C(r))),e.s<0?"-"+o:o}function M(e,t){if(e.length>t)return e.length=t,!0}function j(e){if(!e||"object"!==typeof e)throw Error(c+"Object expected");var t,n,r,i=["precision",1,a,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t=i[t+1]&&r<=i[t+2]))throw Error(l+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(l+n+": "+r);this[n]=new this(r)}return this}s=function e(t){var n,r,i;function o(e){var t=this;if(!(t instanceof o))return new o(e);if(t.constructor=o,e instanceof o)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"===typeof e){if(0*e!==0)throw Error(l+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):P(t,e.toString())}if("string"!==typeof e)throw Error(l+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!p.test(e))throw Error(l+e);P(t,e)}if(o.prototype=b,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=e,o.config=o.set=j,void 0===t&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n>24&255,l[t.length+1]=d>>16&255,l[t.length+2]=d>>8&255,l[t.length+3]=255&d;var f=(0,b.lE)((0,E.Gy)(i,e,l));o||(o=f.length,s=new Uint8Array(o),a=r-((u=Math.ceil(r/o))-1)*o),s.set(f);for(var h=1;h=256)throw new Error("Depth too large!");return V((0,b.zo)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,b.Dv)(this.depth),this.parentFingerprint,(0,b.$m)((0,b.Dv)(this.index),4),this.chainCode,null!=this.privateKey?(0,b.zo)(["0x00",this.privateKey]):this.publicKey]))}},{key:"neuter",value:function(){return new e(Y,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 n=this.path;n&&(n+="/"+(t&~W));var r=new Uint8Array(37);if(t&W){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set((0,b.lE)(this.privateKey),1),n&&(n+="'")}else r.set((0,b.lE)(this.publicKey));for(var i=24;i>=0;i-=8)r[33+(i>>3)]=t>>24-i&255;var o=(0,b.lE)((0,E.Gy)(R.p.sha512,this.chainCode,r)),a=o.slice(0,32),s=o.slice(32),c=null,l=null;this.privateKey?c=q(u.O$.from(a).add(this.privateKey).mod(z)):l=new P.Et((0,b.Dv)(a))._addPoint(this.publicKey);var d=n,f=this.mnemonic;return f&&(d=Object.freeze({phrase:f.phrase,path:n,locale:f.locale||"en"})),new e(Y,c,l,this.fingerprint,q(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 n=this,r=0;r=W)throw new Error("invalid path index - "+i);n=n._derive(W+o)}else{if(!i.match(/^[0-9]+$/))throw new Error("invalid path component - "+i);var a=parseInt(i);if(a>=W)throw new Error("invalid path index - "+i);n=n._derive(a)}}return n}}],[{key:"_fromSeed",value:function(t,n){var r=(0,b.lE)(t);if(r.length<16||r.length>64)throw new Error("invalid seed");var i=(0,b.lE)((0,E.Gy)(R.p.sha512,U,r));return new e(Y,q(i.slice(0,32)),null,"0x00000000",q(i.slice(32)),0,0,n)}},{key:"fromMnemonic",value:function(t,n,r){return t=$(X(t,r=G(r)),r),e._fromSeed(J(t,n),{phrase:t,path:"m",locale:r.locale})}},{key:"fromSeed",value:function(t){return e._fromSeed(t,null)}},{key:"fromExtendedKey",value:function(t){var n=S.eU.decode(t);82===n.length&&V(n.slice(0,78))===t||L.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var r=n[4],i=(0,b.Dv)(n.slice(5,9)),o=parseInt((0,b.Dv)(n.slice(9,13)).substring(2),16),a=(0,b.Dv)(n.slice(13,45)),s=n.slice(45,78);switch((0,b.Dv)(n.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new e(Y,null,(0,b.Dv)(s),i,a,o,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new e(Y,(0,b.Dv)(s.slice(1)),null,i,a,o,r,null)}return L.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}]),e}();function J(e,t){t||(t="");var n=(0,x.Y0)("mnemonic"+t,x.Uj.NFKD);return C((0,x.Y0)(e,x.Uj.NFKD),n,2048,64,"sha512")}function X(e,t){t=G(t),L.checkNormalize();var n=t.split(e);if(n.length%3!==0)throw new Error("invalid mnemonic");for(var r=(0,b.lE)(new Uint8Array(Math.ceil(11*n.length/8))),i=0,o=0;o>3]|=1<<7-i%8),i++}var u=32*n.length/3,c=H(n.length/3);if(((0,b.lE)((0,E.JQ)(r.slice(0,u/8)))[0]&c)!==(r[r.length-1]&c))throw new Error("invalid checksum");return(0,b.Dv)(r.slice(0,u/8))}function $(e,t){if(t=G(t),(e=(0,b.lE)(e)).length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");for(var n=[0],r=11,i=0;i8?(n[n.length-1]<<=8,n[n.length-1]|=e[i],r-=8):(n[n.length-1]<<=r,n[n.length-1]|=e[i]>>8-r,n.push(e[i]&(1<<8-r)-1),r+=3);var o=e.length/4,a=(0,b.lE)((0,E.JQ)(e))[0]&H(o);return n[n.length-1]<<=o,n[n.length-1]|=a>>8-o,t.join(n.map((function(e){return t.getWord(e)})))}function ee(e,t){try{return X(e,t),!0}catch(n){}return!1}function te(e){return("number"!==typeof e||e<0||e>=W||e%1)&&L.throwArgumentError("invalid account index","index",e),"m/44'/60'/".concat(e,"'/0/0")}var ne=new M.Yd("random/5.7.0");var re=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw new Error("unable to locate global object")}(),ie=re.crypto||re.msCrypto;function oe(e){(e<=0||e>1024||e%1||e!=e)&&ne.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return ie.getRandomValues(t),(0,b.lE)(t)}ie&&ie.getRandomValues||(ne.warn("WARNING: Missing strong random number source"),ie={getRandomValues:function(e){return ne.throwError("no secure random source avaialble",M.Yd.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var ae=n(468),se=n.n(ae),ue=n(2065),ce=n.n(ue);function le(e){return"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,b.lE)(e)}function de(e,t){for(e=String(e);e.length=(n+=i.l)&&e<=n+i.h&&(e-n)%(i.d||1)===0){if(i.e&&-1!==i.e.indexOf(e-n))continue;return i}}return null}var et=Xe("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"),tt="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),nt=[{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}],rt=Je("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"),it=Je("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"),ot=Je("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=[],n=0;n=0)return[];if(e>=65024&&e<=65039)return[];var t=function(e){var t=$e(e,nt);if(t)return[e+t.s];var n=rt[e];if(n)return n;var r=it[e];return r?[e+r[0]]:ot[e]||null}(e);return t||[e]})),n=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(n=(0,x.XL)((0,x.uu)(n),x.Uj.NFKC)).forEach((function(e){if($e(e,at))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),n.forEach((function(e){if($e(e,et))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var r=(0,x.uu)(n);if("-"===r.substring(0,1)||"--"===r.substring(2,4)||"-"===r.substring(r.length-1))throw new Error("invalid hyphen");return r}function ut(e){var t=(0,x.Y0)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,b.Dv)((0,b.zo)([t,Fe.R]).slice(0,32))}function ct(e){var t=(0,b.lE)(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 n=31;0===t[n-1];)n--;return(0,x.ZN)(t.slice(0,n))}var lt=n(6222),dt=n(5889),ft="ethers/5.7.2",ht=new M.Yd(ft);try{var pt=window;null==pt._ethers&&(pt._ethers=a)}catch(vt){}},7465:function(e){"use strict";var t,n="object"===typeof Reflect?Reflect:null,r=n&&"function"===typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!==e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"===typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"===typeof e.on&&v(e,"error",t,n)}(e,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,o,a,c;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"===typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,c=l,console&&console.warn&&console.warn(c)}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 d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[e];if(void 0===u)return!1;if("function"===typeof u)r(u,this,t);else{var c=u.length,l=p(u,c);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},2683:function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},9046:function(e,t,n){"use strict";var r=n(2325),i=n(2534);function o(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function a(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 u(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=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i>6|192,n[r++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},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,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,a,s){var u=0,c=t;return u+=(c=c+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,a,s,u,c){var l=0,d=t;return l+=(d=d+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,s,u,c){return t+r+o+s+c>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},2110:function(e,t,n){"use strict";var r=n(7441),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=h(n);i&&i!==p&&e(t,i,r)}var a=l(n);d&&(a=a.concat(d(n)));for(var s=u(t),v=u(n),m=0;m>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}function B(e,t,n){j.call(this,e,t,n)}j.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(i);if(null===e)throw new Error(i);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var r,o,a=this.blocks,s=this.byteCount,u=e.length,c=this.blockCount,d=0,f=this.s;d>2]|=e[d]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(a[r>>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)<=s){for(this.start=r-s,this.block=a[c],r=0;r>=8);n>0;)i.unshift(n),n=255&(e>>=8),++r;return t?i.push(r):i.unshift(r),this.update(i),i.length},j.prototype.encodeString=function(e){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(i);if(null===e)throw new Error(i);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw new Error(i);t=!0}var r=0,o=e.length;if(t)r=o;else for(var a=0;a=57344?r+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),r+=4)}return r+=this.encode(8*r),this.update(e),r},j.prototype.bytepad=function(e,t){for(var n=this.encode(t),r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];a%t===0&&(N(n),o=0)}return i&&(e=n[o],s+=d[e>>4&15]+d[15&e],i>1&&(s+=d[e>>12&15]+d[e>>8&15]),i>2&&(s+=d[e>>20&15]+d[e>>16&15])),s},j.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(r+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%n===0&&N(r)}return o&&(e=s<<2,t=r[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},B.prototype=new j,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),j.prototype.finalize.call(this)};var N=function(e){var t,n,r,i,o,a,s,u,c,l,d,f,h,v,m,y,g,b,w,x,k,A,_,S,E,C,T,P,R,O,I,M,j,B,N,Z,D,F,L,z,U,W,H,q,V,G,Y,K,Q,J,X,$,ee,te,ne,re,ie,oe,ae,se,ue,ce,le;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=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],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(f=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),n=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(u<<1|c>>>31),n=o^(c<<1|u>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=a^(l<<1|d>>>31),n=s^(d<<1|l>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=u^(f<<1|h>>>31),n=c^(h<<1|f>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=l^(i<<1|o>>>31),n=d^(o<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,v=e[0],m=e[1],G=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,R=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,W=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,B=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,K=e[22]<<10|e[23]>>>22,Q=e[23]<<10|e[22]>>>22,O=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,Z=e[14]<<6|e[15]>>>26,D=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,M=e[45]<<29|e[44]>>>3,j=e[44]<<29|e[45]>>>3,S=e[6]<<28|e[7]>>>4,E=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,L=e[27]<<25|e[26]>>>7,x=e[36]<<21|e[37]>>>11,k=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,V=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,U=e[39]<<8|e[38]>>>24,A=e[48]<<14|e[49]>>>18,_=e[49]<<14|e[48]>>>18,e[0]=v^~y&b,e[1]=m^~g&w,e[10]=S^~C&P,e[11]=E^~T&R,e[20]=B^~Z&F,e[21]=N^~D&L,e[30]=q^~G&K,e[31]=V^~Y&Q,e[40]=te^~re&oe,e[41]=ne^~ie&ae,e[2]=y^~b&x,e[3]=g^~w&k,e[12]=C^~P&O,e[13]=T^~R&I,e[22]=Z^~F&z,e[23]=D^~L&U,e[32]=G^~K&J,e[33]=Y^~Q&X,e[42]=re^~oe&se,e[43]=ie^~ae&ue,e[4]=b^~x&A,e[5]=w^~k&_,e[14]=P^~O&M,e[15]=R^~I&j,e[24]=F^~z&W,e[25]=L^~U&H,e[34]=K^~J&$,e[35]=Q^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=x^~A&v,e[7]=k^~_&m,e[16]=O^~M&S,e[17]=I^~j&E,e[26]=z^~W&B,e[27]=U^~H&N,e[36]=J^~$&q,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&ne,e[8]=A^~v&y,e[9]=_^~m&g,e[18]=M^~S&C,e[19]=j^~E&T,e[28]=W^~B&Z,e[29]=H^~N&D,e[38]=$^~q&G,e[39]=ee^~V&Y,e[48]=ce^~te&re,e[49]=le^~ne&ie,e[0]^=p[r],e[1]^=p[r+1]};if(u)e.exports=E;else{for(T=0;Tc.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return a(r)}return o(c,[{key:"toDebugString",value:function(){var e,t=["BigInt["],n=r(this);try{for(n.s();!(e=n.n()).done;){var i=e.value;t.push((i?(i>>>0).toString(16):i)+", ")}}catch(o){n.e(o)}finally{n.f()}return t.push("]"),t.join("")}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;if(2>e||36this.length&&(n=this.length);for(var r=32767&e,i=e>>>15,o=0,a=t,s=0;s>>15,f=c.__imul(l,r),h=c.__imul(l,i),p=c.__imul(d,r),v=a+f+o;o=v>>>30,v&=1073741823,o+=(v+=((32767&h)<<15)+((32767&p)<<15))>>>30,a=c.__imul(d,i)+(h>>>15)+(p>>>15),this.__setDigit(s,1073741823&v)}if(0!=o||0!==a)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(e,t,n){for(var r=0,i=0;i>>15,this.__setHalfDigit(t+i,32767&o)}return r}},{key:"__inplaceSub",value:function(e,t,n){var r=0;if(1&t){t>>=1;for(var i=this.__digit(t),o=32767&i,a=0;a>>1;a++){var s=e.__digit(a),u=(i>>>15)-(32767&s)-r;r=1&u>>>15,this.__setDigit(t+a,(32767&u)<<15|32767&o),r=1&(o=(32767&(i=this.__digit(t+a+1)))-(s>>>15)-r)>>>15}var c=e.__digit(a),l=(i>>>15)-(32767&c)-r;if(r=1&l>>>15,this.__setDigit(t+a,(32767&l)<<15|32767&o),t+a+1>=this.length)throw new RangeError("out of bounds");0==(1&n)&&(r=1&(o=(32767&(i=this.__digit(t+a+1)))-(c>>>15)-r)>>>15,this.__setDigit(t+e.length,1073709056&i|32767&o))}else{t>>=1;for(var d=0;d>>15)-(h>>>15)-(r=1&p>>>15);r=1&v>>>15,this.__setDigit(t+d,(32767&v)<<15|32767&p)}var m=this.__digit(t+d),y=e.__digit(d),g=(32767&m)-(32767&y)-r;r=1&g>>>15;var b=0;0==(1&n)&&(r=1&(b=(m>>>15)-(y>>>15)-r)>>>15),this.__setDigit(t+d,(32767&b)<<15|32767&g)}return r}},{key:"__inplaceRightShift",value:function(e){if(0!==e){for(var t=this.__digit(0)>>>e,n=this.length-1,r=0;r>>e}this.__setDigit(n,t)}}},{key:"__digit",value:function(e){return this[e]}},{key:"__unsignedDigit",value:function(e){return this[e]>>>0}},{key:"__setDigit",value:function(e,t){this[e]=0|t}},{key:"__setDigitGrow",value:function(e,t){this[e]=0|t}},{key:"__halfDigitLength",value:function(){var e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}},{key:"__halfDigit",value:function(e){return 32767&this[e>>>1]>>>15*(1&e)}},{key:"__setHalfDigit",value:function(e,t){var n=e>>>1,r=this.__digit(n),i=1&e?32767&r|t<<15:1073709056&r|32767&t;this.__setDigit(n,i)}}],[{key:"BigInt",value:function(e){var t=Number.isFinite;if("number"==typeof e){if(0===e)return c.__zero();if(c.__isOneDigitInt(e))return 0>e?c.__oneDigit(-e,!0):c.__oneDigit(e,!1);if(!t(e)||d(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return c.__fromDouble(e)}if("string"==typeof e){var n=c.__fromString(e);if(null===n)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return n}if("boolean"==typeof e)return!0===e?c.__oneDigit(1,!1):c.__zero();if("object"==typeof e){if(e.constructor===c)return e;var r=c.__toPrimitive(e);return c.BigInt(r)}throw new TypeError("Cannot convert "+e+" to a BigInt")}},{key:"toNumber",value:function(e){var t=e.length;if(0===t)return 0;if(1===t){var n=e.__unsignedDigit(0);return e.sign?-n:n}var r=e.__digit(t-1),i=c.__clz30(r),o=30*t-i;if(1024>>=12;var f=l-12,h=12<=l?0:s<<20+l,p=20+l;for(0>>30-f,h=s<>>30-p,p-=30;var v=c.__decideRounding(e,p,u,s);if((1===v||0===v&&1==(1&h))&&0===(h=h+1>>>0)&&0!=++d>>>20&&(d=0,1023<++a))return e.sign?-1/0:1/0;var m=e.sign?-2147483648:0;return a=a+1023<<20,c.__kBitConversionInts[1]=m|a|d,c.__kBitConversionInts[0]=h,c.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function(e){if(0===e.length)return e;var t=e.__copy();return t.sign=!e.sign,t}},{key:"bitwiseNot",value:function(e){return e.sign?c.__absoluteSubOne(e).__trim():c.__absoluteAddOne(e,!0)}},{key:"exponentiate",value:function(e,t){if(t.sign)throw new RangeError("Exponent must be positive");if(0===t.length)return c.__oneDigit(1,!1);if(0===e.length)return e;if(1===e.length&&1===e.__digit(0))return e.sign&&0==(1&t.__digit(0))?c.unaryMinus(e):e;if(1=c.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===e.length&&2===e.__digit(0)){var r=1+(0|n/30),i=new c(r,e.sign&&0!=(1&n));i.__initializeDigits();var o=1<>=1;0!==n;n>>=1)s=c.multiply(s,s),0!=(1&n)&&(a=null===a?s:c.multiply(a,s));return a}},{key:"multiply",value:function(e,t){if(0===e.length)return e;if(0===t.length)return t;var n=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&n--;var r=new c(n,e.sign!==t.sign);r.__initializeDigits();for(var i=0;ic.__absoluteCompare(e,t))return c.__zero();var n,r=e.sign!==t.sign,i=t.__unsignedDigit(0);if(1===t.length&&32767>=i){if(1===i)return r===e.sign?e:c.unaryMinus(e);n=c.__absoluteDivSmall(e,i,null)}else n=c.__absoluteDivLarge(e,t,!0,!1);return n.sign=r,n.__trim()}},{key:"remainder",value:function(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>c.__absoluteCompare(e,t))return e;var n=t.__unsignedDigit(0);if(1===t.length&&32767>=n){if(1===n)return c.__zero();var r=c.__absoluteModSmall(e,n);return 0===r?c.__zero():c.__oneDigit(r,e.sign)}var i=c.__absoluteDivLarge(e,t,!1,!0);return i.sign=e.sign,i.__trim()}},{key:"add",value:function(e,t){var n=e.sign;return n===t.sign?c.__absoluteAdd(e,t,n):0<=c.__absoluteCompare(e,t)?c.__absoluteSub(e,t,n):c.__absoluteSub(t,e,!n)}},{key:"subtract",value:function(e,t){var n=e.sign;return n===t.sign?0<=c.__absoluteCompare(e,t)?c.__absoluteSub(e,t,n):c.__absoluteSub(t,e,!n):c.__absoluteAdd(e,t,n)}},{key:"leftShift",value:function(e,t){return 0===t.length||0===e.length?e:t.sign?c.__rightShiftByAbsolute(e,t):c.__leftShiftByAbsolute(e,t)}},{key:"signedRightShift",value:function(e,t){return 0===t.length||0===e.length?e:t.sign?c.__leftShiftByAbsolute(e,t):c.__rightShiftByAbsolute(e,t)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(e,t){return 0>c.__compareToBigInt(e,t)}},{key:"lessThanOrEqual",value:function(e,t){return 0>=c.__compareToBigInt(e,t)}},{key:"greaterThan",value:function(e,t){return 0(e=d(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return c.__zero();if(e>=c.__kMaxLengthBits)return t;var n=0|(e+29)/30;if(t.length(e=d(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return c.__zero();if(t.sign){if(e>c.__kMaxLengthBits)throw new RangeError("BigInt too big");return c.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=c.__kMaxLengthBits)return t;var n=0|(e+29)/30;if(t.length>>r)return t}return c.__truncateToNBits(e,t)}},{key:"ADD",value:function(e,t){if(e=c.__toPrimitive(e),t=c.__toPrimitive(t),"string"==typeof e)return"string"!=typeof t&&(t=t.toString()),e+t;if("string"==typeof t)return e.toString()+t;if(e=c.__toNumeric(e),t=c.__toNumeric(t),c.__isBigInt(e)&&c.__isBigInt(t))return c.add(e,t);if("number"==typeof e&&"number"==typeof t)return e+t;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(e,t){return c.__compare(e,t,0)}},{key:"LE",value:function(e,t){return c.__compare(e,t,1)}},{key:"GT",value:function(e,t){return c.__compare(e,t,2)}},{key:"GE",value:function(e,t){return c.__compare(e,t,3)}},{key:"EQ",value:function(e,t){for(;;){if(c.__isBigInt(e))return c.__isBigInt(t)?c.equal(e,t):c.EQ(t,e);if("number"==typeof e){if(c.__isBigInt(t))return c.__equalToNumber(t,e);if("object"!=typeof t)return e==t;t=c.__toPrimitive(t)}else if("string"==typeof e){if(c.__isBigInt(t))return null!==(e=c.__fromString(e))&&c.equal(e,t);if("object"!=typeof t)return e==t;t=c.__toPrimitive(t)}else if("boolean"==typeof e){if(c.__isBigInt(t))return c.__equalToNumber(t,+e);if("object"!=typeof t)return e==t;t=c.__toPrimitive(t)}else if("symbol"==typeof e){if(c.__isBigInt(t))return!1;if("object"!=typeof t)return e==t;t=c.__toPrimitive(t)}else{if("object"!=typeof e)return e==t;if("object"==typeof t&&t.constructor!==c)return e==t;e=c.__toPrimitive(e)}}}},{key:"NE",value:function(e,t){return!c.EQ(e,t)}},{key:"__zero",value:function(){return new c(0,!1)}},{key:"__oneDigit",value:function(e,t){var n=new c(1,t);return n.__setDigit(0,e),n}},{key:"__decideRounding",value:function(e,t,n,r){if(0t)i=-t-1;else{if(0===n)return-1;n--,r=e.__digit(n),i=29}var o=1<>>20)-1023,r=1+(0|n/30),i=new c(r,0>e),o=1048575&c.__kBitConversionInts[1]|1048576,a=c.__kBitConversionInts[0],s=20,u=n%30,l=0;if(20>u){var d=s-u;l=d+32,t=o>>>d,o=o<<32-d|a>>>d,a<<=32-d}else if(20===u)l=32,t=o,o=a,a=0;else{var f=u-s;l=32-f,t=o<>>32-f,o=a<>>2,o=o<<30|a>>>2,a<<=30):t=0,i.__setDigit(h,t);return i.__trim()}},{key:"__isWhitespace",value:function(e){return!!(13>=e&&9<=e)||(159>=e?32==e:131071>=e?160==e||5760==e:196607>=e?10>=(e&=131071)||40==e||41==e||47==e||95==e||4096==e:65279==e)}},{key:"__fromString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0,r=e.length,i=0;if(i===r)return c.__zero();for(var o=e.charCodeAt(i);c.__isWhitespace(o);){if(++i===r)return c.__zero();o=e.charCodeAt(i)}if(43===o){if(++i===r)return null;o=e.charCodeAt(i),n=1}else if(45===o){if(++i===r)return null;o=e.charCodeAt(i),n=-1}if(0===t){if(t=10,48===o){if(++i===r)return c.__zero();if(88===(o=e.charCodeAt(i))||120===o){if(t=16,++i===r)return null;o=e.charCodeAt(i)}else if(79===o||111===o){if(t=8,++i===r)return null;o=e.charCodeAt(i)}else if(66===o||98===o){if(t=2,++i===r)return null;o=e.charCodeAt(i)}}}else if(16===t&&48===o){if(++i===r)return c.__zero();if(88===(o=e.charCodeAt(i))||120===o){if(++i===r)return null;o=e.charCodeAt(i)}}if(0!=n&&10!==t)return null;for(;48===o;){if(++i===r)return c.__zero();o=e.charCodeAt(i)}var a=r-i,s=c.__kMaxBitsPerChar[t],u=c.__kBitsPerCharTableMultiplier-1;if(a>1073741824/s)return null;var l=new c(0|(29+(s*a+u>>>c.__kBitsPerCharTableShift))/30,!1),d=10>t?t:10,f=10>=c.__kBitsPerCharTableShift;var h=[],p=[],v=!1;do{for(var m=0,y=0;;){var g=void 0;if(o-48>>>0>>0>>0>>0>>c.__kBitsPerCharTableShift)/30;l.__inplaceMultiplyAdd(k,x,S)}while(!b)}if(i!==r){if(!c.__isWhitespace(o))return null;for(i++;i>>u-(o-=30))}if(0!==i){if(r>=e.length)throw new Error("implementation bug");e.__setDigit(r++,i)}for(;r>>1)+(85&r))>>>2)+(51&r))>>>4)+(15&r),o=t-1,a=e.__digit(n-1),s=0|(30*n-c.__clz30(a)+i-1)/i;if(e.sign&&s++,268435456>>m,f=30-m;f>=i;)u[l--]=c.__kConversionChars[d&o],d>>>=i,f-=i}var y=(d|a<>>i-f;0!==d;)u[l--]=c.__kConversionChars[d&o],d>>>=i;if(e.sign&&(u[l--]="-"),-1!=l)throw new Error("implementation bug");return u.join("")}},{key:"__toStringGeneric",value:function(e,t,n){var r=e.length;if(0===r)return"";if(1===r){var i=e.__unsignedDigit(0).toString(t);return!1===n&&e.sign&&(i="-"+i),i}var o,a,s=30*r-c.__clz30(e.__digit(r-1)),u=c.__kMaxBitsPerChar[t]-1,l=s*c.__kBitsPerCharTableMultiplier,d=1+(l=0|(l+=u-1)/u)>>1,f=c.exponentiate(c.__oneDigit(t,!1),c.__oneDigit(d,!1)),h=f.__unsignedDigit(0);if(1===f.length&&32767>=h){(o=new c(e.length,!1)).__initializeDigits();for(var p=0,v=2*e.length-1;0<=v;v--){var m=p<<15|e.__halfDigit(v);o.__setHalfDigit(v,0|m/h),p=0|m%h}a=p.toString(t)}else{var y=c.__absoluteDivLarge(e,f,!0,!0);o=y.quotient;var g=y.remainder.__trim();a=c.__toStringGeneric(g,t,!0)}o.__trim();for(var b=c.__toStringGeneric(o,t,!0);a.lengthr?c.__absoluteLess(n):0}},{key:"__compareToNumber",value:function(e,t){if(c.__isOneDigitInt(t)){var r=e.sign,i=0>t;if(r!==i)return c.__unequalSign(r);if(0===e.length){if(i)throw new Error("implementation bug");return 0===t?0:-1}if(1o?c.__absoluteGreater(r):at)return c.__unequalSign(n);if(0===t)throw new Error("implementation bug: should be handled elsewhere");if(0===e.length)return-1;c.__kBitConversionDouble[0]=t;var r=2047&c.__kBitConversionInts[1]>>>20;if(2047==r)throw new Error("implementation bug: handled elsewhere");var i=r-1023;if(0>i)return c.__absoluteGreater(n);var o=e.length,a=e.__digit(o-1),s=c.__clz30(a),u=30*o-s,l=i+1;if(ul)return c.__absoluteGreater(n);var d=1048576|1048575&c.__kBitConversionInts[1],f=c.__kBitConversionInts[0],h=20,p=29-s;if(p!==(0|(u-1)%30))throw new Error("implementation bug");var v,m=0;if(20>p){var y=h-p;m=y+32,v=d>>>y,d=d<<32-y|f>>>y,f<<=32-y}else if(20===p)m=32,v=d,d=f,f=0;else{var g=p-h;m=32-g,v=d<>>32-g,d=f<>>=0)>(v>>>=0))return c.__absoluteGreater(n);if(a>>2,d=d<<30|f>>>2,f<<=30):v=0;var w=e.__unsignedDigit(b);if(w>v)return c.__absoluteGreater(n);if(wt&&e.__unsignedDigit(0)===n(t):0===c.__compareToDouble(e,t)}},{key:"__comparisonResultToBool",value:function(e,t){return 0===t?0>e:1===t?0>=e:2===t?0t;case 3:return e>=t}if(c.__isBigInt(e)&&"string"==typeof t)return null!==(t=c.__fromString(t))&&c.__comparisonResultToBool(c.__compareToBigInt(e,t),n);if("string"==typeof e&&c.__isBigInt(t))return null!==(e=c.__fromString(e))&&c.__comparisonResultToBool(c.__compareToBigInt(e,t),n);if(e=c.__toNumeric(e),t=c.__toNumeric(t),c.__isBigInt(e)){if(c.__isBigInt(t))return c.__comparisonResultToBool(c.__compareToBigInt(e,t),n);if("number"!=typeof t)throw new Error("implementation bug");return c.__comparisonResultToBool(c.__compareToNumber(e,t),n)}if("number"!=typeof e)throw new Error("implementation bug");if(c.__isBigInt(t))return c.__comparisonResultToBool(c.__compareToNumber(t,e),2^n);if("number"!=typeof t)throw new Error("implementation bug");return 0===n?et:3===n?e>=t:void 0}},{key:"__absoluteAdd",value:function(e,t,n){if(e.length>>30,i.__setDigit(a,1073741823&s)}for(;a>>30,i.__setDigit(a,1073741823&u)}return a>>30,r.__setDigit(o,1073741823&a)}for(;o>>30,r.__setDigit(o,1073741823&s)}return r.__trim()}},{key:"__absoluteAddOne",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=e.length;null===n?n=new c(r,t):n.sign=t;for(var i=1,o=0;o>>30,n.__setDigit(o,1073741823&a)}return 0!=i&&n.__setDigitGrow(r,1),n}},{key:"__absoluteSubOne",value:function(e,t){for(var n=e.length,r=new c(t=t||n,!1),i=1,o=0;o>>30,r.__setDigit(o,1073741823&a)}if(0!=i)throw new Error("implementation bug");for(var s=n;s2&&void 0!==arguments[2]?arguments[2]:null,r=e.length,i=t.length,o=i;if(r2&&void 0!==arguments[2]?arguments[2]:null,r=e.length,i=t.length,o=i;r2&&void 0!==arguments[2]?arguments[2]:null,r=e.length,i=t.length,o=i;if(r2&&void 0!==arguments[2]?arguments[2]:null,r=e.length,i=t.length,o=i;if(rr?0:e.__unsignedDigit(r)>t.__unsignedDigit(r)?1:-1}},{key:"__multiplyAccumulate",value:function(e,t,n,r){if(0!==t){for(var i,o=32767&t,a=t>>>15,s=0,u=0,l=0;l>>15,p=c.__imul(f,o),v=c.__imul(f,a),m=c.__imul(h,o);s=(i+=u+p+s)>>>30,i&=1073741823,s+=(i+=((32767&v)<<15)+((32767&m)<<15))>>>30,u=c.__imul(h,a)+(v>>>15)+(m>>>15),n.__setDigit(r,1073741823&i)}for(;0!=s||0!==u;r++){var y=n.__digit(r);y+=s+u,u=0,s=y>>>30,n.__setDigit(r,1073741823&y)}}}},{key:"__internalMultiplyAdd",value:function(e,t,n,r,i){for(var o=n,a=0,s=0;s>>15,t),f=l+((32767&d)<<15)+a+o;o=f>>>30,a=d>>>15,i.__setDigit(s,1073741823&f)}if(i.length>r)for(i.__setDigit(r++,o+a);r2&&void 0!==arguments[2]?arguments[2]:null;null===n&&(n=new c(e.length,!1));for(var r,i=0,o=2*e.length-1;0<=o;o-=2){var a=0|(r=(i<<15|e.__halfDigit(o))>>>0)/t,s=0|(r=((i=0|r%t)<<15|e.__halfDigit(o-1))>>>0)/t;i=0|r%t,n.__setDigit(o>>>1,a<<15|s)}return n}},{key:"__absoluteModSmall",value:function(e,t){for(var n=0,r=2*e.length-1;0<=r;r--)n=0|((n<<15|e.__halfDigit(r))>>>0)%t;return n}},{key:"__absoluteDivLarge",value:function(e,t,n,r){var i=t.__halfDigitLength(),o=t.length,a=e.__halfDigitLength()-i,s=null;n&&(s=new c(a+2>>>1,!1)).__initializeDigits();var u=new c(i+2>>>1,!1);u.__initializeDigits();var l=c.__clz15(t.__halfDigit(i-1));0>>0;d=0|y/h;for(var g=0|y%h,b=t.__halfDigit(i-2),w=f.__halfDigit(v+i-2);c.__imul(d,b)>>>0>(g<<16|w)>>>0&&(d--,!(32767<(g+=h))););}c.__internalMultiplyAdd(t,d,0,o,u);var x=f.__inplaceSub(u,v,i+1);0!==x&&(x=f.__inplaceAdd(t,v,i),f.__setHalfDigit(v+i,32767&f.__halfDigit(v+i)+x),d--),n&&(1&v?p=d<<15:s.__setDigit(v>>>1,p|d))}if(r)return f.__inplaceRightShift(l),n?{quotient:s,remainder:f}:f;if(n)return s;throw new Error("unreachable")}},{key:"__clz15",value:function(e){return c.__clz30(e)-15}},{key:"__specialLeftShift",value:function(e,t,n){var r=e.length,i=new c(r+n,!1);if(0===t){for(var o=0;o>>30-t}return 0n)throw new RangeError("BigInt too big");var r=0|n/30,i=n%30,o=e.length,a=0!==i&&0!=e.__digit(o-1)>>>30-i,s=o+r+(a?1:0),u=new c(s,e.sign);if(0===i){for(var l=0;l>>30-i}if(a)u.__setDigit(o+r,d);else if(0!==d)throw new Error("implementation bug")}return u.__trim()}},{key:"__rightShiftByAbsolute",value:function(e,t){var n=e.length,r=e.sign,i=c.__toShiftAmount(t);if(0>i)return c.__rightShiftByMaximum(r);var o=0|i/30,a=i%30,s=n-o;if(0>=s)return c.__rightShiftByMaximum(r);var u=!1;if(r)if(0!=(e.__digit(o)&(1<>>a,p=n-o-1,v=0;v>>a}d.__setDigit(p,h)}return u&&(d=c.__absoluteAddOne(d,!0,d)),d.__trim()}},{key:"__rightShiftByMaximum",value:function(e){return e?c.__oneDigit(1,!0):c.__zero()}},{key:"__toShiftAmount",value:function(e){if(1c.__kMaxLengthBits?-1:t}},{key:"__toPrimitive",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";if("object"!=typeof e)return e;if(e.constructor===c)return e;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){var n=e[Symbol.toPrimitive];if(n){var r=n(t);if("object"!=typeof r)return r;throw new TypeError("Cannot convert object to primitive value")}}var i=e.valueOf;if(i){var o=i.call(e);if("object"!=typeof o)return o}var a=e.toString;if(a){var s=a.call(e);if("object"!=typeof s)return s}throw new TypeError("Cannot convert object to primitive value")}},{key:"__toNumeric",value:function(e){return c.__isBigInt(e)?e:+e}},{key:"__isBigInt",value:function(e){return"object"==typeof e&&null!==e&&e.constructor===c}},{key:"__truncateToNBits",value:function(e,t){for(var n=0|(e+29)/30,r=new c(n,t.sign),i=n-1,o=0;o>>s}return r.__setDigit(i,a),r.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(e,t,n){for(var r=Math.min,i=0|(e+29)/30,o=new c(i,n),a=0,s=i-1,u=0,l=r(s,t.length);a>>30,o.__setDigit(a,1073741823&d)}for(;a>>v)-u,f&=m-1}return o.__setDigit(s,f),o.__trim()}},{key:"__digitPow",value:function(e,t){for(var n=1;0>>=1,e*=e;return n}},{key:"__isOneDigitInt",value:function(e){return(1073741823&e)===e}}]),c}(c(Array));return f.__kMaxLength=33554432,f.__kMaxLengthBits=f.__kMaxLength<<5,f.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],f.__kBitsPerCharTableShift=5,f.__kBitsPerCharTableMultiplier=1<>>0)/t)},f.__imul=e||function(e,t){return 0|e*t},f}()},6198:function(e,t,n){e=n.nmd(e);var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object AsyncFunction]",s="[object Function]",u="[object GeneratorFunction]",c="[object Null]",l="[object Object]",d="[object Proxy]",f="[object Undefined]",h=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[o]=v["[object Array]"]=v["[object ArrayBuffer]"]=v["[object Boolean]"]=v["[object DataView]"]=v["[object Date]"]=v["[object Error]"]=v[s]=v["[object Map]"]=v["[object Number]"]=v[l]=v["[object RegExp]"]=v["[object Set]"]=v["[object String]"]=v["[object WeakMap]"]=!1;var m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,g=m||y||Function("return this")(),b=t&&!t.nodeType&&t,w=b&&e&&!e.nodeType&&e,x=w&&w.exports===b,k=x&&m.process,A=function(){try{var e=w&&w.require&&w.require("util").types;return e||k&&k.binding&&k.binding("util")}catch(t){}}(),_=A&&A.isTypedArray;var S,E,C=Array.prototype,T=Function.prototype,P=Object.prototype,R=g["__core-js_shared__"],O=T.toString,I=P.hasOwnProperty,M=function(){var e=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),j=P.toString,B=O.call(Object),N=RegExp("^"+O.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=x?g.Buffer:void 0,D=g.Symbol,F=g.Uint8Array,L=Z?Z.allocUnsafe:void 0,z=(S=Object.getPrototypeOf,E=Object,function(e){return S(E(e))}),U=Object.create,W=P.propertyIsEnumerable,H=C.splice,q=D?D.toStringTag:void 0,V=function(){try{var e=ge(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),G=Z?Z.isBuffer:void 0,Y=Math.max,K=Date.now,Q=ge(g,"Map"),J=ge(Object,"create"),X=function(){function e(){}return function(t){if(!Re(t))return{};if(U)return U(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function $(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},ee.prototype.set=function(e,t){var n=this.__data__,r=ae(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},te.prototype.clear=function(){this.size=0,this.__data__={hash:new $,map:new(Q||ee),string:new $}},te.prototype.delete=function(e){var t=ye(this,e).delete(e);return this.size-=t?1:0,t},te.prototype.get=function(e){return ye(this,e).get(e)},te.prototype.has=function(e){return ye(this,e).has(e)},te.prototype.set=function(e,t){var n=ye(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ne.prototype.clear=function(){this.__data__=new ee,this.size=0},ne.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ne.prototype.get=function(e){return this.__data__.get(e)},ne.prototype.has=function(e){return this.__data__.has(e)},ne.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ee){var r=n.__data__;if(!Q||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new te(r)}return n.set(e,t),this.size=n.size,this};var ue,ce=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[ue?a:++r];if(!1===t(i[s],s,i))break}return e};function le(e){return null==e?void 0===e?f:c:q&&q in Object(e)?function(e){var t=I.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(o){}var i=j.call(e);r&&(t?e[q]=n:delete e[q]);return i}(e):function(e){return j.call(e)}(e)}function de(e){return Oe(e)&&le(e)==o}function fe(e){return!(!Re(e)||function(e){return!!M&&M in e}(e))&&(Te(e)?N:h).test(function(e){if(null!=e){try{return O.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function he(e){if(!Re(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=we(e),n=[];for(var r in e)("constructor"!=r||!t&&I.call(e,r))&&n.push(r);return n}function pe(e,t,n,r,i){e!==t&&ce(t,(function(o,a){if(i||(i=new ne),Re(o))!function(e,t,n,r,i,o,a){var s=xe(e,n),u=xe(t,n),c=a.get(u);if(c)return void ie(e,n,c);var d=o?o(s,u,n+"",e,t,a):void 0,f=void 0===d;if(f){var h=Se(u),p=!h&&Ce(u),v=!h&&!p&&Ie(u);d=u,h||p||v?Se(s)?d=s:Oe(m=s)&&Ee(m)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(me);function Ae(e,t){return e===t||e!==e&&t!==t}var _e=de(function(){return arguments}())?de:function(e){return Oe(e)&&I.call(e,"callee")&&!W.call(e,"callee")},Se=Array.isArray;function Ee(e){return null!=e&&Pe(e.length)&&!Te(e)}var Ce=G||function(){return!1};function Te(e){if(!Re(e))return!1;var t=le(e);return t==s||t==u||t==a||t==d}function Pe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Re(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Oe(e){return null!=e&&"object"==typeof e}var Ie=_?function(e){return function(t){return e(t)}}(_):function(e){return Oe(e)&&Pe(e.length)&&!!v[le(e)]};function Me(e){return Ee(e)?re(e,!0):he(e)}var je,Be=(je=function(e,t,n,r){pe(e,t,n,r)},ve((function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=je.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(e,t,n){if(!Re(n))return!1;var r=typeof t;return!!("number"==r?Ee(n)&&be(t,n.length):"string"==r&&t in n)&&Ae(n[t],e)}(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n0})).join("&")},t.parseUrl=function(e,t){t=Object.assign({decode:!0},t);var n=c(e,"#"),r=i(n,2),o=r[0],a=r[1];return Object.assign({url:o.split("?")[0]||"",query:b(y(e),t)},t&&t.parseFragmentIdentifier&&a?{fragmentIdentifier:p(a,t)}:{})},t.stringifyUrl=function(e,n){n=Object.assign(r({encode:!0,strict:!0},d,!0),n);var i=m(e.url).split("?")[0]||"",o=t.extract(e.url),a=t.parse(o,{sort:!1}),s=Object.assign(a,e.query),u=t.stringify(s,n);u&&(u="?".concat(u));var c=function(e){var t="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(c="#".concat(n[d]?h(e.fragmentIdentifier,n):e.fragmentIdentifier)),"".concat(i).concat(u).concat(c)},t.pick=function(e,n,i){i=Object.assign(r({parseFragmentIdentifier:!0},d,!1),i);var o=t.parseUrl(e,i),a=o.url,s=o.query,u=o.fragmentIdentifier;return t.stringifyUrl({url:a,query:l(s,n),fragmentIdentifier:u},i)},t.exclude=function(e,n,r){var i=Array.isArray(n)?function(e){return!n.includes(e)}:function(e,t){return!n(e,t)};return t.pick(e,i,r)}},173:function(e,t,n){"use strict";var r,i=n(2791),o=(r=i)&&"object"===typeof r&&"default"in r?r.default:r,a=n(8821),s=new a,u=s.getBrowser(),c=s.getCPU(),l=s.getDevice(),d=s.getEngine(),f=s.getOS(),h=s.getUA(),p=function(e){return s.setUA(e)},v=function(e){if(e){var t=new a(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}console.error("No userAgent string was provided")},m=Object.freeze({ClientUAInstance:s,browser:u,cpu:c,device:l,engine:d,os:f,ua:h,setUa:p,parseUserAgent:v});function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){return g="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},g(e)}function b(e,t){for(var n=0;n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"none")},F=function(){return!("undefined"===typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},L=function(e){var t=F();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},z=function(e,t,n,r){return function(e){for(var t=1;t1)&&!window.MSStream},Se=function(){return L("iPad")},Ee=function(){return L("iPhone")},Ce=function(){return L("iPod")},Te=function(e){return D(e)};function Pe(e){var t=e||m,n=t.device,r=t.browser,i=t.os,o=t.engine,a=t.ua;return{isSmartTV:q(n),isConsole:Y(n),isWearable:G(n),isEmbedded:K(n),isMobileSafari:fe(r)||Se(),isChromium:ue(r),isMobile:H(n)||Se(),isMobileOnly:U(n),isTablet:W(n)||Se(),isBrowser:V(n),isDesktop:V(n),isAndroid:$(i),isWinPhone:ne(i),isIOS:re(i)||Se(),isChrome:ae(r),isFirefox:se(r),isSafari:de(r),isOpera:he(r),isIE:pe(r),osVersion:ie(i),osName:oe(i),fullBrowserVersion:ye(r),browserVersion:ge(r),browserName:be(r),mobileVendor:Q(n),mobileModel:J(n),engineName:we(o),engineVersion:xe(o),getUA:Te(a),isEdge:ce(r)||Ae(a),isYandex:le(r),deviceType:X(n),isIOS13:_e(),isIPad13:Se(),isIPhone13:Ee(),isIPod13:Ce(),isElectron:ke(),isEdgeChromium:Ae(a),isLegacyEdge:ce(r)&&!Ae(a),isWindows:ee(i),isMacOs:te(i),isMIUI:ve(r),isSamsungBrowser:me(r)}}var Re=q(l),Oe=Y(l),Ie=G(l),Me=K(l),je=fe(u)||Se(),Be=ue(u),Ne=H(l)||Se(),Ze=U(l),De=W(l)||Se(),Fe=V(l),Le=V(l),ze=$(f),Ue=ne(f),We=re(f)||Se(),He=ae(u),qe=se(u),Ve=de(u),Ge=he(u),Ye=pe(u),Ke=ie(f),Qe=oe(f),Je=ye(u),Xe=ge(u),$e=be(u),et=Q(l),tt=J(l),nt=we(d),rt=xe(d),it=Te(h),ot=ce(u)||Ae(h),at=le(u),st=X(l),ut=_e(),ct=Se(),lt=Ee(),dt=Ce(),ft=ke(),ht=Ae(h),pt=ce(u)&&!Ae(h),vt=ee(f),mt=te(f),yt=ve(u),gt=me(u);function bt(e){var t=e||window.navigator.userAgent;return v(t)}t.Dt=ze,t.tq=Ne},8821:function(e,t,n){var r;!function(i,o){"use strict";var a="function",s="undefined",u="object",c="string",l="major",d="model",f="name",h="type",p="vendor",v="version",m="architecture",y="console",g="mobile",b="tablet",w="smarttv",x="wearable",k="embedded",A="Amazon",_="Apple",S="ASUS",E="BlackBerry",C="Browser",T="Chrome",P="Firefox",R="Google",O="Huawei",I="LG",M="Microsoft",j="Motorola",B="Opera",N="Samsung",Z="Sharp",D="Sony",F="Xiaomi",L="Zebra",z="Facebook",U="Chromium OS",W="Mac OS",H=function(e){for(var t={},n=0;n0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):o:this[s[0]]=l?s[1].call(this,l,s[2]):o:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):o):this[s]=l||o;d+=2}},K=function(e,t){for(var n in t)if(typeof t[n]===u&&t[n].length>0){for(var r=0;r2&&(e[d]="iPad",e[h]=b),e},this.getEngine=function(){var e={};return e[f]=o,e[v]=o,Y.call(e,y,x.engine),e},this.getOS=function(){var e={};return e[f]=o,e[v]=o,Y.call(e,y,x.os),k&&!e[f]&&w&&"Unknown"!=w.platform&&(e[f]=w.platform.replace(/chrome os/i,U).replace(/macos/i,W)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return y},this.setUA=function(e){return y=typeof e===c&&e.length>350?G(e,350):e,this},this.setUA(y),this};X.VERSION="1.0.35",X.BROWSER=H([f,v,l]),X.CPU=H([m]),X.DEVICE=H([d,p,h,y,g,w,b,x,k]),X.ENGINE=X.OS=H([f,v]),typeof t!==s?(e.exports&&(t=e.exports=X),t.UAParser=X):n.amdO?(r=function(){return X}.call(t,n,t,e))===o||(e.exports=r):typeof i!==s&&(i.UAParser=X);var $=typeof i!==s&&(i.jQuery||i.Zepto);if($&&!$.ua){var ee=new X;$.ua=ee.getResult(),$.ua.get=function(){return ee.getUA()},$.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var n in t)$.ua[n]=t[n]}}}("object"===typeof window?window:this)},4463:function(e,t,n){"use strict";var r=n(2791),i=n(5296);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n